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
@@ -7,105 +7,75 @@ module Stripe
|
|
7
7
|
class CancelParams < Stripe::RequestParams
|
8
8
|
class CancellationDetails < Stripe::RequestParams
|
9
9
|
# Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
|
10
|
-
sig { returns(T.nilable(String)) }
|
10
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
11
11
|
attr_accessor :comment
|
12
12
|
# The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
|
13
|
-
sig { returns(T.nilable(String)) }
|
13
|
+
sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
|
14
14
|
attr_accessor :feedback
|
15
|
-
sig {
|
15
|
+
sig {
|
16
|
+
params(comment: T.nilable(T.nilable(String)), feedback: T.nilable(T.nilable(T.any(String, String)))).void
|
17
|
+
}
|
16
18
|
def initialize(comment: nil, feedback: nil); end
|
17
19
|
end
|
18
20
|
# Details about why this subscription was cancelled
|
19
|
-
sig { returns(::Stripe::SubscriptionService::CancelParams::CancellationDetails) }
|
21
|
+
sig { returns(T.nilable(::Stripe::SubscriptionService::CancelParams::CancellationDetails)) }
|
20
22
|
attr_accessor :cancellation_details
|
21
23
|
# Specifies which fields in the response should be expanded.
|
22
|
-
sig { returns(T::Array[String]) }
|
24
|
+
sig { returns(T.nilable(T::Array[String])) }
|
23
25
|
attr_accessor :expand
|
24
26
|
# Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`.
|
25
|
-
sig { returns(T::Boolean) }
|
27
|
+
sig { returns(T.nilable(T::Boolean)) }
|
26
28
|
attr_accessor :invoice_now
|
27
29
|
# Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`.
|
28
|
-
sig { returns(T::Boolean) }
|
30
|
+
sig { returns(T.nilable(T::Boolean)) }
|
29
31
|
attr_accessor :prorate
|
30
32
|
sig {
|
31
|
-
params(cancellation_details: ::Stripe::SubscriptionService::CancelParams::CancellationDetails, expand: T::Array[String], invoice_now: T::Boolean, prorate: T::Boolean).void
|
33
|
+
params(cancellation_details: T.nilable(::Stripe::SubscriptionService::CancelParams::CancellationDetails), expand: T.nilable(T::Array[String]), invoice_now: T.nilable(T::Boolean), prorate: T.nilable(T::Boolean)).void
|
32
34
|
}
|
33
35
|
def initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil); end
|
34
36
|
end
|
35
37
|
class RetrieveParams < Stripe::RequestParams
|
36
38
|
# Specifies which fields in the response should be expanded.
|
37
|
-
sig { returns(T::Array[String]) }
|
39
|
+
sig { returns(T.nilable(T::Array[String])) }
|
38
40
|
attr_accessor :expand
|
39
|
-
sig { params(expand: T::Array[String]).void }
|
41
|
+
sig { params(expand: T.nilable(T::Array[String])).void }
|
40
42
|
def initialize(expand: nil); end
|
41
43
|
end
|
42
44
|
class UpdateParams < Stripe::RequestParams
|
43
45
|
class AddInvoiceItem < Stripe::RequestParams
|
44
46
|
class Discount < Stripe::RequestParams
|
45
|
-
class DiscountEnd < Stripe::RequestParams
|
46
|
-
class Duration < Stripe::RequestParams
|
47
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
48
|
-
sig { returns(String) }
|
49
|
-
attr_accessor :interval
|
50
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
51
|
-
sig { returns(Integer) }
|
52
|
-
attr_accessor :interval_count
|
53
|
-
sig { params(interval: String, interval_count: Integer).void }
|
54
|
-
def initialize(interval: nil, interval_count: nil); end
|
55
|
-
end
|
56
|
-
# Time span for the redeemed discount.
|
57
|
-
sig {
|
58
|
-
returns(::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount::DiscountEnd::Duration)
|
59
|
-
}
|
60
|
-
attr_accessor :duration
|
61
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
62
|
-
sig { returns(Integer) }
|
63
|
-
attr_accessor :timestamp
|
64
|
-
# The type of calculation made to determine when the discount ends.
|
65
|
-
sig { returns(String) }
|
66
|
-
attr_accessor :type
|
67
|
-
sig {
|
68
|
-
params(duration: ::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
69
|
-
}
|
70
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
71
|
-
end
|
72
47
|
# ID of the coupon to create a new discount for.
|
73
|
-
sig { returns(String) }
|
48
|
+
sig { returns(T.nilable(String)) }
|
74
49
|
attr_accessor :coupon
|
75
50
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
76
|
-
sig { returns(String) }
|
51
|
+
sig { returns(T.nilable(String)) }
|
77
52
|
attr_accessor :discount
|
78
|
-
# Details to determine how long the discount should be applied for.
|
79
|
-
sig {
|
80
|
-
returns(::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount::DiscountEnd)
|
81
|
-
}
|
82
|
-
attr_accessor :discount_end
|
83
53
|
# ID of the promotion code to create a new discount for.
|
84
|
-
sig { returns(String) }
|
54
|
+
sig { returns(T.nilable(String)) }
|
85
55
|
attr_accessor :promotion_code
|
86
56
|
sig {
|
87
|
-
params(coupon: String, discount: String,
|
57
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
88
58
|
}
|
89
|
-
def initialize(coupon: nil, discount: nil,
|
59
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
90
60
|
end
|
91
61
|
class PriceData < Stripe::RequestParams
|
92
62
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
93
63
|
sig { returns(String) }
|
94
64
|
attr_accessor :currency
|
95
|
-
# The ID of the
|
65
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
96
66
|
sig { returns(String) }
|
97
67
|
attr_accessor :product
|
98
68
|
# 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.
|
99
|
-
sig { returns(String) }
|
69
|
+
sig { returns(T.nilable(String)) }
|
100
70
|
attr_accessor :tax_behavior
|
101
71
|
# 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.
|
102
|
-
sig { returns(Integer) }
|
72
|
+
sig { returns(T.nilable(Integer)) }
|
103
73
|
attr_accessor :unit_amount
|
104
74
|
# 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.
|
105
|
-
sig { returns(String) }
|
75
|
+
sig { returns(T.nilable(String)) }
|
106
76
|
attr_accessor :unit_amount_decimal
|
107
77
|
sig {
|
108
|
-
params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
|
78
|
+
params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
109
79
|
}
|
110
80
|
def initialize(
|
111
81
|
currency: nil,
|
@@ -117,23 +87,25 @@ module Stripe
|
|
117
87
|
end
|
118
88
|
# The coupons to redeem into discounts for the item.
|
119
89
|
sig {
|
120
|
-
returns(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount])
|
90
|
+
returns(T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount]))
|
121
91
|
}
|
122
92
|
attr_accessor :discounts
|
123
93
|
# The ID of the price object. One of `price` or `price_data` is required.
|
124
|
-
sig { returns(String) }
|
94
|
+
sig { returns(T.nilable(String)) }
|
125
95
|
attr_accessor :price
|
126
96
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
127
|
-
sig {
|
97
|
+
sig {
|
98
|
+
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::PriceData))
|
99
|
+
}
|
128
100
|
attr_accessor :price_data
|
129
101
|
# Quantity for this item. Defaults to 1.
|
130
|
-
sig { returns(Integer) }
|
102
|
+
sig { returns(T.nilable(Integer)) }
|
131
103
|
attr_accessor :quantity
|
132
104
|
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
133
|
-
sig { returns(T.nilable(T::Array[String])) }
|
105
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
134
106
|
attr_accessor :tax_rates
|
135
107
|
sig {
|
136
|
-
params(discounts: T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
|
108
|
+
params(discounts: T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
137
109
|
}
|
138
110
|
def initialize(
|
139
111
|
discounts: nil,
|
@@ -146,164 +118,93 @@ module Stripe
|
|
146
118
|
class AutomaticTax < Stripe::RequestParams
|
147
119
|
class Liability < Stripe::RequestParams
|
148
120
|
# The connected account being referenced when `type` is `account`.
|
149
|
-
sig { returns(String) }
|
121
|
+
sig { returns(T.nilable(String)) }
|
150
122
|
attr_accessor :account
|
151
123
|
# Type of the account referenced in the request.
|
152
124
|
sig { returns(String) }
|
153
125
|
attr_accessor :type
|
154
|
-
sig { params(account: String, type: String).void }
|
126
|
+
sig { params(account: T.nilable(String), type: String).void }
|
155
127
|
def initialize(account: nil, type: nil); end
|
156
128
|
end
|
157
129
|
# Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
|
158
130
|
sig { returns(T::Boolean) }
|
159
131
|
attr_accessor :enabled
|
160
132
|
# 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.
|
161
|
-
sig {
|
133
|
+
sig {
|
134
|
+
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::AutomaticTax::Liability))
|
135
|
+
}
|
162
136
|
attr_accessor :liability
|
163
137
|
sig {
|
164
|
-
params(enabled: T::Boolean, liability: ::Stripe::SubscriptionService::UpdateParams::AutomaticTax::Liability).void
|
138
|
+
params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionService::UpdateParams::AutomaticTax::Liability)).void
|
165
139
|
}
|
166
140
|
def initialize(enabled: nil, liability: nil); end
|
167
141
|
end
|
168
|
-
class BillingThresholds < Stripe::RequestParams
|
169
|
-
# Monetary threshold that triggers the subscription to advance to a new billing period
|
170
|
-
sig { returns(Integer) }
|
171
|
-
attr_accessor :amount_gte
|
172
|
-
# 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.
|
173
|
-
sig { returns(T::Boolean) }
|
174
|
-
attr_accessor :reset_billing_cycle_anchor
|
175
|
-
sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void }
|
176
|
-
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
|
177
|
-
end
|
178
142
|
class CancellationDetails < Stripe::RequestParams
|
179
143
|
# Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
|
180
|
-
sig { returns(T.nilable(String)) }
|
144
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
181
145
|
attr_accessor :comment
|
182
146
|
# The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
|
183
|
-
sig { returns(T.nilable(String)) }
|
147
|
+
sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
|
184
148
|
attr_accessor :feedback
|
185
|
-
sig {
|
149
|
+
sig {
|
150
|
+
params(comment: T.nilable(T.nilable(String)), feedback: T.nilable(T.nilable(T.any(String, String)))).void
|
151
|
+
}
|
186
152
|
def initialize(comment: nil, feedback: nil); end
|
187
153
|
end
|
188
154
|
class Discount < Stripe::RequestParams
|
189
|
-
class DiscountEnd < Stripe::RequestParams
|
190
|
-
class Duration < Stripe::RequestParams
|
191
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
192
|
-
sig { returns(String) }
|
193
|
-
attr_accessor :interval
|
194
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
195
|
-
sig { returns(Integer) }
|
196
|
-
attr_accessor :interval_count
|
197
|
-
sig { params(interval: String, interval_count: Integer).void }
|
198
|
-
def initialize(interval: nil, interval_count: nil); end
|
199
|
-
end
|
200
|
-
# Time span for the redeemed discount.
|
201
|
-
sig {
|
202
|
-
returns(::Stripe::SubscriptionService::UpdateParams::Discount::DiscountEnd::Duration)
|
203
|
-
}
|
204
|
-
attr_accessor :duration
|
205
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
206
|
-
sig { returns(Integer) }
|
207
|
-
attr_accessor :timestamp
|
208
|
-
# The type of calculation made to determine when the discount ends.
|
209
|
-
sig { returns(String) }
|
210
|
-
attr_accessor :type
|
211
|
-
sig {
|
212
|
-
params(duration: ::Stripe::SubscriptionService::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
213
|
-
}
|
214
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
215
|
-
end
|
216
155
|
# ID of the coupon to create a new discount for.
|
217
|
-
sig { returns(String) }
|
156
|
+
sig { returns(T.nilable(String)) }
|
218
157
|
attr_accessor :coupon
|
219
158
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
220
|
-
sig { returns(String) }
|
159
|
+
sig { returns(T.nilable(String)) }
|
221
160
|
attr_accessor :discount
|
222
|
-
# Details to determine how long the discount should be applied for.
|
223
|
-
sig { returns(::Stripe::SubscriptionService::UpdateParams::Discount::DiscountEnd) }
|
224
|
-
attr_accessor :discount_end
|
225
161
|
# ID of the promotion code to create a new discount for.
|
226
|
-
sig { returns(String) }
|
162
|
+
sig { returns(T.nilable(String)) }
|
227
163
|
attr_accessor :promotion_code
|
228
164
|
sig {
|
229
|
-
params(coupon: String, discount: String,
|
165
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
230
166
|
}
|
231
|
-
def initialize(coupon: nil, discount: nil,
|
167
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
232
168
|
end
|
233
169
|
class InvoiceSettings < Stripe::RequestParams
|
234
170
|
class Issuer < Stripe::RequestParams
|
235
171
|
# The connected account being referenced when `type` is `account`.
|
236
|
-
sig { returns(String) }
|
172
|
+
sig { returns(T.nilable(String)) }
|
237
173
|
attr_accessor :account
|
238
174
|
# Type of the account referenced in the request.
|
239
175
|
sig { returns(String) }
|
240
176
|
attr_accessor :type
|
241
|
-
sig { params(account: String, type: String).void }
|
177
|
+
sig { params(account: T.nilable(String), type: String).void }
|
242
178
|
def initialize(account: nil, type: nil); end
|
243
179
|
end
|
244
180
|
# The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
|
245
|
-
sig { returns(T.nilable(T::Array[String])) }
|
181
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
246
182
|
attr_accessor :account_tax_ids
|
247
183
|
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
248
|
-
sig {
|
184
|
+
sig {
|
185
|
+
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings::Issuer))
|
186
|
+
}
|
249
187
|
attr_accessor :issuer
|
250
188
|
sig {
|
251
|
-
params(account_tax_ids: T.nilable(T::Array[String]), issuer: ::Stripe::SubscriptionService::UpdateParams::InvoiceSettings::Issuer).void
|
189
|
+
params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), issuer: T.nilable(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings::Issuer)).void
|
252
190
|
}
|
253
191
|
def initialize(account_tax_ids: nil, issuer: nil); end
|
254
192
|
end
|
255
193
|
class Item < Stripe::RequestParams
|
256
|
-
class BillingThresholds < Stripe::RequestParams
|
257
|
-
# 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))
|
258
|
-
sig { returns(Integer) }
|
259
|
-
attr_accessor :usage_gte
|
260
|
-
sig { params(usage_gte: Integer).void }
|
261
|
-
def initialize(usage_gte: nil); end
|
262
|
-
end
|
263
194
|
class Discount < Stripe::RequestParams
|
264
|
-
class DiscountEnd < Stripe::RequestParams
|
265
|
-
class Duration < Stripe::RequestParams
|
266
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
267
|
-
sig { returns(String) }
|
268
|
-
attr_accessor :interval
|
269
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
270
|
-
sig { returns(Integer) }
|
271
|
-
attr_accessor :interval_count
|
272
|
-
sig { params(interval: String, interval_count: Integer).void }
|
273
|
-
def initialize(interval: nil, interval_count: nil); end
|
274
|
-
end
|
275
|
-
# Time span for the redeemed discount.
|
276
|
-
sig {
|
277
|
-
returns(::Stripe::SubscriptionService::UpdateParams::Item::Discount::DiscountEnd::Duration)
|
278
|
-
}
|
279
|
-
attr_accessor :duration
|
280
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
281
|
-
sig { returns(Integer) }
|
282
|
-
attr_accessor :timestamp
|
283
|
-
# The type of calculation made to determine when the discount ends.
|
284
|
-
sig { returns(String) }
|
285
|
-
attr_accessor :type
|
286
|
-
sig {
|
287
|
-
params(duration: ::Stripe::SubscriptionService::UpdateParams::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
288
|
-
}
|
289
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
290
|
-
end
|
291
195
|
# ID of the coupon to create a new discount for.
|
292
|
-
sig { returns(String) }
|
196
|
+
sig { returns(T.nilable(String)) }
|
293
197
|
attr_accessor :coupon
|
294
198
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
295
|
-
sig { returns(String) }
|
199
|
+
sig { returns(T.nilable(String)) }
|
296
200
|
attr_accessor :discount
|
297
|
-
# Details to determine how long the discount should be applied for.
|
298
|
-
sig { returns(::Stripe::SubscriptionService::UpdateParams::Item::Discount::DiscountEnd) }
|
299
|
-
attr_accessor :discount_end
|
300
201
|
# ID of the promotion code to create a new discount for.
|
301
|
-
sig { returns(String) }
|
202
|
+
sig { returns(T.nilable(String)) }
|
302
203
|
attr_accessor :promotion_code
|
303
204
|
sig {
|
304
|
-
params(coupon: String, discount: String,
|
205
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
305
206
|
}
|
306
|
-
def initialize(coupon: nil, discount: nil,
|
207
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
307
208
|
end
|
308
209
|
class PriceData < Stripe::RequestParams
|
309
210
|
class Recurring < Stripe::RequestParams
|
@@ -311,31 +212,31 @@ module Stripe
|
|
311
212
|
sig { returns(String) }
|
312
213
|
attr_accessor :interval
|
313
214
|
# 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).
|
314
|
-
sig { returns(Integer) }
|
215
|
+
sig { returns(T.nilable(Integer)) }
|
315
216
|
attr_accessor :interval_count
|
316
|
-
sig { params(interval: String, interval_count: Integer).void }
|
217
|
+
sig { params(interval: String, interval_count: T.nilable(Integer)).void }
|
317
218
|
def initialize(interval: nil, interval_count: nil); end
|
318
219
|
end
|
319
220
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
320
221
|
sig { returns(String) }
|
321
222
|
attr_accessor :currency
|
322
|
-
# The ID of the
|
223
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
323
224
|
sig { returns(String) }
|
324
225
|
attr_accessor :product
|
325
226
|
# The recurring components of a price such as `interval` and `interval_count`.
|
326
227
|
sig { returns(::Stripe::SubscriptionService::UpdateParams::Item::PriceData::Recurring) }
|
327
228
|
attr_accessor :recurring
|
328
229
|
# 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.
|
329
|
-
sig { returns(String) }
|
230
|
+
sig { returns(T.nilable(String)) }
|
330
231
|
attr_accessor :tax_behavior
|
331
232
|
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
332
|
-
sig { returns(Integer) }
|
233
|
+
sig { returns(T.nilable(Integer)) }
|
333
234
|
attr_accessor :unit_amount
|
334
235
|
# 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.
|
335
|
-
sig { returns(String) }
|
236
|
+
sig { returns(T.nilable(String)) }
|
336
237
|
attr_accessor :unit_amount_decimal
|
337
238
|
sig {
|
338
|
-
params(currency: String, product: String, recurring: ::Stripe::SubscriptionService::UpdateParams::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
|
239
|
+
params(currency: String, product: String, recurring: ::Stripe::SubscriptionService::UpdateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
339
240
|
}
|
340
241
|
def initialize(
|
341
242
|
currency: nil,
|
@@ -346,48 +247,42 @@ module Stripe
|
|
346
247
|
unit_amount_decimal: nil
|
347
248
|
); end
|
348
249
|
end
|
349
|
-
# 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.
|
350
|
-
sig {
|
351
|
-
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::Item::BillingThresholds))
|
352
|
-
}
|
353
|
-
attr_accessor :billing_thresholds
|
354
250
|
# 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.
|
355
|
-
sig { returns(T::Boolean) }
|
251
|
+
sig { returns(T.nilable(T::Boolean)) }
|
356
252
|
attr_accessor :clear_usage
|
357
253
|
# A flag that, if set to `true`, will delete the specified item.
|
358
|
-
sig { returns(T::Boolean) }
|
254
|
+
sig { returns(T.nilable(T::Boolean)) }
|
359
255
|
attr_accessor :deleted
|
360
256
|
# The coupons to redeem into discounts for the subscription item.
|
361
257
|
sig {
|
362
|
-
returns(T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::Item::Discount]))
|
258
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::UpdateParams::Item::Discount]))))
|
363
259
|
}
|
364
260
|
attr_accessor :discounts
|
365
261
|
# Subscription item to update.
|
366
|
-
sig { returns(String) }
|
262
|
+
sig { returns(T.nilable(String)) }
|
367
263
|
attr_accessor :id
|
368
264
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
369
|
-
sig { returns(T.nilable(T::Hash[String, String])) }
|
265
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
|
370
266
|
attr_accessor :metadata
|
371
267
|
# Plan ID for this item, as a string.
|
372
|
-
sig { returns(String) }
|
268
|
+
sig { returns(T.nilable(String)) }
|
373
269
|
attr_accessor :plan
|
374
270
|
# 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.
|
375
|
-
sig { returns(String) }
|
271
|
+
sig { returns(T.nilable(String)) }
|
376
272
|
attr_accessor :price
|
377
273
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
378
|
-
sig { returns(::Stripe::SubscriptionService::UpdateParams::Item::PriceData) }
|
274
|
+
sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::Item::PriceData)) }
|
379
275
|
attr_accessor :price_data
|
380
276
|
# Quantity for this item.
|
381
|
-
sig { returns(Integer) }
|
277
|
+
sig { returns(T.nilable(Integer)) }
|
382
278
|
attr_accessor :quantity
|
383
279
|
# 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.
|
384
|
-
sig { returns(T.nilable(T::Array[String])) }
|
280
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
385
281
|
attr_accessor :tax_rates
|
386
282
|
sig {
|
387
|
-
params(
|
283
|
+
params(clear_usage: T.nilable(T::Boolean), deleted: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::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::SubscriptionService::UpdateParams::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
388
284
|
}
|
389
285
|
def initialize(
|
390
|
-
billing_thresholds: nil,
|
391
286
|
clear_usage: nil,
|
392
287
|
deleted: nil,
|
393
288
|
discounts: nil,
|
@@ -405,9 +300,9 @@ module Stripe
|
|
405
300
|
sig { returns(String) }
|
406
301
|
attr_accessor :behavior
|
407
302
|
# The time after which the subscription will resume collecting payments.
|
408
|
-
sig { returns(Integer) }
|
303
|
+
sig { returns(T.nilable(Integer)) }
|
409
304
|
attr_accessor :resumes_at
|
410
|
-
sig { params(behavior: String, resumes_at: Integer).void }
|
305
|
+
sig { params(behavior: String, resumes_at: T.nilable(Integer)).void }
|
411
306
|
def initialize(behavior: nil, resumes_at: nil); end
|
412
307
|
end
|
413
308
|
class PaymentSettings < Stripe::RequestParams
|
@@ -415,58 +310,60 @@ module Stripe
|
|
415
310
|
class AcssDebit < Stripe::RequestParams
|
416
311
|
class MandateOptions < Stripe::RequestParams
|
417
312
|
# Transaction type of the mandate.
|
418
|
-
sig { returns(String) }
|
313
|
+
sig { returns(T.nilable(String)) }
|
419
314
|
attr_accessor :transaction_type
|
420
|
-
sig { params(transaction_type: String).void }
|
315
|
+
sig { params(transaction_type: T.nilable(String)).void }
|
421
316
|
def initialize(transaction_type: nil); end
|
422
317
|
end
|
423
318
|
# Additional fields for Mandate creation
|
424
319
|
sig {
|
425
|
-
returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions)
|
320
|
+
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
|
426
321
|
}
|
427
322
|
attr_accessor :mandate_options
|
428
323
|
# Verification method for the intent
|
429
|
-
sig { returns(String) }
|
324
|
+
sig { returns(T.nilable(String)) }
|
430
325
|
attr_accessor :verification_method
|
431
326
|
sig {
|
432
|
-
params(mandate_options: ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void
|
327
|
+
params(mandate_options: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
|
433
328
|
}
|
434
329
|
def initialize(mandate_options: nil, verification_method: nil); end
|
435
330
|
end
|
436
331
|
class Bancontact < Stripe::RequestParams
|
437
332
|
# Preferred language of the Bancontact authorization page that the customer is redirected to.
|
438
|
-
sig { returns(String) }
|
333
|
+
sig { returns(T.nilable(String)) }
|
439
334
|
attr_accessor :preferred_language
|
440
|
-
sig { params(preferred_language: String).void }
|
335
|
+
sig { params(preferred_language: T.nilable(String)).void }
|
441
336
|
def initialize(preferred_language: nil); end
|
442
337
|
end
|
443
338
|
class Card < Stripe::RequestParams
|
444
339
|
class MandateOptions < Stripe::RequestParams
|
445
340
|
# Amount to be charged for future payments.
|
446
|
-
sig { returns(Integer) }
|
341
|
+
sig { returns(T.nilable(Integer)) }
|
447
342
|
attr_accessor :amount
|
448
343
|
# 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.
|
449
|
-
sig { returns(String) }
|
344
|
+
sig { returns(T.nilable(String)) }
|
450
345
|
attr_accessor :amount_type
|
451
346
|
# A description of the mandate or subscription that is meant to be displayed to the customer.
|
452
|
-
sig { returns(String) }
|
347
|
+
sig { returns(T.nilable(String)) }
|
453
348
|
attr_accessor :description
|
454
|
-
sig {
|
349
|
+
sig {
|
350
|
+
params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void
|
351
|
+
}
|
455
352
|
def initialize(amount: nil, amount_type: nil, description: nil); end
|
456
353
|
end
|
457
354
|
# Configuration options for setting up an eMandate for cards issued in India.
|
458
355
|
sig {
|
459
|
-
returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions)
|
356
|
+
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions))
|
460
357
|
}
|
461
358
|
attr_accessor :mandate_options
|
462
359
|
# 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.
|
463
|
-
sig { returns(String) }
|
360
|
+
sig { returns(T.nilable(String)) }
|
464
361
|
attr_accessor :network
|
465
362
|
# 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.
|
466
|
-
sig { returns(String) }
|
363
|
+
sig { returns(T.nilable(String)) }
|
467
364
|
attr_accessor :request_three_d_secure
|
468
365
|
sig {
|
469
|
-
params(mandate_options: ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions, network: String, request_three_d_secure: String).void
|
366
|
+
params(mandate_options: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void
|
470
367
|
}
|
471
368
|
def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end
|
472
369
|
end
|
@@ -481,32 +378,29 @@ module Stripe
|
|
481
378
|
end
|
482
379
|
# Configuration for eu_bank_transfer funding type.
|
483
380
|
sig {
|
484
|
-
returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer)
|
381
|
+
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
|
485
382
|
}
|
486
383
|
attr_accessor :eu_bank_transfer
|
487
384
|
# 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`.
|
488
|
-
sig { returns(String) }
|
385
|
+
sig { returns(T.nilable(String)) }
|
489
386
|
attr_accessor :type
|
490
387
|
sig {
|
491
|
-
params(eu_bank_transfer: ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, type: String).void
|
388
|
+
params(eu_bank_transfer: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
|
492
389
|
}
|
493
390
|
def initialize(eu_bank_transfer: nil, type: nil); end
|
494
391
|
end
|
495
392
|
# Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
|
496
393
|
sig {
|
497
|
-
returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer)
|
394
|
+
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
|
498
395
|
}
|
499
396
|
attr_accessor :bank_transfer
|
500
397
|
# The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
|
501
|
-
sig { returns(String) }
|
398
|
+
sig { returns(T.nilable(String)) }
|
502
399
|
attr_accessor :funding_type
|
503
400
|
sig {
|
504
|
-
params(bank_transfer: ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String).void
|
401
|
+
params(bank_transfer: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
|
505
402
|
}
|
506
403
|
def initialize(bank_transfer: nil, funding_type: nil); end
|
507
|
-
end
|
508
|
-
class IdBankTransfer < Stripe::RequestParams
|
509
|
-
|
510
404
|
end
|
511
405
|
class Konbini < Stripe::RequestParams
|
512
406
|
|
@@ -518,92 +412,83 @@ module Stripe
|
|
518
412
|
class FinancialConnections < Stripe::RequestParams
|
519
413
|
class Filters < Stripe::RequestParams
|
520
414
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
521
|
-
sig { returns(T::Array[String]) }
|
415
|
+
sig { returns(T.nilable(T::Array[String])) }
|
522
416
|
attr_accessor :account_subcategories
|
523
|
-
|
524
|
-
|
525
|
-
attr_accessor :institution
|
526
|
-
sig { params(account_subcategories: T::Array[String], institution: String).void }
|
527
|
-
def initialize(account_subcategories: nil, institution: nil); end
|
417
|
+
sig { params(account_subcategories: T.nilable(T::Array[String])).void }
|
418
|
+
def initialize(account_subcategories: nil); end
|
528
419
|
end
|
529
420
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
530
421
|
sig {
|
531
|
-
returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters)
|
422
|
+
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
|
532
423
|
}
|
533
424
|
attr_accessor :filters
|
534
425
|
# 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`.
|
535
|
-
sig { returns(T::Array[String]) }
|
426
|
+
sig { returns(T.nilable(T::Array[String])) }
|
536
427
|
attr_accessor :permissions
|
537
428
|
# List of data features that you would like to retrieve upon account creation.
|
538
|
-
sig { returns(T::Array[String]) }
|
429
|
+
sig { returns(T.nilable(T::Array[String])) }
|
539
430
|
attr_accessor :prefetch
|
540
431
|
sig {
|
541
|
-
params(filters: ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, permissions: T::Array[String], prefetch: T::Array[String]).void
|
432
|
+
params(filters: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
|
542
433
|
}
|
543
434
|
def initialize(filters: nil, permissions: nil, prefetch: nil); end
|
544
435
|
end
|
545
436
|
# Additional fields for Financial Connections Session creation
|
546
437
|
sig {
|
547
|
-
returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections)
|
438
|
+
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
|
548
439
|
}
|
549
440
|
attr_accessor :financial_connections
|
550
441
|
# Verification method for the intent
|
551
|
-
sig { returns(String) }
|
442
|
+
sig { returns(T.nilable(String)) }
|
552
443
|
attr_accessor :verification_method
|
553
444
|
sig {
|
554
|
-
params(financial_connections: ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections, verification_method: String).void
|
445
|
+
params(financial_connections: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
|
555
446
|
}
|
556
447
|
def initialize(financial_connections: nil, verification_method: nil); end
|
557
448
|
end
|
558
449
|
# This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
|
559
450
|
sig {
|
560
|
-
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))
|
451
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
|
561
452
|
}
|
562
453
|
attr_accessor :acss_debit
|
563
454
|
# This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
|
564
455
|
sig {
|
565
|
-
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))
|
456
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
|
566
457
|
}
|
567
458
|
attr_accessor :bancontact
|
568
459
|
# This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
|
569
460
|
sig {
|
570
|
-
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))
|
461
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))))
|
571
462
|
}
|
572
463
|
attr_accessor :card
|
573
464
|
# This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
574
465
|
sig {
|
575
|
-
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))
|
466
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
|
576
467
|
}
|
577
468
|
attr_accessor :customer_balance
|
578
|
-
# This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
579
|
-
sig {
|
580
|
-
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer))
|
581
|
-
}
|
582
|
-
attr_accessor :id_bank_transfer
|
583
469
|
# This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
584
470
|
sig {
|
585
|
-
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))
|
471
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
|
586
472
|
}
|
587
473
|
attr_accessor :konbini
|
588
474
|
# This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
|
589
475
|
sig {
|
590
|
-
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))
|
476
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
|
591
477
|
}
|
592
478
|
attr_accessor :sepa_debit
|
593
479
|
# This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
|
594
480
|
sig {
|
595
|
-
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))
|
481
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
|
596
482
|
}
|
597
483
|
attr_accessor :us_bank_account
|
598
484
|
sig {
|
599
|
-
params(acss_debit: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit), bancontact: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact), card: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card), customer_balance: T.nilable(
|
485
|
+
params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
|
600
486
|
}
|
601
487
|
def initialize(
|
602
488
|
acss_debit: nil,
|
603
489
|
bancontact: nil,
|
604
490
|
card: nil,
|
605
491
|
customer_balance: nil,
|
606
|
-
id_bank_transfer: nil,
|
607
492
|
konbini: nil,
|
608
493
|
sepa_debit: nil,
|
609
494
|
us_bank_account: nil
|
@@ -611,17 +496,17 @@ module Stripe
|
|
611
496
|
end
|
612
497
|
# Payment-method-specific configuration to provide to invoices created by the subscription.
|
613
498
|
sig {
|
614
|
-
returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions)
|
499
|
+
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions))
|
615
500
|
}
|
616
501
|
attr_accessor :payment_method_options
|
617
502
|
# 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
|
618
|
-
sig { returns(T.nilable(T::Array[String])) }
|
503
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
619
504
|
attr_accessor :payment_method_types
|
620
505
|
# Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
|
621
|
-
sig { returns(String) }
|
506
|
+
sig { returns(T.nilable(String)) }
|
622
507
|
attr_accessor :save_default_payment_method
|
623
508
|
sig {
|
624
|
-
params(payment_method_options: ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions, payment_method_types: T.nilable(T::Array[String]), save_default_payment_method: String).void
|
509
|
+
params(payment_method_options: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String]))), save_default_payment_method: T.nilable(String)).void
|
625
510
|
}
|
626
511
|
def initialize(
|
627
512
|
payment_method_options: nil,
|
@@ -634,29 +519,19 @@ module Stripe
|
|
634
519
|
sig { returns(String) }
|
635
520
|
attr_accessor :interval
|
636
521
|
# 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).
|
637
|
-
sig { returns(Integer) }
|
522
|
+
sig { returns(T.nilable(Integer)) }
|
638
523
|
attr_accessor :interval_count
|
639
|
-
sig { params(interval: String, interval_count: Integer).void }
|
524
|
+
sig { params(interval: String, interval_count: T.nilable(Integer)).void }
|
640
525
|
def initialize(interval: nil, interval_count: nil); end
|
641
526
|
end
|
642
|
-
class Prebilling < Stripe::RequestParams
|
643
|
-
# This is used to determine the number of billing cycles to prebill.
|
644
|
-
sig { returns(Integer) }
|
645
|
-
attr_accessor :iterations
|
646
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
647
|
-
sig { returns(String) }
|
648
|
-
attr_accessor :update_behavior
|
649
|
-
sig { params(iterations: Integer, update_behavior: String).void }
|
650
|
-
def initialize(iterations: nil, update_behavior: nil); end
|
651
|
-
end
|
652
527
|
class TransferData < Stripe::RequestParams
|
653
528
|
# 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.
|
654
|
-
sig { returns(Float) }
|
529
|
+
sig { returns(T.nilable(Float)) }
|
655
530
|
attr_accessor :amount_percent
|
656
531
|
# ID of an existing, connected Stripe account.
|
657
532
|
sig { returns(String) }
|
658
533
|
attr_accessor :destination
|
659
|
-
sig { params(amount_percent: Float, destination: String).void }
|
534
|
+
sig { params(amount_percent: T.nilable(Float), destination: String).void }
|
660
535
|
def initialize(amount_percent: nil, destination: nil); end
|
661
536
|
end
|
662
537
|
class TrialSettings < Stripe::RequestParams
|
@@ -676,73 +551,73 @@ module Stripe
|
|
676
551
|
def initialize(end_behavior: nil); end
|
677
552
|
end
|
678
553
|
# 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.
|
679
|
-
sig {
|
554
|
+
sig {
|
555
|
+
returns(T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem]))
|
556
|
+
}
|
680
557
|
attr_accessor :add_invoice_items
|
681
558
|
# 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).
|
682
|
-
sig { returns(T.nilable(Float)) }
|
559
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
|
683
560
|
attr_accessor :application_fee_percent
|
684
561
|
# Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
|
685
|
-
sig { returns(::Stripe::SubscriptionService::UpdateParams::AutomaticTax) }
|
562
|
+
sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::AutomaticTax)) }
|
686
563
|
attr_accessor :automatic_tax
|
687
564
|
# 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).
|
688
|
-
sig { returns(String) }
|
565
|
+
sig { returns(T.nilable(String)) }
|
689
566
|
attr_accessor :billing_cycle_anchor
|
690
|
-
# 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.
|
691
|
-
sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::BillingThresholds)) }
|
692
|
-
attr_accessor :billing_thresholds
|
693
567
|
# 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.
|
694
|
-
sig { returns(T.nilable(Integer)) }
|
568
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
695
569
|
attr_accessor :cancel_at
|
696
570
|
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
697
|
-
sig { returns(T::Boolean) }
|
571
|
+
sig { returns(T.nilable(T::Boolean)) }
|
698
572
|
attr_accessor :cancel_at_period_end
|
699
573
|
# Details about why this subscription was cancelled
|
700
|
-
sig { returns(::Stripe::SubscriptionService::UpdateParams::CancellationDetails) }
|
574
|
+
sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::CancellationDetails)) }
|
701
575
|
attr_accessor :cancellation_details
|
702
576
|
# 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`.
|
703
|
-
sig { returns(String) }
|
577
|
+
sig { returns(T.nilable(String)) }
|
704
578
|
attr_accessor :collection_method
|
705
|
-
# 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.
|
706
|
-
sig { returns(String) }
|
707
|
-
attr_accessor :coupon
|
708
579
|
# 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`.
|
709
|
-
sig { returns(Integer) }
|
580
|
+
sig { returns(T.nilable(Integer)) }
|
710
581
|
attr_accessor :days_until_due
|
711
582
|
# 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).
|
712
|
-
sig { returns(String) }
|
583
|
+
sig { returns(T.nilable(String)) }
|
713
584
|
attr_accessor :default_payment_method
|
714
585
|
# 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).
|
715
|
-
sig { returns(T.nilable(String)) }
|
586
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
716
587
|
attr_accessor :default_source
|
717
588
|
# 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.
|
718
|
-
sig { returns(T.nilable(T::Array[String])) }
|
589
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
719
590
|
attr_accessor :default_tax_rates
|
720
591
|
# 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.
|
721
|
-
sig { returns(T.nilable(String)) }
|
592
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
722
593
|
attr_accessor :description
|
723
594
|
# The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
|
724
|
-
sig {
|
595
|
+
sig {
|
596
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::UpdateParams::Discount]))))
|
597
|
+
}
|
725
598
|
attr_accessor :discounts
|
726
599
|
# Specifies which fields in the response should be expanded.
|
727
|
-
sig { returns(T::Array[String]) }
|
600
|
+
sig { returns(T.nilable(T::Array[String])) }
|
728
601
|
attr_accessor :expand
|
729
602
|
# All invoices will be billed using the specified settings.
|
730
|
-
sig { returns(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings) }
|
603
|
+
sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings)) }
|
731
604
|
attr_accessor :invoice_settings
|
732
605
|
# A list of up to 20 subscription items, each with an attached price.
|
733
|
-
sig { returns(T::Array[::Stripe::SubscriptionService::UpdateParams::Item]) }
|
606
|
+
sig { returns(T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::Item])) }
|
734
607
|
attr_accessor :items
|
735
608
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
736
|
-
sig { returns(T.nilable(T::Hash[String, String])) }
|
609
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
|
737
610
|
attr_accessor :metadata
|
738
611
|
# Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
|
739
|
-
sig { returns(T::Boolean) }
|
612
|
+
sig { returns(T.nilable(T::Boolean)) }
|
740
613
|
attr_accessor :off_session
|
741
614
|
# The account on behalf of which to charge, for each of the subscription's invoices.
|
742
|
-
sig { returns(T.nilable(String)) }
|
615
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
743
616
|
attr_accessor :on_behalf_of
|
744
617
|
# 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).
|
745
|
-
sig {
|
618
|
+
sig {
|
619
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PauseCollection))))
|
620
|
+
}
|
746
621
|
attr_accessor :pause_collection
|
747
622
|
# 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.
|
748
623
|
#
|
@@ -751,54 +626,48 @@ module Stripe
|
|
751
626
|
# 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).
|
752
627
|
#
|
753
628
|
# 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.
|
754
|
-
sig { returns(String) }
|
629
|
+
sig { returns(T.nilable(String)) }
|
755
630
|
attr_accessor :payment_behavior
|
756
631
|
# Payment settings to pass to invoices created by the subscription.
|
757
|
-
sig { returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings) }
|
632
|
+
sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings)) }
|
758
633
|
attr_accessor :payment_settings
|
759
634
|
# 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.
|
760
635
|
sig {
|
761
|
-
returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PendingInvoiceItemInterval))
|
636
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PendingInvoiceItemInterval))))
|
762
637
|
}
|
763
638
|
attr_accessor :pending_invoice_item_interval
|
764
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
765
|
-
sig { returns(::Stripe::SubscriptionService::UpdateParams::Prebilling) }
|
766
|
-
attr_accessor :prebilling
|
767
|
-
# 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.
|
768
|
-
sig { returns(String) }
|
769
|
-
attr_accessor :promotion_code
|
770
639
|
# 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`.
|
771
|
-
sig { returns(String) }
|
640
|
+
sig { returns(T.nilable(String)) }
|
772
641
|
attr_accessor :proration_behavior
|
773
642
|
# 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.
|
774
|
-
sig { returns(Integer) }
|
643
|
+
sig { returns(T.nilable(Integer)) }
|
775
644
|
attr_accessor :proration_date
|
776
645
|
# 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.
|
777
|
-
sig {
|
646
|
+
sig {
|
647
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::TransferData))))
|
648
|
+
}
|
778
649
|
attr_accessor :transfer_data
|
779
650
|
# 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`.
|
780
|
-
sig { returns(T.any(String, Integer)) }
|
651
|
+
sig { returns(T.nilable(T.any(String, Integer))) }
|
781
652
|
attr_accessor :trial_end
|
782
653
|
# 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.
|
783
|
-
sig { returns(T::Boolean) }
|
654
|
+
sig { returns(T.nilable(T::Boolean)) }
|
784
655
|
attr_accessor :trial_from_plan
|
785
656
|
# Settings related to subscription trials.
|
786
|
-
sig { returns(::Stripe::SubscriptionService::UpdateParams::TrialSettings) }
|
657
|
+
sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::TrialSettings)) }
|
787
658
|
attr_accessor :trial_settings
|
788
659
|
sig {
|
789
|
-
params(add_invoice_items: T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem], application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::SubscriptionService::UpdateParams::AutomaticTax, billing_cycle_anchor:
|
660
|
+
params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::SubscriptionService::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::SubscriptionService::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::SubscriptionService::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::SubscriptionService::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::SubscriptionService::UpdateParams::PauseCollection))), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::TransferData))), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_settings: T.nilable(::Stripe::SubscriptionService::UpdateParams::TrialSettings)).void
|
790
661
|
}
|
791
662
|
def initialize(
|
792
663
|
add_invoice_items: nil,
|
793
664
|
application_fee_percent: nil,
|
794
665
|
automatic_tax: nil,
|
795
666
|
billing_cycle_anchor: nil,
|
796
|
-
billing_thresholds: nil,
|
797
667
|
cancel_at: nil,
|
798
668
|
cancel_at_period_end: nil,
|
799
669
|
cancellation_details: nil,
|
800
670
|
collection_method: nil,
|
801
|
-
coupon: nil,
|
802
671
|
days_until_due: nil,
|
803
672
|
default_payment_method: nil,
|
804
673
|
default_source: nil,
|
@@ -815,8 +684,6 @@ module Stripe
|
|
815
684
|
payment_behavior: nil,
|
816
685
|
payment_settings: nil,
|
817
686
|
pending_invoice_item_interval: nil,
|
818
|
-
prebilling: nil,
|
819
|
-
promotion_code: nil,
|
820
687
|
proration_behavior: nil,
|
821
688
|
proration_date: nil,
|
822
689
|
transfer_data: nil,
|
@@ -838,96 +705,106 @@ module Stripe
|
|
838
705
|
end
|
839
706
|
class Created < Stripe::RequestParams
|
840
707
|
# Minimum value to filter by (exclusive)
|
841
|
-
sig { returns(Integer) }
|
708
|
+
sig { returns(T.nilable(Integer)) }
|
842
709
|
attr_accessor :gt
|
843
710
|
# Minimum value to filter by (inclusive)
|
844
|
-
sig { returns(Integer) }
|
711
|
+
sig { returns(T.nilable(Integer)) }
|
845
712
|
attr_accessor :gte
|
846
713
|
# Maximum value to filter by (exclusive)
|
847
|
-
sig { returns(Integer) }
|
714
|
+
sig { returns(T.nilable(Integer)) }
|
848
715
|
attr_accessor :lt
|
849
716
|
# Maximum value to filter by (inclusive)
|
850
|
-
sig { returns(Integer) }
|
717
|
+
sig { returns(T.nilable(Integer)) }
|
851
718
|
attr_accessor :lte
|
852
|
-
sig {
|
719
|
+
sig {
|
720
|
+
params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
|
721
|
+
}
|
853
722
|
def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
|
854
723
|
end
|
855
724
|
class CurrentPeriodEnd < Stripe::RequestParams
|
856
725
|
# Minimum value to filter by (exclusive)
|
857
|
-
sig { returns(Integer) }
|
726
|
+
sig { returns(T.nilable(Integer)) }
|
858
727
|
attr_accessor :gt
|
859
728
|
# Minimum value to filter by (inclusive)
|
860
|
-
sig { returns(Integer) }
|
729
|
+
sig { returns(T.nilable(Integer)) }
|
861
730
|
attr_accessor :gte
|
862
731
|
# Maximum value to filter by (exclusive)
|
863
|
-
sig { returns(Integer) }
|
732
|
+
sig { returns(T.nilable(Integer)) }
|
864
733
|
attr_accessor :lt
|
865
734
|
# Maximum value to filter by (inclusive)
|
866
|
-
sig { returns(Integer) }
|
735
|
+
sig { returns(T.nilable(Integer)) }
|
867
736
|
attr_accessor :lte
|
868
|
-
sig {
|
737
|
+
sig {
|
738
|
+
params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
|
739
|
+
}
|
869
740
|
def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
|
870
741
|
end
|
871
742
|
class CurrentPeriodStart < Stripe::RequestParams
|
872
743
|
# Minimum value to filter by (exclusive)
|
873
|
-
sig { returns(Integer) }
|
744
|
+
sig { returns(T.nilable(Integer)) }
|
874
745
|
attr_accessor :gt
|
875
746
|
# Minimum value to filter by (inclusive)
|
876
|
-
sig { returns(Integer) }
|
747
|
+
sig { returns(T.nilable(Integer)) }
|
877
748
|
attr_accessor :gte
|
878
749
|
# Maximum value to filter by (exclusive)
|
879
|
-
sig { returns(Integer) }
|
750
|
+
sig { returns(T.nilable(Integer)) }
|
880
751
|
attr_accessor :lt
|
881
752
|
# Maximum value to filter by (inclusive)
|
882
|
-
sig { returns(Integer) }
|
753
|
+
sig { returns(T.nilable(Integer)) }
|
883
754
|
attr_accessor :lte
|
884
|
-
sig {
|
755
|
+
sig {
|
756
|
+
params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
|
757
|
+
}
|
885
758
|
def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
|
886
759
|
end
|
887
760
|
# Filter subscriptions by their automatic tax settings.
|
888
|
-
sig { returns(::Stripe::SubscriptionService::ListParams::AutomaticTax) }
|
761
|
+
sig { returns(T.nilable(::Stripe::SubscriptionService::ListParams::AutomaticTax)) }
|
889
762
|
attr_accessor :automatic_tax
|
890
763
|
# The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`.
|
891
|
-
sig { returns(String) }
|
764
|
+
sig { returns(T.nilable(String)) }
|
892
765
|
attr_accessor :collection_method
|
893
766
|
# Only return subscriptions that were created during the given date interval.
|
894
|
-
sig { returns(T.any(::Stripe::SubscriptionService::ListParams::Created, Integer)) }
|
767
|
+
sig { returns(T.nilable(T.any(::Stripe::SubscriptionService::ListParams::Created, Integer))) }
|
895
768
|
attr_accessor :created
|
896
769
|
# Only return subscriptions whose current_period_end falls within the given date interval.
|
897
|
-
sig {
|
770
|
+
sig {
|
771
|
+
returns(T.nilable(T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodEnd, Integer)))
|
772
|
+
}
|
898
773
|
attr_accessor :current_period_end
|
899
774
|
# Only return subscriptions whose current_period_start falls within the given date interval.
|
900
|
-
sig {
|
775
|
+
sig {
|
776
|
+
returns(T.nilable(T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodStart, Integer)))
|
777
|
+
}
|
901
778
|
attr_accessor :current_period_start
|
902
779
|
# The ID of the customer whose subscriptions will be retrieved.
|
903
|
-
sig { returns(String) }
|
780
|
+
sig { returns(T.nilable(String)) }
|
904
781
|
attr_accessor :customer
|
905
782
|
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
906
|
-
sig { returns(String) }
|
783
|
+
sig { returns(T.nilable(String)) }
|
907
784
|
attr_accessor :ending_before
|
908
785
|
# Specifies which fields in the response should be expanded.
|
909
|
-
sig { returns(T::Array[String]) }
|
786
|
+
sig { returns(T.nilable(T::Array[String])) }
|
910
787
|
attr_accessor :expand
|
911
788
|
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
912
|
-
sig { returns(Integer) }
|
789
|
+
sig { returns(T.nilable(Integer)) }
|
913
790
|
attr_accessor :limit
|
914
791
|
# The ID of the plan whose subscriptions will be retrieved.
|
915
|
-
sig { returns(String) }
|
792
|
+
sig { returns(T.nilable(String)) }
|
916
793
|
attr_accessor :plan
|
917
794
|
# Filter for subscriptions that contain this recurring price ID.
|
918
|
-
sig { returns(String) }
|
795
|
+
sig { returns(T.nilable(String)) }
|
919
796
|
attr_accessor :price
|
920
797
|
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
921
|
-
sig { returns(String) }
|
798
|
+
sig { returns(T.nilable(String)) }
|
922
799
|
attr_accessor :starting_after
|
923
800
|
# 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.
|
924
|
-
sig { returns(String) }
|
801
|
+
sig { returns(T.nilable(String)) }
|
925
802
|
attr_accessor :status
|
926
803
|
# 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.
|
927
|
-
sig { returns(String) }
|
804
|
+
sig { returns(T.nilable(String)) }
|
928
805
|
attr_accessor :test_clock
|
929
806
|
sig {
|
930
|
-
params(automatic_tax: ::Stripe::SubscriptionService::ListParams::AutomaticTax, collection_method: String, created: T.any(::Stripe::SubscriptionService::ListParams::Created, Integer), current_period_end: T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodEnd, Integer), current_period_start: T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodStart, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, plan: String, price: String, starting_after: String, status: String, test_clock: String).void
|
807
|
+
params(automatic_tax: T.nilable(::Stripe::SubscriptionService::ListParams::AutomaticTax), collection_method: T.nilable(String), created: T.nilable(T.any(::Stripe::SubscriptionService::ListParams::Created, Integer)), current_period_end: T.nilable(T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodEnd, Integer)), current_period_start: T.nilable(T.any(::Stripe::SubscriptionService::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
|
931
808
|
}
|
932
809
|
def initialize(
|
933
810
|
automatic_tax: nil,
|
@@ -949,70 +826,38 @@ module Stripe
|
|
949
826
|
class CreateParams < Stripe::RequestParams
|
950
827
|
class AddInvoiceItem < Stripe::RequestParams
|
951
828
|
class Discount < Stripe::RequestParams
|
952
|
-
class DiscountEnd < Stripe::RequestParams
|
953
|
-
class Duration < Stripe::RequestParams
|
954
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
955
|
-
sig { returns(String) }
|
956
|
-
attr_accessor :interval
|
957
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
958
|
-
sig { returns(Integer) }
|
959
|
-
attr_accessor :interval_count
|
960
|
-
sig { params(interval: String, interval_count: Integer).void }
|
961
|
-
def initialize(interval: nil, interval_count: nil); end
|
962
|
-
end
|
963
|
-
# Time span for the redeemed discount.
|
964
|
-
sig {
|
965
|
-
returns(::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount::DiscountEnd::Duration)
|
966
|
-
}
|
967
|
-
attr_accessor :duration
|
968
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
969
|
-
sig { returns(Integer) }
|
970
|
-
attr_accessor :timestamp
|
971
|
-
# The type of calculation made to determine when the discount ends.
|
972
|
-
sig { returns(String) }
|
973
|
-
attr_accessor :type
|
974
|
-
sig {
|
975
|
-
params(duration: ::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
976
|
-
}
|
977
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
978
|
-
end
|
979
829
|
# ID of the coupon to create a new discount for.
|
980
|
-
sig { returns(String) }
|
830
|
+
sig { returns(T.nilable(String)) }
|
981
831
|
attr_accessor :coupon
|
982
832
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
983
|
-
sig { returns(String) }
|
833
|
+
sig { returns(T.nilable(String)) }
|
984
834
|
attr_accessor :discount
|
985
|
-
# Details to determine how long the discount should be applied for.
|
986
|
-
sig {
|
987
|
-
returns(::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount::DiscountEnd)
|
988
|
-
}
|
989
|
-
attr_accessor :discount_end
|
990
835
|
# ID of the promotion code to create a new discount for.
|
991
|
-
sig { returns(String) }
|
836
|
+
sig { returns(T.nilable(String)) }
|
992
837
|
attr_accessor :promotion_code
|
993
838
|
sig {
|
994
|
-
params(coupon: String, discount: String,
|
839
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
995
840
|
}
|
996
|
-
def initialize(coupon: nil, discount: nil,
|
841
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
997
842
|
end
|
998
843
|
class PriceData < Stripe::RequestParams
|
999
844
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1000
845
|
sig { returns(String) }
|
1001
846
|
attr_accessor :currency
|
1002
|
-
# The ID of the
|
847
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
1003
848
|
sig { returns(String) }
|
1004
849
|
attr_accessor :product
|
1005
850
|
# 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.
|
1006
|
-
sig { returns(String) }
|
851
|
+
sig { returns(T.nilable(String)) }
|
1007
852
|
attr_accessor :tax_behavior
|
1008
853
|
# 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.
|
1009
|
-
sig { returns(Integer) }
|
854
|
+
sig { returns(T.nilable(Integer)) }
|
1010
855
|
attr_accessor :unit_amount
|
1011
856
|
# 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.
|
1012
|
-
sig { returns(String) }
|
857
|
+
sig { returns(T.nilable(String)) }
|
1013
858
|
attr_accessor :unit_amount_decimal
|
1014
859
|
sig {
|
1015
|
-
params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
|
860
|
+
params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
1016
861
|
}
|
1017
862
|
def initialize(
|
1018
863
|
currency: nil,
|
@@ -1024,23 +869,25 @@ module Stripe
|
|
1024
869
|
end
|
1025
870
|
# The coupons to redeem into discounts for the item.
|
1026
871
|
sig {
|
1027
|
-
returns(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount])
|
872
|
+
returns(T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount]))
|
1028
873
|
}
|
1029
874
|
attr_accessor :discounts
|
1030
875
|
# The ID of the price object. One of `price` or `price_data` is required.
|
1031
|
-
sig { returns(String) }
|
876
|
+
sig { returns(T.nilable(String)) }
|
1032
877
|
attr_accessor :price
|
1033
878
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
1034
|
-
sig {
|
879
|
+
sig {
|
880
|
+
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::PriceData))
|
881
|
+
}
|
1035
882
|
attr_accessor :price_data
|
1036
883
|
# Quantity for this item. Defaults to 1.
|
1037
|
-
sig { returns(Integer) }
|
884
|
+
sig { returns(T.nilable(Integer)) }
|
1038
885
|
attr_accessor :quantity
|
1039
886
|
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
1040
|
-
sig { returns(T.nilable(T::Array[String])) }
|
887
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1041
888
|
attr_accessor :tax_rates
|
1042
889
|
sig {
|
1043
|
-
params(discounts: T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
|
890
|
+
params(discounts: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
1044
891
|
}
|
1045
892
|
def initialize(
|
1046
893
|
discounts: nil,
|
@@ -1053,22 +900,24 @@ module Stripe
|
|
1053
900
|
class AutomaticTax < Stripe::RequestParams
|
1054
901
|
class Liability < Stripe::RequestParams
|
1055
902
|
# The connected account being referenced when `type` is `account`.
|
1056
|
-
sig { returns(String) }
|
903
|
+
sig { returns(T.nilable(String)) }
|
1057
904
|
attr_accessor :account
|
1058
905
|
# Type of the account referenced in the request.
|
1059
906
|
sig { returns(String) }
|
1060
907
|
attr_accessor :type
|
1061
|
-
sig { params(account: String, type: String).void }
|
908
|
+
sig { params(account: T.nilable(String), type: String).void }
|
1062
909
|
def initialize(account: nil, type: nil); end
|
1063
910
|
end
|
1064
911
|
# Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
|
1065
912
|
sig { returns(T::Boolean) }
|
1066
913
|
attr_accessor :enabled
|
1067
914
|
# 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.
|
1068
|
-
sig {
|
915
|
+
sig {
|
916
|
+
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax::Liability))
|
917
|
+
}
|
1069
918
|
attr_accessor :liability
|
1070
919
|
sig {
|
1071
|
-
params(enabled: T::Boolean, liability: ::Stripe::SubscriptionService::CreateParams::AutomaticTax::Liability).void
|
920
|
+
params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax::Liability)).void
|
1072
921
|
}
|
1073
922
|
def initialize(enabled: nil, liability: nil); end
|
1074
923
|
end
|
@@ -1077,151 +926,76 @@ module Stripe
|
|
1077
926
|
sig { returns(Integer) }
|
1078
927
|
attr_accessor :day_of_month
|
1079
928
|
# The hour of the day the billing_cycle_anchor should be. Ranges from 0 to 23.
|
1080
|
-
sig { returns(Integer) }
|
929
|
+
sig { returns(T.nilable(Integer)) }
|
1081
930
|
attr_accessor :hour
|
1082
931
|
# The minute of the hour the billing_cycle_anchor should be. Ranges from 0 to 59.
|
1083
|
-
sig { returns(Integer) }
|
932
|
+
sig { returns(T.nilable(Integer)) }
|
1084
933
|
attr_accessor :minute
|
1085
934
|
# The month to start full cycle billing periods. Ranges from 1 to 12.
|
1086
|
-
sig { returns(Integer) }
|
935
|
+
sig { returns(T.nilable(Integer)) }
|
1087
936
|
attr_accessor :month
|
1088
937
|
# The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59.
|
1089
|
-
sig { returns(Integer) }
|
938
|
+
sig { returns(T.nilable(Integer)) }
|
1090
939
|
attr_accessor :second
|
1091
940
|
sig {
|
1092
|
-
params(day_of_month: Integer, hour: Integer, minute: Integer, month: Integer, second: Integer).void
|
941
|
+
params(day_of_month: Integer, hour: T.nilable(Integer), minute: T.nilable(Integer), month: T.nilable(Integer), second: T.nilable(Integer)).void
|
1093
942
|
}
|
1094
943
|
def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end
|
1095
944
|
end
|
1096
|
-
class BillingThresholds < Stripe::RequestParams
|
1097
|
-
# Monetary threshold that triggers the subscription to advance to a new billing period
|
1098
|
-
sig { returns(Integer) }
|
1099
|
-
attr_accessor :amount_gte
|
1100
|
-
# 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.
|
1101
|
-
sig { returns(T::Boolean) }
|
1102
|
-
attr_accessor :reset_billing_cycle_anchor
|
1103
|
-
sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void }
|
1104
|
-
def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
|
1105
|
-
end
|
1106
945
|
class Discount < Stripe::RequestParams
|
1107
|
-
class DiscountEnd < Stripe::RequestParams
|
1108
|
-
class Duration < Stripe::RequestParams
|
1109
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1110
|
-
sig { returns(String) }
|
1111
|
-
attr_accessor :interval
|
1112
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1113
|
-
sig { returns(Integer) }
|
1114
|
-
attr_accessor :interval_count
|
1115
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1116
|
-
def initialize(interval: nil, interval_count: nil); end
|
1117
|
-
end
|
1118
|
-
# Time span for the redeemed discount.
|
1119
|
-
sig {
|
1120
|
-
returns(::Stripe::SubscriptionService::CreateParams::Discount::DiscountEnd::Duration)
|
1121
|
-
}
|
1122
|
-
attr_accessor :duration
|
1123
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1124
|
-
sig { returns(Integer) }
|
1125
|
-
attr_accessor :timestamp
|
1126
|
-
# The type of calculation made to determine when the discount ends.
|
1127
|
-
sig { returns(String) }
|
1128
|
-
attr_accessor :type
|
1129
|
-
sig {
|
1130
|
-
params(duration: ::Stripe::SubscriptionService::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
1131
|
-
}
|
1132
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
1133
|
-
end
|
1134
946
|
# ID of the coupon to create a new discount for.
|
1135
|
-
sig { returns(String) }
|
947
|
+
sig { returns(T.nilable(String)) }
|
1136
948
|
attr_accessor :coupon
|
1137
949
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1138
|
-
sig { returns(String) }
|
950
|
+
sig { returns(T.nilable(String)) }
|
1139
951
|
attr_accessor :discount
|
1140
|
-
# Details to determine how long the discount should be applied for.
|
1141
|
-
sig { returns(::Stripe::SubscriptionService::CreateParams::Discount::DiscountEnd) }
|
1142
|
-
attr_accessor :discount_end
|
1143
952
|
# ID of the promotion code to create a new discount for.
|
1144
|
-
sig { returns(String) }
|
953
|
+
sig { returns(T.nilable(String)) }
|
1145
954
|
attr_accessor :promotion_code
|
1146
955
|
sig {
|
1147
|
-
params(coupon: String, discount: String,
|
956
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
1148
957
|
}
|
1149
|
-
def initialize(coupon: nil, discount: nil,
|
958
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
1150
959
|
end
|
1151
960
|
class InvoiceSettings < Stripe::RequestParams
|
1152
961
|
class Issuer < Stripe::RequestParams
|
1153
962
|
# The connected account being referenced when `type` is `account`.
|
1154
|
-
sig { returns(String) }
|
963
|
+
sig { returns(T.nilable(String)) }
|
1155
964
|
attr_accessor :account
|
1156
965
|
# Type of the account referenced in the request.
|
1157
966
|
sig { returns(String) }
|
1158
967
|
attr_accessor :type
|
1159
|
-
sig { params(account: String, type: String).void }
|
968
|
+
sig { params(account: T.nilable(String), type: String).void }
|
1160
969
|
def initialize(account: nil, type: nil); end
|
1161
970
|
end
|
1162
971
|
# The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
|
1163
|
-
sig { returns(T.nilable(T::Array[String])) }
|
972
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1164
973
|
attr_accessor :account_tax_ids
|
1165
974
|
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
1166
|
-
sig {
|
975
|
+
sig {
|
976
|
+
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings::Issuer))
|
977
|
+
}
|
1167
978
|
attr_accessor :issuer
|
1168
979
|
sig {
|
1169
|
-
params(account_tax_ids: T.nilable(T::Array[String]), issuer: ::Stripe::SubscriptionService::CreateParams::InvoiceSettings::Issuer).void
|
980
|
+
params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), issuer: T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings::Issuer)).void
|
1170
981
|
}
|
1171
982
|
def initialize(account_tax_ids: nil, issuer: nil); end
|
1172
983
|
end
|
1173
984
|
class Item < Stripe::RequestParams
|
1174
|
-
class BillingThresholds < Stripe::RequestParams
|
1175
|
-
# 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))
|
1176
|
-
sig { returns(Integer) }
|
1177
|
-
attr_accessor :usage_gte
|
1178
|
-
sig { params(usage_gte: Integer).void }
|
1179
|
-
def initialize(usage_gte: nil); end
|
1180
|
-
end
|
1181
985
|
class Discount < Stripe::RequestParams
|
1182
|
-
class DiscountEnd < Stripe::RequestParams
|
1183
|
-
class Duration < Stripe::RequestParams
|
1184
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1185
|
-
sig { returns(String) }
|
1186
|
-
attr_accessor :interval
|
1187
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1188
|
-
sig { returns(Integer) }
|
1189
|
-
attr_accessor :interval_count
|
1190
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1191
|
-
def initialize(interval: nil, interval_count: nil); end
|
1192
|
-
end
|
1193
|
-
# Time span for the redeemed discount.
|
1194
|
-
sig {
|
1195
|
-
returns(::Stripe::SubscriptionService::CreateParams::Item::Discount::DiscountEnd::Duration)
|
1196
|
-
}
|
1197
|
-
attr_accessor :duration
|
1198
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1199
|
-
sig { returns(Integer) }
|
1200
|
-
attr_accessor :timestamp
|
1201
|
-
# The type of calculation made to determine when the discount ends.
|
1202
|
-
sig { returns(String) }
|
1203
|
-
attr_accessor :type
|
1204
|
-
sig {
|
1205
|
-
params(duration: ::Stripe::SubscriptionService::CreateParams::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
1206
|
-
}
|
1207
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
1208
|
-
end
|
1209
986
|
# ID of the coupon to create a new discount for.
|
1210
|
-
sig { returns(String) }
|
987
|
+
sig { returns(T.nilable(String)) }
|
1211
988
|
attr_accessor :coupon
|
1212
989
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1213
|
-
sig { returns(String) }
|
990
|
+
sig { returns(T.nilable(String)) }
|
1214
991
|
attr_accessor :discount
|
1215
|
-
# Details to determine how long the discount should be applied for.
|
1216
|
-
sig { returns(::Stripe::SubscriptionService::CreateParams::Item::Discount::DiscountEnd) }
|
1217
|
-
attr_accessor :discount_end
|
1218
992
|
# ID of the promotion code to create a new discount for.
|
1219
|
-
sig { returns(String) }
|
993
|
+
sig { returns(T.nilable(String)) }
|
1220
994
|
attr_accessor :promotion_code
|
1221
995
|
sig {
|
1222
|
-
params(coupon: String, discount: String,
|
996
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
1223
997
|
}
|
1224
|
-
def initialize(coupon: nil, discount: nil,
|
998
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
1225
999
|
end
|
1226
1000
|
class PriceData < Stripe::RequestParams
|
1227
1001
|
class Recurring < Stripe::RequestParams
|
@@ -1229,31 +1003,31 @@ module Stripe
|
|
1229
1003
|
sig { returns(String) }
|
1230
1004
|
attr_accessor :interval
|
1231
1005
|
# 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).
|
1232
|
-
sig { returns(Integer) }
|
1006
|
+
sig { returns(T.nilable(Integer)) }
|
1233
1007
|
attr_accessor :interval_count
|
1234
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1008
|
+
sig { params(interval: String, interval_count: T.nilable(Integer)).void }
|
1235
1009
|
def initialize(interval: nil, interval_count: nil); end
|
1236
1010
|
end
|
1237
1011
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1238
1012
|
sig { returns(String) }
|
1239
1013
|
attr_accessor :currency
|
1240
|
-
# The ID of the
|
1014
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
1241
1015
|
sig { returns(String) }
|
1242
1016
|
attr_accessor :product
|
1243
1017
|
# The recurring components of a price such as `interval` and `interval_count`.
|
1244
1018
|
sig { returns(::Stripe::SubscriptionService::CreateParams::Item::PriceData::Recurring) }
|
1245
1019
|
attr_accessor :recurring
|
1246
1020
|
# 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.
|
1247
|
-
sig { returns(String) }
|
1021
|
+
sig { returns(T.nilable(String)) }
|
1248
1022
|
attr_accessor :tax_behavior
|
1249
1023
|
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
1250
|
-
sig { returns(Integer) }
|
1024
|
+
sig { returns(T.nilable(Integer)) }
|
1251
1025
|
attr_accessor :unit_amount
|
1252
1026
|
# 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.
|
1253
|
-
sig { returns(String) }
|
1027
|
+
sig { returns(T.nilable(String)) }
|
1254
1028
|
attr_accessor :unit_amount_decimal
|
1255
1029
|
sig {
|
1256
|
-
params(currency: String, product: String, recurring: ::Stripe::SubscriptionService::CreateParams::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
|
1030
|
+
params(currency: String, product: String, recurring: ::Stripe::SubscriptionService::CreateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
1257
1031
|
}
|
1258
1032
|
def initialize(
|
1259
1033
|
currency: nil,
|
@@ -1264,60 +1038,40 @@ module Stripe
|
|
1264
1038
|
unit_amount_decimal: nil
|
1265
1039
|
); end
|
1266
1040
|
end
|
1267
|
-
class Trial < Stripe::RequestParams
|
1268
|
-
# 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.
|
1269
|
-
sig { returns(T::Array[String]) }
|
1270
|
-
attr_accessor :converts_to
|
1271
|
-
# Determines the type of trial for this item.
|
1272
|
-
sig { returns(String) }
|
1273
|
-
attr_accessor :type
|
1274
|
-
sig { params(converts_to: T::Array[String], type: String).void }
|
1275
|
-
def initialize(converts_to: nil, type: nil); end
|
1276
|
-
end
|
1277
|
-
# 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.
|
1278
|
-
sig {
|
1279
|
-
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::Item::BillingThresholds))
|
1280
|
-
}
|
1281
|
-
attr_accessor :billing_thresholds
|
1282
1041
|
# The coupons to redeem into discounts for the subscription item.
|
1283
1042
|
sig {
|
1284
|
-
returns(T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::Item::Discount]))
|
1043
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::CreateParams::Item::Discount]))))
|
1285
1044
|
}
|
1286
1045
|
attr_accessor :discounts
|
1287
1046
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1288
|
-
sig { returns(T::Hash[String, String]) }
|
1047
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
1289
1048
|
attr_accessor :metadata
|
1290
1049
|
# Plan ID for this item, as a string.
|
1291
|
-
sig { returns(String) }
|
1050
|
+
sig { returns(T.nilable(String)) }
|
1292
1051
|
attr_accessor :plan
|
1293
1052
|
# The ID of the price object.
|
1294
|
-
sig { returns(String) }
|
1053
|
+
sig { returns(T.nilable(String)) }
|
1295
1054
|
attr_accessor :price
|
1296
1055
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
|
1297
|
-
sig { returns(::Stripe::SubscriptionService::CreateParams::Item::PriceData) }
|
1056
|
+
sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::Item::PriceData)) }
|
1298
1057
|
attr_accessor :price_data
|
1299
1058
|
# Quantity for this item.
|
1300
|
-
sig { returns(Integer) }
|
1059
|
+
sig { returns(T.nilable(Integer)) }
|
1301
1060
|
attr_accessor :quantity
|
1302
1061
|
# 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.
|
1303
|
-
sig { returns(T.nilable(T::Array[String])) }
|
1062
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1304
1063
|
attr_accessor :tax_rates
|
1305
|
-
# Define options to configure the trial on the subscription item.
|
1306
|
-
sig { returns(::Stripe::SubscriptionService::CreateParams::Item::Trial) }
|
1307
|
-
attr_accessor :trial
|
1308
1064
|
sig {
|
1309
|
-
params(
|
1065
|
+
params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::CreateParams::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionService::CreateParams::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
1310
1066
|
}
|
1311
1067
|
def initialize(
|
1312
|
-
billing_thresholds: nil,
|
1313
1068
|
discounts: nil,
|
1314
1069
|
metadata: nil,
|
1315
1070
|
plan: nil,
|
1316
1071
|
price: nil,
|
1317
1072
|
price_data: nil,
|
1318
1073
|
quantity: nil,
|
1319
|
-
tax_rates: nil
|
1320
|
-
trial: nil
|
1074
|
+
tax_rates: nil
|
1321
1075
|
); end
|
1322
1076
|
end
|
1323
1077
|
class PaymentSettings < Stripe::RequestParams
|
@@ -1325,58 +1079,60 @@ module Stripe
|
|
1325
1079
|
class AcssDebit < Stripe::RequestParams
|
1326
1080
|
class MandateOptions < Stripe::RequestParams
|
1327
1081
|
# Transaction type of the mandate.
|
1328
|
-
sig { returns(String) }
|
1082
|
+
sig { returns(T.nilable(String)) }
|
1329
1083
|
attr_accessor :transaction_type
|
1330
|
-
sig { params(transaction_type: String).void }
|
1084
|
+
sig { params(transaction_type: T.nilable(String)).void }
|
1331
1085
|
def initialize(transaction_type: nil); end
|
1332
1086
|
end
|
1333
1087
|
# Additional fields for Mandate creation
|
1334
1088
|
sig {
|
1335
|
-
returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions)
|
1089
|
+
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
|
1336
1090
|
}
|
1337
1091
|
attr_accessor :mandate_options
|
1338
1092
|
# Verification method for the intent
|
1339
|
-
sig { returns(String) }
|
1093
|
+
sig { returns(T.nilable(String)) }
|
1340
1094
|
attr_accessor :verification_method
|
1341
1095
|
sig {
|
1342
|
-
params(mandate_options: ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void
|
1096
|
+
params(mandate_options: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
|
1343
1097
|
}
|
1344
1098
|
def initialize(mandate_options: nil, verification_method: nil); end
|
1345
1099
|
end
|
1346
1100
|
class Bancontact < Stripe::RequestParams
|
1347
1101
|
# Preferred language of the Bancontact authorization page that the customer is redirected to.
|
1348
|
-
sig { returns(String) }
|
1102
|
+
sig { returns(T.nilable(String)) }
|
1349
1103
|
attr_accessor :preferred_language
|
1350
|
-
sig { params(preferred_language: String).void }
|
1104
|
+
sig { params(preferred_language: T.nilable(String)).void }
|
1351
1105
|
def initialize(preferred_language: nil); end
|
1352
1106
|
end
|
1353
1107
|
class Card < Stripe::RequestParams
|
1354
1108
|
class MandateOptions < Stripe::RequestParams
|
1355
1109
|
# Amount to be charged for future payments.
|
1356
|
-
sig { returns(Integer) }
|
1110
|
+
sig { returns(T.nilable(Integer)) }
|
1357
1111
|
attr_accessor :amount
|
1358
1112
|
# 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.
|
1359
|
-
sig { returns(String) }
|
1113
|
+
sig { returns(T.nilable(String)) }
|
1360
1114
|
attr_accessor :amount_type
|
1361
1115
|
# A description of the mandate or subscription that is meant to be displayed to the customer.
|
1362
|
-
sig { returns(String) }
|
1116
|
+
sig { returns(T.nilable(String)) }
|
1363
1117
|
attr_accessor :description
|
1364
|
-
sig {
|
1118
|
+
sig {
|
1119
|
+
params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void
|
1120
|
+
}
|
1365
1121
|
def initialize(amount: nil, amount_type: nil, description: nil); end
|
1366
1122
|
end
|
1367
1123
|
# Configuration options for setting up an eMandate for cards issued in India.
|
1368
1124
|
sig {
|
1369
|
-
returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions)
|
1125
|
+
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions))
|
1370
1126
|
}
|
1371
1127
|
attr_accessor :mandate_options
|
1372
1128
|
# 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.
|
1373
|
-
sig { returns(String) }
|
1129
|
+
sig { returns(T.nilable(String)) }
|
1374
1130
|
attr_accessor :network
|
1375
1131
|
# 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.
|
1376
|
-
sig { returns(String) }
|
1132
|
+
sig { returns(T.nilable(String)) }
|
1377
1133
|
attr_accessor :request_three_d_secure
|
1378
1134
|
sig {
|
1379
|
-
params(mandate_options: ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions, network: String, request_three_d_secure: String).void
|
1135
|
+
params(mandate_options: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void
|
1380
1136
|
}
|
1381
1137
|
def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end
|
1382
1138
|
end
|
@@ -1391,32 +1147,29 @@ module Stripe
|
|
1391
1147
|
end
|
1392
1148
|
# Configuration for eu_bank_transfer funding type.
|
1393
1149
|
sig {
|
1394
|
-
returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer)
|
1150
|
+
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
|
1395
1151
|
}
|
1396
1152
|
attr_accessor :eu_bank_transfer
|
1397
1153
|
# 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`.
|
1398
|
-
sig { returns(String) }
|
1154
|
+
sig { returns(T.nilable(String)) }
|
1399
1155
|
attr_accessor :type
|
1400
1156
|
sig {
|
1401
|
-
params(eu_bank_transfer: ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, type: String).void
|
1157
|
+
params(eu_bank_transfer: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
|
1402
1158
|
}
|
1403
1159
|
def initialize(eu_bank_transfer: nil, type: nil); end
|
1404
1160
|
end
|
1405
1161
|
# Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
|
1406
1162
|
sig {
|
1407
|
-
returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer)
|
1163
|
+
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
|
1408
1164
|
}
|
1409
1165
|
attr_accessor :bank_transfer
|
1410
1166
|
# The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
|
1411
|
-
sig { returns(String) }
|
1167
|
+
sig { returns(T.nilable(String)) }
|
1412
1168
|
attr_accessor :funding_type
|
1413
1169
|
sig {
|
1414
|
-
params(bank_transfer: ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String).void
|
1170
|
+
params(bank_transfer: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
|
1415
1171
|
}
|
1416
1172
|
def initialize(bank_transfer: nil, funding_type: nil); end
|
1417
|
-
end
|
1418
|
-
class IdBankTransfer < Stripe::RequestParams
|
1419
|
-
|
1420
1173
|
end
|
1421
1174
|
class Konbini < Stripe::RequestParams
|
1422
1175
|
|
@@ -1428,92 +1181,83 @@ module Stripe
|
|
1428
1181
|
class FinancialConnections < Stripe::RequestParams
|
1429
1182
|
class Filters < Stripe::RequestParams
|
1430
1183
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
1431
|
-
sig { returns(T::Array[String]) }
|
1184
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1432
1185
|
attr_accessor :account_subcategories
|
1433
|
-
|
1434
|
-
|
1435
|
-
attr_accessor :institution
|
1436
|
-
sig { params(account_subcategories: T::Array[String], institution: String).void }
|
1437
|
-
def initialize(account_subcategories: nil, institution: nil); end
|
1186
|
+
sig { params(account_subcategories: T.nilable(T::Array[String])).void }
|
1187
|
+
def initialize(account_subcategories: nil); end
|
1438
1188
|
end
|
1439
1189
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
1440
1190
|
sig {
|
1441
|
-
returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters)
|
1191
|
+
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
|
1442
1192
|
}
|
1443
1193
|
attr_accessor :filters
|
1444
1194
|
# 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`.
|
1445
|
-
sig { returns(T::Array[String]) }
|
1195
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1446
1196
|
attr_accessor :permissions
|
1447
1197
|
# List of data features that you would like to retrieve upon account creation.
|
1448
|
-
sig { returns(T::Array[String]) }
|
1198
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1449
1199
|
attr_accessor :prefetch
|
1450
1200
|
sig {
|
1451
|
-
params(filters: ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, permissions: T::Array[String], prefetch: T::Array[String]).void
|
1201
|
+
params(filters: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
|
1452
1202
|
}
|
1453
1203
|
def initialize(filters: nil, permissions: nil, prefetch: nil); end
|
1454
1204
|
end
|
1455
1205
|
# Additional fields for Financial Connections Session creation
|
1456
1206
|
sig {
|
1457
|
-
returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections)
|
1207
|
+
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
|
1458
1208
|
}
|
1459
1209
|
attr_accessor :financial_connections
|
1460
1210
|
# Verification method for the intent
|
1461
|
-
sig { returns(String) }
|
1211
|
+
sig { returns(T.nilable(String)) }
|
1462
1212
|
attr_accessor :verification_method
|
1463
1213
|
sig {
|
1464
|
-
params(financial_connections: ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections, verification_method: String).void
|
1214
|
+
params(financial_connections: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
|
1465
1215
|
}
|
1466
1216
|
def initialize(financial_connections: nil, verification_method: nil); end
|
1467
1217
|
end
|
1468
1218
|
# This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
|
1469
1219
|
sig {
|
1470
|
-
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))
|
1220
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
|
1471
1221
|
}
|
1472
1222
|
attr_accessor :acss_debit
|
1473
1223
|
# This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
|
1474
1224
|
sig {
|
1475
|
-
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))
|
1225
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
|
1476
1226
|
}
|
1477
1227
|
attr_accessor :bancontact
|
1478
1228
|
# This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
|
1479
1229
|
sig {
|
1480
|
-
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card))
|
1230
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card))))
|
1481
1231
|
}
|
1482
1232
|
attr_accessor :card
|
1483
1233
|
# This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1484
1234
|
sig {
|
1485
|
-
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))
|
1235
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
|
1486
1236
|
}
|
1487
1237
|
attr_accessor :customer_balance
|
1488
|
-
# This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
1489
|
-
sig {
|
1490
|
-
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer))
|
1491
|
-
}
|
1492
|
-
attr_accessor :id_bank_transfer
|
1493
1238
|
# This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
1494
1239
|
sig {
|
1495
|
-
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))
|
1240
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
|
1496
1241
|
}
|
1497
1242
|
attr_accessor :konbini
|
1498
1243
|
# This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
|
1499
1244
|
sig {
|
1500
|
-
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))
|
1245
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
|
1501
1246
|
}
|
1502
1247
|
attr_accessor :sepa_debit
|
1503
1248
|
# This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
|
1504
1249
|
sig {
|
1505
|
-
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))
|
1250
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
|
1506
1251
|
}
|
1507
1252
|
attr_accessor :us_bank_account
|
1508
1253
|
sig {
|
1509
|
-
params(acss_debit: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit), bancontact: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact), card: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card), customer_balance: T.nilable(
|
1254
|
+
params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
|
1510
1255
|
}
|
1511
1256
|
def initialize(
|
1512
1257
|
acss_debit: nil,
|
1513
1258
|
bancontact: nil,
|
1514
1259
|
card: nil,
|
1515
1260
|
customer_balance: nil,
|
1516
|
-
id_bank_transfer: nil,
|
1517
1261
|
konbini: nil,
|
1518
1262
|
sepa_debit: nil,
|
1519
1263
|
us_bank_account: nil
|
@@ -1521,17 +1265,17 @@ module Stripe
|
|
1521
1265
|
end
|
1522
1266
|
# Payment-method-specific configuration to provide to invoices created by the subscription.
|
1523
1267
|
sig {
|
1524
|
-
returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions)
|
1268
|
+
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions))
|
1525
1269
|
}
|
1526
1270
|
attr_accessor :payment_method_options
|
1527
1271
|
# 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
|
1528
|
-
sig { returns(T.nilable(T::Array[String])) }
|
1272
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1529
1273
|
attr_accessor :payment_method_types
|
1530
1274
|
# Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
|
1531
|
-
sig { returns(String) }
|
1275
|
+
sig { returns(T.nilable(String)) }
|
1532
1276
|
attr_accessor :save_default_payment_method
|
1533
1277
|
sig {
|
1534
|
-
params(payment_method_options: ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions, payment_method_types: T.nilable(T::Array[String]), save_default_payment_method: String).void
|
1278
|
+
params(payment_method_options: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String]))), save_default_payment_method: T.nilable(String)).void
|
1535
1279
|
}
|
1536
1280
|
def initialize(
|
1537
1281
|
payment_method_options: nil,
|
@@ -1544,29 +1288,19 @@ module Stripe
|
|
1544
1288
|
sig { returns(String) }
|
1545
1289
|
attr_accessor :interval
|
1546
1290
|
# 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).
|
1547
|
-
sig { returns(Integer) }
|
1291
|
+
sig { returns(T.nilable(Integer)) }
|
1548
1292
|
attr_accessor :interval_count
|
1549
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1293
|
+
sig { params(interval: String, interval_count: T.nilable(Integer)).void }
|
1550
1294
|
def initialize(interval: nil, interval_count: nil); end
|
1551
1295
|
end
|
1552
|
-
class Prebilling < Stripe::RequestParams
|
1553
|
-
# This is used to determine the number of billing cycles to prebill.
|
1554
|
-
sig { returns(Integer) }
|
1555
|
-
attr_accessor :iterations
|
1556
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1557
|
-
sig { returns(String) }
|
1558
|
-
attr_accessor :update_behavior
|
1559
|
-
sig { params(iterations: Integer, update_behavior: String).void }
|
1560
|
-
def initialize(iterations: nil, update_behavior: nil); end
|
1561
|
-
end
|
1562
1296
|
class TransferData < Stripe::RequestParams
|
1563
1297
|
# 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.
|
1564
|
-
sig { returns(Float) }
|
1298
|
+
sig { returns(T.nilable(Float)) }
|
1565
1299
|
attr_accessor :amount_percent
|
1566
1300
|
# ID of an existing, connected Stripe account.
|
1567
1301
|
sig { returns(String) }
|
1568
1302
|
attr_accessor :destination
|
1569
|
-
sig { params(amount_percent: Float, destination: String).void }
|
1303
|
+
sig { params(amount_percent: T.nilable(Float), destination: String).void }
|
1570
1304
|
def initialize(amount_percent: nil, destination: nil); end
|
1571
1305
|
end
|
1572
1306
|
class TrialSettings < Stripe::RequestParams
|
@@ -1586,79 +1320,79 @@ module Stripe
|
|
1586
1320
|
def initialize(end_behavior: nil); end
|
1587
1321
|
end
|
1588
1322
|
# 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.
|
1589
|
-
sig {
|
1323
|
+
sig {
|
1324
|
+
returns(T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem]))
|
1325
|
+
}
|
1590
1326
|
attr_accessor :add_invoice_items
|
1591
1327
|
# 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).
|
1592
|
-
sig { returns(T.nilable(Float)) }
|
1328
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
|
1593
1329
|
attr_accessor :application_fee_percent
|
1594
1330
|
# Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
|
1595
|
-
sig { returns(::Stripe::SubscriptionService::CreateParams::AutomaticTax) }
|
1331
|
+
sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax)) }
|
1596
1332
|
attr_accessor :automatic_tax
|
1597
1333
|
# 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.
|
1598
|
-
sig { returns(Integer) }
|
1334
|
+
sig { returns(T.nilable(Integer)) }
|
1599
1335
|
attr_accessor :backdate_start_date
|
1600
1336
|
# 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.
|
1601
|
-
sig { returns(Integer) }
|
1337
|
+
sig { returns(T.nilable(Integer)) }
|
1602
1338
|
attr_accessor :billing_cycle_anchor
|
1603
1339
|
# 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.
|
1604
|
-
sig {
|
1340
|
+
sig {
|
1341
|
+
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::BillingCycleAnchorConfig))
|
1342
|
+
}
|
1605
1343
|
attr_accessor :billing_cycle_anchor_config
|
1606
|
-
# 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.
|
1607
|
-
sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::BillingThresholds)) }
|
1608
|
-
attr_accessor :billing_thresholds
|
1609
1344
|
# 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.
|
1610
|
-
sig { returns(Integer) }
|
1345
|
+
sig { returns(T.nilable(Integer)) }
|
1611
1346
|
attr_accessor :cancel_at
|
1612
1347
|
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
1613
|
-
sig { returns(T::Boolean) }
|
1348
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1614
1349
|
attr_accessor :cancel_at_period_end
|
1615
1350
|
# 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`.
|
1616
|
-
sig { returns(String) }
|
1351
|
+
sig { returns(T.nilable(String)) }
|
1617
1352
|
attr_accessor :collection_method
|
1618
|
-
# 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.
|
1619
|
-
sig { returns(String) }
|
1620
|
-
attr_accessor :coupon
|
1621
1353
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1622
|
-
sig { returns(String) }
|
1354
|
+
sig { returns(T.nilable(String)) }
|
1623
1355
|
attr_accessor :currency
|
1624
1356
|
# The identifier of the customer to subscribe.
|
1625
1357
|
sig { returns(String) }
|
1626
1358
|
attr_accessor :customer
|
1627
1359
|
# 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`.
|
1628
|
-
sig { returns(Integer) }
|
1360
|
+
sig { returns(T.nilable(Integer)) }
|
1629
1361
|
attr_accessor :days_until_due
|
1630
1362
|
# 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).
|
1631
|
-
sig { returns(String) }
|
1363
|
+
sig { returns(T.nilable(String)) }
|
1632
1364
|
attr_accessor :default_payment_method
|
1633
1365
|
# 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).
|
1634
|
-
sig { returns(String) }
|
1366
|
+
sig { returns(T.nilable(String)) }
|
1635
1367
|
attr_accessor :default_source
|
1636
1368
|
# 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.
|
1637
|
-
sig { returns(T.nilable(T::Array[String])) }
|
1369
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1638
1370
|
attr_accessor :default_tax_rates
|
1639
1371
|
# 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.
|
1640
|
-
sig { returns(String) }
|
1372
|
+
sig { returns(T.nilable(String)) }
|
1641
1373
|
attr_accessor :description
|
1642
1374
|
# The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
|
1643
|
-
sig {
|
1375
|
+
sig {
|
1376
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::CreateParams::Discount]))))
|
1377
|
+
}
|
1644
1378
|
attr_accessor :discounts
|
1645
1379
|
# Specifies which fields in the response should be expanded.
|
1646
|
-
sig { returns(T::Array[String]) }
|
1380
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1647
1381
|
attr_accessor :expand
|
1648
1382
|
# All invoices will be billed using the specified settings.
|
1649
|
-
sig { returns(::Stripe::SubscriptionService::CreateParams::InvoiceSettings) }
|
1383
|
+
sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings)) }
|
1650
1384
|
attr_accessor :invoice_settings
|
1651
1385
|
# A list of up to 20 subscription items, each with an attached price.
|
1652
|
-
sig { returns(T::Array[::Stripe::SubscriptionService::CreateParams::Item]) }
|
1386
|
+
sig { returns(T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::Item])) }
|
1653
1387
|
attr_accessor :items
|
1654
1388
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1655
|
-
sig { returns(T.nilable(T::Hash[String, String])) }
|
1389
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
|
1656
1390
|
attr_accessor :metadata
|
1657
1391
|
# Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
|
1658
|
-
sig { returns(T::Boolean) }
|
1392
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1659
1393
|
attr_accessor :off_session
|
1660
1394
|
# The account on behalf of which to charge, for each of the subscription's invoices.
|
1661
|
-
sig { returns(T.nilable(String)) }
|
1395
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1662
1396
|
attr_accessor :on_behalf_of
|
1663
1397
|
# Only applies to subscriptions with `collection_method=charge_automatically`.
|
1664
1398
|
#
|
@@ -1671,42 +1405,36 @@ module Stripe
|
|
1671
1405
|
# `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription.
|
1672
1406
|
#
|
1673
1407
|
# Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.
|
1674
|
-
sig { returns(String) }
|
1408
|
+
sig { returns(T.nilable(String)) }
|
1675
1409
|
attr_accessor :payment_behavior
|
1676
1410
|
# Payment settings to pass to invoices created by the subscription.
|
1677
|
-
sig { returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings) }
|
1411
|
+
sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings)) }
|
1678
1412
|
attr_accessor :payment_settings
|
1679
1413
|
# 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.
|
1680
1414
|
sig {
|
1681
|
-
returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PendingInvoiceItemInterval))
|
1415
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PendingInvoiceItemInterval))))
|
1682
1416
|
}
|
1683
1417
|
attr_accessor :pending_invoice_item_interval
|
1684
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1685
|
-
sig { returns(::Stripe::SubscriptionService::CreateParams::Prebilling) }
|
1686
|
-
attr_accessor :prebilling
|
1687
|
-
# 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.
|
1688
|
-
sig { returns(String) }
|
1689
|
-
attr_accessor :promotion_code
|
1690
1418
|
# 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`.
|
1691
|
-
sig { returns(String) }
|
1419
|
+
sig { returns(T.nilable(String)) }
|
1692
1420
|
attr_accessor :proration_behavior
|
1693
1421
|
# 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.
|
1694
|
-
sig { returns(::Stripe::SubscriptionService::CreateParams::TransferData) }
|
1422
|
+
sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::TransferData)) }
|
1695
1423
|
attr_accessor :transfer_data
|
1696
1424
|
# 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.
|
1697
|
-
sig { returns(T.any(String, Integer)) }
|
1425
|
+
sig { returns(T.nilable(T.any(String, Integer))) }
|
1698
1426
|
attr_accessor :trial_end
|
1699
1427
|
# 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.
|
1700
|
-
sig { returns(T::Boolean) }
|
1428
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1701
1429
|
attr_accessor :trial_from_plan
|
1702
1430
|
# 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.
|
1703
|
-
sig { returns(Integer) }
|
1431
|
+
sig { returns(T.nilable(Integer)) }
|
1704
1432
|
attr_accessor :trial_period_days
|
1705
1433
|
# Settings related to subscription trials.
|
1706
|
-
sig { returns(::Stripe::SubscriptionService::CreateParams::TrialSettings) }
|
1434
|
+
sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::TrialSettings)) }
|
1707
1435
|
attr_accessor :trial_settings
|
1708
1436
|
sig {
|
1709
|
-
params(add_invoice_items: T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem], application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::SubscriptionService::CreateParams::AutomaticTax, backdate_start_date: Integer, billing_cycle_anchor: Integer, billing_cycle_anchor_config:
|
1437
|
+
params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax), backdate_start_date: T.nilable(Integer), billing_cycle_anchor: T.nilable(Integer), billing_cycle_anchor_config: T.nilable(::Stripe::SubscriptionService::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::SubscriptionService::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::SubscriptionService::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::SubscriptionService::CreateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionService::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::SubscriptionService::CreateParams::TrialSettings)).void
|
1710
1438
|
}
|
1711
1439
|
def initialize(
|
1712
1440
|
add_invoice_items: nil,
|
@@ -1715,11 +1443,9 @@ module Stripe
|
|
1715
1443
|
backdate_start_date: nil,
|
1716
1444
|
billing_cycle_anchor: nil,
|
1717
1445
|
billing_cycle_anchor_config: nil,
|
1718
|
-
billing_thresholds: nil,
|
1719
1446
|
cancel_at: nil,
|
1720
1447
|
cancel_at_period_end: nil,
|
1721
1448
|
collection_method: nil,
|
1722
|
-
coupon: nil,
|
1723
1449
|
currency: nil,
|
1724
1450
|
customer: nil,
|
1725
1451
|
days_until_due: nil,
|
@@ -1737,8 +1463,6 @@ module Stripe
|
|
1737
1463
|
payment_behavior: nil,
|
1738
1464
|
payment_settings: nil,
|
1739
1465
|
pending_invoice_item_interval: nil,
|
1740
|
-
prebilling: nil,
|
1741
|
-
promotion_code: nil,
|
1742
1466
|
proration_behavior: nil,
|
1743
1467
|
transfer_data: nil,
|
1744
1468
|
trial_end: nil,
|
@@ -1749,35 +1473,37 @@ module Stripe
|
|
1749
1473
|
end
|
1750
1474
|
class SearchParams < Stripe::RequestParams
|
1751
1475
|
# Specifies which fields in the response should be expanded.
|
1752
|
-
sig { returns(T::Array[String]) }
|
1476
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1753
1477
|
attr_accessor :expand
|
1754
1478
|
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
1755
|
-
sig { returns(Integer) }
|
1479
|
+
sig { returns(T.nilable(Integer)) }
|
1756
1480
|
attr_accessor :limit
|
1757
1481
|
# 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.
|
1758
|
-
sig { returns(String) }
|
1482
|
+
sig { returns(T.nilable(String)) }
|
1759
1483
|
attr_accessor :page
|
1760
1484
|
# 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).
|
1761
1485
|
sig { returns(String) }
|
1762
1486
|
attr_accessor :query
|
1763
|
-
sig {
|
1487
|
+
sig {
|
1488
|
+
params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
|
1489
|
+
}
|
1764
1490
|
def initialize(expand: nil, limit: nil, page: nil, query: nil); end
|
1765
1491
|
end
|
1766
1492
|
class ResumeParams < Stripe::RequestParams
|
1767
1493
|
# 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).
|
1768
|
-
sig { returns(String) }
|
1494
|
+
sig { returns(T.nilable(String)) }
|
1769
1495
|
attr_accessor :billing_cycle_anchor
|
1770
1496
|
# Specifies which fields in the response should be expanded.
|
1771
|
-
sig { returns(T::Array[String]) }
|
1497
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1772
1498
|
attr_accessor :expand
|
1773
1499
|
# 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`.
|
1774
|
-
sig { returns(String) }
|
1500
|
+
sig { returns(T.nilable(String)) }
|
1775
1501
|
attr_accessor :proration_behavior
|
1776
1502
|
# 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.
|
1777
|
-
sig { returns(Integer) }
|
1503
|
+
sig { returns(T.nilable(Integer)) }
|
1778
1504
|
attr_accessor :proration_date
|
1779
1505
|
sig {
|
1780
|
-
params(billing_cycle_anchor: String, expand: T::Array[String], proration_behavior: String, proration_date: Integer).void
|
1506
|
+
params(billing_cycle_anchor: T.nilable(String), expand: T.nilable(T::Array[String]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer)).void
|
1781
1507
|
}
|
1782
1508
|
def initialize(
|
1783
1509
|
billing_cycle_anchor: nil,
|