stripe 13.6.0.pre.beta.1 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +699 -1457
- data/OPENAPI_VERSION +1 -1
- data/README.md +29 -0
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +2 -0
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/errors.rb +0 -7
- data/lib/stripe/object_types.rb +0 -26
- data/lib/stripe/resources/account.rb +83 -614
- data/lib/stripe/resources/account_session.rb +1 -247
- data/lib/stripe/resources/apple_pay_domain.rb +0 -9
- data/lib/stripe/resources/application_fee.rb +1 -10
- data/lib/stripe/resources/balance.rb +0 -9
- data/lib/stripe/resources/balance_transaction.rb +2 -11
- data/lib/stripe/resources/bank_account.rb +1 -1
- data/lib/stripe/resources/billing/alert.rb +0 -9
- data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -48
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -9
- data/lib/stripe/resources/billing/credit_grant.rb +4 -13
- data/lib/stripe/resources/billing/meter.rb +1 -10
- data/lib/stripe/resources/billing_portal/configuration.rb +0 -9
- data/lib/stripe/resources/card.rb +2 -4
- data/lib/stripe/resources/charge.rb +35 -1457
- data/lib/stripe/resources/checkout/session.rb +100 -293
- data/lib/stripe/resources/climate/order.rb +0 -9
- data/lib/stripe/resources/climate/product.rb +0 -9
- data/lib/stripe/resources/climate/supplier.rb +0 -9
- data/lib/stripe/resources/confirmation_token.rb +74 -156
- data/lib/stripe/resources/country_spec.rb +0 -9
- data/lib/stripe/resources/coupon.rb +0 -9
- data/lib/stripe/resources/credit_note.rb +14 -35
- data/lib/stripe/resources/credit_note_line_item.rb +14 -12
- data/lib/stripe/resources/customer.rb +12 -28
- data/lib/stripe/resources/customer_balance_transaction.rb +3 -1
- data/lib/stripe/resources/dispute.rb +0 -9
- data/lib/stripe/resources/entitlements/active_entitlement.rb +0 -9
- data/lib/stripe/resources/entitlements/feature.rb +0 -9
- data/lib/stripe/resources/event.rb +0 -40
- data/lib/stripe/resources/exchange_rate.rb +0 -9
- data/lib/stripe/resources/file.rb +0 -9
- data/lib/stripe/resources/file_link.rb +0 -9
- data/lib/stripe/resources/financial_connections/account.rb +0 -23
- data/lib/stripe/resources/financial_connections/session.rb +1 -65
- data/lib/stripe/resources/financial_connections/transaction.rb +0 -9
- data/lib/stripe/resources/forwarding/request.rb +0 -9
- data/lib/stripe/resources/identity/verification_report.rb +0 -9
- data/lib/stripe/resources/identity/verification_session.rb +0 -9
- data/lib/stripe/resources/invoice.rb +225 -5120
- data/lib/stripe/resources/invoice_item.rb +65 -110
- data/lib/stripe/resources/invoice_line_item.rb +106 -89
- data/lib/stripe/resources/invoice_payment.rb +53 -4
- data/lib/stripe/resources/invoice_rendering_template.rb +0 -12
- data/lib/stripe/resources/issuing/authorization.rb +0 -9
- data/lib/stripe/resources/issuing/card.rb +0 -9
- data/lib/stripe/resources/issuing/cardholder.rb +1 -11
- data/lib/stripe/resources/issuing/dispute.rb +0 -9
- data/lib/stripe/resources/issuing/personalization_design.rb +0 -9
- data/lib/stripe/resources/issuing/physical_bundle.rb +0 -9
- data/lib/stripe/resources/issuing/token.rb +0 -9
- data/lib/stripe/resources/issuing/transaction.rb +0 -15
- data/lib/stripe/resources/line_item.rb +0 -28
- data/lib/stripe/resources/mandate.rb +6 -33
- data/lib/stripe/resources/payment_intent.rb +642 -4975
- data/lib/stripe/resources/payment_link.rb +84 -15
- data/lib/stripe/resources/payment_method.rb +74 -187
- data/lib/stripe/resources/payment_method_configuration.rb +87 -214
- data/lib/stripe/resources/payment_method_domain.rb +9 -18
- data/lib/stripe/resources/payout.rb +0 -9
- data/lib/stripe/resources/person.rb +9 -9
- data/lib/stripe/resources/plan.rb +0 -15
- data/lib/stripe/resources/price.rb +2 -47
- data/lib/stripe/resources/product.rb +0 -68
- data/lib/stripe/resources/promotion_code.rb +0 -9
- data/lib/stripe/resources/quote.rb +8 -2037
- data/lib/stripe/resources/radar/early_fraud_warning.rb +0 -9
- data/lib/stripe/resources/radar/value_list.rb +0 -9
- data/lib/stripe/resources/radar/value_list_item.rb +0 -9
- data/lib/stripe/resources/refund.rb +13 -18
- data/lib/stripe/resources/reporting/report_run.rb +0 -9
- data/lib/stripe/resources/reporting/report_type.rb +0 -9
- data/lib/stripe/resources/review.rb +2 -11
- data/lib/stripe/resources/setup_attempt.rb +11 -16
- data/lib/stripe/resources/setup_intent.rb +158 -540
- data/lib/stripe/resources/shipping_rate.rb +0 -9
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +0 -9
- data/lib/stripe/resources/source.rb +0 -41
- data/lib/stripe/resources/subscription.rb +14 -385
- data/lib/stripe/resources/subscription_item.rb +9 -134
- data/lib/stripe/resources/subscription_schedule.rb +14 -1135
- data/lib/stripe/resources/tax/calculation.rb +0 -9
- data/lib/stripe/resources/tax/registration.rb +1 -10
- data/lib/stripe/resources/tax/settings.rb +0 -9
- data/lib/stripe/resources/tax/transaction.rb +0 -9
- data/lib/stripe/resources/tax_code.rb +0 -9
- data/lib/stripe/resources/tax_id.rb +0 -9
- data/lib/stripe/resources/tax_rate.rb +0 -9
- data/lib/stripe/resources/terminal/configuration.rb +214 -14
- data/lib/stripe/resources/terminal/location.rb +0 -9
- data/lib/stripe/resources/terminal/reader.rb +0 -408
- data/lib/stripe/resources/test_helpers/test_clock.rb +0 -9
- data/lib/stripe/resources/token.rb +1 -10
- data/lib/stripe/resources/topup.rb +0 -9
- data/lib/stripe/resources/transfer.rb +0 -9
- data/lib/stripe/resources/treasury/credit_reversal.rb +0 -9
- data/lib/stripe/resources/treasury/debit_reversal.rb +0 -9
- data/lib/stripe/resources/treasury/financial_account.rb +4 -32
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
- data/lib/stripe/resources/treasury/inbound_transfer.rb +0 -9
- data/lib/stripe/resources/treasury/outbound_payment.rb +0 -9
- data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -46
- data/lib/stripe/resources/treasury/received_credit.rb +1 -47
- data/lib/stripe/resources/treasury/received_debit.rb +1 -49
- data/lib/stripe/resources/treasury/transaction.rb +0 -9
- data/lib/stripe/resources/treasury/transaction_entry.rb +0 -9
- data/lib/stripe/resources/v2/event.rb +1 -0
- data/lib/stripe/resources/v2/event_destination.rb +1 -0
- data/lib/stripe/resources/webhook_endpoint.rb +0 -9
- data/lib/stripe/resources.rb +0 -25
- data/lib/stripe/services/account_external_account_service.rb +1 -1
- data/lib/stripe/services/account_service.rb +68 -509
- data/lib/stripe/services/account_session_service.rb +1 -217
- data/lib/stripe/services/balance_transaction_service.rb +1 -1
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +2 -2
- data/lib/stripe/services/billing/credit_grant_service.rb +2 -2
- data/lib/stripe/services/billing/meter_service.rb +1 -1
- data/lib/stripe/services/charge_service.rb +1 -1335
- data/lib/stripe/services/checkout/session_service.rb +60 -168
- data/lib/stripe/services/credit_note_preview_lines_service.rb +0 -4
- data/lib/stripe/services/credit_note_service.rb +0 -8
- data/lib/stripe/services/customer_service.rb +0 -16
- data/lib/stripe/services/financial_connections/account_service.rb +1 -3
- data/lib/stripe/services/financial_connections/session_service.rb +1 -30
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/invoice_item_service.rb +34 -88
- data/lib/stripe/services/invoice_line_item_service.rb +25 -41
- data/lib/stripe/services/invoice_payment_service.rb +33 -5
- data/lib/stripe/services/invoice_service.rb +210 -3147
- data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
- data/lib/stripe/services/issuing/transaction_service.rb +0 -4
- data/lib/stripe/services/issuing_service.rb +1 -5
- data/lib/stripe/services/payment_intent_service.rb +568 -4513
- data/lib/stripe/services/payment_link_service.rb +59 -6
- data/lib/stripe/services/payment_method_configuration_service.rb +62 -146
- data/lib/stripe/services/payment_method_domain_service.rb +6 -6
- data/lib/stripe/services/payment_method_service.rb +49 -119
- data/lib/stripe/services/plan_service.rb +0 -4
- data/lib/stripe/services/price_service.rb +2 -25
- data/lib/stripe/services/product_service.rb +0 -38
- data/lib/stripe/services/quote_service.rb +9 -1716
- data/lib/stripe/services/setup_intent_service.rb +158 -492
- data/lib/stripe/services/subscription_item_service.rb +5 -111
- data/lib/stripe/services/subscription_schedule_service.rb +14 -1005
- data/lib/stripe/services/subscription_service.rb +13 -323
- data/lib/stripe/services/tax/registration_service.rb +1 -1
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/configuration_service.rb +170 -4
- data/lib/stripe/services/terminal/reader_service.rb +0 -177
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +49 -87
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -43
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
- data/lib/stripe/services/token_service.rb +1 -1
- data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
- data/lib/stripe/services/treasury/financial_account_service.rb +3 -17
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
- data/lib/stripe/services/v1_services.rb +2 -8
- data/lib/stripe/services/v2/core/event_destination_service.rb +1 -4
- data/lib/stripe/services/v2/core/event_service.rb +1 -4
- data/lib/stripe/services.rb +0 -27
- data/lib/stripe/stripe_client.rb +1 -0
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/util.rb +1 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -45
- data/rbi/stripe/resources/account.rbi +1131 -1479
- data/rbi/stripe/resources/account_link.rbi +9 -9
- data/rbi/stripe/resources/account_session.rbi +118 -367
- data/rbi/stripe/resources/apple_pay_domain.rbi +8 -15
- data/rbi/stripe/resources/application_fee.rbi +15 -20
- data/rbi/stripe/resources/apps/secret.rbi +20 -20
- data/rbi/stripe/resources/balance.rbi +0 -7
- data/rbi/stripe/resources/balance_transaction.rbi +19 -24
- data/rbi/stripe/resources/bank_account.rbi +1 -1
- data/rbi/stripe/resources/billing/alert.rbi +23 -28
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -53
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +6 -13
- data/rbi/stripe/resources/billing/credit_grant.rbi +30 -37
- data/rbi/stripe/resources/billing/meter.rbi +19 -26
- data/rbi/stripe/resources/billing/meter_event.rbi +4 -4
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +5 -5
- data/rbi/stripe/resources/billing_portal/configuration.rbi +86 -81
- data/rbi/stripe/resources/billing_portal/session.rbi +31 -27
- data/rbi/stripe/resources/card.rbi +2 -5
- data/rbi/stripe/resources/charge.rbi +136 -1576
- data/rbi/stripe/resources/checkout/session.rbi +631 -748
- data/rbi/stripe/resources/climate/order.rbi +20 -25
- data/rbi/stripe/resources/climate/product.rbi +5 -12
- data/rbi/stripe/resources/climate/supplier.rbi +5 -12
- data/rbi/stripe/resources/confirmation_token.rbi +274 -268
- data/rbi/stripe/resources/country_spec.rbi +5 -12
- data/rbi/stripe/resources/coupon.rbi +34 -39
- data/rbi/stripe/resources/credit_note.rbi +134 -146
- data/rbi/stripe/resources/credit_note_line_item.rbi +20 -18
- data/rbi/stripe/resources/customer.rbi +172 -164
- data/rbi/stripe/resources/customer_balance_transaction.rbi +4 -1
- data/rbi/stripe/resources/customer_session.rbi +19 -15
- data/rbi/stripe/resources/dispute.rbi +92 -95
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +5 -12
- data/rbi/stripe/resources/entitlements/feature.rbi +15 -22
- data/rbi/stripe/resources/ephemeral_key.rbi +2 -2
- data/rbi/stripe/resources/event.rbi +16 -60
- data/rbi/stripe/resources/exchange_rate.rbi +5 -12
- data/rbi/stripe/resources/file.rbi +20 -25
- data/rbi/stripe/resources/file_link.rbi +23 -28
- data/rbi/stripe/resources/financial_connections/account.rbi +25 -44
- data/rbi/stripe/resources/financial_connections/session.rbi +12 -75
- data/rbi/stripe/resources/financial_connections/transaction.rbi +16 -19
- data/rbi/stripe/resources/forwarding/request.rbi +21 -24
- data/rbi/stripe/resources/identity/verification_report.rbi +18 -21
- data/rbi/stripe/resources/identity/verification_session.rbi +60 -61
- data/rbi/stripe/resources/invoice.rbi +723 -5918
- data/rbi/stripe/resources/invoice_item.rbi +138 -177
- data/rbi/stripe/resources/invoice_line_item.rbi +199 -264
- data/rbi/stripe/resources/invoice_payment.rbi +51 -7
- data/rbi/stripe/resources/invoice_rendering_template.rbi +10 -20
- data/rbi/stripe/resources/issuing/authorization.rbi +216 -199
- data/rbi/stripe/resources/issuing/card.rbi +104 -101
- data/rbi/stripe/resources/issuing/cardholder.rbi +120 -108
- data/rbi/stripe/resources/issuing/dispute.rbi +164 -151
- data/rbi/stripe/resources/issuing/personalization_design.rbi +61 -56
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +7 -14
- data/rbi/stripe/resources/issuing/token.rbi +16 -21
- data/rbi/stripe/resources/issuing/transaction.rbi +180 -176
- data/rbi/stripe/resources/line_item.rbi +0 -36
- data/rbi/stripe/resources/mandate.rbi +8 -40
- data/rbi/stripe/resources/payment_intent.rbi +2252 -6482
- data/rbi/stripe/resources/payment_link.rbi +346 -211
- data/rbi/stripe/resources/payment_method.rbi +226 -330
- data/rbi/stripe/resources/payment_method_configuration.rbi +602 -685
- data/rbi/stripe/resources/payment_method_domain.rbi +26 -31
- data/rbi/stripe/resources/payout.rbi +43 -42
- data/rbi/stripe/resources/person.rbi +9 -9
- data/rbi/stripe/resources/plan.rbi +51 -63
- data/rbi/stripe/resources/price.rbi +114 -151
- data/rbi/stripe/resources/product.rbi +90 -152
- data/rbi/stripe/resources/promotion_code.rbi +42 -47
- data/rbi/stripe/resources/quote.rbi +168 -2231
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +17 -20
- data/rbi/stripe/resources/radar/value_list.rbi +24 -29
- data/rbi/stripe/resources/radar/value_list_item.rbi +18 -21
- data/rbi/stripe/resources/refund.rbi +52 -51
- data/rbi/stripe/resources/reporting/report_run.rbi +27 -30
- data/rbi/stripe/resources/reporting/report_type.rbi +2 -9
- data/rbi/stripe/resources/review.rbi +17 -22
- data/rbi/stripe/resources/setup_attempt.rbi +25 -32
- data/rbi/stripe/resources/setup_intent.rbi +900 -1102
- data/rbi/stripe/resources/shipping_rate.rbi +41 -46
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +5 -12
- data/rbi/stripe/resources/source.rbi +132 -179
- data/rbi/stripe/resources/subscription.rbi +363 -707
- data/rbi/stripe/resources/subscription_item.rbi +69 -177
- data/rbi/stripe/resources/subscription_schedule.rbi +289 -1447
- data/rbi/stripe/resources/tax/calculation.rbi +43 -48
- data/rbi/stripe/resources/tax/registration.rbi +217 -170
- data/rbi/stripe/resources/tax/settings.rbi +14 -21
- data/rbi/stripe/resources/tax/transaction.rbi +20 -25
- data/rbi/stripe/resources/tax_code.rbi +5 -12
- data/rbi/stripe/resources/tax_id.rbi +15 -22
- data/rbi/stripe/resources/tax_rate.rbi +34 -39
- data/rbi/stripe/resources/terminal/configuration.rbi +457 -212
- data/rbi/stripe/resources/terminal/connection_token.rbi +3 -3
- data/rbi/stripe/resources/terminal/location.rbi +28 -35
- data/rbi/stripe/resources/terminal/reader.rbi +71 -441
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +12 -17
- data/rbi/stripe/resources/token.rbi +288 -263
- data/rbi/stripe/resources/topup.rbi +35 -38
- data/rbi/stripe/resources/transfer.rbi +27 -32
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +10 -17
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +11 -18
- data/rbi/stripe/resources/treasury/financial_account.rbi +125 -130
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -3
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +22 -29
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +82 -79
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +44 -86
- data/rbi/stripe/resources/treasury/received_credit.rbi +18 -64
- data/rbi/stripe/resources/treasury/received_debit.rbi +17 -66
- data/rbi/stripe/resources/treasury/transaction.rbi +27 -28
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +25 -26
- data/rbi/stripe/resources/v2/amount.rbi +1 -1
- data/rbi/stripe/resources/v2/event.rbi +1 -0
- data/rbi/stripe/resources/v2/event_destination.rbi +1 -0
- data/rbi/stripe/resources/webhook_endpoint.rbi +18 -25
- data/rbi/stripe/services/account_capability_service.rbi +7 -7
- data/rbi/stripe/services/account_external_account_service.rbi +52 -52
- data/rbi/stripe/services/account_link_service.rbi +9 -9
- data/rbi/stripe/services/account_login_link_service.rbi +2 -2
- data/rbi/stripe/services/account_person_service.rbi +221 -201
- data/rbi/stripe/services/account_service.rbi +1221 -1345
- data/rbi/stripe/services/account_session_service.rbi +115 -346
- data/rbi/stripe/services/apple_pay_domain_service.rbi +10 -10
- data/rbi/stripe/services/application_fee_refund_service.rbi +16 -14
- data/rbi/stripe/services/application_fee_service.rbi +18 -14
- data/rbi/stripe/services/apps/secret_service.rbi +20 -20
- data/rbi/stripe/services/balance_service.rbi +2 -2
- data/rbi/stripe/services/balance_transaction_service.rbi +22 -18
- data/rbi/stripe/services/billing/alert_service.rbi +23 -23
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +10 -10
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +8 -8
- data/rbi/stripe/services/billing/credit_grant_service.rbi +32 -30
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +7 -5
- data/rbi/stripe/services/billing/meter_event_service.rbi +4 -4
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +6 -6
- data/rbi/stripe/services/billing/meter_service.rbi +21 -21
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +90 -76
- data/rbi/stripe/services/billing_portal/session_service.rbi +29 -27
- data/rbi/stripe/services/charge_service.rbi +96 -1464
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +5 -5
- data/rbi/stripe/services/checkout/session_service.rbi +555 -591
- data/rbi/stripe/services/climate/order_service.rbi +22 -20
- data/rbi/stripe/services/climate/product_service.rbi +7 -7
- data/rbi/stripe/services/climate/supplier_service.rbi +7 -7
- data/rbi/stripe/services/confirmation_token_service.rbi +2 -2
- data/rbi/stripe/services/country_spec_service.rbi +7 -7
- data/rbi/stripe/services/coupon_service.rbi +40 -34
- data/rbi/stripe/services/credit_note_line_item_service.rbi +5 -5
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +35 -35
- data/rbi/stripe/services/credit_note_service.rbi +81 -85
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +15 -15
- data/rbi/stripe/services/customer_cash_balance_service.rbi +7 -7
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +7 -7
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +5 -5
- data/rbi/stripe/services/customer_payment_method_service.rbi +9 -9
- data/rbi/stripe/services/customer_payment_source_service.rbi +48 -44
- data/rbi/stripe/services/customer_service.rbi +143 -139
- data/rbi/stripe/services/customer_session_service.rbi +21 -15
- data/rbi/stripe/services/customer_tax_id_service.rbi +9 -9
- data/rbi/stripe/services/dispute_service.rbi +92 -90
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +7 -7
- data/rbi/stripe/services/entitlements/feature_service.rbi +17 -17
- data/rbi/stripe/services/ephemeral_key_service.rbi +8 -8
- data/rbi/stripe/services/event_service.rbi +18 -16
- data/rbi/stripe/services/exchange_rate_service.rbi +7 -7
- data/rbi/stripe/services/file_link_service.rbi +25 -23
- data/rbi/stripe/services/file_service.rbi +22 -20
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +5 -5
- data/rbi/stripe/services/financial_connections/account_service.rbi +22 -21
- data/rbi/stripe/services/financial_connections/session_service.rbi +16 -39
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +16 -14
- data/rbi/stripe/services/financial_connections_service.rbi +0 -1
- data/rbi/stripe/services/forwarding/request_service.rbi +21 -19
- data/rbi/stripe/services/identity/verification_report_service.rbi +18 -16
- data/rbi/stripe/services/identity/verification_session_service.rbi +62 -56
- data/rbi/stripe/services/invoice_item_service.rbi +99 -155
- data/rbi/stripe/services/invoice_line_item_service.rbi +71 -82
- data/rbi/stripe/services/invoice_payment_service.rbi +39 -12
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +13 -13
- data/rbi/stripe/services/invoice_service.rbi +679 -3799
- data/rbi/stripe/services/issuing/authorization_service.rbi +32 -26
- data/rbi/stripe/services/issuing/card_service.rbi +102 -86
- data/rbi/stripe/services/issuing/cardholder_service.rbi +122 -103
- data/rbi/stripe/services/issuing/dispute_service.rbi +152 -146
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +52 -42
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +9 -9
- data/rbi/stripe/services/issuing/token_service.rbi +20 -16
- data/rbi/stripe/services/issuing/transaction_service.rbi +25 -23
- data/rbi/stripe/services/issuing_service.rbi +0 -3
- data/rbi/stripe/services/mandate_service.rbi +2 -2
- data/rbi/stripe/services/payment_intent_service.rbi +2312 -6081
- data/rbi/stripe/services/payment_link_line_item_service.rbi +5 -5
- data/rbi/stripe/services/payment_link_service.rbi +303 -201
- data/rbi/stripe/services/payment_method_configuration_service.rbi +616 -620
- data/rbi/stripe/services/payment_method_domain_service.rbi +25 -23
- data/rbi/stripe/services/payment_method_service.rbi +192 -249
- data/rbi/stripe/services/payout_service.rbi +45 -37
- data/rbi/stripe/services/plan_service.rbi +53 -55
- data/rbi/stripe/services/price_service.rbi +124 -129
- data/rbi/stripe/services/product_feature_service.rbi +9 -9
- data/rbi/stripe/services/product_service.rbi +94 -122
- data/rbi/stripe/services/promotion_code_service.rbi +46 -42
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +5 -5
- data/rbi/stripe/services/quote_line_item_service.rbi +5 -5
- data/rbi/stripe/services/quote_service.rbi +159 -1863
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +17 -15
- data/rbi/stripe/services/radar/value_list_item_service.rbi +20 -16
- data/rbi/stripe/services/radar/value_list_service.rbi +28 -24
- data/rbi/stripe/services/refund_service.rbi +37 -33
- data/rbi/stripe/services/reporting/report_run_service.rbi +29 -25
- data/rbi/stripe/services/reporting/report_type_service.rbi +4 -4
- data/rbi/stripe/services/review_service.rbi +17 -15
- data/rbi/stripe/services/setup_attempt_service.rbi +13 -11
- data/rbi/stripe/services/setup_intent_service.rbi +1028 -1062
- data/rbi/stripe/services/shipping_rate_service.rbi +47 -41
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +7 -7
- data/rbi/stripe/services/source_service.rbi +149 -133
- data/rbi/stripe/services/source_transaction_service.rbi +5 -5
- data/rbi/stripe/services/subscription_item_service.rbi +61 -159
- data/rbi/stripe/services/subscription_schedule_service.rbi +289 -1305
- data/rbi/stripe/services/subscription_service.rbi +366 -640
- data/rbi/stripe/services/tax/calculation_line_item_service.rbi +5 -5
- data/rbi/stripe/services/tax/calculation_service.rbi +40 -38
- data/rbi/stripe/services/tax/registration_service.rbi +337 -165
- data/rbi/stripe/services/tax/settings_service.rbi +16 -16
- data/rbi/stripe/services/tax/transaction_line_item_service.rbi +5 -5
- data/rbi/stripe/services/tax/transaction_service.rbi +19 -15
- data/rbi/stripe/services/tax_code_service.rbi +7 -7
- data/rbi/stripe/services/tax_id_service.rbi +17 -17
- data/rbi/stripe/services/tax_rate_service.rbi +36 -34
- data/rbi/stripe/services/tax_service.rbi +0 -2
- data/rbi/stripe/services/terminal/configuration_service.rbi +464 -204
- data/rbi/stripe/services/terminal/connection_token_service.rbi +3 -3
- data/rbi/stripe/services/terminal/location_service.rbi +30 -30
- data/rbi/stripe/services/terminal/reader_service.rbi +57 -226
- data/rbi/stripe/services/terminal_service.rbi +0 -1
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +157 -198
- data/rbi/stripe/services/test_helpers/customer_service.rbi +3 -3
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +180 -168
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +10 -10
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +11 -9
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +151 -145
- data/rbi/stripe/services/test_helpers/refund_service.rbi +2 -2
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +10 -39
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +14 -12
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +9 -9
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +20 -18
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +20 -18
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +11 -38
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +11 -38
- data/rbi/stripe/services/token_service.rbi +292 -258
- data/rbi/stripe/services/topup_service.rbi +37 -33
- data/rbi/stripe/services/transfer_reversal_service.rbi +18 -16
- data/rbi/stripe/services/transfer_service.rbi +29 -27
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +12 -12
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +13 -13
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +23 -26
- data/rbi/stripe/services/treasury/financial_account_service.rbi +92 -96
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +15 -15
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +60 -56
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +24 -49
- data/rbi/stripe/services/treasury/received_credit_service.rbi +11 -9
- data/rbi/stripe/services/treasury/received_debit_service.rbi +8 -8
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +25 -21
- data/rbi/stripe/services/treasury/transaction_service.rbi +31 -23
- data/rbi/stripe/services/v1_services.rbi +1 -7
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +3 -3
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +3 -3
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +21 -24
- data/rbi/stripe/services/v2/core/event_service.rbi +3 -6
- data/rbi/stripe/services/webhook_endpoint_service.rbi +20 -20
- metadata +4 -109
- data/lib/stripe/request_signing_authenticator.rb +0 -79
- data/lib/stripe/resources/account_notice.rb +0 -132
- data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
- data/lib/stripe/resources/capital/financing_offer.rb +0 -188
- data/lib/stripe/resources/capital/financing_summary.rb +0 -64
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -123
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
- data/lib/stripe/resources/financial_connections/institution.rb +0 -99
- data/lib/stripe/resources/gift_cards/card.rb +0 -217
- data/lib/stripe/resources/gift_cards/transaction.rb +0 -281
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -611
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -84
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -95
- data/lib/stripe/resources/issuing/settlement.rb +0 -49
- data/lib/stripe/resources/margin.rb +0 -124
- data/lib/stripe/resources/order.rb +0 -2868
- data/lib/stripe/resources/payment_attempt_record.rb +0 -184
- data/lib/stripe/resources/payment_record.rb +0 -715
- data/lib/stripe/resources/quote_line.rb +0 -274
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -652
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -362
- data/lib/stripe/resources/tax/association.rb +0 -89
- data/lib/stripe/resources/tax/form.rb +0 -220
- data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -40
- data/lib/stripe/resources/usage_record.rb +0 -30
- data/lib/stripe/resources/usage_record_summary.rb +0 -33
- data/lib/stripe/services/account_notice_service.rb +0 -101
- data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
- data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
- data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
- data/lib/stripe/services/capital_service.rb +0 -15
- data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +0 -37
- data/lib/stripe/services/financial_connections/institution_service.rb +0 -57
- data/lib/stripe/services/gift_cards/card_service.rb +0 -170
- data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
- data/lib/stripe/services/gift_cards_service.rb +0 -14
- data/lib/stripe/services/invoice_upcoming_lines_service.rb +0 -1881
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
- data/lib/stripe/services/margin_service.rb +0 -119
- data/lib/stripe/services/order_line_item_service.rb +0 -35
- data/lib/stripe/services/order_service.rb +0 -2268
- data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
- data/lib/stripe/services/payment_record_service.rb +0 -542
- data/lib/stripe/services/quote_line_service.rb +0 -35
- data/lib/stripe/services/quote_preview_invoice_service.rb +0 -35
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
- data/lib/stripe/services/subscription_item_usage_record_service.rb +0 -41
- data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +0 -37
- data/lib/stripe/services/tax/association_service.rb +0 -31
- data/lib/stripe/services/tax/form_service.rb +0 -100
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
- data/rbi/stripe/resources/account_notice.rbi +0 -139
- data/rbi/stripe/resources/billing/meter_error_report.rbi +0 -71
- data/rbi/stripe/resources/capital/financing_offer.rbi +0 -190
- data/rbi/stripe/resources/capital/financing_summary.rbi +0 -74
- data/rbi/stripe/resources/capital/financing_transaction.rbi +0 -130
- data/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +0 -27
- data/rbi/stripe/resources/financial_connections/institution.rbi +0 -99
- data/rbi/stripe/resources/gift_cards/card.rbi +0 -206
- data/rbi/stripe/resources/gift_cards/transaction.rbi +0 -257
- data/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +0 -622
- data/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +0 -83
- data/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +0 -90
- data/rbi/stripe/resources/issuing/settlement.rbi +0 -62
- data/rbi/stripe/resources/margin.rbi +0 -127
- data/rbi/stripe/resources/order.rbi +0 -3036
- data/rbi/stripe/resources/payment_attempt_record.rbi +0 -215
- data/rbi/stripe/resources/payment_record.rbi +0 -722
- data/rbi/stripe/resources/quote_line.rbi +0 -350
- data/rbi/stripe/resources/quote_preview_invoice.rbi +0 -850
- data/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +0 -474
- data/rbi/stripe/resources/tax/association.rbi +0 -94
- data/rbi/stripe/resources/tax/form.rbi +0 -224
- data/rbi/stripe/resources/terminal/reader_collected_data.rbi +0 -41
- data/rbi/stripe/resources/usage_record.rbi +0 -32
- data/rbi/stripe/resources/usage_record_summary.rbi +0 -38
- data/rbi/stripe/services/account_notice_service.rbi +0 -90
- data/rbi/stripe/services/capital/financing_offer_service.rbi +0 -95
- data/rbi/stripe/services/capital/financing_summary_service.rbi +0 -22
- data/rbi/stripe/services/capital/financing_transaction_service.rbi +0 -68
- data/rbi/stripe/services/capital_service.rbi +0 -11
- data/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi +0 -33
- data/rbi/stripe/services/financial_connections/institution_service.rbi +0 -46
- data/rbi/stripe/services/gift_cards/card_service.rbi +0 -142
- data/rbi/stripe/services/gift_cards/transaction_service.rbi +0 -174
- data/rbi/stripe/services/gift_cards_service.rbi +0 -10
- data/rbi/stripe/services/invoice_upcoming_lines_service.rbi +0 -2023
- data/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi +0 -498
- data/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi +0 -55
- data/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi +0 -73
- data/rbi/stripe/services/margin_service.rbi +0 -104
- data/rbi/stripe/services/order_line_item_service.rbi +0 -31
- data/rbi/stripe/services/order_service.rbi +0 -2320
- data/rbi/stripe/services/payment_attempt_record_service.rbi +0 -36
- data/rbi/stripe/services/payment_record_service.rbi +0 -521
- data/rbi/stripe/services/quote_line_service.rbi +0 -31
- data/rbi/stripe/services/quote_preview_invoice_service.rbi +0 -31
- data/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi +0 -31
- data/rbi/stripe/services/subscription_item_usage_record_service.rbi +0 -37
- data/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi +0 -33
- data/rbi/stripe/services/tax/association_service.rbi +0 -25
- data/rbi/stripe/services/tax/form_service.rbi +0 -85
- data/rbi/stripe/services/terminal/reader_collected_data_service.rbi +0 -22
@@ -43,14 +43,6 @@ module Stripe
|
|
43
43
|
sig { returns(T.nilable(Integer)) }
|
44
44
|
attr_reader :second
|
45
45
|
end
|
46
|
-
class BillingThresholds < Stripe::StripeObject
|
47
|
-
# Monetary threshold that triggers the subscription to create an invoice
|
48
|
-
sig { returns(T.nilable(Integer)) }
|
49
|
-
attr_reader :amount_gte
|
50
|
-
# 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`.
|
51
|
-
sig { returns(T.nilable(T::Boolean)) }
|
52
|
-
attr_reader :reset_billing_cycle_anchor
|
53
|
-
end
|
54
46
|
class CancellationDetails < Stripe::StripeObject
|
55
47
|
# Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
|
56
48
|
sig { returns(T.nilable(String)) }
|
@@ -78,25 +70,6 @@ module Stripe
|
|
78
70
|
sig { returns(Issuer) }
|
79
71
|
attr_reader :issuer
|
80
72
|
end
|
81
|
-
class LastPriceMigrationError < Stripe::StripeObject
|
82
|
-
class FailedTransition < Stripe::StripeObject
|
83
|
-
# The original price to be migrated.
|
84
|
-
sig { returns(String) }
|
85
|
-
attr_reader :source_price
|
86
|
-
# The intended resulting price of the migration.
|
87
|
-
sig { returns(String) }
|
88
|
-
attr_reader :target_price
|
89
|
-
end
|
90
|
-
# The time at which the price migration encountered an error.
|
91
|
-
sig { returns(Integer) }
|
92
|
-
attr_reader :errored_at
|
93
|
-
# The involved price pairs in each failed transition.
|
94
|
-
sig { returns(T::Array[FailedTransition]) }
|
95
|
-
attr_reader :failed_transitions
|
96
|
-
# The type of error encountered by the price migration.
|
97
|
-
sig { returns(String) }
|
98
|
-
attr_reader :type
|
99
|
-
end
|
100
73
|
class PauseCollection < Stripe::StripeObject
|
101
74
|
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
102
75
|
sig { returns(String) }
|
@@ -168,7 +141,6 @@ module Stripe
|
|
168
141
|
sig { returns(T.nilable(String)) }
|
169
142
|
attr_reader :funding_type
|
170
143
|
end
|
171
|
-
class IdBankTransfer < Stripe::StripeObject; end
|
172
144
|
class Konbini < Stripe::StripeObject; end
|
173
145
|
class SepaDebit < Stripe::StripeObject; end
|
174
146
|
class UsBankAccount < Stripe::StripeObject
|
@@ -177,9 +149,6 @@ module Stripe
|
|
177
149
|
# The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
|
178
150
|
sig { returns(T::Array[String]) }
|
179
151
|
attr_reader :account_subcategories
|
180
|
-
# The institution to use to filter for possible accounts to link.
|
181
|
-
sig { returns(String) }
|
182
|
-
attr_reader :institution
|
183
152
|
end
|
184
153
|
# Attribute for field filters
|
185
154
|
sig { returns(Filters) }
|
@@ -210,9 +179,6 @@ module Stripe
|
|
210
179
|
# This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription.
|
211
180
|
sig { returns(T.nilable(CustomerBalance)) }
|
212
181
|
attr_reader :customer_balance
|
213
|
-
# This sub-hash contains details about the Indonesia bank transfer payment method options to pass to invoices created by the subscription.
|
214
|
-
sig { returns(T.nilable(IdBankTransfer)) }
|
215
|
-
attr_reader :id_bank_transfer
|
216
182
|
# This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription.
|
217
183
|
sig { returns(T.nilable(Konbini)) }
|
218
184
|
attr_reader :konbini
|
@@ -248,9 +214,6 @@ module Stripe
|
|
248
214
|
# The point after which the changes reflected by this update will be discarded and no longer applied.
|
249
215
|
sig { returns(Integer) }
|
250
216
|
attr_reader :expires_at
|
251
|
-
# The number of iterations of prebilling to apply.
|
252
|
-
sig { returns(T.nilable(Integer)) }
|
253
|
-
attr_reader :prebilling_iterations
|
254
217
|
# List of subscription items, each with an attached plan, that will be set if the update is applied.
|
255
218
|
sig { returns(T.nilable(T::Array[Stripe::SubscriptionItem])) }
|
256
219
|
attr_reader :subscription_items
|
@@ -261,20 +224,6 @@ module Stripe
|
|
261
224
|
sig { returns(T.nilable(T::Boolean)) }
|
262
225
|
attr_reader :trial_from_plan
|
263
226
|
end
|
264
|
-
class Prebilling < Stripe::StripeObject
|
265
|
-
# ID of the prebilling invoice.
|
266
|
-
sig { returns(T.any(String, Stripe::Invoice)) }
|
267
|
-
attr_reader :invoice
|
268
|
-
# The end of the last period for which the invoice pre-bills.
|
269
|
-
sig { returns(Integer) }
|
270
|
-
attr_reader :period_end
|
271
|
-
# The start of the first period for which the invoice pre-bills.
|
272
|
-
sig { returns(Integer) }
|
273
|
-
attr_reader :period_start
|
274
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
|
275
|
-
sig { returns(String) }
|
276
|
-
attr_reader :update_behavior
|
277
|
-
end
|
278
227
|
class TransferData < Stripe::StripeObject
|
279
228
|
# 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.
|
280
229
|
sig { returns(T.nilable(Float)) }
|
@@ -308,9 +257,6 @@ module Stripe
|
|
308
257
|
# The fixed values used to calculate the `billing_cycle_anchor`.
|
309
258
|
sig { returns(T.nilable(BillingCycleAnchorConfig)) }
|
310
259
|
attr_reader :billing_cycle_anchor_config
|
311
|
-
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
312
|
-
sig { returns(T.nilable(BillingThresholds)) }
|
313
|
-
attr_reader :billing_thresholds
|
314
260
|
# A date in the future at which the subscription will automatically get canceled
|
315
261
|
sig { returns(T.nilable(Integer)) }
|
316
262
|
attr_reader :cancel_at
|
@@ -332,12 +278,6 @@ module Stripe
|
|
332
278
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
333
279
|
sig { returns(String) }
|
334
280
|
attr_reader :currency
|
335
|
-
# End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
|
336
|
-
sig { returns(Integer) }
|
337
|
-
attr_reader :current_period_end
|
338
|
-
# Start of the current period that the subscription has been invoiced for.
|
339
|
-
sig { returns(Integer) }
|
340
|
-
attr_reader :current_period_start
|
341
281
|
# ID of the customer who owns the subscription.
|
342
282
|
sig { returns(T.any(String, Stripe::Customer)) }
|
343
283
|
attr_reader :customer
|
@@ -358,9 +298,6 @@ module Stripe
|
|
358
298
|
# 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.
|
359
299
|
sig { returns(T.nilable(String)) }
|
360
300
|
attr_reader :description
|
361
|
-
# 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.
|
362
|
-
sig { returns(T.nilable(Stripe::Discount)) }
|
363
|
-
attr_reader :discount
|
364
301
|
# The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
|
365
302
|
sig { returns(T::Array[T.any(String, Stripe::Discount)]) }
|
366
303
|
attr_reader :discounts
|
@@ -376,9 +313,6 @@ module Stripe
|
|
376
313
|
# List of subscription items, each with an attached price.
|
377
314
|
sig { returns(Stripe::ListObject) }
|
378
315
|
attr_reader :items
|
379
|
-
# Details of the most recent price migration that failed for the subscription.
|
380
|
-
sig { returns(T.nilable(LastPriceMigrationError)) }
|
381
|
-
attr_reader :last_price_migration_error
|
382
316
|
# The most recent invoice this subscription has generated.
|
383
317
|
sig { returns(T.nilable(T.any(String, Stripe::Invoice))) }
|
384
318
|
attr_reader :latest_invoice
|
@@ -394,7 +328,7 @@ module Stripe
|
|
394
328
|
# String representing the object's type. Objects of the same type share the same value.
|
395
329
|
sig { returns(String) }
|
396
330
|
attr_reader :object
|
397
|
-
# The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.
|
331
|
+
# The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://stripe.com/docs/connect/subscriptions#on-behalf-of) for details.
|
398
332
|
sig { returns(T.nilable(T.any(String, Stripe::Account))) }
|
399
333
|
attr_reader :on_behalf_of
|
400
334
|
# 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).
|
@@ -412,9 +346,6 @@ module Stripe
|
|
412
346
|
# 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.
|
413
347
|
sig { returns(T.nilable(PendingUpdate)) }
|
414
348
|
attr_reader :pending_update
|
415
|
-
# Time period and invoice for a Subscription billed in advance.
|
416
|
-
sig { returns(T.nilable(Prebilling)) }
|
417
|
-
attr_reader :prebilling
|
418
349
|
# The schedule attached to the subscription
|
419
350
|
sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) }
|
420
351
|
attr_reader :schedule
|
@@ -452,105 +383,68 @@ module Stripe
|
|
452
383
|
class CancelParams < Stripe::RequestParams
|
453
384
|
class CancellationDetails < Stripe::RequestParams
|
454
385
|
# Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
|
455
|
-
sig { returns(T.nilable(String)) }
|
386
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
456
387
|
attr_accessor :comment
|
457
388
|
# The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
|
458
|
-
sig { returns(T.nilable(String)) }
|
389
|
+
sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
|
459
390
|
attr_accessor :feedback
|
460
|
-
sig {
|
391
|
+
sig {
|
392
|
+
params(comment: T.nilable(T.nilable(String)), feedback: T.nilable(T.nilable(T.any(String, String)))).void
|
393
|
+
}
|
461
394
|
def initialize(comment: nil, feedback: nil); end
|
462
395
|
end
|
463
396
|
# Details about why this subscription was cancelled
|
464
|
-
sig { returns(::Stripe::Subscription::CancelParams::CancellationDetails) }
|
397
|
+
sig { returns(T.nilable(::Stripe::Subscription::CancelParams::CancellationDetails)) }
|
465
398
|
attr_accessor :cancellation_details
|
466
399
|
# Specifies which fields in the response should be expanded.
|
467
|
-
sig { returns(T::Array[String]) }
|
400
|
+
sig { returns(T.nilable(T::Array[String])) }
|
468
401
|
attr_accessor :expand
|
469
402
|
# Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`.
|
470
|
-
sig { returns(T::Boolean) }
|
403
|
+
sig { returns(T.nilable(T::Boolean)) }
|
471
404
|
attr_accessor :invoice_now
|
472
405
|
# Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`.
|
473
|
-
sig { returns(T::Boolean) }
|
406
|
+
sig { returns(T.nilable(T::Boolean)) }
|
474
407
|
attr_accessor :prorate
|
475
408
|
sig {
|
476
|
-
params(cancellation_details: ::Stripe::Subscription::CancelParams::CancellationDetails, expand: T::Array[String], invoice_now: T::Boolean, prorate: T::Boolean).void
|
409
|
+
params(cancellation_details: T.nilable(::Stripe::Subscription::CancelParams::CancellationDetails), expand: T.nilable(T::Array[String]), invoice_now: T.nilable(T::Boolean), prorate: T.nilable(T::Boolean)).void
|
477
410
|
}
|
478
411
|
def initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil); end
|
479
412
|
end
|
480
|
-
class RetrieveParams < Stripe::RequestParams
|
481
|
-
# Specifies which fields in the response should be expanded.
|
482
|
-
sig { returns(T::Array[String]) }
|
483
|
-
attr_accessor :expand
|
484
|
-
sig { params(expand: T::Array[String]).void }
|
485
|
-
def initialize(expand: nil); end
|
486
|
-
end
|
487
413
|
class UpdateParams < Stripe::RequestParams
|
488
414
|
class AddInvoiceItem < Stripe::RequestParams
|
489
415
|
class Discount < Stripe::RequestParams
|
490
|
-
class DiscountEnd < Stripe::RequestParams
|
491
|
-
class Duration < Stripe::RequestParams
|
492
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
493
|
-
sig { returns(String) }
|
494
|
-
attr_accessor :interval
|
495
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
496
|
-
sig { returns(Integer) }
|
497
|
-
attr_accessor :interval_count
|
498
|
-
sig { params(interval: String, interval_count: Integer).void }
|
499
|
-
def initialize(interval: nil, interval_count: nil); end
|
500
|
-
end
|
501
|
-
# Time span for the redeemed discount.
|
502
|
-
sig {
|
503
|
-
returns(::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount::DiscountEnd::Duration)
|
504
|
-
}
|
505
|
-
attr_accessor :duration
|
506
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
507
|
-
sig { returns(Integer) }
|
508
|
-
attr_accessor :timestamp
|
509
|
-
# The type of calculation made to determine when the discount ends.
|
510
|
-
sig { returns(String) }
|
511
|
-
attr_accessor :type
|
512
|
-
sig {
|
513
|
-
params(duration: ::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
514
|
-
}
|
515
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
516
|
-
end
|
517
416
|
# ID of the coupon to create a new discount for.
|
518
|
-
sig { returns(String) }
|
417
|
+
sig { returns(T.nilable(String)) }
|
519
418
|
attr_accessor :coupon
|
520
419
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
521
|
-
sig { returns(String) }
|
420
|
+
sig { returns(T.nilable(String)) }
|
522
421
|
attr_accessor :discount
|
523
|
-
# Details to determine how long the discount should be applied for.
|
524
|
-
sig {
|
525
|
-
returns(::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount::DiscountEnd)
|
526
|
-
}
|
527
|
-
attr_accessor :discount_end
|
528
422
|
# ID of the promotion code to create a new discount for.
|
529
|
-
sig { returns(String) }
|
423
|
+
sig { returns(T.nilable(String)) }
|
530
424
|
attr_accessor :promotion_code
|
531
425
|
sig {
|
532
|
-
params(coupon: String, discount: String,
|
426
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
533
427
|
}
|
534
|
-
def initialize(coupon: nil, discount: nil,
|
428
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
535
429
|
end
|
536
430
|
class PriceData < Stripe::RequestParams
|
537
431
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
538
432
|
sig { returns(String) }
|
539
433
|
attr_accessor :currency
|
540
|
-
# The ID of the
|
434
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
541
435
|
sig { returns(String) }
|
542
436
|
attr_accessor :product
|
543
437
|
# 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.
|
544
|
-
sig { returns(String) }
|
438
|
+
sig { returns(T.nilable(String)) }
|
545
439
|
attr_accessor :tax_behavior
|
546
440
|
# 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.
|
547
|
-
sig { returns(Integer) }
|
441
|
+
sig { returns(T.nilable(Integer)) }
|
548
442
|
attr_accessor :unit_amount
|
549
443
|
# 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.
|
550
|
-
sig { returns(String) }
|
444
|
+
sig { returns(T.nilable(String)) }
|
551
445
|
attr_accessor :unit_amount_decimal
|
552
446
|
sig {
|
553
|
-
params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
|
447
|
+
params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
554
448
|
}
|
555
449
|
def initialize(
|
556
450
|
currency: nil,
|
@@ -561,22 +455,24 @@ module Stripe
|
|
561
455
|
); end
|
562
456
|
end
|
563
457
|
# The coupons to redeem into discounts for the item.
|
564
|
-
sig {
|
458
|
+
sig {
|
459
|
+
returns(T.nilable(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount]))
|
460
|
+
}
|
565
461
|
attr_accessor :discounts
|
566
462
|
# The ID of the price object. One of `price` or `price_data` is required.
|
567
|
-
sig { returns(String) }
|
463
|
+
sig { returns(T.nilable(String)) }
|
568
464
|
attr_accessor :price
|
569
465
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
570
|
-
sig { returns(::Stripe::Subscription::UpdateParams::AddInvoiceItem::PriceData) }
|
466
|
+
sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::AddInvoiceItem::PriceData)) }
|
571
467
|
attr_accessor :price_data
|
572
468
|
# Quantity for this item. Defaults to 1.
|
573
|
-
sig { returns(Integer) }
|
469
|
+
sig { returns(T.nilable(Integer)) }
|
574
470
|
attr_accessor :quantity
|
575
471
|
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
576
|
-
sig { returns(T.nilable(T::Array[String])) }
|
472
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
577
473
|
attr_accessor :tax_rates
|
578
474
|
sig {
|
579
|
-
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
|
475
|
+
params(discounts: T.nilable(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::Subscription::UpdateParams::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
580
476
|
}
|
581
477
|
def initialize(
|
582
478
|
discounts: nil,
|
@@ -589,162 +485,89 @@ module Stripe
|
|
589
485
|
class AutomaticTax < Stripe::RequestParams
|
590
486
|
class Liability < Stripe::RequestParams
|
591
487
|
# The connected account being referenced when `type` is `account`.
|
592
|
-
sig { returns(String) }
|
488
|
+
sig { returns(T.nilable(String)) }
|
593
489
|
attr_accessor :account
|
594
490
|
# Type of the account referenced in the request.
|
595
491
|
sig { returns(String) }
|
596
492
|
attr_accessor :type
|
597
|
-
sig { params(account: String, type: String).void }
|
493
|
+
sig { params(account: T.nilable(String), type: String).void }
|
598
494
|
def initialize(account: nil, type: nil); end
|
599
495
|
end
|
600
496
|
# Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
|
601
497
|
sig { returns(T::Boolean) }
|
602
498
|
attr_accessor :enabled
|
603
499
|
# 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.
|
604
|
-
sig { returns(::Stripe::Subscription::UpdateParams::AutomaticTax::Liability) }
|
500
|
+
sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::AutomaticTax::Liability)) }
|
605
501
|
attr_accessor :liability
|
606
502
|
sig {
|
607
|
-
params(enabled: T::Boolean, liability: ::Stripe::Subscription::UpdateParams::AutomaticTax::Liability).void
|
503
|
+
params(enabled: T::Boolean, liability: T.nilable(::Stripe::Subscription::UpdateParams::AutomaticTax::Liability)).void
|
608
504
|
}
|
609
505
|
def initialize(enabled: nil, liability: nil); end
|
610
506
|
end
|
611
|
-
class BillingThresholds < Stripe::RequestParams
|
612
|
-
# Monetary threshold that triggers the subscription to advance to a new billing period
|
613
|
-
sig { returns(Integer) }
|
614
|
-
attr_accessor :amount_gte
|
615
|
-
# 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.
|
616
|
-
sig { returns(T::Boolean) }
|
617
|
-
attr_accessor :reset_billing_cycle_anchor
|
618
|
-
sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void }
|
619
|
-
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
|
620
|
-
end
|
621
507
|
class CancellationDetails < Stripe::RequestParams
|
622
508
|
# Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
|
623
|
-
sig { returns(T.nilable(String)) }
|
509
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
624
510
|
attr_accessor :comment
|
625
511
|
# The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
|
626
|
-
sig { returns(T.nilable(String)) }
|
512
|
+
sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
|
627
513
|
attr_accessor :feedback
|
628
|
-
sig {
|
514
|
+
sig {
|
515
|
+
params(comment: T.nilable(T.nilable(String)), feedback: T.nilable(T.nilable(T.any(String, String)))).void
|
516
|
+
}
|
629
517
|
def initialize(comment: nil, feedback: nil); end
|
630
518
|
end
|
631
519
|
class Discount < Stripe::RequestParams
|
632
|
-
class DiscountEnd < Stripe::RequestParams
|
633
|
-
class Duration < Stripe::RequestParams
|
634
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
635
|
-
sig { returns(String) }
|
636
|
-
attr_accessor :interval
|
637
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
638
|
-
sig { returns(Integer) }
|
639
|
-
attr_accessor :interval_count
|
640
|
-
sig { params(interval: String, interval_count: Integer).void }
|
641
|
-
def initialize(interval: nil, interval_count: nil); end
|
642
|
-
end
|
643
|
-
# Time span for the redeemed discount.
|
644
|
-
sig { returns(::Stripe::Subscription::UpdateParams::Discount::DiscountEnd::Duration) }
|
645
|
-
attr_accessor :duration
|
646
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
647
|
-
sig { returns(Integer) }
|
648
|
-
attr_accessor :timestamp
|
649
|
-
# The type of calculation made to determine when the discount ends.
|
650
|
-
sig { returns(String) }
|
651
|
-
attr_accessor :type
|
652
|
-
sig {
|
653
|
-
params(duration: ::Stripe::Subscription::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
654
|
-
}
|
655
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
656
|
-
end
|
657
520
|
# ID of the coupon to create a new discount for.
|
658
|
-
sig { returns(String) }
|
521
|
+
sig { returns(T.nilable(String)) }
|
659
522
|
attr_accessor :coupon
|
660
523
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
661
|
-
sig { returns(String) }
|
524
|
+
sig { returns(T.nilable(String)) }
|
662
525
|
attr_accessor :discount
|
663
|
-
# Details to determine how long the discount should be applied for.
|
664
|
-
sig { returns(::Stripe::Subscription::UpdateParams::Discount::DiscountEnd) }
|
665
|
-
attr_accessor :discount_end
|
666
526
|
# ID of the promotion code to create a new discount for.
|
667
|
-
sig { returns(String) }
|
527
|
+
sig { returns(T.nilable(String)) }
|
668
528
|
attr_accessor :promotion_code
|
669
529
|
sig {
|
670
|
-
params(coupon: String, discount: String,
|
530
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
671
531
|
}
|
672
|
-
def initialize(coupon: nil, discount: nil,
|
532
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
673
533
|
end
|
674
534
|
class InvoiceSettings < Stripe::RequestParams
|
675
535
|
class Issuer < Stripe::RequestParams
|
676
536
|
# The connected account being referenced when `type` is `account`.
|
677
|
-
sig { returns(String) }
|
537
|
+
sig { returns(T.nilable(String)) }
|
678
538
|
attr_accessor :account
|
679
539
|
# Type of the account referenced in the request.
|
680
540
|
sig { returns(String) }
|
681
541
|
attr_accessor :type
|
682
|
-
sig { params(account: String, type: String).void }
|
542
|
+
sig { params(account: T.nilable(String), type: String).void }
|
683
543
|
def initialize(account: nil, type: nil); end
|
684
544
|
end
|
685
545
|
# The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
|
686
|
-
sig { returns(T.nilable(T::Array[String])) }
|
546
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
687
547
|
attr_accessor :account_tax_ids
|
688
548
|
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
689
|
-
sig { returns(::Stripe::Subscription::UpdateParams::InvoiceSettings::Issuer) }
|
549
|
+
sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::InvoiceSettings::Issuer)) }
|
690
550
|
attr_accessor :issuer
|
691
551
|
sig {
|
692
|
-
params(account_tax_ids: T.nilable(T::Array[String]), issuer: ::Stripe::Subscription::UpdateParams::InvoiceSettings::Issuer).void
|
552
|
+
params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), issuer: T.nilable(::Stripe::Subscription::UpdateParams::InvoiceSettings::Issuer)).void
|
693
553
|
}
|
694
554
|
def initialize(account_tax_ids: nil, issuer: nil); end
|
695
555
|
end
|
696
556
|
class Item < Stripe::RequestParams
|
697
|
-
class BillingThresholds < Stripe::RequestParams
|
698
|
-
# 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))
|
699
|
-
sig { returns(Integer) }
|
700
|
-
attr_accessor :usage_gte
|
701
|
-
sig { params(usage_gte: Integer).void }
|
702
|
-
def initialize(usage_gte: nil); end
|
703
|
-
end
|
704
557
|
class Discount < Stripe::RequestParams
|
705
|
-
class DiscountEnd < Stripe::RequestParams
|
706
|
-
class Duration < Stripe::RequestParams
|
707
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
708
|
-
sig { returns(String) }
|
709
|
-
attr_accessor :interval
|
710
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
711
|
-
sig { returns(Integer) }
|
712
|
-
attr_accessor :interval_count
|
713
|
-
sig { params(interval: String, interval_count: Integer).void }
|
714
|
-
def initialize(interval: nil, interval_count: nil); end
|
715
|
-
end
|
716
|
-
# Time span for the redeemed discount.
|
717
|
-
sig {
|
718
|
-
returns(::Stripe::Subscription::UpdateParams::Item::Discount::DiscountEnd::Duration)
|
719
|
-
}
|
720
|
-
attr_accessor :duration
|
721
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
722
|
-
sig { returns(Integer) }
|
723
|
-
attr_accessor :timestamp
|
724
|
-
# The type of calculation made to determine when the discount ends.
|
725
|
-
sig { returns(String) }
|
726
|
-
attr_accessor :type
|
727
|
-
sig {
|
728
|
-
params(duration: ::Stripe::Subscription::UpdateParams::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
729
|
-
}
|
730
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
731
|
-
end
|
732
558
|
# ID of the coupon to create a new discount for.
|
733
|
-
sig { returns(String) }
|
559
|
+
sig { returns(T.nilable(String)) }
|
734
560
|
attr_accessor :coupon
|
735
561
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
736
|
-
sig { returns(String) }
|
562
|
+
sig { returns(T.nilable(String)) }
|
737
563
|
attr_accessor :discount
|
738
|
-
# Details to determine how long the discount should be applied for.
|
739
|
-
sig { returns(::Stripe::Subscription::UpdateParams::Item::Discount::DiscountEnd) }
|
740
|
-
attr_accessor :discount_end
|
741
564
|
# ID of the promotion code to create a new discount for.
|
742
|
-
sig { returns(String) }
|
565
|
+
sig { returns(T.nilable(String)) }
|
743
566
|
attr_accessor :promotion_code
|
744
567
|
sig {
|
745
|
-
params(coupon: String, discount: String,
|
568
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
746
569
|
}
|
747
|
-
def initialize(coupon: nil, discount: nil,
|
570
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
748
571
|
end
|
749
572
|
class PriceData < Stripe::RequestParams
|
750
573
|
class Recurring < Stripe::RequestParams
|
@@ -752,31 +575,31 @@ module Stripe
|
|
752
575
|
sig { returns(String) }
|
753
576
|
attr_accessor :interval
|
754
577
|
# 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).
|
755
|
-
sig { returns(Integer) }
|
578
|
+
sig { returns(T.nilable(Integer)) }
|
756
579
|
attr_accessor :interval_count
|
757
|
-
sig { params(interval: String, interval_count: Integer).void }
|
580
|
+
sig { params(interval: String, interval_count: T.nilable(Integer)).void }
|
758
581
|
def initialize(interval: nil, interval_count: nil); end
|
759
582
|
end
|
760
583
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
761
584
|
sig { returns(String) }
|
762
585
|
attr_accessor :currency
|
763
|
-
# The ID of the
|
586
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
764
587
|
sig { returns(String) }
|
765
588
|
attr_accessor :product
|
766
589
|
# The recurring components of a price such as `interval` and `interval_count`.
|
767
590
|
sig { returns(::Stripe::Subscription::UpdateParams::Item::PriceData::Recurring) }
|
768
591
|
attr_accessor :recurring
|
769
592
|
# 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.
|
770
|
-
sig { returns(String) }
|
593
|
+
sig { returns(T.nilable(String)) }
|
771
594
|
attr_accessor :tax_behavior
|
772
595
|
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
773
|
-
sig { returns(Integer) }
|
596
|
+
sig { returns(T.nilable(Integer)) }
|
774
597
|
attr_accessor :unit_amount
|
775
598
|
# 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.
|
776
|
-
sig { returns(String) }
|
599
|
+
sig { returns(T.nilable(String)) }
|
777
600
|
attr_accessor :unit_amount_decimal
|
778
601
|
sig {
|
779
|
-
params(currency: String, product: String, recurring: ::Stripe::Subscription::UpdateParams::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
|
602
|
+
params(currency: String, product: String, recurring: ::Stripe::Subscription::UpdateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
780
603
|
}
|
781
604
|
def initialize(
|
782
605
|
currency: nil,
|
@@ -787,44 +610,42 @@ module Stripe
|
|
787
610
|
unit_amount_decimal: nil
|
788
611
|
); end
|
789
612
|
end
|
790
|
-
# 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.
|
791
|
-
sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::Item::BillingThresholds)) }
|
792
|
-
attr_accessor :billing_thresholds
|
793
613
|
# 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.
|
794
|
-
sig { returns(T::Boolean) }
|
614
|
+
sig { returns(T.nilable(T::Boolean)) }
|
795
615
|
attr_accessor :clear_usage
|
796
616
|
# A flag that, if set to `true`, will delete the specified item.
|
797
|
-
sig { returns(T::Boolean) }
|
617
|
+
sig { returns(T.nilable(T::Boolean)) }
|
798
618
|
attr_accessor :deleted
|
799
619
|
# The coupons to redeem into discounts for the subscription item.
|
800
|
-
sig {
|
620
|
+
sig {
|
621
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::UpdateParams::Item::Discount]))))
|
622
|
+
}
|
801
623
|
attr_accessor :discounts
|
802
624
|
# Subscription item to update.
|
803
|
-
sig { returns(String) }
|
625
|
+
sig { returns(T.nilable(String)) }
|
804
626
|
attr_accessor :id
|
805
627
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
806
|
-
sig { returns(T.nilable(T::Hash[String, String])) }
|
628
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
|
807
629
|
attr_accessor :metadata
|
808
630
|
# Plan ID for this item, as a string.
|
809
|
-
sig { returns(String) }
|
631
|
+
sig { returns(T.nilable(String)) }
|
810
632
|
attr_accessor :plan
|
811
633
|
# 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.
|
812
|
-
sig { returns(String) }
|
634
|
+
sig { returns(T.nilable(String)) }
|
813
635
|
attr_accessor :price
|
814
636
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
815
|
-
sig { returns(::Stripe::Subscription::UpdateParams::Item::PriceData) }
|
637
|
+
sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::Item::PriceData)) }
|
816
638
|
attr_accessor :price_data
|
817
639
|
# Quantity for this item.
|
818
|
-
sig { returns(Integer) }
|
640
|
+
sig { returns(T.nilable(Integer)) }
|
819
641
|
attr_accessor :quantity
|
820
642
|
# 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.
|
821
|
-
sig { returns(T.nilable(T::Array[String])) }
|
643
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
822
644
|
attr_accessor :tax_rates
|
823
645
|
sig {
|
824
|
-
params(
|
646
|
+
params(clear_usage: T.nilable(T::Boolean), deleted: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::UpdateParams::Item::Discount]))), id: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::Subscription::UpdateParams::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
825
647
|
}
|
826
648
|
def initialize(
|
827
|
-
billing_thresholds: nil,
|
828
649
|
clear_usage: nil,
|
829
650
|
deleted: nil,
|
830
651
|
discounts: nil,
|
@@ -842,9 +663,9 @@ module Stripe
|
|
842
663
|
sig { returns(String) }
|
843
664
|
attr_accessor :behavior
|
844
665
|
# The time after which the subscription will resume collecting payments.
|
845
|
-
sig { returns(Integer) }
|
666
|
+
sig { returns(T.nilable(Integer)) }
|
846
667
|
attr_accessor :resumes_at
|
847
|
-
sig { params(behavior: String, resumes_at: Integer).void }
|
668
|
+
sig { params(behavior: String, resumes_at: T.nilable(Integer)).void }
|
848
669
|
def initialize(behavior: nil, resumes_at: nil); end
|
849
670
|
end
|
850
671
|
class PaymentSettings < Stripe::RequestParams
|
@@ -852,58 +673,60 @@ module Stripe
|
|
852
673
|
class AcssDebit < Stripe::RequestParams
|
853
674
|
class MandateOptions < Stripe::RequestParams
|
854
675
|
# Transaction type of the mandate.
|
855
|
-
sig { returns(String) }
|
676
|
+
sig { returns(T.nilable(String)) }
|
856
677
|
attr_accessor :transaction_type
|
857
|
-
sig { params(transaction_type: String).void }
|
678
|
+
sig { params(transaction_type: T.nilable(String)).void }
|
858
679
|
def initialize(transaction_type: nil); end
|
859
680
|
end
|
860
681
|
# Additional fields for Mandate creation
|
861
682
|
sig {
|
862
|
-
returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions)
|
683
|
+
returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
|
863
684
|
}
|
864
685
|
attr_accessor :mandate_options
|
865
686
|
# Verification method for the intent
|
866
|
-
sig { returns(String) }
|
687
|
+
sig { returns(T.nilable(String)) }
|
867
688
|
attr_accessor :verification_method
|
868
689
|
sig {
|
869
|
-
params(mandate_options: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void
|
690
|
+
params(mandate_options: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
|
870
691
|
}
|
871
692
|
def initialize(mandate_options: nil, verification_method: nil); end
|
872
693
|
end
|
873
694
|
class Bancontact < Stripe::RequestParams
|
874
695
|
# Preferred language of the Bancontact authorization page that the customer is redirected to.
|
875
|
-
sig { returns(String) }
|
696
|
+
sig { returns(T.nilable(String)) }
|
876
697
|
attr_accessor :preferred_language
|
877
|
-
sig { params(preferred_language: String).void }
|
698
|
+
sig { params(preferred_language: T.nilable(String)).void }
|
878
699
|
def initialize(preferred_language: nil); end
|
879
700
|
end
|
880
701
|
class Card < Stripe::RequestParams
|
881
702
|
class MandateOptions < Stripe::RequestParams
|
882
703
|
# Amount to be charged for future payments.
|
883
|
-
sig { returns(Integer) }
|
704
|
+
sig { returns(T.nilable(Integer)) }
|
884
705
|
attr_accessor :amount
|
885
706
|
# 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.
|
886
|
-
sig { returns(String) }
|
707
|
+
sig { returns(T.nilable(String)) }
|
887
708
|
attr_accessor :amount_type
|
888
709
|
# A description of the mandate or subscription that is meant to be displayed to the customer.
|
889
|
-
sig { returns(String) }
|
710
|
+
sig { returns(T.nilable(String)) }
|
890
711
|
attr_accessor :description
|
891
|
-
sig {
|
712
|
+
sig {
|
713
|
+
params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void
|
714
|
+
}
|
892
715
|
def initialize(amount: nil, amount_type: nil, description: nil); end
|
893
716
|
end
|
894
717
|
# Configuration options for setting up an eMandate for cards issued in India.
|
895
718
|
sig {
|
896
|
-
returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions)
|
719
|
+
returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions))
|
897
720
|
}
|
898
721
|
attr_accessor :mandate_options
|
899
722
|
# 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.
|
900
|
-
sig { returns(String) }
|
723
|
+
sig { returns(T.nilable(String)) }
|
901
724
|
attr_accessor :network
|
902
725
|
# 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.
|
903
|
-
sig { returns(String) }
|
726
|
+
sig { returns(T.nilable(String)) }
|
904
727
|
attr_accessor :request_three_d_secure
|
905
728
|
sig {
|
906
|
-
params(mandate_options: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions, network: String, request_three_d_secure: String).void
|
729
|
+
params(mandate_options: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void
|
907
730
|
}
|
908
731
|
def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end
|
909
732
|
end
|
@@ -918,32 +741,29 @@ module Stripe
|
|
918
741
|
end
|
919
742
|
# Configuration for eu_bank_transfer funding type.
|
920
743
|
sig {
|
921
|
-
returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer)
|
744
|
+
returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
|
922
745
|
}
|
923
746
|
attr_accessor :eu_bank_transfer
|
924
747
|
# 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`.
|
925
|
-
sig { returns(String) }
|
748
|
+
sig { returns(T.nilable(String)) }
|
926
749
|
attr_accessor :type
|
927
750
|
sig {
|
928
|
-
params(eu_bank_transfer: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, type: String).void
|
751
|
+
params(eu_bank_transfer: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
|
929
752
|
}
|
930
753
|
def initialize(eu_bank_transfer: nil, type: nil); end
|
931
754
|
end
|
932
755
|
# Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
|
933
756
|
sig {
|
934
|
-
returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer)
|
757
|
+
returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
|
935
758
|
}
|
936
759
|
attr_accessor :bank_transfer
|
937
760
|
# The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
|
938
|
-
sig { returns(String) }
|
761
|
+
sig { returns(T.nilable(String)) }
|
939
762
|
attr_accessor :funding_type
|
940
763
|
sig {
|
941
|
-
params(bank_transfer: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String).void
|
764
|
+
params(bank_transfer: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
|
942
765
|
}
|
943
766
|
def initialize(bank_transfer: nil, funding_type: nil); end
|
944
|
-
end
|
945
|
-
class IdBankTransfer < Stripe::RequestParams
|
946
|
-
|
947
767
|
end
|
948
768
|
class Konbini < Stripe::RequestParams
|
949
769
|
|
@@ -955,108 +775,101 @@ module Stripe
|
|
955
775
|
class FinancialConnections < Stripe::RequestParams
|
956
776
|
class Filters < Stripe::RequestParams
|
957
777
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
958
|
-
sig { returns(T::Array[String]) }
|
778
|
+
sig { returns(T.nilable(T::Array[String])) }
|
959
779
|
attr_accessor :account_subcategories
|
960
|
-
|
961
|
-
|
962
|
-
attr_accessor :institution
|
963
|
-
sig { params(account_subcategories: T::Array[String], institution: String).void }
|
964
|
-
def initialize(account_subcategories: nil, institution: nil); end
|
780
|
+
sig { params(account_subcategories: T.nilable(T::Array[String])).void }
|
781
|
+
def initialize(account_subcategories: nil); end
|
965
782
|
end
|
966
783
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
967
784
|
sig {
|
968
|
-
returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters)
|
785
|
+
returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
|
969
786
|
}
|
970
787
|
attr_accessor :filters
|
971
788
|
# 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`.
|
972
|
-
sig { returns(T::Array[String]) }
|
789
|
+
sig { returns(T.nilable(T::Array[String])) }
|
973
790
|
attr_accessor :permissions
|
974
791
|
# List of data features that you would like to retrieve upon account creation.
|
975
|
-
sig { returns(T::Array[String]) }
|
792
|
+
sig { returns(T.nilable(T::Array[String])) }
|
976
793
|
attr_accessor :prefetch
|
977
794
|
sig {
|
978
|
-
params(filters: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, permissions: T::Array[String], prefetch: T::Array[String]).void
|
795
|
+
params(filters: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
|
979
796
|
}
|
980
797
|
def initialize(filters: nil, permissions: nil, prefetch: nil); end
|
981
798
|
end
|
982
799
|
# Additional fields for Financial Connections Session creation
|
983
800
|
sig {
|
984
|
-
returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections)
|
801
|
+
returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
|
985
802
|
}
|
986
803
|
attr_accessor :financial_connections
|
987
804
|
# Verification method for the intent
|
988
|
-
sig { returns(String) }
|
805
|
+
sig { returns(T.nilable(String)) }
|
989
806
|
attr_accessor :verification_method
|
990
807
|
sig {
|
991
|
-
params(financial_connections: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections, verification_method: String).void
|
808
|
+
params(financial_connections: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
|
992
809
|
}
|
993
810
|
def initialize(financial_connections: nil, verification_method: nil); end
|
994
811
|
end
|
995
812
|
# This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
|
996
813
|
sig {
|
997
|
-
returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))
|
814
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
|
998
815
|
}
|
999
816
|
attr_accessor :acss_debit
|
1000
817
|
# This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
|
1001
818
|
sig {
|
1002
|
-
returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))
|
819
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
|
1003
820
|
}
|
1004
821
|
attr_accessor :bancontact
|
1005
822
|
# This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
|
1006
823
|
sig {
|
1007
|
-
returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))
|
824
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))))
|
1008
825
|
}
|
1009
826
|
attr_accessor :card
|
1010
827
|
# This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1011
828
|
sig {
|
1012
|
-
returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))
|
829
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
|
1013
830
|
}
|
1014
831
|
attr_accessor :customer_balance
|
1015
|
-
# This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1016
|
-
sig {
|
1017
|
-
returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer))
|
1018
|
-
}
|
1019
|
-
attr_accessor :id_bank_transfer
|
1020
832
|
# This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
1021
833
|
sig {
|
1022
|
-
returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))
|
834
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
|
1023
835
|
}
|
1024
836
|
attr_accessor :konbini
|
1025
837
|
# This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
|
1026
838
|
sig {
|
1027
|
-
returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))
|
839
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
|
1028
840
|
}
|
1029
841
|
attr_accessor :sepa_debit
|
1030
842
|
# This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
|
1031
843
|
sig {
|
1032
|
-
returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))
|
844
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
|
1033
845
|
}
|
1034
846
|
attr_accessor :us_bank_account
|
1035
847
|
sig {
|
1036
|
-
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(
|
848
|
+
params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
|
1037
849
|
}
|
1038
850
|
def initialize(
|
1039
851
|
acss_debit: nil,
|
1040
852
|
bancontact: nil,
|
1041
853
|
card: nil,
|
1042
854
|
customer_balance: nil,
|
1043
|
-
id_bank_transfer: nil,
|
1044
855
|
konbini: nil,
|
1045
856
|
sepa_debit: nil,
|
1046
857
|
us_bank_account: nil
|
1047
858
|
); end
|
1048
859
|
end
|
1049
860
|
# Payment-method-specific configuration to provide to invoices created by the subscription.
|
1050
|
-
sig {
|
861
|
+
sig {
|
862
|
+
returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions))
|
863
|
+
}
|
1051
864
|
attr_accessor :payment_method_options
|
1052
865
|
# 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
|
1053
|
-
sig { returns(T.nilable(T::Array[String])) }
|
866
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1054
867
|
attr_accessor :payment_method_types
|
1055
868
|
# Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
|
1056
|
-
sig { returns(String) }
|
869
|
+
sig { returns(T.nilable(String)) }
|
1057
870
|
attr_accessor :save_default_payment_method
|
1058
871
|
sig {
|
1059
|
-
params(payment_method_options: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions, payment_method_types: T.nilable(T::Array[String]), save_default_payment_method: String).void
|
872
|
+
params(payment_method_options: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String]))), save_default_payment_method: T.nilable(String)).void
|
1060
873
|
}
|
1061
874
|
def initialize(
|
1062
875
|
payment_method_options: nil,
|
@@ -1069,29 +882,19 @@ module Stripe
|
|
1069
882
|
sig { returns(String) }
|
1070
883
|
attr_accessor :interval
|
1071
884
|
# 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).
|
1072
|
-
sig { returns(Integer) }
|
885
|
+
sig { returns(T.nilable(Integer)) }
|
1073
886
|
attr_accessor :interval_count
|
1074
|
-
sig { params(interval: String, interval_count: Integer).void }
|
887
|
+
sig { params(interval: String, interval_count: T.nilable(Integer)).void }
|
1075
888
|
def initialize(interval: nil, interval_count: nil); end
|
1076
889
|
end
|
1077
|
-
class Prebilling < Stripe::RequestParams
|
1078
|
-
# This is used to determine the number of billing cycles to prebill.
|
1079
|
-
sig { returns(Integer) }
|
1080
|
-
attr_accessor :iterations
|
1081
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1082
|
-
sig { returns(String) }
|
1083
|
-
attr_accessor :update_behavior
|
1084
|
-
sig { params(iterations: Integer, update_behavior: String).void }
|
1085
|
-
def initialize(iterations: nil, update_behavior: nil); end
|
1086
|
-
end
|
1087
890
|
class TransferData < Stripe::RequestParams
|
1088
891
|
# 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.
|
1089
|
-
sig { returns(Float) }
|
892
|
+
sig { returns(T.nilable(Float)) }
|
1090
893
|
attr_accessor :amount_percent
|
1091
894
|
# ID of an existing, connected Stripe account.
|
1092
895
|
sig { returns(String) }
|
1093
896
|
attr_accessor :destination
|
1094
|
-
sig { params(amount_percent: Float, destination: String).void }
|
897
|
+
sig { params(amount_percent: T.nilable(Float), destination: String).void }
|
1095
898
|
def initialize(amount_percent: nil, destination: nil); end
|
1096
899
|
end
|
1097
900
|
class TrialSettings < Stripe::RequestParams
|
@@ -1111,73 +914,71 @@ module Stripe
|
|
1111
914
|
def initialize(end_behavior: nil); end
|
1112
915
|
end
|
1113
916
|
# 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.
|
1114
|
-
sig { returns(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem]) }
|
917
|
+
sig { returns(T.nilable(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem])) }
|
1115
918
|
attr_accessor :add_invoice_items
|
1116
919
|
# 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).
|
1117
|
-
sig { returns(T.nilable(Float)) }
|
920
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
|
1118
921
|
attr_accessor :application_fee_percent
|
1119
922
|
# Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
|
1120
|
-
sig { returns(::Stripe::Subscription::UpdateParams::AutomaticTax) }
|
923
|
+
sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::AutomaticTax)) }
|
1121
924
|
attr_accessor :automatic_tax
|
1122
925
|
# 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).
|
1123
|
-
sig { returns(String) }
|
926
|
+
sig { returns(T.nilable(String)) }
|
1124
927
|
attr_accessor :billing_cycle_anchor
|
1125
|
-
# 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.
|
1126
|
-
sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::BillingThresholds)) }
|
1127
|
-
attr_accessor :billing_thresholds
|
1128
928
|
# 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.
|
1129
|
-
sig { returns(T.nilable(Integer)) }
|
929
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
1130
930
|
attr_accessor :cancel_at
|
1131
931
|
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
1132
|
-
sig { returns(T::Boolean) }
|
932
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1133
933
|
attr_accessor :cancel_at_period_end
|
1134
934
|
# Details about why this subscription was cancelled
|
1135
|
-
sig { returns(::Stripe::Subscription::UpdateParams::CancellationDetails) }
|
935
|
+
sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::CancellationDetails)) }
|
1136
936
|
attr_accessor :cancellation_details
|
1137
937
|
# 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`.
|
1138
|
-
sig { returns(String) }
|
938
|
+
sig { returns(T.nilable(String)) }
|
1139
939
|
attr_accessor :collection_method
|
1140
|
-
# 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.
|
1141
|
-
sig { returns(String) }
|
1142
|
-
attr_accessor :coupon
|
1143
940
|
# 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`.
|
1144
|
-
sig { returns(Integer) }
|
941
|
+
sig { returns(T.nilable(Integer)) }
|
1145
942
|
attr_accessor :days_until_due
|
1146
943
|
# 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).
|
1147
|
-
sig { returns(String) }
|
944
|
+
sig { returns(T.nilable(String)) }
|
1148
945
|
attr_accessor :default_payment_method
|
1149
946
|
# 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).
|
1150
|
-
sig { returns(T.nilable(String)) }
|
947
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1151
948
|
attr_accessor :default_source
|
1152
949
|
# 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.
|
1153
|
-
sig { returns(T.nilable(T::Array[String])) }
|
950
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1154
951
|
attr_accessor :default_tax_rates
|
1155
952
|
# 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.
|
1156
|
-
sig { returns(T.nilable(String)) }
|
953
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1157
954
|
attr_accessor :description
|
1158
955
|
# The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
|
1159
|
-
sig {
|
956
|
+
sig {
|
957
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::UpdateParams::Discount]))))
|
958
|
+
}
|
1160
959
|
attr_accessor :discounts
|
1161
960
|
# Specifies which fields in the response should be expanded.
|
1162
|
-
sig { returns(T::Array[String]) }
|
961
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1163
962
|
attr_accessor :expand
|
1164
963
|
# All invoices will be billed using the specified settings.
|
1165
|
-
sig { returns(::Stripe::Subscription::UpdateParams::InvoiceSettings) }
|
964
|
+
sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::InvoiceSettings)) }
|
1166
965
|
attr_accessor :invoice_settings
|
1167
966
|
# A list of up to 20 subscription items, each with an attached price.
|
1168
|
-
sig { returns(T::Array[::Stripe::Subscription::UpdateParams::Item]) }
|
967
|
+
sig { returns(T.nilable(T::Array[::Stripe::Subscription::UpdateParams::Item])) }
|
1169
968
|
attr_accessor :items
|
1170
969
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1171
|
-
sig { returns(T.nilable(T::Hash[String, String])) }
|
970
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
|
1172
971
|
attr_accessor :metadata
|
1173
972
|
# Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
|
1174
|
-
sig { returns(T::Boolean) }
|
973
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1175
974
|
attr_accessor :off_session
|
1176
975
|
# The account on behalf of which to charge, for each of the subscription's invoices.
|
1177
|
-
sig { returns(T.nilable(String)) }
|
976
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1178
977
|
attr_accessor :on_behalf_of
|
1179
978
|
# 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).
|
1180
|
-
sig {
|
979
|
+
sig {
|
980
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PauseCollection))))
|
981
|
+
}
|
1181
982
|
attr_accessor :pause_collection
|
1182
983
|
# 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.
|
1183
984
|
#
|
@@ -1186,52 +987,48 @@ module Stripe
|
|
1186
987
|
# 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).
|
1187
988
|
#
|
1188
989
|
# 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.
|
1189
|
-
sig { returns(String) }
|
990
|
+
sig { returns(T.nilable(String)) }
|
1190
991
|
attr_accessor :payment_behavior
|
1191
992
|
# Payment settings to pass to invoices created by the subscription.
|
1192
|
-
sig { returns(::Stripe::Subscription::UpdateParams::PaymentSettings) }
|
993
|
+
sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings)) }
|
1193
994
|
attr_accessor :payment_settings
|
1194
995
|
# 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.
|
1195
|
-
sig {
|
996
|
+
sig {
|
997
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PendingInvoiceItemInterval))))
|
998
|
+
}
|
1196
999
|
attr_accessor :pending_invoice_item_interval
|
1197
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1198
|
-
sig { returns(::Stripe::Subscription::UpdateParams::Prebilling) }
|
1199
|
-
attr_accessor :prebilling
|
1200
|
-
# 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.
|
1201
|
-
sig { returns(String) }
|
1202
|
-
attr_accessor :promotion_code
|
1203
1000
|
# 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`.
|
1204
|
-
sig { returns(String) }
|
1001
|
+
sig { returns(T.nilable(String)) }
|
1205
1002
|
attr_accessor :proration_behavior
|
1206
1003
|
# 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.
|
1207
|
-
sig { returns(Integer) }
|
1004
|
+
sig { returns(T.nilable(Integer)) }
|
1208
1005
|
attr_accessor :proration_date
|
1209
1006
|
# 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.
|
1210
|
-
sig {
|
1007
|
+
sig {
|
1008
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::TransferData))))
|
1009
|
+
}
|
1211
1010
|
attr_accessor :transfer_data
|
1212
1011
|
# 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`.
|
1213
|
-
sig { returns(T.any(String, Integer)) }
|
1012
|
+
sig { returns(T.nilable(T.any(String, Integer))) }
|
1214
1013
|
attr_accessor :trial_end
|
1215
1014
|
# 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.
|
1216
|
-
sig { returns(T::Boolean) }
|
1015
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1217
1016
|
attr_accessor :trial_from_plan
|
1218
1017
|
# Settings related to subscription trials.
|
1219
|
-
sig { returns(::Stripe::Subscription::UpdateParams::TrialSettings) }
|
1018
|
+
sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::TrialSettings)) }
|
1220
1019
|
attr_accessor :trial_settings
|
1221
1020
|
sig {
|
1222
|
-
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:
|
1021
|
+
params(add_invoice_items: T.nilable(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::Subscription::UpdateParams::AutomaticTax), billing_cycle_anchor: T.nilable(String), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), cancel_at_period_end: T.nilable(T::Boolean), cancellation_details: T.nilable(::Stripe::Subscription::UpdateParams::CancellationDetails), collection_method: T.nilable(String), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(T.nilable(String)), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::Subscription::UpdateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::Subscription::UpdateParams::Item]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(T.nilable(String)), pause_collection: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PauseCollection))), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::TransferData))), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_settings: T.nilable(::Stripe::Subscription::UpdateParams::TrialSettings)).void
|
1223
1022
|
}
|
1224
1023
|
def initialize(
|
1225
1024
|
add_invoice_items: nil,
|
1226
1025
|
application_fee_percent: nil,
|
1227
1026
|
automatic_tax: nil,
|
1228
1027
|
billing_cycle_anchor: nil,
|
1229
|
-
billing_thresholds: nil,
|
1230
1028
|
cancel_at: nil,
|
1231
1029
|
cancel_at_period_end: nil,
|
1232
1030
|
cancellation_details: nil,
|
1233
1031
|
collection_method: nil,
|
1234
|
-
coupon: nil,
|
1235
1032
|
days_until_due: nil,
|
1236
1033
|
default_payment_method: nil,
|
1237
1034
|
default_source: nil,
|
@@ -1248,8 +1045,6 @@ module Stripe
|
|
1248
1045
|
payment_behavior: nil,
|
1249
1046
|
payment_settings: nil,
|
1250
1047
|
pending_invoice_item_interval: nil,
|
1251
|
-
prebilling: nil,
|
1252
|
-
promotion_code: nil,
|
1253
1048
|
proration_behavior: nil,
|
1254
1049
|
proration_date: nil,
|
1255
1050
|
transfer_data: nil,
|
@@ -1271,96 +1066,106 @@ module Stripe
|
|
1271
1066
|
end
|
1272
1067
|
class Created < Stripe::RequestParams
|
1273
1068
|
# Minimum value to filter by (exclusive)
|
1274
|
-
sig { returns(Integer) }
|
1069
|
+
sig { returns(T.nilable(Integer)) }
|
1275
1070
|
attr_accessor :gt
|
1276
1071
|
# Minimum value to filter by (inclusive)
|
1277
|
-
sig { returns(Integer) }
|
1072
|
+
sig { returns(T.nilable(Integer)) }
|
1278
1073
|
attr_accessor :gte
|
1279
1074
|
# Maximum value to filter by (exclusive)
|
1280
|
-
sig { returns(Integer) }
|
1075
|
+
sig { returns(T.nilable(Integer)) }
|
1281
1076
|
attr_accessor :lt
|
1282
1077
|
# Maximum value to filter by (inclusive)
|
1283
|
-
sig { returns(Integer) }
|
1078
|
+
sig { returns(T.nilable(Integer)) }
|
1284
1079
|
attr_accessor :lte
|
1285
|
-
sig {
|
1080
|
+
sig {
|
1081
|
+
params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
|
1082
|
+
}
|
1286
1083
|
def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
|
1287
1084
|
end
|
1288
1085
|
class CurrentPeriodEnd < Stripe::RequestParams
|
1289
1086
|
# Minimum value to filter by (exclusive)
|
1290
|
-
sig { returns(Integer) }
|
1087
|
+
sig { returns(T.nilable(Integer)) }
|
1291
1088
|
attr_accessor :gt
|
1292
1089
|
# Minimum value to filter by (inclusive)
|
1293
|
-
sig { returns(Integer) }
|
1090
|
+
sig { returns(T.nilable(Integer)) }
|
1294
1091
|
attr_accessor :gte
|
1295
1092
|
# Maximum value to filter by (exclusive)
|
1296
|
-
sig { returns(Integer) }
|
1093
|
+
sig { returns(T.nilable(Integer)) }
|
1297
1094
|
attr_accessor :lt
|
1298
1095
|
# Maximum value to filter by (inclusive)
|
1299
|
-
sig { returns(Integer) }
|
1096
|
+
sig { returns(T.nilable(Integer)) }
|
1300
1097
|
attr_accessor :lte
|
1301
|
-
sig {
|
1098
|
+
sig {
|
1099
|
+
params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
|
1100
|
+
}
|
1302
1101
|
def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
|
1303
1102
|
end
|
1304
1103
|
class CurrentPeriodStart < Stripe::RequestParams
|
1305
1104
|
# Minimum value to filter by (exclusive)
|
1306
|
-
sig { returns(Integer) }
|
1105
|
+
sig { returns(T.nilable(Integer)) }
|
1307
1106
|
attr_accessor :gt
|
1308
1107
|
# Minimum value to filter by (inclusive)
|
1309
|
-
sig { returns(Integer) }
|
1108
|
+
sig { returns(T.nilable(Integer)) }
|
1310
1109
|
attr_accessor :gte
|
1311
1110
|
# Maximum value to filter by (exclusive)
|
1312
|
-
sig { returns(Integer) }
|
1111
|
+
sig { returns(T.nilable(Integer)) }
|
1313
1112
|
attr_accessor :lt
|
1314
1113
|
# Maximum value to filter by (inclusive)
|
1315
|
-
sig { returns(Integer) }
|
1114
|
+
sig { returns(T.nilable(Integer)) }
|
1316
1115
|
attr_accessor :lte
|
1317
|
-
sig {
|
1116
|
+
sig {
|
1117
|
+
params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
|
1118
|
+
}
|
1318
1119
|
def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
|
1319
1120
|
end
|
1320
1121
|
# Filter subscriptions by their automatic tax settings.
|
1321
|
-
sig { returns(::Stripe::Subscription::ListParams::AutomaticTax) }
|
1122
|
+
sig { returns(T.nilable(::Stripe::Subscription::ListParams::AutomaticTax)) }
|
1322
1123
|
attr_accessor :automatic_tax
|
1323
1124
|
# The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`.
|
1324
|
-
sig { returns(String) }
|
1125
|
+
sig { returns(T.nilable(String)) }
|
1325
1126
|
attr_accessor :collection_method
|
1326
1127
|
# Only return subscriptions that were created during the given date interval.
|
1327
|
-
sig { returns(T.any(::Stripe::Subscription::ListParams::Created, Integer)) }
|
1128
|
+
sig { returns(T.nilable(T.any(::Stripe::Subscription::ListParams::Created, Integer))) }
|
1328
1129
|
attr_accessor :created
|
1329
1130
|
# Only return subscriptions whose current_period_end falls within the given date interval.
|
1330
|
-
sig {
|
1131
|
+
sig {
|
1132
|
+
returns(T.nilable(T.any(::Stripe::Subscription::ListParams::CurrentPeriodEnd, Integer)))
|
1133
|
+
}
|
1331
1134
|
attr_accessor :current_period_end
|
1332
1135
|
# Only return subscriptions whose current_period_start falls within the given date interval.
|
1333
|
-
sig {
|
1136
|
+
sig {
|
1137
|
+
returns(T.nilable(T.any(::Stripe::Subscription::ListParams::CurrentPeriodStart, Integer)))
|
1138
|
+
}
|
1334
1139
|
attr_accessor :current_period_start
|
1335
1140
|
# The ID of the customer whose subscriptions will be retrieved.
|
1336
|
-
sig { returns(String) }
|
1141
|
+
sig { returns(T.nilable(String)) }
|
1337
1142
|
attr_accessor :customer
|
1338
1143
|
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
1339
|
-
sig { returns(String) }
|
1144
|
+
sig { returns(T.nilable(String)) }
|
1340
1145
|
attr_accessor :ending_before
|
1341
1146
|
# Specifies which fields in the response should be expanded.
|
1342
|
-
sig { returns(T::Array[String]) }
|
1147
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1343
1148
|
attr_accessor :expand
|
1344
1149
|
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
1345
|
-
sig { returns(Integer) }
|
1150
|
+
sig { returns(T.nilable(Integer)) }
|
1346
1151
|
attr_accessor :limit
|
1347
1152
|
# The ID of the plan whose subscriptions will be retrieved.
|
1348
|
-
sig { returns(String) }
|
1153
|
+
sig { returns(T.nilable(String)) }
|
1349
1154
|
attr_accessor :plan
|
1350
1155
|
# Filter for subscriptions that contain this recurring price ID.
|
1351
|
-
sig { returns(String) }
|
1156
|
+
sig { returns(T.nilable(String)) }
|
1352
1157
|
attr_accessor :price
|
1353
1158
|
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
1354
|
-
sig { returns(String) }
|
1159
|
+
sig { returns(T.nilable(String)) }
|
1355
1160
|
attr_accessor :starting_after
|
1356
1161
|
# 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.
|
1357
|
-
sig { returns(String) }
|
1162
|
+
sig { returns(T.nilable(String)) }
|
1358
1163
|
attr_accessor :status
|
1359
1164
|
# 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.
|
1360
|
-
sig { returns(String) }
|
1165
|
+
sig { returns(T.nilable(String)) }
|
1361
1166
|
attr_accessor :test_clock
|
1362
1167
|
sig {
|
1363
|
-
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
|
1168
|
+
params(automatic_tax: T.nilable(::Stripe::Subscription::ListParams::AutomaticTax), collection_method: T.nilable(String), created: T.nilable(T.any(::Stripe::Subscription::ListParams::Created, Integer)), current_period_end: T.nilable(T.any(::Stripe::Subscription::ListParams::CurrentPeriodEnd, Integer)), current_period_start: T.nilable(T.any(::Stripe::Subscription::ListParams::CurrentPeriodStart, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), plan: T.nilable(String), price: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String), test_clock: T.nilable(String)).void
|
1364
1169
|
}
|
1365
1170
|
def initialize(
|
1366
1171
|
automatic_tax: nil,
|
@@ -1382,70 +1187,38 @@ module Stripe
|
|
1382
1187
|
class CreateParams < Stripe::RequestParams
|
1383
1188
|
class AddInvoiceItem < Stripe::RequestParams
|
1384
1189
|
class Discount < Stripe::RequestParams
|
1385
|
-
class DiscountEnd < Stripe::RequestParams
|
1386
|
-
class Duration < Stripe::RequestParams
|
1387
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1388
|
-
sig { returns(String) }
|
1389
|
-
attr_accessor :interval
|
1390
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1391
|
-
sig { returns(Integer) }
|
1392
|
-
attr_accessor :interval_count
|
1393
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1394
|
-
def initialize(interval: nil, interval_count: nil); end
|
1395
|
-
end
|
1396
|
-
# Time span for the redeemed discount.
|
1397
|
-
sig {
|
1398
|
-
returns(::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount::DiscountEnd::Duration)
|
1399
|
-
}
|
1400
|
-
attr_accessor :duration
|
1401
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1402
|
-
sig { returns(Integer) }
|
1403
|
-
attr_accessor :timestamp
|
1404
|
-
# The type of calculation made to determine when the discount ends.
|
1405
|
-
sig { returns(String) }
|
1406
|
-
attr_accessor :type
|
1407
|
-
sig {
|
1408
|
-
params(duration: ::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
1409
|
-
}
|
1410
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
1411
|
-
end
|
1412
1190
|
# ID of the coupon to create a new discount for.
|
1413
|
-
sig { returns(String) }
|
1191
|
+
sig { returns(T.nilable(String)) }
|
1414
1192
|
attr_accessor :coupon
|
1415
1193
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1416
|
-
sig { returns(String) }
|
1194
|
+
sig { returns(T.nilable(String)) }
|
1417
1195
|
attr_accessor :discount
|
1418
|
-
# Details to determine how long the discount should be applied for.
|
1419
|
-
sig {
|
1420
|
-
returns(::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount::DiscountEnd)
|
1421
|
-
}
|
1422
|
-
attr_accessor :discount_end
|
1423
1196
|
# ID of the promotion code to create a new discount for.
|
1424
|
-
sig { returns(String) }
|
1197
|
+
sig { returns(T.nilable(String)) }
|
1425
1198
|
attr_accessor :promotion_code
|
1426
1199
|
sig {
|
1427
|
-
params(coupon: String, discount: String,
|
1200
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
1428
1201
|
}
|
1429
|
-
def initialize(coupon: nil, discount: nil,
|
1202
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
1430
1203
|
end
|
1431
1204
|
class PriceData < Stripe::RequestParams
|
1432
1205
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1433
1206
|
sig { returns(String) }
|
1434
1207
|
attr_accessor :currency
|
1435
|
-
# The ID of the
|
1208
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
1436
1209
|
sig { returns(String) }
|
1437
1210
|
attr_accessor :product
|
1438
1211
|
# 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.
|
1439
|
-
sig { returns(String) }
|
1212
|
+
sig { returns(T.nilable(String)) }
|
1440
1213
|
attr_accessor :tax_behavior
|
1441
1214
|
# 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.
|
1442
|
-
sig { returns(Integer) }
|
1215
|
+
sig { returns(T.nilable(Integer)) }
|
1443
1216
|
attr_accessor :unit_amount
|
1444
1217
|
# 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.
|
1445
|
-
sig { returns(String) }
|
1218
|
+
sig { returns(T.nilable(String)) }
|
1446
1219
|
attr_accessor :unit_amount_decimal
|
1447
1220
|
sig {
|
1448
|
-
params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
|
1221
|
+
params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
1449
1222
|
}
|
1450
1223
|
def initialize(
|
1451
1224
|
currency: nil,
|
@@ -1456,22 +1229,24 @@ module Stripe
|
|
1456
1229
|
); end
|
1457
1230
|
end
|
1458
1231
|
# The coupons to redeem into discounts for the item.
|
1459
|
-
sig {
|
1232
|
+
sig {
|
1233
|
+
returns(T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount]))
|
1234
|
+
}
|
1460
1235
|
attr_accessor :discounts
|
1461
1236
|
# The ID of the price object. One of `price` or `price_data` is required.
|
1462
|
-
sig { returns(String) }
|
1237
|
+
sig { returns(T.nilable(String)) }
|
1463
1238
|
attr_accessor :price
|
1464
1239
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
1465
|
-
sig { returns(::Stripe::Subscription::CreateParams::AddInvoiceItem::PriceData) }
|
1240
|
+
sig { returns(T.nilable(::Stripe::Subscription::CreateParams::AddInvoiceItem::PriceData)) }
|
1466
1241
|
attr_accessor :price_data
|
1467
1242
|
# Quantity for this item. Defaults to 1.
|
1468
|
-
sig { returns(Integer) }
|
1243
|
+
sig { returns(T.nilable(Integer)) }
|
1469
1244
|
attr_accessor :quantity
|
1470
1245
|
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
1471
|
-
sig { returns(T.nilable(T::Array[String])) }
|
1246
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1472
1247
|
attr_accessor :tax_rates
|
1473
1248
|
sig {
|
1474
|
-
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
|
1249
|
+
params(discounts: T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::Subscription::CreateParams::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
1475
1250
|
}
|
1476
1251
|
def initialize(
|
1477
1252
|
discounts: nil,
|
@@ -1484,22 +1259,22 @@ module Stripe
|
|
1484
1259
|
class AutomaticTax < Stripe::RequestParams
|
1485
1260
|
class Liability < Stripe::RequestParams
|
1486
1261
|
# The connected account being referenced when `type` is `account`.
|
1487
|
-
sig { returns(String) }
|
1262
|
+
sig { returns(T.nilable(String)) }
|
1488
1263
|
attr_accessor :account
|
1489
1264
|
# Type of the account referenced in the request.
|
1490
1265
|
sig { returns(String) }
|
1491
1266
|
attr_accessor :type
|
1492
|
-
sig { params(account: String, type: String).void }
|
1267
|
+
sig { params(account: T.nilable(String), type: String).void }
|
1493
1268
|
def initialize(account: nil, type: nil); end
|
1494
1269
|
end
|
1495
1270
|
# Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
|
1496
1271
|
sig { returns(T::Boolean) }
|
1497
1272
|
attr_accessor :enabled
|
1498
1273
|
# 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.
|
1499
|
-
sig { returns(::Stripe::Subscription::CreateParams::AutomaticTax::Liability) }
|
1274
|
+
sig { returns(T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax::Liability)) }
|
1500
1275
|
attr_accessor :liability
|
1501
1276
|
sig {
|
1502
|
-
params(enabled: T::Boolean, liability: ::Stripe::Subscription::CreateParams::AutomaticTax::Liability).void
|
1277
|
+
params(enabled: T::Boolean, liability: T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax::Liability)).void
|
1503
1278
|
}
|
1504
1279
|
def initialize(enabled: nil, liability: nil); end
|
1505
1280
|
end
|
@@ -1508,149 +1283,74 @@ module Stripe
|
|
1508
1283
|
sig { returns(Integer) }
|
1509
1284
|
attr_accessor :day_of_month
|
1510
1285
|
# The hour of the day the billing_cycle_anchor should be. Ranges from 0 to 23.
|
1511
|
-
sig { returns(Integer) }
|
1286
|
+
sig { returns(T.nilable(Integer)) }
|
1512
1287
|
attr_accessor :hour
|
1513
1288
|
# The minute of the hour the billing_cycle_anchor should be. Ranges from 0 to 59.
|
1514
|
-
sig { returns(Integer) }
|
1289
|
+
sig { returns(T.nilable(Integer)) }
|
1515
1290
|
attr_accessor :minute
|
1516
1291
|
# The month to start full cycle billing periods. Ranges from 1 to 12.
|
1517
|
-
sig { returns(Integer) }
|
1292
|
+
sig { returns(T.nilable(Integer)) }
|
1518
1293
|
attr_accessor :month
|
1519
1294
|
# The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59.
|
1520
|
-
sig { returns(Integer) }
|
1295
|
+
sig { returns(T.nilable(Integer)) }
|
1521
1296
|
attr_accessor :second
|
1522
1297
|
sig {
|
1523
|
-
params(day_of_month: Integer, hour: Integer, minute: Integer, month: Integer, second: Integer).void
|
1298
|
+
params(day_of_month: Integer, hour: T.nilable(Integer), minute: T.nilable(Integer), month: T.nilable(Integer), second: T.nilable(Integer)).void
|
1524
1299
|
}
|
1525
1300
|
def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end
|
1526
1301
|
end
|
1527
|
-
class BillingThresholds < Stripe::RequestParams
|
1528
|
-
# Monetary threshold that triggers the subscription to advance to a new billing period
|
1529
|
-
sig { returns(Integer) }
|
1530
|
-
attr_accessor :amount_gte
|
1531
|
-
# 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.
|
1532
|
-
sig { returns(T::Boolean) }
|
1533
|
-
attr_accessor :reset_billing_cycle_anchor
|
1534
|
-
sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void }
|
1535
|
-
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
|
1536
|
-
end
|
1537
1302
|
class Discount < Stripe::RequestParams
|
1538
|
-
class DiscountEnd < Stripe::RequestParams
|
1539
|
-
class Duration < Stripe::RequestParams
|
1540
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1541
|
-
sig { returns(String) }
|
1542
|
-
attr_accessor :interval
|
1543
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1544
|
-
sig { returns(Integer) }
|
1545
|
-
attr_accessor :interval_count
|
1546
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1547
|
-
def initialize(interval: nil, interval_count: nil); end
|
1548
|
-
end
|
1549
|
-
# Time span for the redeemed discount.
|
1550
|
-
sig { returns(::Stripe::Subscription::CreateParams::Discount::DiscountEnd::Duration) }
|
1551
|
-
attr_accessor :duration
|
1552
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1553
|
-
sig { returns(Integer) }
|
1554
|
-
attr_accessor :timestamp
|
1555
|
-
# The type of calculation made to determine when the discount ends.
|
1556
|
-
sig { returns(String) }
|
1557
|
-
attr_accessor :type
|
1558
|
-
sig {
|
1559
|
-
params(duration: ::Stripe::Subscription::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
1560
|
-
}
|
1561
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
1562
|
-
end
|
1563
1303
|
# ID of the coupon to create a new discount for.
|
1564
|
-
sig { returns(String) }
|
1304
|
+
sig { returns(T.nilable(String)) }
|
1565
1305
|
attr_accessor :coupon
|
1566
1306
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1567
|
-
sig { returns(String) }
|
1307
|
+
sig { returns(T.nilable(String)) }
|
1568
1308
|
attr_accessor :discount
|
1569
|
-
# Details to determine how long the discount should be applied for.
|
1570
|
-
sig { returns(::Stripe::Subscription::CreateParams::Discount::DiscountEnd) }
|
1571
|
-
attr_accessor :discount_end
|
1572
1309
|
# ID of the promotion code to create a new discount for.
|
1573
|
-
sig { returns(String) }
|
1310
|
+
sig { returns(T.nilable(String)) }
|
1574
1311
|
attr_accessor :promotion_code
|
1575
1312
|
sig {
|
1576
|
-
params(coupon: String, discount: String,
|
1313
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
1577
1314
|
}
|
1578
|
-
def initialize(coupon: nil, discount: nil,
|
1315
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
1579
1316
|
end
|
1580
1317
|
class InvoiceSettings < Stripe::RequestParams
|
1581
1318
|
class Issuer < Stripe::RequestParams
|
1582
1319
|
# The connected account being referenced when `type` is `account`.
|
1583
|
-
sig { returns(String) }
|
1320
|
+
sig { returns(T.nilable(String)) }
|
1584
1321
|
attr_accessor :account
|
1585
1322
|
# Type of the account referenced in the request.
|
1586
1323
|
sig { returns(String) }
|
1587
1324
|
attr_accessor :type
|
1588
|
-
sig { params(account: String, type: String).void }
|
1325
|
+
sig { params(account: T.nilable(String), type: String).void }
|
1589
1326
|
def initialize(account: nil, type: nil); end
|
1590
1327
|
end
|
1591
1328
|
# The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
|
1592
|
-
sig { returns(T.nilable(T::Array[String])) }
|
1329
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1593
1330
|
attr_accessor :account_tax_ids
|
1594
1331
|
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
1595
|
-
sig { returns(::Stripe::Subscription::CreateParams::InvoiceSettings::Issuer) }
|
1332
|
+
sig { returns(T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings::Issuer)) }
|
1596
1333
|
attr_accessor :issuer
|
1597
1334
|
sig {
|
1598
|
-
params(account_tax_ids: T.nilable(T::Array[String]), issuer: ::Stripe::Subscription::CreateParams::InvoiceSettings::Issuer).void
|
1335
|
+
params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), issuer: T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings::Issuer)).void
|
1599
1336
|
}
|
1600
1337
|
def initialize(account_tax_ids: nil, issuer: nil); end
|
1601
1338
|
end
|
1602
1339
|
class Item < Stripe::RequestParams
|
1603
|
-
class BillingThresholds < Stripe::RequestParams
|
1604
|
-
# 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))
|
1605
|
-
sig { returns(Integer) }
|
1606
|
-
attr_accessor :usage_gte
|
1607
|
-
sig { params(usage_gte: Integer).void }
|
1608
|
-
def initialize(usage_gte: nil); end
|
1609
|
-
end
|
1610
1340
|
class Discount < Stripe::RequestParams
|
1611
|
-
class DiscountEnd < Stripe::RequestParams
|
1612
|
-
class Duration < Stripe::RequestParams
|
1613
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1614
|
-
sig { returns(String) }
|
1615
|
-
attr_accessor :interval
|
1616
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1617
|
-
sig { returns(Integer) }
|
1618
|
-
attr_accessor :interval_count
|
1619
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1620
|
-
def initialize(interval: nil, interval_count: nil); end
|
1621
|
-
end
|
1622
|
-
# Time span for the redeemed discount.
|
1623
|
-
sig {
|
1624
|
-
returns(::Stripe::Subscription::CreateParams::Item::Discount::DiscountEnd::Duration)
|
1625
|
-
}
|
1626
|
-
attr_accessor :duration
|
1627
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1628
|
-
sig { returns(Integer) }
|
1629
|
-
attr_accessor :timestamp
|
1630
|
-
# The type of calculation made to determine when the discount ends.
|
1631
|
-
sig { returns(String) }
|
1632
|
-
attr_accessor :type
|
1633
|
-
sig {
|
1634
|
-
params(duration: ::Stripe::Subscription::CreateParams::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
1635
|
-
}
|
1636
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
1637
|
-
end
|
1638
1341
|
# ID of the coupon to create a new discount for.
|
1639
|
-
sig { returns(String) }
|
1342
|
+
sig { returns(T.nilable(String)) }
|
1640
1343
|
attr_accessor :coupon
|
1641
1344
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1642
|
-
sig { returns(String) }
|
1345
|
+
sig { returns(T.nilable(String)) }
|
1643
1346
|
attr_accessor :discount
|
1644
|
-
# Details to determine how long the discount should be applied for.
|
1645
|
-
sig { returns(::Stripe::Subscription::CreateParams::Item::Discount::DiscountEnd) }
|
1646
|
-
attr_accessor :discount_end
|
1647
1347
|
# ID of the promotion code to create a new discount for.
|
1648
|
-
sig { returns(String) }
|
1348
|
+
sig { returns(T.nilable(String)) }
|
1649
1349
|
attr_accessor :promotion_code
|
1650
1350
|
sig {
|
1651
|
-
params(coupon: String, discount: String,
|
1351
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
1652
1352
|
}
|
1653
|
-
def initialize(coupon: nil, discount: nil,
|
1353
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
1654
1354
|
end
|
1655
1355
|
class PriceData < Stripe::RequestParams
|
1656
1356
|
class Recurring < Stripe::RequestParams
|
@@ -1658,31 +1358,31 @@ module Stripe
|
|
1658
1358
|
sig { returns(String) }
|
1659
1359
|
attr_accessor :interval
|
1660
1360
|
# 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).
|
1661
|
-
sig { returns(Integer) }
|
1361
|
+
sig { returns(T.nilable(Integer)) }
|
1662
1362
|
attr_accessor :interval_count
|
1663
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1363
|
+
sig { params(interval: String, interval_count: T.nilable(Integer)).void }
|
1664
1364
|
def initialize(interval: nil, interval_count: nil); end
|
1665
1365
|
end
|
1666
1366
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1667
1367
|
sig { returns(String) }
|
1668
1368
|
attr_accessor :currency
|
1669
|
-
# The ID of the
|
1369
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
1670
1370
|
sig { returns(String) }
|
1671
1371
|
attr_accessor :product
|
1672
1372
|
# The recurring components of a price such as `interval` and `interval_count`.
|
1673
1373
|
sig { returns(::Stripe::Subscription::CreateParams::Item::PriceData::Recurring) }
|
1674
1374
|
attr_accessor :recurring
|
1675
1375
|
# 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.
|
1676
|
-
sig { returns(String) }
|
1376
|
+
sig { returns(T.nilable(String)) }
|
1677
1377
|
attr_accessor :tax_behavior
|
1678
1378
|
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
1679
|
-
sig { returns(Integer) }
|
1379
|
+
sig { returns(T.nilable(Integer)) }
|
1680
1380
|
attr_accessor :unit_amount
|
1681
1381
|
# 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.
|
1682
|
-
sig { returns(String) }
|
1382
|
+
sig { returns(T.nilable(String)) }
|
1683
1383
|
attr_accessor :unit_amount_decimal
|
1684
1384
|
sig {
|
1685
|
-
params(currency: String, product: String, recurring: ::Stripe::Subscription::CreateParams::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
|
1385
|
+
params(currency: String, product: String, recurring: ::Stripe::Subscription::CreateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
1686
1386
|
}
|
1687
1387
|
def initialize(
|
1688
1388
|
currency: nil,
|
@@ -1693,56 +1393,40 @@ module Stripe
|
|
1693
1393
|
unit_amount_decimal: nil
|
1694
1394
|
); end
|
1695
1395
|
end
|
1696
|
-
class Trial < Stripe::RequestParams
|
1697
|
-
# 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.
|
1698
|
-
sig { returns(T::Array[String]) }
|
1699
|
-
attr_accessor :converts_to
|
1700
|
-
# Determines the type of trial for this item.
|
1701
|
-
sig { returns(String) }
|
1702
|
-
attr_accessor :type
|
1703
|
-
sig { params(converts_to: T::Array[String], type: String).void }
|
1704
|
-
def initialize(converts_to: nil, type: nil); end
|
1705
|
-
end
|
1706
|
-
# 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.
|
1707
|
-
sig { returns(T.nilable(::Stripe::Subscription::CreateParams::Item::BillingThresholds)) }
|
1708
|
-
attr_accessor :billing_thresholds
|
1709
1396
|
# The coupons to redeem into discounts for the subscription item.
|
1710
|
-
sig {
|
1397
|
+
sig {
|
1398
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Item::Discount]))))
|
1399
|
+
}
|
1711
1400
|
attr_accessor :discounts
|
1712
1401
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1713
|
-
sig { returns(T::Hash[String, String]) }
|
1402
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
1714
1403
|
attr_accessor :metadata
|
1715
1404
|
# Plan ID for this item, as a string.
|
1716
|
-
sig { returns(String) }
|
1405
|
+
sig { returns(T.nilable(String)) }
|
1717
1406
|
attr_accessor :plan
|
1718
1407
|
# The ID of the price object.
|
1719
|
-
sig { returns(String) }
|
1408
|
+
sig { returns(T.nilable(String)) }
|
1720
1409
|
attr_accessor :price
|
1721
1410
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
|
1722
|
-
sig { returns(::Stripe::Subscription::CreateParams::Item::PriceData) }
|
1411
|
+
sig { returns(T.nilable(::Stripe::Subscription::CreateParams::Item::PriceData)) }
|
1723
1412
|
attr_accessor :price_data
|
1724
1413
|
# Quantity for this item.
|
1725
|
-
sig { returns(Integer) }
|
1414
|
+
sig { returns(T.nilable(Integer)) }
|
1726
1415
|
attr_accessor :quantity
|
1727
1416
|
# 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.
|
1728
|
-
sig { returns(T.nilable(T::Array[String])) }
|
1417
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1729
1418
|
attr_accessor :tax_rates
|
1730
|
-
# Define options to configure the trial on the subscription item.
|
1731
|
-
sig { returns(::Stripe::Subscription::CreateParams::Item::Trial) }
|
1732
|
-
attr_accessor :trial
|
1733
1419
|
sig {
|
1734
|
-
params(
|
1420
|
+
params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::Subscription::CreateParams::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
1735
1421
|
}
|
1736
1422
|
def initialize(
|
1737
|
-
billing_thresholds: nil,
|
1738
1423
|
discounts: nil,
|
1739
1424
|
metadata: nil,
|
1740
1425
|
plan: nil,
|
1741
1426
|
price: nil,
|
1742
1427
|
price_data: nil,
|
1743
1428
|
quantity: nil,
|
1744
|
-
tax_rates: nil
|
1745
|
-
trial: nil
|
1429
|
+
tax_rates: nil
|
1746
1430
|
); end
|
1747
1431
|
end
|
1748
1432
|
class PaymentSettings < Stripe::RequestParams
|
@@ -1750,58 +1434,60 @@ module Stripe
|
|
1750
1434
|
class AcssDebit < Stripe::RequestParams
|
1751
1435
|
class MandateOptions < Stripe::RequestParams
|
1752
1436
|
# Transaction type of the mandate.
|
1753
|
-
sig { returns(String) }
|
1437
|
+
sig { returns(T.nilable(String)) }
|
1754
1438
|
attr_accessor :transaction_type
|
1755
|
-
sig { params(transaction_type: String).void }
|
1439
|
+
sig { params(transaction_type: T.nilable(String)).void }
|
1756
1440
|
def initialize(transaction_type: nil); end
|
1757
1441
|
end
|
1758
1442
|
# Additional fields for Mandate creation
|
1759
1443
|
sig {
|
1760
|
-
returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions)
|
1444
|
+
returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
|
1761
1445
|
}
|
1762
1446
|
attr_accessor :mandate_options
|
1763
1447
|
# Verification method for the intent
|
1764
|
-
sig { returns(String) }
|
1448
|
+
sig { returns(T.nilable(String)) }
|
1765
1449
|
attr_accessor :verification_method
|
1766
1450
|
sig {
|
1767
|
-
params(mandate_options: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void
|
1451
|
+
params(mandate_options: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
|
1768
1452
|
}
|
1769
1453
|
def initialize(mandate_options: nil, verification_method: nil); end
|
1770
1454
|
end
|
1771
1455
|
class Bancontact < Stripe::RequestParams
|
1772
1456
|
# Preferred language of the Bancontact authorization page that the customer is redirected to.
|
1773
|
-
sig { returns(String) }
|
1457
|
+
sig { returns(T.nilable(String)) }
|
1774
1458
|
attr_accessor :preferred_language
|
1775
|
-
sig { params(preferred_language: String).void }
|
1459
|
+
sig { params(preferred_language: T.nilable(String)).void }
|
1776
1460
|
def initialize(preferred_language: nil); end
|
1777
1461
|
end
|
1778
1462
|
class Card < Stripe::RequestParams
|
1779
1463
|
class MandateOptions < Stripe::RequestParams
|
1780
1464
|
# Amount to be charged for future payments.
|
1781
|
-
sig { returns(Integer) }
|
1465
|
+
sig { returns(T.nilable(Integer)) }
|
1782
1466
|
attr_accessor :amount
|
1783
1467
|
# 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.
|
1784
|
-
sig { returns(String) }
|
1468
|
+
sig { returns(T.nilable(String)) }
|
1785
1469
|
attr_accessor :amount_type
|
1786
1470
|
# A description of the mandate or subscription that is meant to be displayed to the customer.
|
1787
|
-
sig { returns(String) }
|
1471
|
+
sig { returns(T.nilable(String)) }
|
1788
1472
|
attr_accessor :description
|
1789
|
-
sig {
|
1473
|
+
sig {
|
1474
|
+
params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void
|
1475
|
+
}
|
1790
1476
|
def initialize(amount: nil, amount_type: nil, description: nil); end
|
1791
1477
|
end
|
1792
1478
|
# Configuration options for setting up an eMandate for cards issued in India.
|
1793
1479
|
sig {
|
1794
|
-
returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions)
|
1480
|
+
returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions))
|
1795
1481
|
}
|
1796
1482
|
attr_accessor :mandate_options
|
1797
1483
|
# 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.
|
1798
|
-
sig { returns(String) }
|
1484
|
+
sig { returns(T.nilable(String)) }
|
1799
1485
|
attr_accessor :network
|
1800
1486
|
# 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.
|
1801
|
-
sig { returns(String) }
|
1487
|
+
sig { returns(T.nilable(String)) }
|
1802
1488
|
attr_accessor :request_three_d_secure
|
1803
1489
|
sig {
|
1804
|
-
params(mandate_options: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions, network: String, request_three_d_secure: String).void
|
1490
|
+
params(mandate_options: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void
|
1805
1491
|
}
|
1806
1492
|
def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end
|
1807
1493
|
end
|
@@ -1816,32 +1502,29 @@ module Stripe
|
|
1816
1502
|
end
|
1817
1503
|
# Configuration for eu_bank_transfer funding type.
|
1818
1504
|
sig {
|
1819
|
-
returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer)
|
1505
|
+
returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
|
1820
1506
|
}
|
1821
1507
|
attr_accessor :eu_bank_transfer
|
1822
1508
|
# 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`.
|
1823
|
-
sig { returns(String) }
|
1509
|
+
sig { returns(T.nilable(String)) }
|
1824
1510
|
attr_accessor :type
|
1825
1511
|
sig {
|
1826
|
-
params(eu_bank_transfer: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, type: String).void
|
1512
|
+
params(eu_bank_transfer: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
|
1827
1513
|
}
|
1828
1514
|
def initialize(eu_bank_transfer: nil, type: nil); end
|
1829
1515
|
end
|
1830
1516
|
# Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
|
1831
1517
|
sig {
|
1832
|
-
returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer)
|
1518
|
+
returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
|
1833
1519
|
}
|
1834
1520
|
attr_accessor :bank_transfer
|
1835
1521
|
# The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
|
1836
|
-
sig { returns(String) }
|
1522
|
+
sig { returns(T.nilable(String)) }
|
1837
1523
|
attr_accessor :funding_type
|
1838
1524
|
sig {
|
1839
|
-
params(bank_transfer: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String).void
|
1525
|
+
params(bank_transfer: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
|
1840
1526
|
}
|
1841
1527
|
def initialize(bank_transfer: nil, funding_type: nil); end
|
1842
|
-
end
|
1843
|
-
class IdBankTransfer < Stripe::RequestParams
|
1844
|
-
|
1845
1528
|
end
|
1846
1529
|
class Konbini < Stripe::RequestParams
|
1847
1530
|
|
@@ -1853,108 +1536,101 @@ module Stripe
|
|
1853
1536
|
class FinancialConnections < Stripe::RequestParams
|
1854
1537
|
class Filters < Stripe::RequestParams
|
1855
1538
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
1856
|
-
sig { returns(T::Array[String]) }
|
1539
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1857
1540
|
attr_accessor :account_subcategories
|
1858
|
-
|
1859
|
-
|
1860
|
-
attr_accessor :institution
|
1861
|
-
sig { params(account_subcategories: T::Array[String], institution: String).void }
|
1862
|
-
def initialize(account_subcategories: nil, institution: nil); end
|
1541
|
+
sig { params(account_subcategories: T.nilable(T::Array[String])).void }
|
1542
|
+
def initialize(account_subcategories: nil); end
|
1863
1543
|
end
|
1864
1544
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
1865
1545
|
sig {
|
1866
|
-
returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters)
|
1546
|
+
returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
|
1867
1547
|
}
|
1868
1548
|
attr_accessor :filters
|
1869
1549
|
# 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`.
|
1870
|
-
sig { returns(T::Array[String]) }
|
1550
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1871
1551
|
attr_accessor :permissions
|
1872
1552
|
# List of data features that you would like to retrieve upon account creation.
|
1873
|
-
sig { returns(T::Array[String]) }
|
1553
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1874
1554
|
attr_accessor :prefetch
|
1875
1555
|
sig {
|
1876
|
-
params(filters: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, permissions: T::Array[String], prefetch: T::Array[String]).void
|
1556
|
+
params(filters: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
|
1877
1557
|
}
|
1878
1558
|
def initialize(filters: nil, permissions: nil, prefetch: nil); end
|
1879
1559
|
end
|
1880
1560
|
# Additional fields for Financial Connections Session creation
|
1881
1561
|
sig {
|
1882
|
-
returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections)
|
1562
|
+
returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
|
1883
1563
|
}
|
1884
1564
|
attr_accessor :financial_connections
|
1885
1565
|
# Verification method for the intent
|
1886
|
-
sig { returns(String) }
|
1566
|
+
sig { returns(T.nilable(String)) }
|
1887
1567
|
attr_accessor :verification_method
|
1888
1568
|
sig {
|
1889
|
-
params(financial_connections: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections, verification_method: String).void
|
1569
|
+
params(financial_connections: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
|
1890
1570
|
}
|
1891
1571
|
def initialize(financial_connections: nil, verification_method: nil); end
|
1892
1572
|
end
|
1893
1573
|
# This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
|
1894
1574
|
sig {
|
1895
|
-
returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))
|
1575
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
|
1896
1576
|
}
|
1897
1577
|
attr_accessor :acss_debit
|
1898
1578
|
# This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
|
1899
1579
|
sig {
|
1900
|
-
returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))
|
1580
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
|
1901
1581
|
}
|
1902
1582
|
attr_accessor :bancontact
|
1903
1583
|
# This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
|
1904
1584
|
sig {
|
1905
|
-
returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card))
|
1585
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card))))
|
1906
1586
|
}
|
1907
1587
|
attr_accessor :card
|
1908
1588
|
# This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1909
1589
|
sig {
|
1910
|
-
returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))
|
1590
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
|
1911
1591
|
}
|
1912
1592
|
attr_accessor :customer_balance
|
1913
|
-
# This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1914
|
-
sig {
|
1915
|
-
returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer))
|
1916
|
-
}
|
1917
|
-
attr_accessor :id_bank_transfer
|
1918
1593
|
# This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
1919
1594
|
sig {
|
1920
|
-
returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))
|
1595
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
|
1921
1596
|
}
|
1922
1597
|
attr_accessor :konbini
|
1923
1598
|
# This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
|
1924
1599
|
sig {
|
1925
|
-
returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))
|
1600
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
|
1926
1601
|
}
|
1927
1602
|
attr_accessor :sepa_debit
|
1928
1603
|
# This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
|
1929
1604
|
sig {
|
1930
|
-
returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))
|
1605
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
|
1931
1606
|
}
|
1932
1607
|
attr_accessor :us_bank_account
|
1933
1608
|
sig {
|
1934
|
-
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(
|
1609
|
+
params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
|
1935
1610
|
}
|
1936
1611
|
def initialize(
|
1937
1612
|
acss_debit: nil,
|
1938
1613
|
bancontact: nil,
|
1939
1614
|
card: nil,
|
1940
1615
|
customer_balance: nil,
|
1941
|
-
id_bank_transfer: nil,
|
1942
1616
|
konbini: nil,
|
1943
1617
|
sepa_debit: nil,
|
1944
1618
|
us_bank_account: nil
|
1945
1619
|
); end
|
1946
1620
|
end
|
1947
1621
|
# Payment-method-specific configuration to provide to invoices created by the subscription.
|
1948
|
-
sig {
|
1622
|
+
sig {
|
1623
|
+
returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions))
|
1624
|
+
}
|
1949
1625
|
attr_accessor :payment_method_options
|
1950
1626
|
# 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
|
1951
|
-
sig { returns(T.nilable(T::Array[String])) }
|
1627
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1952
1628
|
attr_accessor :payment_method_types
|
1953
1629
|
# Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
|
1954
|
-
sig { returns(String) }
|
1630
|
+
sig { returns(T.nilable(String)) }
|
1955
1631
|
attr_accessor :save_default_payment_method
|
1956
1632
|
sig {
|
1957
|
-
params(payment_method_options: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions, payment_method_types: T.nilable(T::Array[String]), save_default_payment_method: String).void
|
1633
|
+
params(payment_method_options: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String]))), save_default_payment_method: T.nilable(String)).void
|
1958
1634
|
}
|
1959
1635
|
def initialize(
|
1960
1636
|
payment_method_options: nil,
|
@@ -1967,29 +1643,19 @@ module Stripe
|
|
1967
1643
|
sig { returns(String) }
|
1968
1644
|
attr_accessor :interval
|
1969
1645
|
# 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).
|
1970
|
-
sig { returns(Integer) }
|
1646
|
+
sig { returns(T.nilable(Integer)) }
|
1971
1647
|
attr_accessor :interval_count
|
1972
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1648
|
+
sig { params(interval: String, interval_count: T.nilable(Integer)).void }
|
1973
1649
|
def initialize(interval: nil, interval_count: nil); end
|
1974
1650
|
end
|
1975
|
-
class Prebilling < Stripe::RequestParams
|
1976
|
-
# This is used to determine the number of billing cycles to prebill.
|
1977
|
-
sig { returns(Integer) }
|
1978
|
-
attr_accessor :iterations
|
1979
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1980
|
-
sig { returns(String) }
|
1981
|
-
attr_accessor :update_behavior
|
1982
|
-
sig { params(iterations: Integer, update_behavior: String).void }
|
1983
|
-
def initialize(iterations: nil, update_behavior: nil); end
|
1984
|
-
end
|
1985
1651
|
class TransferData < Stripe::RequestParams
|
1986
1652
|
# 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.
|
1987
|
-
sig { returns(Float) }
|
1653
|
+
sig { returns(T.nilable(Float)) }
|
1988
1654
|
attr_accessor :amount_percent
|
1989
1655
|
# ID of an existing, connected Stripe account.
|
1990
1656
|
sig { returns(String) }
|
1991
1657
|
attr_accessor :destination
|
1992
|
-
sig { params(amount_percent: Float, destination: String).void }
|
1658
|
+
sig { params(amount_percent: T.nilable(Float), destination: String).void }
|
1993
1659
|
def initialize(amount_percent: nil, destination: nil); end
|
1994
1660
|
end
|
1995
1661
|
class TrialSettings < Stripe::RequestParams
|
@@ -2009,79 +1675,75 @@ module Stripe
|
|
2009
1675
|
def initialize(end_behavior: nil); end
|
2010
1676
|
end
|
2011
1677
|
# 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.
|
2012
|
-
sig { returns(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem]) }
|
1678
|
+
sig { returns(T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem])) }
|
2013
1679
|
attr_accessor :add_invoice_items
|
2014
1680
|
# 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).
|
2015
|
-
sig { returns(T.nilable(Float)) }
|
1681
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
|
2016
1682
|
attr_accessor :application_fee_percent
|
2017
1683
|
# Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
|
2018
|
-
sig { returns(::Stripe::Subscription::CreateParams::AutomaticTax) }
|
1684
|
+
sig { returns(T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax)) }
|
2019
1685
|
attr_accessor :automatic_tax
|
2020
1686
|
# 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.
|
2021
|
-
sig { returns(Integer) }
|
1687
|
+
sig { returns(T.nilable(Integer)) }
|
2022
1688
|
attr_accessor :backdate_start_date
|
2023
1689
|
# 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.
|
2024
|
-
sig { returns(Integer) }
|
1690
|
+
sig { returns(T.nilable(Integer)) }
|
2025
1691
|
attr_accessor :billing_cycle_anchor
|
2026
1692
|
# 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.
|
2027
|
-
sig { returns(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig) }
|
1693
|
+
sig { returns(T.nilable(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig)) }
|
2028
1694
|
attr_accessor :billing_cycle_anchor_config
|
2029
|
-
# 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.
|
2030
|
-
sig { returns(T.nilable(::Stripe::Subscription::CreateParams::BillingThresholds)) }
|
2031
|
-
attr_accessor :billing_thresholds
|
2032
1695
|
# 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.
|
2033
|
-
sig { returns(Integer) }
|
1696
|
+
sig { returns(T.nilable(Integer)) }
|
2034
1697
|
attr_accessor :cancel_at
|
2035
1698
|
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
2036
|
-
sig { returns(T::Boolean) }
|
1699
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2037
1700
|
attr_accessor :cancel_at_period_end
|
2038
1701
|
# 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`.
|
2039
|
-
sig { returns(String) }
|
1702
|
+
sig { returns(T.nilable(String)) }
|
2040
1703
|
attr_accessor :collection_method
|
2041
|
-
# 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.
|
2042
|
-
sig { returns(String) }
|
2043
|
-
attr_accessor :coupon
|
2044
1704
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
2045
|
-
sig { returns(String) }
|
1705
|
+
sig { returns(T.nilable(String)) }
|
2046
1706
|
attr_accessor :currency
|
2047
1707
|
# The identifier of the customer to subscribe.
|
2048
1708
|
sig { returns(String) }
|
2049
1709
|
attr_accessor :customer
|
2050
1710
|
# 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`.
|
2051
|
-
sig { returns(Integer) }
|
1711
|
+
sig { returns(T.nilable(Integer)) }
|
2052
1712
|
attr_accessor :days_until_due
|
2053
1713
|
# 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).
|
2054
|
-
sig { returns(String) }
|
1714
|
+
sig { returns(T.nilable(String)) }
|
2055
1715
|
attr_accessor :default_payment_method
|
2056
1716
|
# 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).
|
2057
|
-
sig { returns(String) }
|
1717
|
+
sig { returns(T.nilable(String)) }
|
2058
1718
|
attr_accessor :default_source
|
2059
1719
|
# 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.
|
2060
|
-
sig { returns(T.nilable(T::Array[String])) }
|
1720
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
2061
1721
|
attr_accessor :default_tax_rates
|
2062
1722
|
# 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.
|
2063
|
-
sig { returns(String) }
|
1723
|
+
sig { returns(T.nilable(String)) }
|
2064
1724
|
attr_accessor :description
|
2065
1725
|
# The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
|
2066
|
-
sig {
|
1726
|
+
sig {
|
1727
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Discount]))))
|
1728
|
+
}
|
2067
1729
|
attr_accessor :discounts
|
2068
1730
|
# Specifies which fields in the response should be expanded.
|
2069
|
-
sig { returns(T::Array[String]) }
|
1731
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2070
1732
|
attr_accessor :expand
|
2071
1733
|
# All invoices will be billed using the specified settings.
|
2072
|
-
sig { returns(::Stripe::Subscription::CreateParams::InvoiceSettings) }
|
1734
|
+
sig { returns(T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings)) }
|
2073
1735
|
attr_accessor :invoice_settings
|
2074
1736
|
# A list of up to 20 subscription items, each with an attached price.
|
2075
|
-
sig { returns(T::Array[::Stripe::Subscription::CreateParams::Item]) }
|
1737
|
+
sig { returns(T.nilable(T::Array[::Stripe::Subscription::CreateParams::Item])) }
|
2076
1738
|
attr_accessor :items
|
2077
1739
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2078
|
-
sig { returns(T.nilable(T::Hash[String, String])) }
|
1740
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
|
2079
1741
|
attr_accessor :metadata
|
2080
1742
|
# Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
|
2081
|
-
sig { returns(T::Boolean) }
|
1743
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2082
1744
|
attr_accessor :off_session
|
2083
1745
|
# The account on behalf of which to charge, for each of the subscription's invoices.
|
2084
|
-
sig { returns(T.nilable(String)) }
|
1746
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
2085
1747
|
attr_accessor :on_behalf_of
|
2086
1748
|
# Only applies to subscriptions with `collection_method=charge_automatically`.
|
2087
1749
|
#
|
@@ -2094,40 +1756,36 @@ module Stripe
|
|
2094
1756
|
# `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription.
|
2095
1757
|
#
|
2096
1758
|
# Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.
|
2097
|
-
sig { returns(String) }
|
1759
|
+
sig { returns(T.nilable(String)) }
|
2098
1760
|
attr_accessor :payment_behavior
|
2099
1761
|
# Payment settings to pass to invoices created by the subscription.
|
2100
|
-
sig { returns(::Stripe::Subscription::CreateParams::PaymentSettings) }
|
1762
|
+
sig { returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings)) }
|
2101
1763
|
attr_accessor :payment_settings
|
2102
1764
|
# 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.
|
2103
|
-
sig {
|
1765
|
+
sig {
|
1766
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PendingInvoiceItemInterval))))
|
1767
|
+
}
|
2104
1768
|
attr_accessor :pending_invoice_item_interval
|
2105
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
2106
|
-
sig { returns(::Stripe::Subscription::CreateParams::Prebilling) }
|
2107
|
-
attr_accessor :prebilling
|
2108
|
-
# 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.
|
2109
|
-
sig { returns(String) }
|
2110
|
-
attr_accessor :promotion_code
|
2111
1769
|
# 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`.
|
2112
|
-
sig { returns(String) }
|
1770
|
+
sig { returns(T.nilable(String)) }
|
2113
1771
|
attr_accessor :proration_behavior
|
2114
1772
|
# 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.
|
2115
|
-
sig { returns(::Stripe::Subscription::CreateParams::TransferData) }
|
1773
|
+
sig { returns(T.nilable(::Stripe::Subscription::CreateParams::TransferData)) }
|
2116
1774
|
attr_accessor :transfer_data
|
2117
1775
|
# 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.
|
2118
|
-
sig { returns(T.any(String, Integer)) }
|
1776
|
+
sig { returns(T.nilable(T.any(String, Integer))) }
|
2119
1777
|
attr_accessor :trial_end
|
2120
1778
|
# 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.
|
2121
|
-
sig { returns(T::Boolean) }
|
1779
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2122
1780
|
attr_accessor :trial_from_plan
|
2123
1781
|
# 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.
|
2124
|
-
sig { returns(Integer) }
|
1782
|
+
sig { returns(T.nilable(Integer)) }
|
2125
1783
|
attr_accessor :trial_period_days
|
2126
1784
|
# Settings related to subscription trials.
|
2127
|
-
sig { returns(::Stripe::Subscription::CreateParams::TrialSettings) }
|
1785
|
+
sig { returns(T.nilable(::Stripe::Subscription::CreateParams::TrialSettings)) }
|
2128
1786
|
attr_accessor :trial_settings
|
2129
1787
|
sig {
|
2130
|
-
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:
|
1788
|
+
params(add_invoice_items: T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax), backdate_start_date: T.nilable(Integer), billing_cycle_anchor: T.nilable(Integer), billing_cycle_anchor_config: T.nilable(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig), cancel_at: T.nilable(Integer), cancel_at_period_end: T.nilable(T::Boolean), collection_method: T.nilable(String), currency: T.nilable(String), customer: String, days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::Subscription::CreateParams::Item]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(T.nilable(String)), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Subscription::CreateParams::TransferData), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Subscription::CreateParams::TrialSettings)).void
|
2131
1789
|
}
|
2132
1790
|
def initialize(
|
2133
1791
|
add_invoice_items: nil,
|
@@ -2136,11 +1794,9 @@ module Stripe
|
|
2136
1794
|
backdate_start_date: nil,
|
2137
1795
|
billing_cycle_anchor: nil,
|
2138
1796
|
billing_cycle_anchor_config: nil,
|
2139
|
-
billing_thresholds: nil,
|
2140
1797
|
cancel_at: nil,
|
2141
1798
|
cancel_at_period_end: nil,
|
2142
1799
|
collection_method: nil,
|
2143
|
-
coupon: nil,
|
2144
1800
|
currency: nil,
|
2145
1801
|
customer: nil,
|
2146
1802
|
days_until_due: nil,
|
@@ -2158,8 +1814,6 @@ module Stripe
|
|
2158
1814
|
payment_behavior: nil,
|
2159
1815
|
payment_settings: nil,
|
2160
1816
|
pending_invoice_item_interval: nil,
|
2161
|
-
prebilling: nil,
|
2162
|
-
promotion_code: nil,
|
2163
1817
|
proration_behavior: nil,
|
2164
1818
|
transfer_data: nil,
|
2165
1819
|
trial_end: nil,
|
@@ -2170,35 +1824,37 @@ module Stripe
|
|
2170
1824
|
end
|
2171
1825
|
class SearchParams < Stripe::RequestParams
|
2172
1826
|
# Specifies which fields in the response should be expanded.
|
2173
|
-
sig { returns(T::Array[String]) }
|
1827
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2174
1828
|
attr_accessor :expand
|
2175
1829
|
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
2176
|
-
sig { returns(Integer) }
|
1830
|
+
sig { returns(T.nilable(Integer)) }
|
2177
1831
|
attr_accessor :limit
|
2178
1832
|
# 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.
|
2179
|
-
sig { returns(String) }
|
1833
|
+
sig { returns(T.nilable(String)) }
|
2180
1834
|
attr_accessor :page
|
2181
1835
|
# 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).
|
2182
1836
|
sig { returns(String) }
|
2183
1837
|
attr_accessor :query
|
2184
|
-
sig {
|
1838
|
+
sig {
|
1839
|
+
params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
|
1840
|
+
}
|
2185
1841
|
def initialize(expand: nil, limit: nil, page: nil, query: nil); end
|
2186
1842
|
end
|
2187
1843
|
class ResumeParams < Stripe::RequestParams
|
2188
1844
|
# 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).
|
2189
|
-
sig { returns(String) }
|
1845
|
+
sig { returns(T.nilable(String)) }
|
2190
1846
|
attr_accessor :billing_cycle_anchor
|
2191
1847
|
# Specifies which fields in the response should be expanded.
|
2192
|
-
sig { returns(T::Array[String]) }
|
1848
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2193
1849
|
attr_accessor :expand
|
2194
1850
|
# 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`.
|
2195
|
-
sig { returns(String) }
|
1851
|
+
sig { returns(T.nilable(String)) }
|
2196
1852
|
attr_accessor :proration_behavior
|
2197
1853
|
# 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.
|
2198
|
-
sig { returns(Integer) }
|
1854
|
+
sig { returns(T.nilable(Integer)) }
|
2199
1855
|
attr_accessor :proration_date
|
2200
1856
|
sig {
|
2201
|
-
params(billing_cycle_anchor: String, expand: T::Array[String], proration_behavior: String, proration_date: Integer).void
|
1857
|
+
params(billing_cycle_anchor: T.nilable(String), expand: T.nilable(T::Array[String]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer)).void
|
2202
1858
|
}
|
2203
1859
|
def initialize(
|
2204
1860
|
billing_cycle_anchor: nil,
|