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
@@ -26,25 +26,6 @@ module Stripe
|
|
26
26
|
attr_reader :status
|
27
27
|
end
|
28
28
|
class Computed < Stripe::StripeObject
|
29
|
-
class LastReestimationDetails < Stripe::StripeObject
|
30
|
-
class Failed < Stripe::StripeObject
|
31
|
-
# The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field.
|
32
|
-
sig { returns(T.nilable(String)) }
|
33
|
-
attr_reader :failure_code
|
34
|
-
# Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID".
|
35
|
-
sig { returns(T.nilable(String)) }
|
36
|
-
attr_reader :message
|
37
|
-
# The reason the reestimation failed.
|
38
|
-
sig { returns(String) }
|
39
|
-
attr_reader :reason
|
40
|
-
end
|
41
|
-
# When `status` is `failed`, provides details about the quote reestimation failure.
|
42
|
-
sig { returns(T.nilable(Failed)) }
|
43
|
-
attr_reader :failed
|
44
|
-
# Latest status of the reestimation.
|
45
|
-
sig { returns(String) }
|
46
|
-
attr_reader :status
|
47
|
-
end
|
48
29
|
class Recurring < Stripe::StripeObject
|
49
30
|
class TotalDetails < Stripe::StripeObject
|
50
31
|
class Breakdown < Stripe::StripeObject
|
@@ -174,15 +155,9 @@ module Stripe
|
|
174
155
|
sig { returns(TotalDetails) }
|
175
156
|
attr_reader :total_details
|
176
157
|
end
|
177
|
-
# Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation.
|
178
|
-
sig { returns(T.nilable(LastReestimationDetails)) }
|
179
|
-
attr_reader :last_reestimation_details
|
180
158
|
# The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
|
181
159
|
sig { returns(T.nilable(Recurring)) }
|
182
160
|
attr_reader :recurring
|
183
|
-
# The time at which the quote's estimated schedules and upcoming invoices were generated.
|
184
|
-
sig { returns(T.nilable(Integer)) }
|
185
|
-
attr_reader :updated_at
|
186
161
|
# Attribute for field upfront
|
187
162
|
sig { returns(Upfront) }
|
188
163
|
attr_reader :upfront
|
@@ -211,86 +186,6 @@ module Stripe
|
|
211
186
|
sig { returns(Issuer) }
|
212
187
|
attr_reader :issuer
|
213
188
|
end
|
214
|
-
class StatusDetails < Stripe::StripeObject
|
215
|
-
class Canceled < Stripe::StripeObject
|
216
|
-
# The reason this quote was marked as canceled.
|
217
|
-
sig { returns(T.nilable(String)) }
|
218
|
-
attr_reader :reason
|
219
|
-
# Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch.
|
220
|
-
sig { returns(T.nilable(Integer)) }
|
221
|
-
attr_reader :transitioned_at
|
222
|
-
end
|
223
|
-
class Stale < Stripe::StripeObject
|
224
|
-
class LastReason < Stripe::StripeObject
|
225
|
-
class LinesInvalid < Stripe::StripeObject
|
226
|
-
# The timestamp at which the lines were marked as invalid.
|
227
|
-
sig { returns(Integer) }
|
228
|
-
attr_reader :invalid_at
|
229
|
-
# The list of lines that became invalid at the given timestamp.
|
230
|
-
sig { returns(T::Array[String]) }
|
231
|
-
attr_reader :lines
|
232
|
-
end
|
233
|
-
class SubscriptionChanged < Stripe::StripeObject
|
234
|
-
# The subscription's state before the quote was marked as stale.
|
235
|
-
sig { returns(T.nilable(Stripe::Subscription)) }
|
236
|
-
attr_reader :previous_subscription
|
237
|
-
end
|
238
|
-
class SubscriptionScheduleChanged < Stripe::StripeObject
|
239
|
-
# The subscription schedule's state before the quote was marked as stale.
|
240
|
-
sig { returns(T.nilable(Stripe::SubscriptionSchedule)) }
|
241
|
-
attr_reader :previous_subscription_schedule
|
242
|
-
end
|
243
|
-
# The ID of the line that is invalid if the stale reason type is `line_invalid`.
|
244
|
-
sig { returns(String) }
|
245
|
-
attr_reader :line_invalid
|
246
|
-
# The IDs of the lines that are invalid if the stale reason type is `lines_invalid`.
|
247
|
-
sig { returns(T::Array[LinesInvalid]) }
|
248
|
-
attr_reader :lines_invalid
|
249
|
-
# The user supplied mark stale reason.
|
250
|
-
sig { returns(T.nilable(String)) }
|
251
|
-
attr_reader :marked_stale
|
252
|
-
# The ID of the subscription that was canceled.
|
253
|
-
sig { returns(String) }
|
254
|
-
attr_reader :subscription_canceled
|
255
|
-
# Attribute for field subscription_changed
|
256
|
-
sig { returns(SubscriptionChanged) }
|
257
|
-
attr_reader :subscription_changed
|
258
|
-
# The ID of the subscription that was expired.
|
259
|
-
sig { returns(String) }
|
260
|
-
attr_reader :subscription_expired
|
261
|
-
# The ID of the subscription schedule that was canceled.
|
262
|
-
sig { returns(String) }
|
263
|
-
attr_reader :subscription_schedule_canceled
|
264
|
-
# Attribute for field subscription_schedule_changed
|
265
|
-
sig { returns(SubscriptionScheduleChanged) }
|
266
|
-
attr_reader :subscription_schedule_changed
|
267
|
-
# The ID of the subscription schedule that was released.
|
268
|
-
sig { returns(String) }
|
269
|
-
attr_reader :subscription_schedule_released
|
270
|
-
# The reason the quote was marked as stale.
|
271
|
-
sig { returns(T.nilable(String)) }
|
272
|
-
attr_reader :type
|
273
|
-
end
|
274
|
-
# Time at which the quote expires. Measured in seconds since the Unix epoch.
|
275
|
-
sig { returns(T.nilable(Integer)) }
|
276
|
-
attr_reader :expires_at
|
277
|
-
# The most recent reason this quote was marked as stale.
|
278
|
-
sig { returns(T.nilable(LastReason)) }
|
279
|
-
attr_reader :last_reason
|
280
|
-
# Time at which the stale reason was updated. Measured in seconds since the Unix epoch.
|
281
|
-
sig { returns(T.nilable(Integer)) }
|
282
|
-
attr_reader :last_updated_at
|
283
|
-
# Time at which the quote was marked as stale. Measured in seconds since the Unix epoch.
|
284
|
-
sig { returns(T.nilable(Integer)) }
|
285
|
-
attr_reader :transitioned_at
|
286
|
-
end
|
287
|
-
# Attribute for field canceled
|
288
|
-
sig { returns(Canceled) }
|
289
|
-
attr_reader :canceled
|
290
|
-
# Attribute for field stale
|
291
|
-
sig { returns(Stale) }
|
292
|
-
attr_reader :stale
|
293
|
-
end
|
294
189
|
class StatusTransitions < Stripe::StripeObject
|
295
190
|
# The time that the quote was accepted. Measured in seconds since Unix epoch.
|
296
191
|
sig { returns(T.nilable(Integer)) }
|
@@ -303,212 +198,19 @@ module Stripe
|
|
303
198
|
attr_reader :finalized_at
|
304
199
|
end
|
305
200
|
class SubscriptionData < Stripe::StripeObject
|
306
|
-
class BillOnAcceptance < Stripe::StripeObject
|
307
|
-
class BillFrom < Stripe::StripeObject
|
308
|
-
class LineStartsAt < Stripe::StripeObject
|
309
|
-
# Unique identifier for the object.
|
310
|
-
sig { returns(String) }
|
311
|
-
attr_reader :id
|
312
|
-
end
|
313
|
-
# The materialized time.
|
314
|
-
sig { returns(T.nilable(Integer)) }
|
315
|
-
attr_reader :computed
|
316
|
-
# The timestamp the given line starts at.
|
317
|
-
sig { returns(T.nilable(LineStartsAt)) }
|
318
|
-
attr_reader :line_starts_at
|
319
|
-
# A precise Unix timestamp.
|
320
|
-
sig { returns(T.nilable(Integer)) }
|
321
|
-
attr_reader :timestamp
|
322
|
-
# The type of method to specify the `bill_from` time.
|
323
|
-
sig { returns(String) }
|
324
|
-
attr_reader :type
|
325
|
-
end
|
326
|
-
class BillUntil < Stripe::StripeObject
|
327
|
-
class Duration < Stripe::StripeObject
|
328
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
329
|
-
sig { returns(String) }
|
330
|
-
attr_reader :interval
|
331
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
332
|
-
sig { returns(Integer) }
|
333
|
-
attr_reader :interval_count
|
334
|
-
end
|
335
|
-
class LineEndsAt < Stripe::StripeObject
|
336
|
-
# Unique identifier for the object.
|
337
|
-
sig { returns(String) }
|
338
|
-
attr_reader :id
|
339
|
-
end
|
340
|
-
# The materialized time.
|
341
|
-
sig { returns(T.nilable(Integer)) }
|
342
|
-
attr_reader :computed
|
343
|
-
# Time span for the quote line starting from the `starts_at` date.
|
344
|
-
sig { returns(T.nilable(Duration)) }
|
345
|
-
attr_reader :duration
|
346
|
-
# The timestamp the given line ends at.
|
347
|
-
sig { returns(T.nilable(LineEndsAt)) }
|
348
|
-
attr_reader :line_ends_at
|
349
|
-
# A precise Unix timestamp.
|
350
|
-
sig { returns(T.nilable(Integer)) }
|
351
|
-
attr_reader :timestamp
|
352
|
-
# The type of method to specify the `bill_until` time.
|
353
|
-
sig { returns(String) }
|
354
|
-
attr_reader :type
|
355
|
-
end
|
356
|
-
# The start of the period to bill from when the Quote is accepted.
|
357
|
-
sig { returns(T.nilable(BillFrom)) }
|
358
|
-
attr_reader :bill_from
|
359
|
-
# The end of the period to bill until when the Quote is accepted.
|
360
|
-
sig { returns(T.nilable(BillUntil)) }
|
361
|
-
attr_reader :bill_until
|
362
|
-
end
|
363
|
-
class Prebilling < Stripe::StripeObject
|
364
|
-
# Attribute for field iterations
|
365
|
-
sig { returns(Integer) }
|
366
|
-
attr_reader :iterations
|
367
|
-
end
|
368
|
-
# Describes the period to bill for upon accepting the quote.
|
369
|
-
sig { returns(T.nilable(BillOnAcceptance)) }
|
370
|
-
attr_reader :bill_on_acceptance
|
371
|
-
# Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
|
372
|
-
sig { returns(String) }
|
373
|
-
attr_reader :billing_behavior
|
374
|
-
# Whether the subscription will always start a new billing period when the quote is accepted.
|
375
|
-
sig { returns(T.nilable(String)) }
|
376
|
-
attr_reader :billing_cycle_anchor
|
377
201
|
# 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.
|
378
202
|
sig { returns(T.nilable(String)) }
|
379
203
|
attr_reader :description
|
380
204
|
# When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
|
381
205
|
sig { returns(T.nilable(Integer)) }
|
382
206
|
attr_reader :effective_date
|
383
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
384
|
-
sig { returns(T.nilable(String)) }
|
385
|
-
attr_reader :end_behavior
|
386
|
-
# The id of the subscription that will be updated when the quote is accepted.
|
387
|
-
sig { returns(T.nilable(T.any(String, Stripe::Subscription))) }
|
388
|
-
attr_reader :from_subscription
|
389
207
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
|
390
208
|
sig { returns(T.nilable(T::Hash[String, String])) }
|
391
209
|
attr_reader :metadata
|
392
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
393
|
-
sig { returns(T.nilable(Prebilling)) }
|
394
|
-
attr_reader :prebilling
|
395
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
396
|
-
sig { returns(String) }
|
397
|
-
attr_reader :proration_behavior
|
398
210
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
399
211
|
sig { returns(T.nilable(Integer)) }
|
400
212
|
attr_reader :trial_period_days
|
401
213
|
end
|
402
|
-
class SubscriptionDataOverride < Stripe::StripeObject
|
403
|
-
class AppliesTo < Stripe::StripeObject
|
404
|
-
# A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
405
|
-
sig { returns(T.nilable(String)) }
|
406
|
-
attr_reader :new_reference
|
407
|
-
# The ID of the schedule the line applies to.
|
408
|
-
sig { returns(T.nilable(String)) }
|
409
|
-
attr_reader :subscription_schedule
|
410
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
411
|
-
sig { returns(String) }
|
412
|
-
attr_reader :type
|
413
|
-
end
|
414
|
-
class BillOnAcceptance < Stripe::StripeObject
|
415
|
-
class BillFrom < Stripe::StripeObject
|
416
|
-
class LineStartsAt < Stripe::StripeObject
|
417
|
-
# Unique identifier for the object.
|
418
|
-
sig { returns(String) }
|
419
|
-
attr_reader :id
|
420
|
-
end
|
421
|
-
# The materialized time.
|
422
|
-
sig { returns(T.nilable(Integer)) }
|
423
|
-
attr_reader :computed
|
424
|
-
# The timestamp the given line starts at.
|
425
|
-
sig { returns(T.nilable(LineStartsAt)) }
|
426
|
-
attr_reader :line_starts_at
|
427
|
-
# A precise Unix timestamp.
|
428
|
-
sig { returns(T.nilable(Integer)) }
|
429
|
-
attr_reader :timestamp
|
430
|
-
# The type of method to specify the `bill_from` time.
|
431
|
-
sig { returns(String) }
|
432
|
-
attr_reader :type
|
433
|
-
end
|
434
|
-
class BillUntil < Stripe::StripeObject
|
435
|
-
class Duration < Stripe::StripeObject
|
436
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
437
|
-
sig { returns(String) }
|
438
|
-
attr_reader :interval
|
439
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
440
|
-
sig { returns(Integer) }
|
441
|
-
attr_reader :interval_count
|
442
|
-
end
|
443
|
-
class LineEndsAt < Stripe::StripeObject
|
444
|
-
# Unique identifier for the object.
|
445
|
-
sig { returns(String) }
|
446
|
-
attr_reader :id
|
447
|
-
end
|
448
|
-
# The materialized time.
|
449
|
-
sig { returns(T.nilable(Integer)) }
|
450
|
-
attr_reader :computed
|
451
|
-
# Time span for the quote line starting from the `starts_at` date.
|
452
|
-
sig { returns(T.nilable(Duration)) }
|
453
|
-
attr_reader :duration
|
454
|
-
# The timestamp the given line ends at.
|
455
|
-
sig { returns(T.nilable(LineEndsAt)) }
|
456
|
-
attr_reader :line_ends_at
|
457
|
-
# A precise Unix timestamp.
|
458
|
-
sig { returns(T.nilable(Integer)) }
|
459
|
-
attr_reader :timestamp
|
460
|
-
# The type of method to specify the `bill_until` time.
|
461
|
-
sig { returns(String) }
|
462
|
-
attr_reader :type
|
463
|
-
end
|
464
|
-
# The start of the period to bill from when the Quote is accepted.
|
465
|
-
sig { returns(T.nilable(BillFrom)) }
|
466
|
-
attr_reader :bill_from
|
467
|
-
# The end of the period to bill until when the Quote is accepted.
|
468
|
-
sig { returns(T.nilable(BillUntil)) }
|
469
|
-
attr_reader :bill_until
|
470
|
-
end
|
471
|
-
# Attribute for field applies_to
|
472
|
-
sig { returns(AppliesTo) }
|
473
|
-
attr_reader :applies_to
|
474
|
-
# Describes the period to bill for upon accepting the quote.
|
475
|
-
sig { returns(T.nilable(BillOnAcceptance)) }
|
476
|
-
attr_reader :bill_on_acceptance
|
477
|
-
# Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
|
478
|
-
sig { returns(String) }
|
479
|
-
attr_reader :billing_behavior
|
480
|
-
# The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
481
|
-
sig { returns(T.nilable(String)) }
|
482
|
-
attr_reader :customer
|
483
|
-
# 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.
|
484
|
-
sig { returns(T.nilable(String)) }
|
485
|
-
attr_reader :description
|
486
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
487
|
-
sig { returns(T.nilable(String)) }
|
488
|
-
attr_reader :end_behavior
|
489
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
490
|
-
sig { returns(T.nilable(String)) }
|
491
|
-
attr_reader :proration_behavior
|
492
|
-
end
|
493
|
-
class SubscriptionSchedule < Stripe::StripeObject
|
494
|
-
class AppliesTo < Stripe::StripeObject
|
495
|
-
# A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
496
|
-
sig { returns(T.nilable(String)) }
|
497
|
-
attr_reader :new_reference
|
498
|
-
# The ID of the schedule the line applies to.
|
499
|
-
sig { returns(T.nilable(String)) }
|
500
|
-
attr_reader :subscription_schedule
|
501
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
502
|
-
sig { returns(String) }
|
503
|
-
attr_reader :type
|
504
|
-
end
|
505
|
-
# Attribute for field applies_to
|
506
|
-
sig { returns(AppliesTo) }
|
507
|
-
attr_reader :applies_to
|
508
|
-
# The subscription schedule that was created or updated from this quote.
|
509
|
-
sig { returns(String) }
|
510
|
-
attr_reader :subscription_schedule
|
511
|
-
end
|
512
214
|
class TotalDetails < Stripe::StripeObject
|
513
215
|
class Breakdown < Stripe::StripeObject
|
514
216
|
class Discount < Stripe::StripeObject
|
@@ -569,9 +271,6 @@ module Stripe
|
|
569
271
|
sig { returns(T.any(String, Stripe::Account)) }
|
570
272
|
attr_reader :destination
|
571
273
|
end
|
572
|
-
# Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
573
|
-
sig { returns(T.nilable(T::Boolean)) }
|
574
|
-
attr_reader :allow_backdated_lines
|
575
274
|
# Total before any discounts or taxes are applied.
|
576
275
|
sig { returns(Integer) }
|
577
276
|
attr_reader :amount_subtotal
|
@@ -638,9 +337,6 @@ module Stripe
|
|
638
337
|
# A list of items the customer is being quoted for.
|
639
338
|
sig { returns(Stripe::ListObject) }
|
640
339
|
attr_reader :line_items
|
641
|
-
# A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
642
|
-
sig { returns(T.nilable(T::Array[String])) }
|
643
|
-
attr_reader :lines
|
644
340
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
645
341
|
sig { returns(T::Boolean) }
|
646
342
|
attr_reader :livemode
|
@@ -659,9 +355,6 @@ module Stripe
|
|
659
355
|
# The status of the quote.
|
660
356
|
sig { returns(String) }
|
661
357
|
attr_reader :status
|
662
|
-
# Details on when and why a quote has been marked as stale or canceled.
|
663
|
-
sig { returns(T.nilable(StatusDetails)) }
|
664
|
-
attr_reader :status_details
|
665
358
|
# Attribute for field status_transitions
|
666
359
|
sig { returns(StatusTransitions) }
|
667
360
|
attr_reader :status_transitions
|
@@ -671,15 +364,9 @@ module Stripe
|
|
671
364
|
# Attribute for field subscription_data
|
672
365
|
sig { returns(SubscriptionData) }
|
673
366
|
attr_reader :subscription_data
|
674
|
-
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
675
|
-
sig { returns(T.nilable(T::Array[SubscriptionDataOverride])) }
|
676
|
-
attr_reader :subscription_data_overrides
|
677
367
|
# The subscription schedule that was created or updated from this quote.
|
678
368
|
sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) }
|
679
369
|
attr_reader :subscription_schedule
|
680
|
-
# The subscription schedules that were created or updated from this quote.
|
681
|
-
sig { returns(T.nilable(T::Array[SubscriptionSchedule])) }
|
682
|
-
attr_reader :subscription_schedules
|
683
370
|
# ID of the test clock this quote belongs to.
|
684
371
|
sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
|
685
372
|
attr_reader :test_clock
|
@@ -691,37 +378,33 @@ module Stripe
|
|
691
378
|
attr_reader :transfer_data
|
692
379
|
class ListParams < Stripe::RequestParams
|
693
380
|
# The ID of the customer whose quotes will be retrieved.
|
694
|
-
sig { returns(String) }
|
381
|
+
sig { returns(T.nilable(String)) }
|
695
382
|
attr_accessor :customer
|
696
383
|
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
697
|
-
sig { returns(String) }
|
384
|
+
sig { returns(T.nilable(String)) }
|
698
385
|
attr_accessor :ending_before
|
699
386
|
# Specifies which fields in the response should be expanded.
|
700
|
-
sig { returns(T::Array[String]) }
|
387
|
+
sig { returns(T.nilable(T::Array[String])) }
|
701
388
|
attr_accessor :expand
|
702
|
-
# The subscription which the quote updates.
|
703
|
-
sig { returns(String) }
|
704
|
-
attr_accessor :from_subscription
|
705
389
|
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
706
|
-
sig { returns(Integer) }
|
390
|
+
sig { returns(T.nilable(Integer)) }
|
707
391
|
attr_accessor :limit
|
708
392
|
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
709
|
-
sig { returns(String) }
|
393
|
+
sig { returns(T.nilable(String)) }
|
710
394
|
attr_accessor :starting_after
|
711
395
|
# The status of the quote.
|
712
|
-
sig { returns(String) }
|
396
|
+
sig { returns(T.nilable(String)) }
|
713
397
|
attr_accessor :status
|
714
398
|
# Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set.
|
715
|
-
sig { returns(String) }
|
399
|
+
sig { returns(T.nilable(String)) }
|
716
400
|
attr_accessor :test_clock
|
717
401
|
sig {
|
718
|
-
params(customer: String, ending_before: String, expand: T::Array[String],
|
402
|
+
params(customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String), test_clock: T.nilable(String)).void
|
719
403
|
}
|
720
404
|
def initialize(
|
721
405
|
customer: nil,
|
722
406
|
ending_before: nil,
|
723
407
|
expand: nil,
|
724
|
-
from_subscription: nil,
|
725
408
|
limit: nil,
|
726
409
|
starting_after: nil,
|
727
410
|
status: nil,
|
@@ -732,624 +415,87 @@ module Stripe
|
|
732
415
|
class AutomaticTax < Stripe::RequestParams
|
733
416
|
class Liability < Stripe::RequestParams
|
734
417
|
# The connected account being referenced when `type` is `account`.
|
735
|
-
sig { returns(String) }
|
418
|
+
sig { returns(T.nilable(String)) }
|
736
419
|
attr_accessor :account
|
737
420
|
# Type of the account referenced in the request.
|
738
421
|
sig { returns(String) }
|
739
422
|
attr_accessor :type
|
740
|
-
sig { params(account: String, type: String).void }
|
423
|
+
sig { params(account: T.nilable(String), type: String).void }
|
741
424
|
def initialize(account: nil, type: nil); end
|
742
425
|
end
|
743
426
|
# Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
|
744
427
|
sig { returns(T::Boolean) }
|
745
428
|
attr_accessor :enabled
|
746
429
|
# 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.
|
747
|
-
sig { returns(::Stripe::Quote::CreateParams::AutomaticTax::Liability) }
|
430
|
+
sig { returns(T.nilable(::Stripe::Quote::CreateParams::AutomaticTax::Liability)) }
|
748
431
|
attr_accessor :liability
|
749
432
|
sig {
|
750
|
-
params(enabled: T::Boolean, liability: ::Stripe::Quote::CreateParams::AutomaticTax::Liability).void
|
433
|
+
params(enabled: T::Boolean, liability: T.nilable(::Stripe::Quote::CreateParams::AutomaticTax::Liability)).void
|
751
434
|
}
|
752
435
|
def initialize(enabled: nil, liability: nil); end
|
753
436
|
end
|
754
437
|
class Discount < Stripe::RequestParams
|
755
|
-
class DiscountEnd < Stripe::RequestParams
|
756
|
-
class Duration < Stripe::RequestParams
|
757
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
758
|
-
sig { returns(String) }
|
759
|
-
attr_accessor :interval
|
760
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
761
|
-
sig { returns(Integer) }
|
762
|
-
attr_accessor :interval_count
|
763
|
-
sig { params(interval: String, interval_count: Integer).void }
|
764
|
-
def initialize(interval: nil, interval_count: nil); end
|
765
|
-
end
|
766
|
-
# Time span for the redeemed discount.
|
767
|
-
sig { returns(::Stripe::Quote::CreateParams::Discount::DiscountEnd::Duration) }
|
768
|
-
attr_accessor :duration
|
769
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
770
|
-
sig { returns(Integer) }
|
771
|
-
attr_accessor :timestamp
|
772
|
-
# The type of calculation made to determine when the discount ends.
|
773
|
-
sig { returns(String) }
|
774
|
-
attr_accessor :type
|
775
|
-
sig {
|
776
|
-
params(duration: ::Stripe::Quote::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
777
|
-
}
|
778
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
779
|
-
end
|
780
438
|
# ID of the coupon to create a new discount for.
|
781
|
-
sig { returns(String) }
|
439
|
+
sig { returns(T.nilable(String)) }
|
782
440
|
attr_accessor :coupon
|
783
441
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
784
|
-
sig { returns(String) }
|
442
|
+
sig { returns(T.nilable(String)) }
|
785
443
|
attr_accessor :discount
|
786
|
-
# Details to determine how long the discount should be applied for.
|
787
|
-
sig { returns(::Stripe::Quote::CreateParams::Discount::DiscountEnd) }
|
788
|
-
attr_accessor :discount_end
|
789
444
|
# ID of the promotion code to create a new discount for.
|
790
|
-
sig { returns(String) }
|
445
|
+
sig { returns(T.nilable(String)) }
|
791
446
|
attr_accessor :promotion_code
|
792
447
|
sig {
|
793
|
-
params(coupon: String, discount: String,
|
448
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
794
449
|
}
|
795
|
-
def initialize(coupon: nil, discount: nil,
|
450
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
796
451
|
end
|
797
452
|
class FromQuote < Stripe::RequestParams
|
798
453
|
# Whether this quote is a revision of the previous quote.
|
799
|
-
sig { returns(T::Boolean) }
|
454
|
+
sig { returns(T.nilable(T::Boolean)) }
|
800
455
|
attr_accessor :is_revision
|
801
456
|
# The `id` of the quote that will be cloned.
|
802
457
|
sig { returns(String) }
|
803
458
|
attr_accessor :quote
|
804
|
-
sig { params(is_revision: T::Boolean, quote: String).void }
|
459
|
+
sig { params(is_revision: T.nilable(T::Boolean), quote: String).void }
|
805
460
|
def initialize(is_revision: nil, quote: nil); end
|
806
461
|
end
|
807
462
|
class InvoiceSettings < Stripe::RequestParams
|
808
463
|
class Issuer < Stripe::RequestParams
|
809
464
|
# The connected account being referenced when `type` is `account`.
|
810
|
-
sig { returns(String) }
|
465
|
+
sig { returns(T.nilable(String)) }
|
811
466
|
attr_accessor :account
|
812
467
|
# Type of the account referenced in the request.
|
813
468
|
sig { returns(String) }
|
814
469
|
attr_accessor :type
|
815
|
-
sig { params(account: String, type: String).void }
|
470
|
+
sig { params(account: T.nilable(String), type: String).void }
|
816
471
|
def initialize(account: nil, type: nil); end
|
817
472
|
end
|
818
473
|
# Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
|
819
|
-
sig { returns(Integer) }
|
474
|
+
sig { returns(T.nilable(Integer)) }
|
820
475
|
attr_accessor :days_until_due
|
821
476
|
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
822
|
-
sig { returns(::Stripe::Quote::CreateParams::InvoiceSettings::Issuer) }
|
477
|
+
sig { returns(T.nilable(::Stripe::Quote::CreateParams::InvoiceSettings::Issuer)) }
|
823
478
|
attr_accessor :issuer
|
824
479
|
sig {
|
825
|
-
params(days_until_due: Integer, issuer: ::Stripe::Quote::CreateParams::InvoiceSettings::Issuer).void
|
480
|
+
params(days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::Quote::CreateParams::InvoiceSettings::Issuer)).void
|
826
481
|
}
|
827
482
|
def initialize(days_until_due: nil, issuer: nil); end
|
828
483
|
end
|
829
|
-
class Line < Stripe::RequestParams
|
830
|
-
class Action < Stripe::RequestParams
|
831
|
-
class AddDiscount < Stripe::RequestParams
|
832
|
-
class DiscountEnd < Stripe::RequestParams
|
833
|
-
# The type of calculation made to determine when the discount ends.
|
834
|
-
sig { returns(String) }
|
835
|
-
attr_accessor :type
|
836
|
-
sig { params(type: String).void }
|
837
|
-
def initialize(type: nil); end
|
838
|
-
end
|
839
|
-
# The coupon code to redeem.
|
840
|
-
sig { returns(String) }
|
841
|
-
attr_accessor :coupon
|
842
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
843
|
-
sig { returns(String) }
|
844
|
-
attr_accessor :discount
|
845
|
-
# Details to determine how long the discount should be applied for.
|
846
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::Action::AddDiscount::DiscountEnd) }
|
847
|
-
attr_accessor :discount_end
|
848
|
-
# The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
|
849
|
-
sig { returns(Integer) }
|
850
|
-
attr_accessor :index
|
851
|
-
# The promotion code to redeem.
|
852
|
-
sig { returns(String) }
|
853
|
-
attr_accessor :promotion_code
|
854
|
-
sig {
|
855
|
-
params(coupon: String, discount: String, discount_end: ::Stripe::Quote::CreateParams::Line::Action::AddDiscount::DiscountEnd, index: Integer, promotion_code: String).void
|
856
|
-
}
|
857
|
-
def initialize(
|
858
|
-
coupon: nil,
|
859
|
-
discount: nil,
|
860
|
-
discount_end: nil,
|
861
|
-
index: nil,
|
862
|
-
promotion_code: nil
|
863
|
-
); end
|
864
|
-
end
|
865
|
-
class AddItem < Stripe::RequestParams
|
866
|
-
class Discount < Stripe::RequestParams
|
867
|
-
class DiscountEnd < Stripe::RequestParams
|
868
|
-
class Duration < Stripe::RequestParams
|
869
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
870
|
-
sig { returns(String) }
|
871
|
-
attr_accessor :interval
|
872
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
873
|
-
sig { returns(Integer) }
|
874
|
-
attr_accessor :interval_count
|
875
|
-
sig { params(interval: String, interval_count: Integer).void }
|
876
|
-
def initialize(interval: nil, interval_count: nil); end
|
877
|
-
end
|
878
|
-
# Time span for the redeemed discount.
|
879
|
-
sig {
|
880
|
-
returns(::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration)
|
881
|
-
}
|
882
|
-
attr_accessor :duration
|
883
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
884
|
-
sig { returns(Integer) }
|
885
|
-
attr_accessor :timestamp
|
886
|
-
# The type of calculation made to determine when the discount ends.
|
887
|
-
sig { returns(String) }
|
888
|
-
attr_accessor :type
|
889
|
-
sig {
|
890
|
-
params(duration: ::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
891
|
-
}
|
892
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
893
|
-
end
|
894
|
-
# ID of the coupon to create a new discount for.
|
895
|
-
sig { returns(String) }
|
896
|
-
attr_accessor :coupon
|
897
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
898
|
-
sig { returns(String) }
|
899
|
-
attr_accessor :discount
|
900
|
-
# Details to determine how long the discount should be applied for.
|
901
|
-
sig {
|
902
|
-
returns(::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount::DiscountEnd)
|
903
|
-
}
|
904
|
-
attr_accessor :discount_end
|
905
|
-
# ID of the promotion code to create a new discount for.
|
906
|
-
sig { returns(String) }
|
907
|
-
attr_accessor :promotion_code
|
908
|
-
sig {
|
909
|
-
params(coupon: String, discount: String, discount_end: ::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount::DiscountEnd, promotion_code: String).void
|
910
|
-
}
|
911
|
-
def initialize(
|
912
|
-
coupon: nil,
|
913
|
-
discount: nil,
|
914
|
-
discount_end: nil,
|
915
|
-
promotion_code: nil
|
916
|
-
); end
|
917
|
-
end
|
918
|
-
class Trial < Stripe::RequestParams
|
919
|
-
# 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.
|
920
|
-
sig { returns(T::Array[String]) }
|
921
|
-
attr_accessor :converts_to
|
922
|
-
# Determines the type of trial for this item.
|
923
|
-
sig { returns(String) }
|
924
|
-
attr_accessor :type
|
925
|
-
sig { params(converts_to: T::Array[String], type: String).void }
|
926
|
-
def initialize(converts_to: nil, type: nil); end
|
927
|
-
end
|
928
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
929
|
-
sig {
|
930
|
-
returns(T::Array[::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount])
|
931
|
-
}
|
932
|
-
attr_accessor :discounts
|
933
|
-
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
934
|
-
sig { returns(T::Hash[String, String]) }
|
935
|
-
attr_accessor :metadata
|
936
|
-
# The ID of the price object.
|
937
|
-
sig { returns(String) }
|
938
|
-
attr_accessor :price
|
939
|
-
# Quantity for this item.
|
940
|
-
sig { returns(Integer) }
|
941
|
-
attr_accessor :quantity
|
942
|
-
# The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
|
943
|
-
sig { returns(T::Array[String]) }
|
944
|
-
attr_accessor :tax_rates
|
945
|
-
# Options that configure the trial on the subscription item.
|
946
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::Action::AddItem::Trial) }
|
947
|
-
attr_accessor :trial
|
948
|
-
sig {
|
949
|
-
params(discounts: T::Array[::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Quote::CreateParams::Line::Action::AddItem::Trial).void
|
950
|
-
}
|
951
|
-
def initialize(
|
952
|
-
discounts: nil,
|
953
|
-
metadata: nil,
|
954
|
-
price: nil,
|
955
|
-
quantity: nil,
|
956
|
-
tax_rates: nil,
|
957
|
-
trial: nil
|
958
|
-
); end
|
959
|
-
end
|
960
|
-
class RemoveDiscount < Stripe::RequestParams
|
961
|
-
# The coupon code to remove from the `discounts` array.
|
962
|
-
sig { returns(String) }
|
963
|
-
attr_accessor :coupon
|
964
|
-
# The ID of a discount to remove from the `discounts` array.
|
965
|
-
sig { returns(String) }
|
966
|
-
attr_accessor :discount
|
967
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
968
|
-
sig { returns(String) }
|
969
|
-
attr_accessor :promotion_code
|
970
|
-
sig { params(coupon: String, discount: String, promotion_code: String).void }
|
971
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
972
|
-
end
|
973
|
-
class RemoveItem < Stripe::RequestParams
|
974
|
-
# ID of a price to remove.
|
975
|
-
sig { returns(String) }
|
976
|
-
attr_accessor :price
|
977
|
-
sig { params(price: String).void }
|
978
|
-
def initialize(price: nil); end
|
979
|
-
end
|
980
|
-
class SetDiscount < Stripe::RequestParams
|
981
|
-
# The coupon code to replace the `discounts` array with.
|
982
|
-
sig { returns(String) }
|
983
|
-
attr_accessor :coupon
|
984
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
985
|
-
sig { returns(String) }
|
986
|
-
attr_accessor :discount
|
987
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
988
|
-
sig { returns(String) }
|
989
|
-
attr_accessor :promotion_code
|
990
|
-
sig { params(coupon: String, discount: String, promotion_code: String).void }
|
991
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
992
|
-
end
|
993
|
-
class SetItem < Stripe::RequestParams
|
994
|
-
class Discount < Stripe::RequestParams
|
995
|
-
class DiscountEnd < Stripe::RequestParams
|
996
|
-
class Duration < Stripe::RequestParams
|
997
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
998
|
-
sig { returns(String) }
|
999
|
-
attr_accessor :interval
|
1000
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1001
|
-
sig { returns(Integer) }
|
1002
|
-
attr_accessor :interval_count
|
1003
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1004
|
-
def initialize(interval: nil, interval_count: nil); end
|
1005
|
-
end
|
1006
|
-
# Time span for the redeemed discount.
|
1007
|
-
sig {
|
1008
|
-
returns(::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration)
|
1009
|
-
}
|
1010
|
-
attr_accessor :duration
|
1011
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1012
|
-
sig { returns(Integer) }
|
1013
|
-
attr_accessor :timestamp
|
1014
|
-
# The type of calculation made to determine when the discount ends.
|
1015
|
-
sig { returns(String) }
|
1016
|
-
attr_accessor :type
|
1017
|
-
sig {
|
1018
|
-
params(duration: ::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
1019
|
-
}
|
1020
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
1021
|
-
end
|
1022
|
-
# ID of the coupon to create a new discount for.
|
1023
|
-
sig { returns(String) }
|
1024
|
-
attr_accessor :coupon
|
1025
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1026
|
-
sig { returns(String) }
|
1027
|
-
attr_accessor :discount
|
1028
|
-
# Details to determine how long the discount should be applied for.
|
1029
|
-
sig {
|
1030
|
-
returns(::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount::DiscountEnd)
|
1031
|
-
}
|
1032
|
-
attr_accessor :discount_end
|
1033
|
-
# ID of the promotion code to create a new discount for.
|
1034
|
-
sig { returns(String) }
|
1035
|
-
attr_accessor :promotion_code
|
1036
|
-
sig {
|
1037
|
-
params(coupon: String, discount: String, discount_end: ::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount::DiscountEnd, promotion_code: String).void
|
1038
|
-
}
|
1039
|
-
def initialize(
|
1040
|
-
coupon: nil,
|
1041
|
-
discount: nil,
|
1042
|
-
discount_end: nil,
|
1043
|
-
promotion_code: nil
|
1044
|
-
); end
|
1045
|
-
end
|
1046
|
-
class Trial < Stripe::RequestParams
|
1047
|
-
# 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.
|
1048
|
-
sig { returns(T::Array[String]) }
|
1049
|
-
attr_accessor :converts_to
|
1050
|
-
# Determines the type of trial for this item.
|
1051
|
-
sig { returns(String) }
|
1052
|
-
attr_accessor :type
|
1053
|
-
sig { params(converts_to: T::Array[String], type: String).void }
|
1054
|
-
def initialize(converts_to: nil, type: nil); end
|
1055
|
-
end
|
1056
|
-
# If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
|
1057
|
-
sig {
|
1058
|
-
returns(T::Array[::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount])
|
1059
|
-
}
|
1060
|
-
attr_accessor :discounts
|
1061
|
-
# If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
|
1062
|
-
sig { returns(T::Hash[String, String]) }
|
1063
|
-
attr_accessor :metadata
|
1064
|
-
# The ID of the price object.
|
1065
|
-
sig { returns(String) }
|
1066
|
-
attr_accessor :price
|
1067
|
-
# If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
|
1068
|
-
sig { returns(Integer) }
|
1069
|
-
attr_accessor :quantity
|
1070
|
-
# If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
|
1071
|
-
sig { returns(T::Array[String]) }
|
1072
|
-
attr_accessor :tax_rates
|
1073
|
-
# If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
|
1074
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::Action::SetItem::Trial) }
|
1075
|
-
attr_accessor :trial
|
1076
|
-
sig {
|
1077
|
-
params(discounts: T::Array[::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Quote::CreateParams::Line::Action::SetItem::Trial).void
|
1078
|
-
}
|
1079
|
-
def initialize(
|
1080
|
-
discounts: nil,
|
1081
|
-
metadata: nil,
|
1082
|
-
price: nil,
|
1083
|
-
quantity: nil,
|
1084
|
-
tax_rates: nil,
|
1085
|
-
trial: nil
|
1086
|
-
); end
|
1087
|
-
end
|
1088
|
-
# Details for the `add_discount` type.
|
1089
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::Action::AddDiscount) }
|
1090
|
-
attr_accessor :add_discount
|
1091
|
-
# Details for the `add_item` type.
|
1092
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::Action::AddItem) }
|
1093
|
-
attr_accessor :add_item
|
1094
|
-
# Details for the `add_metadata` type: specify a hash of key-value pairs.
|
1095
|
-
sig { returns(T::Hash[String, String]) }
|
1096
|
-
attr_accessor :add_metadata
|
1097
|
-
# Details for the `remove_discount` type.
|
1098
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::Action::RemoveDiscount) }
|
1099
|
-
attr_accessor :remove_discount
|
1100
|
-
# Details for the `remove_item` type.
|
1101
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::Action::RemoveItem) }
|
1102
|
-
attr_accessor :remove_item
|
1103
|
-
# Details for the `remove_metadata` type: specify an array of metadata keys.
|
1104
|
-
sig { returns(T::Array[String]) }
|
1105
|
-
attr_accessor :remove_metadata
|
1106
|
-
# Details for the `set_discounts` type.
|
1107
|
-
sig { returns(T::Array[::Stripe::Quote::CreateParams::Line::Action::SetDiscount]) }
|
1108
|
-
attr_accessor :set_discounts
|
1109
|
-
# Details for the `set_items` type.
|
1110
|
-
sig { returns(T::Array[::Stripe::Quote::CreateParams::Line::Action::SetItem]) }
|
1111
|
-
attr_accessor :set_items
|
1112
|
-
# Details for the `set_metadata` type: specify an array of key-value pairs.
|
1113
|
-
sig { returns(T.nilable(T::Hash[String, String])) }
|
1114
|
-
attr_accessor :set_metadata
|
1115
|
-
# The type of action the quote line performs.
|
1116
|
-
sig { returns(String) }
|
1117
|
-
attr_accessor :type
|
1118
|
-
sig {
|
1119
|
-
params(add_discount: ::Stripe::Quote::CreateParams::Line::Action::AddDiscount, add_item: ::Stripe::Quote::CreateParams::Line::Action::AddItem, add_metadata: T::Hash[String, String], remove_discount: ::Stripe::Quote::CreateParams::Line::Action::RemoveDiscount, remove_item: ::Stripe::Quote::CreateParams::Line::Action::RemoveItem, remove_metadata: T::Array[String], set_discounts: T::Array[::Stripe::Quote::CreateParams::Line::Action::SetDiscount], set_items: T::Array[::Stripe::Quote::CreateParams::Line::Action::SetItem], set_metadata: T.nilable(T::Hash[String, String]), type: String).void
|
1120
|
-
}
|
1121
|
-
def initialize(
|
1122
|
-
add_discount: nil,
|
1123
|
-
add_item: nil,
|
1124
|
-
add_metadata: nil,
|
1125
|
-
remove_discount: nil,
|
1126
|
-
remove_item: nil,
|
1127
|
-
remove_metadata: nil,
|
1128
|
-
set_discounts: nil,
|
1129
|
-
set_items: nil,
|
1130
|
-
set_metadata: nil,
|
1131
|
-
type: nil
|
1132
|
-
); end
|
1133
|
-
end
|
1134
|
-
class AppliesTo < Stripe::RequestParams
|
1135
|
-
# A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
1136
|
-
sig { returns(String) }
|
1137
|
-
attr_accessor :new_reference
|
1138
|
-
# The ID of the schedule the line applies to.
|
1139
|
-
sig { returns(String) }
|
1140
|
-
attr_accessor :subscription_schedule
|
1141
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
1142
|
-
sig { returns(String) }
|
1143
|
-
attr_accessor :type
|
1144
|
-
sig { params(new_reference: String, subscription_schedule: String, type: String).void }
|
1145
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
|
1146
|
-
end
|
1147
|
-
class CancelSubscriptionSchedule < Stripe::RequestParams
|
1148
|
-
# Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
1149
|
-
sig { returns(String) }
|
1150
|
-
attr_accessor :cancel_at
|
1151
|
-
# If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
|
1152
|
-
sig { returns(T::Boolean) }
|
1153
|
-
attr_accessor :invoice_now
|
1154
|
-
# If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
1155
|
-
sig { returns(T::Boolean) }
|
1156
|
-
attr_accessor :prorate
|
1157
|
-
sig { params(cancel_at: String, invoice_now: T::Boolean, prorate: T::Boolean).void }
|
1158
|
-
def initialize(cancel_at: nil, invoice_now: nil, prorate: nil); end
|
1159
|
-
end
|
1160
|
-
class EndsAt < Stripe::RequestParams
|
1161
|
-
class DiscountEnd < Stripe::RequestParams
|
1162
|
-
# The ID of a specific discount.
|
1163
|
-
sig { returns(String) }
|
1164
|
-
attr_accessor :discount
|
1165
|
-
sig { params(discount: String).void }
|
1166
|
-
def initialize(discount: nil); end
|
1167
|
-
end
|
1168
|
-
class Duration < Stripe::RequestParams
|
1169
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1170
|
-
sig { returns(String) }
|
1171
|
-
attr_accessor :interval
|
1172
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1173
|
-
sig { returns(Integer) }
|
1174
|
-
attr_accessor :interval_count
|
1175
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1176
|
-
def initialize(interval: nil, interval_count: nil); end
|
1177
|
-
end
|
1178
|
-
# Use the `end` time of a given discount.
|
1179
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::EndsAt::DiscountEnd) }
|
1180
|
-
attr_accessor :discount_end
|
1181
|
-
# Time span for the quote line starting from the `starts_at` date.
|
1182
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::EndsAt::Duration) }
|
1183
|
-
attr_accessor :duration
|
1184
|
-
# A precise Unix timestamp.
|
1185
|
-
sig { returns(Integer) }
|
1186
|
-
attr_accessor :timestamp
|
1187
|
-
# Select a way to pass in `ends_at`.
|
1188
|
-
sig { returns(String) }
|
1189
|
-
attr_accessor :type
|
1190
|
-
sig {
|
1191
|
-
params(discount_end: ::Stripe::Quote::CreateParams::Line::EndsAt::DiscountEnd, duration: ::Stripe::Quote::CreateParams::Line::EndsAt::Duration, timestamp: Integer, type: String).void
|
1192
|
-
}
|
1193
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end
|
1194
|
-
end
|
1195
|
-
class SetPauseCollection < Stripe::RequestParams
|
1196
|
-
class Set < Stripe::RequestParams
|
1197
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1198
|
-
sig { returns(String) }
|
1199
|
-
attr_accessor :behavior
|
1200
|
-
sig { params(behavior: String).void }
|
1201
|
-
def initialize(behavior: nil); end
|
1202
|
-
end
|
1203
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
1204
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::SetPauseCollection::Set) }
|
1205
|
-
attr_accessor :set
|
1206
|
-
# Determines the type of the pause_collection amendment.
|
1207
|
-
sig { returns(String) }
|
1208
|
-
attr_accessor :type
|
1209
|
-
sig {
|
1210
|
-
params(set: ::Stripe::Quote::CreateParams::Line::SetPauseCollection::Set, type: String).void
|
1211
|
-
}
|
1212
|
-
def initialize(set: nil, type: nil); end
|
1213
|
-
end
|
1214
|
-
class StartsAt < Stripe::RequestParams
|
1215
|
-
class DiscountEnd < Stripe::RequestParams
|
1216
|
-
# The ID of a specific discount.
|
1217
|
-
sig { returns(String) }
|
1218
|
-
attr_accessor :discount
|
1219
|
-
sig { params(discount: String).void }
|
1220
|
-
def initialize(discount: nil); end
|
1221
|
-
end
|
1222
|
-
class LineEndsAt < Stripe::RequestParams
|
1223
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
1224
|
-
sig { returns(Integer) }
|
1225
|
-
attr_accessor :index
|
1226
|
-
sig { params(index: Integer).void }
|
1227
|
-
def initialize(index: nil); end
|
1228
|
-
end
|
1229
|
-
# Use the `end` time of a given discount.
|
1230
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::StartsAt::DiscountEnd) }
|
1231
|
-
attr_accessor :discount_end
|
1232
|
-
# The timestamp the given line ends at.
|
1233
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::StartsAt::LineEndsAt) }
|
1234
|
-
attr_accessor :line_ends_at
|
1235
|
-
# A precise Unix timestamp.
|
1236
|
-
sig { returns(Integer) }
|
1237
|
-
attr_accessor :timestamp
|
1238
|
-
# Select a way to pass in `starts_at`.
|
1239
|
-
sig { returns(String) }
|
1240
|
-
attr_accessor :type
|
1241
|
-
sig {
|
1242
|
-
params(discount_end: ::Stripe::Quote::CreateParams::Line::StartsAt::DiscountEnd, line_ends_at: ::Stripe::Quote::CreateParams::Line::StartsAt::LineEndsAt, timestamp: Integer, type: String).void
|
1243
|
-
}
|
1244
|
-
def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil); end
|
1245
|
-
end
|
1246
|
-
class TrialSettings < Stripe::RequestParams
|
1247
|
-
class EndBehavior < Stripe::RequestParams
|
1248
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1249
|
-
sig { returns(String) }
|
1250
|
-
attr_accessor :prorate_up_front
|
1251
|
-
sig { params(prorate_up_front: String).void }
|
1252
|
-
def initialize(prorate_up_front: nil); end
|
1253
|
-
end
|
1254
|
-
# Defines how the subscription should behave when a trial ends.
|
1255
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::TrialSettings::EndBehavior) }
|
1256
|
-
attr_accessor :end_behavior
|
1257
|
-
sig {
|
1258
|
-
params(end_behavior: ::Stripe::Quote::CreateParams::Line::TrialSettings::EndBehavior).void
|
1259
|
-
}
|
1260
|
-
def initialize(end_behavior: nil); end
|
1261
|
-
end
|
1262
|
-
# An array of operations the quote line performs.
|
1263
|
-
sig { returns(T::Array[::Stripe::Quote::CreateParams::Line::Action]) }
|
1264
|
-
attr_accessor :actions
|
1265
|
-
# Details to identify the subscription schedule the quote line applies to.
|
1266
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::AppliesTo) }
|
1267
|
-
attr_accessor :applies_to
|
1268
|
-
# For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
|
1269
|
-
sig { returns(String) }
|
1270
|
-
attr_accessor :billing_cycle_anchor
|
1271
|
-
# A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
|
1272
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::CancelSubscriptionSchedule) }
|
1273
|
-
attr_accessor :cancel_subscription_schedule
|
1274
|
-
# Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
|
1275
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::EndsAt) }
|
1276
|
-
attr_accessor :ends_at
|
1277
|
-
# Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
|
1278
|
-
sig { returns(String) }
|
1279
|
-
attr_accessor :proration_behavior
|
1280
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
1281
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::SetPauseCollection) }
|
1282
|
-
attr_accessor :set_pause_collection
|
1283
|
-
# Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
1284
|
-
sig { returns(String) }
|
1285
|
-
attr_accessor :set_schedule_end
|
1286
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
1287
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::StartsAt) }
|
1288
|
-
attr_accessor :starts_at
|
1289
|
-
# Settings related to subscription trials.
|
1290
|
-
sig { returns(::Stripe::Quote::CreateParams::Line::TrialSettings) }
|
1291
|
-
attr_accessor :trial_settings
|
1292
|
-
sig {
|
1293
|
-
params(actions: T::Array[::Stripe::Quote::CreateParams::Line::Action], applies_to: ::Stripe::Quote::CreateParams::Line::AppliesTo, billing_cycle_anchor: String, cancel_subscription_schedule: ::Stripe::Quote::CreateParams::Line::CancelSubscriptionSchedule, ends_at: ::Stripe::Quote::CreateParams::Line::EndsAt, proration_behavior: String, set_pause_collection: ::Stripe::Quote::CreateParams::Line::SetPauseCollection, set_schedule_end: String, starts_at: ::Stripe::Quote::CreateParams::Line::StartsAt, trial_settings: ::Stripe::Quote::CreateParams::Line::TrialSettings).void
|
1294
|
-
}
|
1295
|
-
def initialize(
|
1296
|
-
actions: nil,
|
1297
|
-
applies_to: nil,
|
1298
|
-
billing_cycle_anchor: nil,
|
1299
|
-
cancel_subscription_schedule: nil,
|
1300
|
-
ends_at: nil,
|
1301
|
-
proration_behavior: nil,
|
1302
|
-
set_pause_collection: nil,
|
1303
|
-
set_schedule_end: nil,
|
1304
|
-
starts_at: nil,
|
1305
|
-
trial_settings: nil
|
1306
|
-
); end
|
1307
|
-
end
|
1308
484
|
class LineItem < Stripe::RequestParams
|
1309
485
|
class Discount < Stripe::RequestParams
|
1310
|
-
class DiscountEnd < Stripe::RequestParams
|
1311
|
-
class Duration < Stripe::RequestParams
|
1312
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1313
|
-
sig { returns(String) }
|
1314
|
-
attr_accessor :interval
|
1315
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1316
|
-
sig { returns(Integer) }
|
1317
|
-
attr_accessor :interval_count
|
1318
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1319
|
-
def initialize(interval: nil, interval_count: nil); end
|
1320
|
-
end
|
1321
|
-
# Time span for the redeemed discount.
|
1322
|
-
sig {
|
1323
|
-
returns(::Stripe::Quote::CreateParams::LineItem::Discount::DiscountEnd::Duration)
|
1324
|
-
}
|
1325
|
-
attr_accessor :duration
|
1326
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1327
|
-
sig { returns(Integer) }
|
1328
|
-
attr_accessor :timestamp
|
1329
|
-
# The type of calculation made to determine when the discount ends.
|
1330
|
-
sig { returns(String) }
|
1331
|
-
attr_accessor :type
|
1332
|
-
sig {
|
1333
|
-
params(duration: ::Stripe::Quote::CreateParams::LineItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
1334
|
-
}
|
1335
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
1336
|
-
end
|
1337
486
|
# ID of the coupon to create a new discount for.
|
1338
|
-
sig { returns(String) }
|
487
|
+
sig { returns(T.nilable(String)) }
|
1339
488
|
attr_accessor :coupon
|
1340
489
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1341
|
-
sig { returns(String) }
|
490
|
+
sig { returns(T.nilable(String)) }
|
1342
491
|
attr_accessor :discount
|
1343
|
-
# Details to determine how long the discount should be applied for.
|
1344
|
-
sig { returns(::Stripe::Quote::CreateParams::LineItem::Discount::DiscountEnd) }
|
1345
|
-
attr_accessor :discount_end
|
1346
492
|
# ID of the promotion code to create a new discount for.
|
1347
|
-
sig { returns(String) }
|
493
|
+
sig { returns(T.nilable(String)) }
|
1348
494
|
attr_accessor :promotion_code
|
1349
495
|
sig {
|
1350
|
-
params(coupon: String, discount: String,
|
496
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
1351
497
|
}
|
1352
|
-
def initialize(coupon: nil, discount: nil,
|
498
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
1353
499
|
end
|
1354
500
|
class PriceData < Stripe::RequestParams
|
1355
501
|
class Recurring < Stripe::RequestParams
|
@@ -1357,31 +503,31 @@ module Stripe
|
|
1357
503
|
sig { returns(String) }
|
1358
504
|
attr_accessor :interval
|
1359
505
|
# 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).
|
1360
|
-
sig { returns(Integer) }
|
506
|
+
sig { returns(T.nilable(Integer)) }
|
1361
507
|
attr_accessor :interval_count
|
1362
|
-
sig { params(interval: String, interval_count: Integer).void }
|
508
|
+
sig { params(interval: String, interval_count: T.nilable(Integer)).void }
|
1363
509
|
def initialize(interval: nil, interval_count: nil); end
|
1364
510
|
end
|
1365
511
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1366
512
|
sig { returns(String) }
|
1367
513
|
attr_accessor :currency
|
1368
|
-
# The ID of the
|
514
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
1369
515
|
sig { returns(String) }
|
1370
516
|
attr_accessor :product
|
1371
517
|
# The recurring components of a price such as `interval` and `interval_count`.
|
1372
|
-
sig { returns(::Stripe::Quote::CreateParams::LineItem::PriceData::Recurring) }
|
518
|
+
sig { returns(T.nilable(::Stripe::Quote::CreateParams::LineItem::PriceData::Recurring)) }
|
1373
519
|
attr_accessor :recurring
|
1374
520
|
# 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.
|
1375
|
-
sig { returns(String) }
|
521
|
+
sig { returns(T.nilable(String)) }
|
1376
522
|
attr_accessor :tax_behavior
|
1377
523
|
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
1378
|
-
sig { returns(Integer) }
|
524
|
+
sig { returns(T.nilable(Integer)) }
|
1379
525
|
attr_accessor :unit_amount
|
1380
526
|
# 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.
|
1381
|
-
sig { returns(String) }
|
527
|
+
sig { returns(T.nilable(String)) }
|
1382
528
|
attr_accessor :unit_amount_decimal
|
1383
529
|
sig {
|
1384
|
-
params(currency: String, product: String, recurring: ::Stripe::Quote::CreateParams::LineItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
|
530
|
+
params(currency: String, product: String, recurring: T.nilable(::Stripe::Quote::CreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
1385
531
|
}
|
1386
532
|
def initialize(
|
1387
533
|
currency: nil,
|
@@ -1393,22 +539,24 @@ module Stripe
|
|
1393
539
|
); end
|
1394
540
|
end
|
1395
541
|
# The discounts applied to this line item.
|
1396
|
-
sig {
|
542
|
+
sig {
|
543
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Quote::CreateParams::LineItem::Discount]))))
|
544
|
+
}
|
1397
545
|
attr_accessor :discounts
|
1398
546
|
# The ID of the price object. One of `price` or `price_data` is required.
|
1399
|
-
sig { returns(String) }
|
547
|
+
sig { returns(T.nilable(String)) }
|
1400
548
|
attr_accessor :price
|
1401
549
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
1402
|
-
sig { returns(::Stripe::Quote::CreateParams::LineItem::PriceData) }
|
550
|
+
sig { returns(T.nilable(::Stripe::Quote::CreateParams::LineItem::PriceData)) }
|
1403
551
|
attr_accessor :price_data
|
1404
552
|
# The quantity of the line item.
|
1405
|
-
sig { returns(Integer) }
|
553
|
+
sig { returns(T.nilable(Integer)) }
|
1406
554
|
attr_accessor :quantity
|
1407
555
|
# The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
|
1408
|
-
sig { returns(T.nilable(T::Array[String])) }
|
556
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1409
557
|
attr_accessor :tax_rates
|
1410
558
|
sig {
|
1411
|
-
params(discounts: T.nilable(T::Array[::Stripe::Quote::CreateParams::LineItem::Discount]), price: String, price_data: ::Stripe::Quote::CreateParams::LineItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
|
559
|
+
params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Quote::CreateParams::LineItem::Discount]))), price: T.nilable(String), price_data: T.nilable(::Stripe::Quote::CreateParams::LineItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
1412
560
|
}
|
1413
561
|
def initialize(
|
1414
562
|
discounts: nil,
|
@@ -1419,380 +567,111 @@ module Stripe
|
|
1419
567
|
); end
|
1420
568
|
end
|
1421
569
|
class SubscriptionData < Stripe::RequestParams
|
1422
|
-
class BillOnAcceptance < Stripe::RequestParams
|
1423
|
-
class BillFrom < Stripe::RequestParams
|
1424
|
-
class LineStartsAt < Stripe::RequestParams
|
1425
|
-
# The ID of a quote line.
|
1426
|
-
sig { returns(String) }
|
1427
|
-
attr_accessor :id
|
1428
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
1429
|
-
sig { returns(Integer) }
|
1430
|
-
attr_accessor :index
|
1431
|
-
sig { params(id: String, index: Integer).void }
|
1432
|
-
def initialize(id: nil, index: nil); end
|
1433
|
-
end
|
1434
|
-
# Details of a Quote line to start the bill period from.
|
1435
|
-
sig {
|
1436
|
-
returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt)
|
1437
|
-
}
|
1438
|
-
attr_accessor :line_starts_at
|
1439
|
-
# A precise Unix timestamp.
|
1440
|
-
sig { returns(Integer) }
|
1441
|
-
attr_accessor :timestamp
|
1442
|
-
# The type of method to specify the `bill_from` time.
|
1443
|
-
sig { returns(String) }
|
1444
|
-
attr_accessor :type
|
1445
|
-
sig {
|
1446
|
-
params(line_starts_at: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
|
1447
|
-
}
|
1448
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
|
1449
|
-
end
|
1450
|
-
class BillUntil < Stripe::RequestParams
|
1451
|
-
class Duration < Stripe::RequestParams
|
1452
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1453
|
-
sig { returns(String) }
|
1454
|
-
attr_accessor :interval
|
1455
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1456
|
-
sig { returns(Integer) }
|
1457
|
-
attr_accessor :interval_count
|
1458
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1459
|
-
def initialize(interval: nil, interval_count: nil); end
|
1460
|
-
end
|
1461
|
-
class LineEndsAt < Stripe::RequestParams
|
1462
|
-
# The ID of a quote line.
|
1463
|
-
sig { returns(String) }
|
1464
|
-
attr_accessor :id
|
1465
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
1466
|
-
sig { returns(Integer) }
|
1467
|
-
attr_accessor :index
|
1468
|
-
sig { params(id: String, index: Integer).void }
|
1469
|
-
def initialize(id: nil, index: nil); end
|
1470
|
-
end
|
1471
|
-
# Details of the duration over which to bill.
|
1472
|
-
sig {
|
1473
|
-
returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration)
|
1474
|
-
}
|
1475
|
-
attr_accessor :duration
|
1476
|
-
# Details of a Quote line item from which to bill until.
|
1477
|
-
sig {
|
1478
|
-
returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt)
|
1479
|
-
}
|
1480
|
-
attr_accessor :line_ends_at
|
1481
|
-
# A precise Unix timestamp.
|
1482
|
-
sig { returns(Integer) }
|
1483
|
-
attr_accessor :timestamp
|
1484
|
-
# The type of method to specify the `bill_until` time.
|
1485
|
-
sig { returns(String) }
|
1486
|
-
attr_accessor :type
|
1487
|
-
sig {
|
1488
|
-
params(duration: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
|
1489
|
-
}
|
1490
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
|
1491
|
-
end
|
1492
|
-
# The start of the period to bill from when the Quote is accepted.
|
1493
|
-
sig {
|
1494
|
-
returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom)
|
1495
|
-
}
|
1496
|
-
attr_accessor :bill_from
|
1497
|
-
# The end of the period to bill until when the Quote is accepted.
|
1498
|
-
sig {
|
1499
|
-
returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil)
|
1500
|
-
}
|
1501
|
-
attr_accessor :bill_until
|
1502
|
-
sig {
|
1503
|
-
params(bill_from: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom, bill_until: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil).void
|
1504
|
-
}
|
1505
|
-
def initialize(bill_from: nil, bill_until: nil); end
|
1506
|
-
end
|
1507
|
-
class Prebilling < Stripe::RequestParams
|
1508
|
-
# This is used to determine the number of billing cycles to prebill.
|
1509
|
-
sig { returns(Integer) }
|
1510
|
-
attr_accessor :iterations
|
1511
|
-
sig { params(iterations: Integer).void }
|
1512
|
-
def initialize(iterations: nil); end
|
1513
|
-
end
|
1514
|
-
# Describes the period to bill for upon accepting the quote.
|
1515
|
-
sig { returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance) }
|
1516
|
-
attr_accessor :bill_on_acceptance
|
1517
|
-
# Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
|
1518
|
-
sig { returns(String) }
|
1519
|
-
attr_accessor :billing_behavior
|
1520
|
-
# When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
1521
|
-
sig { returns(T.nilable(String)) }
|
1522
|
-
attr_accessor :billing_cycle_anchor
|
1523
570
|
# 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.
|
1524
|
-
sig { returns(String) }
|
571
|
+
sig { returns(T.nilable(String)) }
|
1525
572
|
attr_accessor :description
|
1526
573
|
# When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
1527
|
-
sig { returns(T.nilable(T.any(String, Integer))) }
|
574
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) }
|
1528
575
|
attr_accessor :effective_date
|
1529
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
1530
|
-
sig { returns(String) }
|
1531
|
-
attr_accessor :end_behavior
|
1532
|
-
# The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden.
|
1533
|
-
sig { returns(String) }
|
1534
|
-
attr_accessor :from_subscription
|
1535
576
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
|
1536
|
-
sig { returns(T::Hash[String, String]) }
|
577
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
1537
578
|
attr_accessor :metadata
|
1538
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
1539
|
-
sig { returns(T.nilable(::Stripe::Quote::CreateParams::SubscriptionData::Prebilling)) }
|
1540
|
-
attr_accessor :prebilling
|
1541
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
1542
|
-
#
|
1543
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
1544
|
-
#
|
1545
|
-
# Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
1546
|
-
#
|
1547
|
-
# Prorations can be disabled by passing `none`.
|
1548
|
-
sig { returns(String) }
|
1549
|
-
attr_accessor :proration_behavior
|
1550
579
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
1551
|
-
sig { returns(T.nilable(Integer)) }
|
580
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
1552
581
|
attr_accessor :trial_period_days
|
1553
582
|
sig {
|
1554
|
-
params(
|
583
|
+
params(description: T.nilable(String), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), metadata: T.nilable(T::Hash[String, String]), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void
|
1555
584
|
}
|
1556
585
|
def initialize(
|
1557
|
-
bill_on_acceptance: nil,
|
1558
|
-
billing_behavior: nil,
|
1559
|
-
billing_cycle_anchor: nil,
|
1560
586
|
description: nil,
|
1561
587
|
effective_date: nil,
|
1562
|
-
end_behavior: nil,
|
1563
|
-
from_subscription: nil,
|
1564
588
|
metadata: nil,
|
1565
|
-
prebilling: nil,
|
1566
|
-
proration_behavior: nil,
|
1567
589
|
trial_period_days: nil
|
1568
590
|
); end
|
1569
591
|
end
|
1570
|
-
class SubscriptionDataOverride < Stripe::RequestParams
|
1571
|
-
class AppliesTo < Stripe::RequestParams
|
1572
|
-
# A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
1573
|
-
sig { returns(String) }
|
1574
|
-
attr_accessor :new_reference
|
1575
|
-
# The ID of the schedule the line applies to.
|
1576
|
-
sig { returns(String) }
|
1577
|
-
attr_accessor :subscription_schedule
|
1578
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
1579
|
-
sig { returns(String) }
|
1580
|
-
attr_accessor :type
|
1581
|
-
sig { params(new_reference: String, subscription_schedule: String, type: String).void }
|
1582
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
|
1583
|
-
end
|
1584
|
-
class BillOnAcceptance < Stripe::RequestParams
|
1585
|
-
class BillFrom < Stripe::RequestParams
|
1586
|
-
class LineStartsAt < Stripe::RequestParams
|
1587
|
-
# The ID of a quote line.
|
1588
|
-
sig { returns(String) }
|
1589
|
-
attr_accessor :id
|
1590
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
1591
|
-
sig { returns(Integer) }
|
1592
|
-
attr_accessor :index
|
1593
|
-
sig { params(id: String, index: Integer).void }
|
1594
|
-
def initialize(id: nil, index: nil); end
|
1595
|
-
end
|
1596
|
-
# Details of a Quote line to start the bill period from.
|
1597
|
-
sig {
|
1598
|
-
returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt)
|
1599
|
-
}
|
1600
|
-
attr_accessor :line_starts_at
|
1601
|
-
# A precise Unix timestamp.
|
1602
|
-
sig { returns(Integer) }
|
1603
|
-
attr_accessor :timestamp
|
1604
|
-
# The type of method to specify the `bill_from` time.
|
1605
|
-
sig { returns(String) }
|
1606
|
-
attr_accessor :type
|
1607
|
-
sig {
|
1608
|
-
params(line_starts_at: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
|
1609
|
-
}
|
1610
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
|
1611
|
-
end
|
1612
|
-
class BillUntil < Stripe::RequestParams
|
1613
|
-
class Duration < Stripe::RequestParams
|
1614
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1615
|
-
sig { returns(String) }
|
1616
|
-
attr_accessor :interval
|
1617
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1618
|
-
sig { returns(Integer) }
|
1619
|
-
attr_accessor :interval_count
|
1620
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1621
|
-
def initialize(interval: nil, interval_count: nil); end
|
1622
|
-
end
|
1623
|
-
class LineEndsAt < Stripe::RequestParams
|
1624
|
-
# The ID of a quote line.
|
1625
|
-
sig { returns(String) }
|
1626
|
-
attr_accessor :id
|
1627
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
1628
|
-
sig { returns(Integer) }
|
1629
|
-
attr_accessor :index
|
1630
|
-
sig { params(id: String, index: Integer).void }
|
1631
|
-
def initialize(id: nil, index: nil); end
|
1632
|
-
end
|
1633
|
-
# Details of the duration over which to bill.
|
1634
|
-
sig {
|
1635
|
-
returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration)
|
1636
|
-
}
|
1637
|
-
attr_accessor :duration
|
1638
|
-
# Details of a Quote line item from which to bill until.
|
1639
|
-
sig {
|
1640
|
-
returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt)
|
1641
|
-
}
|
1642
|
-
attr_accessor :line_ends_at
|
1643
|
-
# A precise Unix timestamp.
|
1644
|
-
sig { returns(Integer) }
|
1645
|
-
attr_accessor :timestamp
|
1646
|
-
# The type of method to specify the `bill_until` time.
|
1647
|
-
sig { returns(String) }
|
1648
|
-
attr_accessor :type
|
1649
|
-
sig {
|
1650
|
-
params(duration: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
|
1651
|
-
}
|
1652
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
|
1653
|
-
end
|
1654
|
-
# The start of the period to bill from when the Quote is accepted.
|
1655
|
-
sig {
|
1656
|
-
returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom)
|
1657
|
-
}
|
1658
|
-
attr_accessor :bill_from
|
1659
|
-
# The end of the period to bill until when the Quote is accepted.
|
1660
|
-
sig {
|
1661
|
-
returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil)
|
1662
|
-
}
|
1663
|
-
attr_accessor :bill_until
|
1664
|
-
sig {
|
1665
|
-
params(bill_from: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom, bill_until: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil).void
|
1666
|
-
}
|
1667
|
-
def initialize(bill_from: nil, bill_until: nil); end
|
1668
|
-
end
|
1669
|
-
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
1670
|
-
sig { returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::AppliesTo) }
|
1671
|
-
attr_accessor :applies_to
|
1672
|
-
# Describes the period to bill for upon accepting the quote.
|
1673
|
-
sig { returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance) }
|
1674
|
-
attr_accessor :bill_on_acceptance
|
1675
|
-
# Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
|
1676
|
-
sig { returns(String) }
|
1677
|
-
attr_accessor :billing_behavior
|
1678
|
-
# The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
|
1679
|
-
sig { returns(String) }
|
1680
|
-
attr_accessor :customer
|
1681
|
-
# 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.
|
1682
|
-
sig { returns(String) }
|
1683
|
-
attr_accessor :description
|
1684
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
1685
|
-
sig { returns(String) }
|
1686
|
-
attr_accessor :end_behavior
|
1687
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
1688
|
-
#
|
1689
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
1690
|
-
#
|
1691
|
-
# Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
1692
|
-
#
|
1693
|
-
# Prorations can be disabled by passing `none`.
|
1694
|
-
sig { returns(String) }
|
1695
|
-
attr_accessor :proration_behavior
|
1696
|
-
sig {
|
1697
|
-
params(applies_to: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::AppliesTo, bill_on_acceptance: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance, billing_behavior: String, customer: String, description: String, end_behavior: String, proration_behavior: String).void
|
1698
|
-
}
|
1699
|
-
def initialize(
|
1700
|
-
applies_to: nil,
|
1701
|
-
bill_on_acceptance: nil,
|
1702
|
-
billing_behavior: nil,
|
1703
|
-
customer: nil,
|
1704
|
-
description: nil,
|
1705
|
-
end_behavior: nil,
|
1706
|
-
proration_behavior: nil
|
1707
|
-
); end
|
1708
|
-
end
|
1709
592
|
class TransferData < Stripe::RequestParams
|
1710
593
|
# The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
|
1711
|
-
sig { returns(Integer) }
|
594
|
+
sig { returns(T.nilable(Integer)) }
|
1712
595
|
attr_accessor :amount
|
1713
596
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
|
1714
|
-
sig { returns(Float) }
|
597
|
+
sig { returns(T.nilable(Float)) }
|
1715
598
|
attr_accessor :amount_percent
|
1716
599
|
# ID of an existing, connected Stripe account.
|
1717
600
|
sig { returns(String) }
|
1718
601
|
attr_accessor :destination
|
1719
|
-
sig {
|
602
|
+
sig {
|
603
|
+
params(amount: T.nilable(Integer), amount_percent: T.nilable(Float), destination: String).void
|
604
|
+
}
|
1720
605
|
def initialize(amount: nil, amount_percent: nil, destination: nil); end
|
1721
606
|
end
|
1722
|
-
# Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
1723
|
-
sig { returns(T::Boolean) }
|
1724
|
-
attr_accessor :allow_backdated_lines
|
1725
607
|
# The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
|
1726
|
-
sig { returns(T.nilable(Integer)) }
|
608
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
1727
609
|
attr_accessor :application_fee_amount
|
1728
610
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
|
1729
|
-
sig { returns(T.nilable(Float)) }
|
611
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
|
1730
612
|
attr_accessor :application_fee_percent
|
1731
613
|
# Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
|
1732
|
-
sig { returns(::Stripe::Quote::CreateParams::AutomaticTax) }
|
614
|
+
sig { returns(T.nilable(::Stripe::Quote::CreateParams::AutomaticTax)) }
|
1733
615
|
attr_accessor :automatic_tax
|
1734
616
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
|
1735
|
-
sig { returns(String) }
|
617
|
+
sig { returns(T.nilable(String)) }
|
1736
618
|
attr_accessor :collection_method
|
1737
619
|
# The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
1738
|
-
sig { returns(String) }
|
620
|
+
sig { returns(T.nilable(String)) }
|
1739
621
|
attr_accessor :customer
|
1740
622
|
# The tax rates that will apply to any line item that does not have `tax_rates` set.
|
1741
|
-
sig { returns(T.nilable(T::Array[String])) }
|
623
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1742
624
|
attr_accessor :default_tax_rates
|
1743
625
|
# A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
|
1744
|
-
sig { returns(T.nilable(String)) }
|
626
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1745
627
|
attr_accessor :description
|
1746
628
|
# The discounts applied to the quote.
|
1747
|
-
sig {
|
629
|
+
sig {
|
630
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Quote::CreateParams::Discount]))))
|
631
|
+
}
|
1748
632
|
attr_accessor :discounts
|
1749
633
|
# Specifies which fields in the response should be expanded.
|
1750
|
-
sig { returns(T::Array[String]) }
|
634
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1751
635
|
attr_accessor :expand
|
1752
636
|
# A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
|
1753
|
-
sig { returns(Integer) }
|
637
|
+
sig { returns(T.nilable(Integer)) }
|
1754
638
|
attr_accessor :expires_at
|
1755
639
|
# A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
|
1756
|
-
sig { returns(T.nilable(String)) }
|
640
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1757
641
|
attr_accessor :footer
|
1758
642
|
# Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.
|
1759
|
-
sig { returns(::Stripe::Quote::CreateParams::FromQuote) }
|
643
|
+
sig { returns(T.nilable(::Stripe::Quote::CreateParams::FromQuote)) }
|
1760
644
|
attr_accessor :from_quote
|
1761
645
|
# A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
|
1762
|
-
sig { returns(T.nilable(String)) }
|
646
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1763
647
|
attr_accessor :header
|
1764
648
|
# All invoices will be billed using the specified settings.
|
1765
|
-
sig { returns(::Stripe::Quote::CreateParams::InvoiceSettings) }
|
649
|
+
sig { returns(T.nilable(::Stripe::Quote::CreateParams::InvoiceSettings)) }
|
1766
650
|
attr_accessor :invoice_settings
|
1767
651
|
# A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
|
1768
|
-
sig { returns(T::Array[::Stripe::Quote::CreateParams::LineItem]) }
|
652
|
+
sig { returns(T.nilable(T::Array[::Stripe::Quote::CreateParams::LineItem])) }
|
1769
653
|
attr_accessor :line_items
|
1770
|
-
# A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
1771
|
-
sig { returns(T::Array[::Stripe::Quote::CreateParams::Line]) }
|
1772
|
-
attr_accessor :lines
|
1773
654
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1774
|
-
sig { returns(T::Hash[String, String]) }
|
655
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
1775
656
|
attr_accessor :metadata
|
1776
657
|
# The account on behalf of which to charge.
|
1777
|
-
sig { returns(T.nilable(String)) }
|
658
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1778
659
|
attr_accessor :on_behalf_of
|
1779
660
|
# When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
|
1780
|
-
sig { returns(::Stripe::Quote::CreateParams::SubscriptionData) }
|
661
|
+
sig { returns(T.nilable(::Stripe::Quote::CreateParams::SubscriptionData)) }
|
1781
662
|
attr_accessor :subscription_data
|
1782
|
-
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
1783
|
-
sig { returns(T::Array[::Stripe::Quote::CreateParams::SubscriptionDataOverride]) }
|
1784
|
-
attr_accessor :subscription_data_overrides
|
1785
663
|
# ID of the test clock to attach to the quote.
|
1786
|
-
sig { returns(String) }
|
664
|
+
sig { returns(T.nilable(String)) }
|
1787
665
|
attr_accessor :test_clock
|
1788
666
|
# The data with which to automatically create a Transfer for each of the invoices.
|
1789
|
-
sig {
|
667
|
+
sig {
|
668
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Quote::CreateParams::TransferData))))
|
669
|
+
}
|
1790
670
|
attr_accessor :transfer_data
|
1791
671
|
sig {
|
1792
|
-
params(
|
672
|
+
params(application_fee_amount: T.nilable(T.nilable(T.any(String, Integer))), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::Quote::CreateParams::AutomaticTax), collection_method: T.nilable(String), customer: 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::Quote::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), footer: T.nilable(T.nilable(String)), from_quote: T.nilable(::Stripe::Quote::CreateParams::FromQuote), header: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::Quote::CreateParams::InvoiceSettings), line_items: T.nilable(T::Array[::Stripe::Quote::CreateParams::LineItem]), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(T.nilable(String)), subscription_data: T.nilable(::Stripe::Quote::CreateParams::SubscriptionData), test_clock: T.nilable(String), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::Quote::CreateParams::TransferData)))).void
|
1793
673
|
}
|
1794
674
|
def initialize(
|
1795
|
-
allow_backdated_lines: nil,
|
1796
675
|
application_fee_amount: nil,
|
1797
676
|
application_fee_percent: nil,
|
1798
677
|
automatic_tax: nil,
|
@@ -1808,641 +687,88 @@ module Stripe
|
|
1808
687
|
header: nil,
|
1809
688
|
invoice_settings: nil,
|
1810
689
|
line_items: nil,
|
1811
|
-
lines: nil,
|
1812
690
|
metadata: nil,
|
1813
691
|
on_behalf_of: nil,
|
1814
692
|
subscription_data: nil,
|
1815
|
-
subscription_data_overrides: nil,
|
1816
693
|
test_clock: nil,
|
1817
694
|
transfer_data: nil
|
1818
695
|
); end
|
1819
696
|
end
|
1820
|
-
class RetrieveParams < Stripe::RequestParams
|
1821
|
-
# Specifies which fields in the response should be expanded.
|
1822
|
-
sig { returns(T::Array[String]) }
|
1823
|
-
attr_accessor :expand
|
1824
|
-
sig { params(expand: T::Array[String]).void }
|
1825
|
-
def initialize(expand: nil); end
|
1826
|
-
end
|
1827
697
|
class UpdateParams < Stripe::RequestParams
|
1828
698
|
class AutomaticTax < Stripe::RequestParams
|
1829
699
|
class Liability < Stripe::RequestParams
|
1830
700
|
# The connected account being referenced when `type` is `account`.
|
1831
|
-
sig { returns(String) }
|
701
|
+
sig { returns(T.nilable(String)) }
|
1832
702
|
attr_accessor :account
|
1833
703
|
# Type of the account referenced in the request.
|
1834
704
|
sig { returns(String) }
|
1835
705
|
attr_accessor :type
|
1836
|
-
sig { params(account: String, type: String).void }
|
706
|
+
sig { params(account: T.nilable(String), type: String).void }
|
1837
707
|
def initialize(account: nil, type: nil); end
|
1838
708
|
end
|
1839
709
|
# Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
|
1840
710
|
sig { returns(T::Boolean) }
|
1841
711
|
attr_accessor :enabled
|
1842
712
|
# 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.
|
1843
|
-
sig { returns(::Stripe::Quote::UpdateParams::AutomaticTax::Liability) }
|
713
|
+
sig { returns(T.nilable(::Stripe::Quote::UpdateParams::AutomaticTax::Liability)) }
|
1844
714
|
attr_accessor :liability
|
1845
715
|
sig {
|
1846
|
-
params(enabled: T::Boolean, liability: ::Stripe::Quote::UpdateParams::AutomaticTax::Liability).void
|
716
|
+
params(enabled: T::Boolean, liability: T.nilable(::Stripe::Quote::UpdateParams::AutomaticTax::Liability)).void
|
1847
717
|
}
|
1848
718
|
def initialize(enabled: nil, liability: nil); end
|
1849
719
|
end
|
1850
720
|
class Discount < Stripe::RequestParams
|
1851
|
-
class DiscountEnd < Stripe::RequestParams
|
1852
|
-
class Duration < Stripe::RequestParams
|
1853
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1854
|
-
sig { returns(String) }
|
1855
|
-
attr_accessor :interval
|
1856
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1857
|
-
sig { returns(Integer) }
|
1858
|
-
attr_accessor :interval_count
|
1859
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1860
|
-
def initialize(interval: nil, interval_count: nil); end
|
1861
|
-
end
|
1862
|
-
# Time span for the redeemed discount.
|
1863
|
-
sig { returns(::Stripe::Quote::UpdateParams::Discount::DiscountEnd::Duration) }
|
1864
|
-
attr_accessor :duration
|
1865
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1866
|
-
sig { returns(Integer) }
|
1867
|
-
attr_accessor :timestamp
|
1868
|
-
# The type of calculation made to determine when the discount ends.
|
1869
|
-
sig { returns(String) }
|
1870
|
-
attr_accessor :type
|
1871
|
-
sig {
|
1872
|
-
params(duration: ::Stripe::Quote::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
1873
|
-
}
|
1874
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
1875
|
-
end
|
1876
721
|
# ID of the coupon to create a new discount for.
|
1877
|
-
sig { returns(String) }
|
722
|
+
sig { returns(T.nilable(String)) }
|
1878
723
|
attr_accessor :coupon
|
1879
724
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1880
|
-
sig { returns(String) }
|
725
|
+
sig { returns(T.nilable(String)) }
|
1881
726
|
attr_accessor :discount
|
1882
|
-
# Details to determine how long the discount should be applied for.
|
1883
|
-
sig { returns(::Stripe::Quote::UpdateParams::Discount::DiscountEnd) }
|
1884
|
-
attr_accessor :discount_end
|
1885
727
|
# ID of the promotion code to create a new discount for.
|
1886
|
-
sig { returns(String) }
|
728
|
+
sig { returns(T.nilable(String)) }
|
1887
729
|
attr_accessor :promotion_code
|
1888
730
|
sig {
|
1889
|
-
params(coupon: String, discount: String,
|
731
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
1890
732
|
}
|
1891
|
-
def initialize(coupon: nil, discount: nil,
|
733
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
1892
734
|
end
|
1893
735
|
class InvoiceSettings < Stripe::RequestParams
|
1894
736
|
class Issuer < Stripe::RequestParams
|
1895
737
|
# The connected account being referenced when `type` is `account`.
|
1896
|
-
sig { returns(String) }
|
738
|
+
sig { returns(T.nilable(String)) }
|
1897
739
|
attr_accessor :account
|
1898
740
|
# Type of the account referenced in the request.
|
1899
741
|
sig { returns(String) }
|
1900
742
|
attr_accessor :type
|
1901
|
-
sig { params(account: String, type: String).void }
|
743
|
+
sig { params(account: T.nilable(String), type: String).void }
|
1902
744
|
def initialize(account: nil, type: nil); end
|
1903
745
|
end
|
1904
746
|
# Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
|
1905
|
-
sig { returns(Integer) }
|
747
|
+
sig { returns(T.nilable(Integer)) }
|
1906
748
|
attr_accessor :days_until_due
|
1907
749
|
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
1908
|
-
sig { returns(::Stripe::Quote::UpdateParams::InvoiceSettings::Issuer) }
|
750
|
+
sig { returns(T.nilable(::Stripe::Quote::UpdateParams::InvoiceSettings::Issuer)) }
|
1909
751
|
attr_accessor :issuer
|
1910
752
|
sig {
|
1911
|
-
params(days_until_due: Integer, issuer: ::Stripe::Quote::UpdateParams::InvoiceSettings::Issuer).void
|
753
|
+
params(days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::Quote::UpdateParams::InvoiceSettings::Issuer)).void
|
1912
754
|
}
|
1913
755
|
def initialize(days_until_due: nil, issuer: nil); end
|
1914
756
|
end
|
1915
|
-
class Line < Stripe::RequestParams
|
1916
|
-
class Action < Stripe::RequestParams
|
1917
|
-
class AddDiscount < Stripe::RequestParams
|
1918
|
-
class DiscountEnd < Stripe::RequestParams
|
1919
|
-
# The type of calculation made to determine when the discount ends.
|
1920
|
-
sig { returns(String) }
|
1921
|
-
attr_accessor :type
|
1922
|
-
sig { params(type: String).void }
|
1923
|
-
def initialize(type: nil); end
|
1924
|
-
end
|
1925
|
-
# The coupon code to redeem.
|
1926
|
-
sig { returns(String) }
|
1927
|
-
attr_accessor :coupon
|
1928
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
1929
|
-
sig { returns(String) }
|
1930
|
-
attr_accessor :discount
|
1931
|
-
# Details to determine how long the discount should be applied for.
|
1932
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::Action::AddDiscount::DiscountEnd) }
|
1933
|
-
attr_accessor :discount_end
|
1934
|
-
# The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
|
1935
|
-
sig { returns(Integer) }
|
1936
|
-
attr_accessor :index
|
1937
|
-
# The promotion code to redeem.
|
1938
|
-
sig { returns(String) }
|
1939
|
-
attr_accessor :promotion_code
|
1940
|
-
sig {
|
1941
|
-
params(coupon: String, discount: String, discount_end: ::Stripe::Quote::UpdateParams::Line::Action::AddDiscount::DiscountEnd, index: Integer, promotion_code: String).void
|
1942
|
-
}
|
1943
|
-
def initialize(
|
1944
|
-
coupon: nil,
|
1945
|
-
discount: nil,
|
1946
|
-
discount_end: nil,
|
1947
|
-
index: nil,
|
1948
|
-
promotion_code: nil
|
1949
|
-
); end
|
1950
|
-
end
|
1951
|
-
class AddItem < Stripe::RequestParams
|
1952
|
-
class Discount < Stripe::RequestParams
|
1953
|
-
class DiscountEnd < Stripe::RequestParams
|
1954
|
-
class Duration < Stripe::RequestParams
|
1955
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1956
|
-
sig { returns(String) }
|
1957
|
-
attr_accessor :interval
|
1958
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1959
|
-
sig { returns(Integer) }
|
1960
|
-
attr_accessor :interval_count
|
1961
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1962
|
-
def initialize(interval: nil, interval_count: nil); end
|
1963
|
-
end
|
1964
|
-
# Time span for the redeemed discount.
|
1965
|
-
sig {
|
1966
|
-
returns(::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration)
|
1967
|
-
}
|
1968
|
-
attr_accessor :duration
|
1969
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1970
|
-
sig { returns(Integer) }
|
1971
|
-
attr_accessor :timestamp
|
1972
|
-
# The type of calculation made to determine when the discount ends.
|
1973
|
-
sig { returns(String) }
|
1974
|
-
attr_accessor :type
|
1975
|
-
sig {
|
1976
|
-
params(duration: ::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
1977
|
-
}
|
1978
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
1979
|
-
end
|
1980
|
-
# ID of the coupon to create a new discount for.
|
1981
|
-
sig { returns(String) }
|
1982
|
-
attr_accessor :coupon
|
1983
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1984
|
-
sig { returns(String) }
|
1985
|
-
attr_accessor :discount
|
1986
|
-
# Details to determine how long the discount should be applied for.
|
1987
|
-
sig {
|
1988
|
-
returns(::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd)
|
1989
|
-
}
|
1990
|
-
attr_accessor :discount_end
|
1991
|
-
# ID of the promotion code to create a new discount for.
|
1992
|
-
sig { returns(String) }
|
1993
|
-
attr_accessor :promotion_code
|
1994
|
-
sig {
|
1995
|
-
params(coupon: String, discount: String, discount_end: ::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd, promotion_code: String).void
|
1996
|
-
}
|
1997
|
-
def initialize(
|
1998
|
-
coupon: nil,
|
1999
|
-
discount: nil,
|
2000
|
-
discount_end: nil,
|
2001
|
-
promotion_code: nil
|
2002
|
-
); end
|
2003
|
-
end
|
2004
|
-
class Trial < Stripe::RequestParams
|
2005
|
-
# 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.
|
2006
|
-
sig { returns(T::Array[String]) }
|
2007
|
-
attr_accessor :converts_to
|
2008
|
-
# Determines the type of trial for this item.
|
2009
|
-
sig { returns(String) }
|
2010
|
-
attr_accessor :type
|
2011
|
-
sig { params(converts_to: T::Array[String], type: String).void }
|
2012
|
-
def initialize(converts_to: nil, type: nil); end
|
2013
|
-
end
|
2014
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
2015
|
-
sig {
|
2016
|
-
returns(T::Array[::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount])
|
2017
|
-
}
|
2018
|
-
attr_accessor :discounts
|
2019
|
-
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2020
|
-
sig { returns(T::Hash[String, String]) }
|
2021
|
-
attr_accessor :metadata
|
2022
|
-
# The ID of the price object.
|
2023
|
-
sig { returns(String) }
|
2024
|
-
attr_accessor :price
|
2025
|
-
# Quantity for this item.
|
2026
|
-
sig { returns(Integer) }
|
2027
|
-
attr_accessor :quantity
|
2028
|
-
# The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
|
2029
|
-
sig { returns(T::Array[String]) }
|
2030
|
-
attr_accessor :tax_rates
|
2031
|
-
# Options that configure the trial on the subscription item.
|
2032
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::Action::AddItem::Trial) }
|
2033
|
-
attr_accessor :trial
|
2034
|
-
sig {
|
2035
|
-
params(discounts: T::Array[::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Quote::UpdateParams::Line::Action::AddItem::Trial).void
|
2036
|
-
}
|
2037
|
-
def initialize(
|
2038
|
-
discounts: nil,
|
2039
|
-
metadata: nil,
|
2040
|
-
price: nil,
|
2041
|
-
quantity: nil,
|
2042
|
-
tax_rates: nil,
|
2043
|
-
trial: nil
|
2044
|
-
); end
|
2045
|
-
end
|
2046
|
-
class RemoveDiscount < Stripe::RequestParams
|
2047
|
-
# The coupon code to remove from the `discounts` array.
|
2048
|
-
sig { returns(String) }
|
2049
|
-
attr_accessor :coupon
|
2050
|
-
# The ID of a discount to remove from the `discounts` array.
|
2051
|
-
sig { returns(String) }
|
2052
|
-
attr_accessor :discount
|
2053
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
2054
|
-
sig { returns(String) }
|
2055
|
-
attr_accessor :promotion_code
|
2056
|
-
sig { params(coupon: String, discount: String, promotion_code: String).void }
|
2057
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
2058
|
-
end
|
2059
|
-
class RemoveItem < Stripe::RequestParams
|
2060
|
-
# ID of a price to remove.
|
2061
|
-
sig { returns(String) }
|
2062
|
-
attr_accessor :price
|
2063
|
-
sig { params(price: String).void }
|
2064
|
-
def initialize(price: nil); end
|
2065
|
-
end
|
2066
|
-
class SetDiscount < Stripe::RequestParams
|
2067
|
-
# The coupon code to replace the `discounts` array with.
|
2068
|
-
sig { returns(String) }
|
2069
|
-
attr_accessor :coupon
|
2070
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
2071
|
-
sig { returns(String) }
|
2072
|
-
attr_accessor :discount
|
2073
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
2074
|
-
sig { returns(String) }
|
2075
|
-
attr_accessor :promotion_code
|
2076
|
-
sig { params(coupon: String, discount: String, promotion_code: String).void }
|
2077
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
2078
|
-
end
|
2079
|
-
class SetItem < Stripe::RequestParams
|
2080
|
-
class Discount < Stripe::RequestParams
|
2081
|
-
class DiscountEnd < Stripe::RequestParams
|
2082
|
-
class Duration < Stripe::RequestParams
|
2083
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2084
|
-
sig { returns(String) }
|
2085
|
-
attr_accessor :interval
|
2086
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2087
|
-
sig { returns(Integer) }
|
2088
|
-
attr_accessor :interval_count
|
2089
|
-
sig { params(interval: String, interval_count: Integer).void }
|
2090
|
-
def initialize(interval: nil, interval_count: nil); end
|
2091
|
-
end
|
2092
|
-
# Time span for the redeemed discount.
|
2093
|
-
sig {
|
2094
|
-
returns(::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration)
|
2095
|
-
}
|
2096
|
-
attr_accessor :duration
|
2097
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2098
|
-
sig { returns(Integer) }
|
2099
|
-
attr_accessor :timestamp
|
2100
|
-
# The type of calculation made to determine when the discount ends.
|
2101
|
-
sig { returns(String) }
|
2102
|
-
attr_accessor :type
|
2103
|
-
sig {
|
2104
|
-
params(duration: ::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
2105
|
-
}
|
2106
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
2107
|
-
end
|
2108
|
-
# ID of the coupon to create a new discount for.
|
2109
|
-
sig { returns(String) }
|
2110
|
-
attr_accessor :coupon
|
2111
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2112
|
-
sig { returns(String) }
|
2113
|
-
attr_accessor :discount
|
2114
|
-
# Details to determine how long the discount should be applied for.
|
2115
|
-
sig {
|
2116
|
-
returns(::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd)
|
2117
|
-
}
|
2118
|
-
attr_accessor :discount_end
|
2119
|
-
# ID of the promotion code to create a new discount for.
|
2120
|
-
sig { returns(String) }
|
2121
|
-
attr_accessor :promotion_code
|
2122
|
-
sig {
|
2123
|
-
params(coupon: String, discount: String, discount_end: ::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd, promotion_code: String).void
|
2124
|
-
}
|
2125
|
-
def initialize(
|
2126
|
-
coupon: nil,
|
2127
|
-
discount: nil,
|
2128
|
-
discount_end: nil,
|
2129
|
-
promotion_code: nil
|
2130
|
-
); end
|
2131
|
-
end
|
2132
|
-
class Trial < Stripe::RequestParams
|
2133
|
-
# 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.
|
2134
|
-
sig { returns(T::Array[String]) }
|
2135
|
-
attr_accessor :converts_to
|
2136
|
-
# Determines the type of trial for this item.
|
2137
|
-
sig { returns(String) }
|
2138
|
-
attr_accessor :type
|
2139
|
-
sig { params(converts_to: T::Array[String], type: String).void }
|
2140
|
-
def initialize(converts_to: nil, type: nil); end
|
2141
|
-
end
|
2142
|
-
# If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
|
2143
|
-
sig {
|
2144
|
-
returns(T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount])
|
2145
|
-
}
|
2146
|
-
attr_accessor :discounts
|
2147
|
-
# If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
|
2148
|
-
sig { returns(T::Hash[String, String]) }
|
2149
|
-
attr_accessor :metadata
|
2150
|
-
# The ID of the price object.
|
2151
|
-
sig { returns(String) }
|
2152
|
-
attr_accessor :price
|
2153
|
-
# If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
|
2154
|
-
sig { returns(Integer) }
|
2155
|
-
attr_accessor :quantity
|
2156
|
-
# If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
|
2157
|
-
sig { returns(T::Array[String]) }
|
2158
|
-
attr_accessor :tax_rates
|
2159
|
-
# If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
|
2160
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::Action::SetItem::Trial) }
|
2161
|
-
attr_accessor :trial
|
2162
|
-
sig {
|
2163
|
-
params(discounts: T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Quote::UpdateParams::Line::Action::SetItem::Trial).void
|
2164
|
-
}
|
2165
|
-
def initialize(
|
2166
|
-
discounts: nil,
|
2167
|
-
metadata: nil,
|
2168
|
-
price: nil,
|
2169
|
-
quantity: nil,
|
2170
|
-
tax_rates: nil,
|
2171
|
-
trial: nil
|
2172
|
-
); end
|
2173
|
-
end
|
2174
|
-
# Details for the `add_discount` type.
|
2175
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::Action::AddDiscount) }
|
2176
|
-
attr_accessor :add_discount
|
2177
|
-
# Details for the `add_item` type.
|
2178
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::Action::AddItem) }
|
2179
|
-
attr_accessor :add_item
|
2180
|
-
# Details for the `add_metadata` type: specify a hash of key-value pairs.
|
2181
|
-
sig { returns(T::Hash[String, String]) }
|
2182
|
-
attr_accessor :add_metadata
|
2183
|
-
# Details for the `remove_discount` type.
|
2184
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::Action::RemoveDiscount) }
|
2185
|
-
attr_accessor :remove_discount
|
2186
|
-
# Details for the `remove_item` type.
|
2187
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::Action::RemoveItem) }
|
2188
|
-
attr_accessor :remove_item
|
2189
|
-
# Details for the `remove_metadata` type: specify an array of metadata keys.
|
2190
|
-
sig { returns(T::Array[String]) }
|
2191
|
-
attr_accessor :remove_metadata
|
2192
|
-
# Details for the `set_discounts` type.
|
2193
|
-
sig { returns(T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetDiscount]) }
|
2194
|
-
attr_accessor :set_discounts
|
2195
|
-
# Details for the `set_items` type.
|
2196
|
-
sig { returns(T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetItem]) }
|
2197
|
-
attr_accessor :set_items
|
2198
|
-
# Details for the `set_metadata` type: specify an array of key-value pairs.
|
2199
|
-
sig { returns(T.nilable(T::Hash[String, String])) }
|
2200
|
-
attr_accessor :set_metadata
|
2201
|
-
# The type of action the quote line performs.
|
2202
|
-
sig { returns(String) }
|
2203
|
-
attr_accessor :type
|
2204
|
-
sig {
|
2205
|
-
params(add_discount: ::Stripe::Quote::UpdateParams::Line::Action::AddDiscount, add_item: ::Stripe::Quote::UpdateParams::Line::Action::AddItem, add_metadata: T::Hash[String, String], remove_discount: ::Stripe::Quote::UpdateParams::Line::Action::RemoveDiscount, remove_item: ::Stripe::Quote::UpdateParams::Line::Action::RemoveItem, remove_metadata: T::Array[String], set_discounts: T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetDiscount], set_items: T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetItem], set_metadata: T.nilable(T::Hash[String, String]), type: String).void
|
2206
|
-
}
|
2207
|
-
def initialize(
|
2208
|
-
add_discount: nil,
|
2209
|
-
add_item: nil,
|
2210
|
-
add_metadata: nil,
|
2211
|
-
remove_discount: nil,
|
2212
|
-
remove_item: nil,
|
2213
|
-
remove_metadata: nil,
|
2214
|
-
set_discounts: nil,
|
2215
|
-
set_items: nil,
|
2216
|
-
set_metadata: nil,
|
2217
|
-
type: nil
|
2218
|
-
); end
|
2219
|
-
end
|
2220
|
-
class AppliesTo < Stripe::RequestParams
|
2221
|
-
# A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
2222
|
-
sig { returns(String) }
|
2223
|
-
attr_accessor :new_reference
|
2224
|
-
# The ID of the schedule the line applies to.
|
2225
|
-
sig { returns(String) }
|
2226
|
-
attr_accessor :subscription_schedule
|
2227
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
2228
|
-
sig { returns(String) }
|
2229
|
-
attr_accessor :type
|
2230
|
-
sig { params(new_reference: String, subscription_schedule: String, type: String).void }
|
2231
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
|
2232
|
-
end
|
2233
|
-
class CancelSubscriptionSchedule < Stripe::RequestParams
|
2234
|
-
# Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
2235
|
-
sig { returns(String) }
|
2236
|
-
attr_accessor :cancel_at
|
2237
|
-
# If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
|
2238
|
-
sig { returns(T::Boolean) }
|
2239
|
-
attr_accessor :invoice_now
|
2240
|
-
# If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
2241
|
-
sig { returns(T::Boolean) }
|
2242
|
-
attr_accessor :prorate
|
2243
|
-
sig { params(cancel_at: String, invoice_now: T::Boolean, prorate: T::Boolean).void }
|
2244
|
-
def initialize(cancel_at: nil, invoice_now: nil, prorate: nil); end
|
2245
|
-
end
|
2246
|
-
class EndsAt < Stripe::RequestParams
|
2247
|
-
class DiscountEnd < Stripe::RequestParams
|
2248
|
-
# The ID of a specific discount.
|
2249
|
-
sig { returns(String) }
|
2250
|
-
attr_accessor :discount
|
2251
|
-
sig { params(discount: String).void }
|
2252
|
-
def initialize(discount: nil); end
|
2253
|
-
end
|
2254
|
-
class Duration < Stripe::RequestParams
|
2255
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2256
|
-
sig { returns(String) }
|
2257
|
-
attr_accessor :interval
|
2258
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2259
|
-
sig { returns(Integer) }
|
2260
|
-
attr_accessor :interval_count
|
2261
|
-
sig { params(interval: String, interval_count: Integer).void }
|
2262
|
-
def initialize(interval: nil, interval_count: nil); end
|
2263
|
-
end
|
2264
|
-
# Use the `end` time of a given discount.
|
2265
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::EndsAt::DiscountEnd) }
|
2266
|
-
attr_accessor :discount_end
|
2267
|
-
# Time span for the quote line starting from the `starts_at` date.
|
2268
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::EndsAt::Duration) }
|
2269
|
-
attr_accessor :duration
|
2270
|
-
# A precise Unix timestamp.
|
2271
|
-
sig { returns(Integer) }
|
2272
|
-
attr_accessor :timestamp
|
2273
|
-
# Select a way to pass in `ends_at`.
|
2274
|
-
sig { returns(String) }
|
2275
|
-
attr_accessor :type
|
2276
|
-
sig {
|
2277
|
-
params(discount_end: ::Stripe::Quote::UpdateParams::Line::EndsAt::DiscountEnd, duration: ::Stripe::Quote::UpdateParams::Line::EndsAt::Duration, timestamp: Integer, type: String).void
|
2278
|
-
}
|
2279
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end
|
2280
|
-
end
|
2281
|
-
class SetPauseCollection < Stripe::RequestParams
|
2282
|
-
class Set < Stripe::RequestParams
|
2283
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2284
|
-
sig { returns(String) }
|
2285
|
-
attr_accessor :behavior
|
2286
|
-
sig { params(behavior: String).void }
|
2287
|
-
def initialize(behavior: nil); end
|
2288
|
-
end
|
2289
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
2290
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::SetPauseCollection::Set) }
|
2291
|
-
attr_accessor :set
|
2292
|
-
# Determines the type of the pause_collection amendment.
|
2293
|
-
sig { returns(String) }
|
2294
|
-
attr_accessor :type
|
2295
|
-
sig {
|
2296
|
-
params(set: ::Stripe::Quote::UpdateParams::Line::SetPauseCollection::Set, type: String).void
|
2297
|
-
}
|
2298
|
-
def initialize(set: nil, type: nil); end
|
2299
|
-
end
|
2300
|
-
class StartsAt < Stripe::RequestParams
|
2301
|
-
class DiscountEnd < Stripe::RequestParams
|
2302
|
-
# The ID of a specific discount.
|
2303
|
-
sig { returns(String) }
|
2304
|
-
attr_accessor :discount
|
2305
|
-
sig { params(discount: String).void }
|
2306
|
-
def initialize(discount: nil); end
|
2307
|
-
end
|
2308
|
-
class LineEndsAt < Stripe::RequestParams
|
2309
|
-
# The ID of a quote line.
|
2310
|
-
sig { returns(String) }
|
2311
|
-
attr_accessor :id
|
2312
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
2313
|
-
sig { returns(Integer) }
|
2314
|
-
attr_accessor :index
|
2315
|
-
sig { params(id: String, index: Integer).void }
|
2316
|
-
def initialize(id: nil, index: nil); end
|
2317
|
-
end
|
2318
|
-
# Use the `end` time of a given discount.
|
2319
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::StartsAt::DiscountEnd) }
|
2320
|
-
attr_accessor :discount_end
|
2321
|
-
# The timestamp the given line ends at.
|
2322
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::StartsAt::LineEndsAt) }
|
2323
|
-
attr_accessor :line_ends_at
|
2324
|
-
# A precise Unix timestamp.
|
2325
|
-
sig { returns(Integer) }
|
2326
|
-
attr_accessor :timestamp
|
2327
|
-
# Select a way to pass in `starts_at`.
|
2328
|
-
sig { returns(String) }
|
2329
|
-
attr_accessor :type
|
2330
|
-
sig {
|
2331
|
-
params(discount_end: ::Stripe::Quote::UpdateParams::Line::StartsAt::DiscountEnd, line_ends_at: ::Stripe::Quote::UpdateParams::Line::StartsAt::LineEndsAt, timestamp: Integer, type: String).void
|
2332
|
-
}
|
2333
|
-
def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil); end
|
2334
|
-
end
|
2335
|
-
class TrialSettings < Stripe::RequestParams
|
2336
|
-
class EndBehavior < Stripe::RequestParams
|
2337
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2338
|
-
sig { returns(String) }
|
2339
|
-
attr_accessor :prorate_up_front
|
2340
|
-
sig { params(prorate_up_front: String).void }
|
2341
|
-
def initialize(prorate_up_front: nil); end
|
2342
|
-
end
|
2343
|
-
# Defines how the subscription should behave when a trial ends.
|
2344
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::TrialSettings::EndBehavior) }
|
2345
|
-
attr_accessor :end_behavior
|
2346
|
-
sig {
|
2347
|
-
params(end_behavior: ::Stripe::Quote::UpdateParams::Line::TrialSettings::EndBehavior).void
|
2348
|
-
}
|
2349
|
-
def initialize(end_behavior: nil); end
|
2350
|
-
end
|
2351
|
-
# An array of operations the quote line performs.
|
2352
|
-
sig { returns(T::Array[::Stripe::Quote::UpdateParams::Line::Action]) }
|
2353
|
-
attr_accessor :actions
|
2354
|
-
# Details to identify the subscription schedule the quote line applies to.
|
2355
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::AppliesTo) }
|
2356
|
-
attr_accessor :applies_to
|
2357
|
-
# For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
|
2358
|
-
sig { returns(String) }
|
2359
|
-
attr_accessor :billing_cycle_anchor
|
2360
|
-
# A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
|
2361
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::CancelSubscriptionSchedule) }
|
2362
|
-
attr_accessor :cancel_subscription_schedule
|
2363
|
-
# Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
|
2364
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::EndsAt) }
|
2365
|
-
attr_accessor :ends_at
|
2366
|
-
# The ID of an existing line on the quote.
|
2367
|
-
sig { returns(String) }
|
2368
|
-
attr_accessor :id
|
2369
|
-
# Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
|
2370
|
-
sig { returns(String) }
|
2371
|
-
attr_accessor :proration_behavior
|
2372
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2373
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::SetPauseCollection) }
|
2374
|
-
attr_accessor :set_pause_collection
|
2375
|
-
# Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
2376
|
-
sig { returns(String) }
|
2377
|
-
attr_accessor :set_schedule_end
|
2378
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2379
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::StartsAt) }
|
2380
|
-
attr_accessor :starts_at
|
2381
|
-
# Settings related to subscription trials.
|
2382
|
-
sig { returns(::Stripe::Quote::UpdateParams::Line::TrialSettings) }
|
2383
|
-
attr_accessor :trial_settings
|
2384
|
-
sig {
|
2385
|
-
params(actions: T::Array[::Stripe::Quote::UpdateParams::Line::Action], applies_to: ::Stripe::Quote::UpdateParams::Line::AppliesTo, billing_cycle_anchor: String, cancel_subscription_schedule: ::Stripe::Quote::UpdateParams::Line::CancelSubscriptionSchedule, ends_at: ::Stripe::Quote::UpdateParams::Line::EndsAt, id: String, proration_behavior: String, set_pause_collection: ::Stripe::Quote::UpdateParams::Line::SetPauseCollection, set_schedule_end: String, starts_at: ::Stripe::Quote::UpdateParams::Line::StartsAt, trial_settings: ::Stripe::Quote::UpdateParams::Line::TrialSettings).void
|
2386
|
-
}
|
2387
|
-
def initialize(
|
2388
|
-
actions: nil,
|
2389
|
-
applies_to: nil,
|
2390
|
-
billing_cycle_anchor: nil,
|
2391
|
-
cancel_subscription_schedule: nil,
|
2392
|
-
ends_at: nil,
|
2393
|
-
id: nil,
|
2394
|
-
proration_behavior: nil,
|
2395
|
-
set_pause_collection: nil,
|
2396
|
-
set_schedule_end: nil,
|
2397
|
-
starts_at: nil,
|
2398
|
-
trial_settings: nil
|
2399
|
-
); end
|
2400
|
-
end
|
2401
757
|
class LineItem < Stripe::RequestParams
|
2402
758
|
class Discount < Stripe::RequestParams
|
2403
|
-
class DiscountEnd < Stripe::RequestParams
|
2404
|
-
class Duration < Stripe::RequestParams
|
2405
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2406
|
-
sig { returns(String) }
|
2407
|
-
attr_accessor :interval
|
2408
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2409
|
-
sig { returns(Integer) }
|
2410
|
-
attr_accessor :interval_count
|
2411
|
-
sig { params(interval: String, interval_count: Integer).void }
|
2412
|
-
def initialize(interval: nil, interval_count: nil); end
|
2413
|
-
end
|
2414
|
-
# Time span for the redeemed discount.
|
2415
|
-
sig {
|
2416
|
-
returns(::Stripe::Quote::UpdateParams::LineItem::Discount::DiscountEnd::Duration)
|
2417
|
-
}
|
2418
|
-
attr_accessor :duration
|
2419
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2420
|
-
sig { returns(Integer) }
|
2421
|
-
attr_accessor :timestamp
|
2422
|
-
# The type of calculation made to determine when the discount ends.
|
2423
|
-
sig { returns(String) }
|
2424
|
-
attr_accessor :type
|
2425
|
-
sig {
|
2426
|
-
params(duration: ::Stripe::Quote::UpdateParams::LineItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
2427
|
-
}
|
2428
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
2429
|
-
end
|
2430
759
|
# ID of the coupon to create a new discount for.
|
2431
|
-
sig { returns(String) }
|
760
|
+
sig { returns(T.nilable(String)) }
|
2432
761
|
attr_accessor :coupon
|
2433
762
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2434
|
-
sig { returns(String) }
|
763
|
+
sig { returns(T.nilable(String)) }
|
2435
764
|
attr_accessor :discount
|
2436
|
-
# Details to determine how long the discount should be applied for.
|
2437
|
-
sig { returns(::Stripe::Quote::UpdateParams::LineItem::Discount::DiscountEnd) }
|
2438
|
-
attr_accessor :discount_end
|
2439
765
|
# ID of the promotion code to create a new discount for.
|
2440
|
-
sig { returns(String) }
|
766
|
+
sig { returns(T.nilable(String)) }
|
2441
767
|
attr_accessor :promotion_code
|
2442
768
|
sig {
|
2443
|
-
params(coupon: String, discount: String,
|
769
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
2444
770
|
}
|
2445
|
-
def initialize(coupon: nil, discount: nil,
|
771
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
2446
772
|
end
|
2447
773
|
class PriceData < Stripe::RequestParams
|
2448
774
|
class Recurring < Stripe::RequestParams
|
@@ -2450,31 +776,31 @@ module Stripe
|
|
2450
776
|
sig { returns(String) }
|
2451
777
|
attr_accessor :interval
|
2452
778
|
# 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).
|
2453
|
-
sig { returns(Integer) }
|
779
|
+
sig { returns(T.nilable(Integer)) }
|
2454
780
|
attr_accessor :interval_count
|
2455
|
-
sig { params(interval: String, interval_count: Integer).void }
|
781
|
+
sig { params(interval: String, interval_count: T.nilable(Integer)).void }
|
2456
782
|
def initialize(interval: nil, interval_count: nil); end
|
2457
783
|
end
|
2458
784
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
2459
785
|
sig { returns(String) }
|
2460
786
|
attr_accessor :currency
|
2461
|
-
# The ID of the
|
787
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
2462
788
|
sig { returns(String) }
|
2463
789
|
attr_accessor :product
|
2464
790
|
# The recurring components of a price such as `interval` and `interval_count`.
|
2465
|
-
sig { returns(::Stripe::Quote::UpdateParams::LineItem::PriceData::Recurring) }
|
791
|
+
sig { returns(T.nilable(::Stripe::Quote::UpdateParams::LineItem::PriceData::Recurring)) }
|
2466
792
|
attr_accessor :recurring
|
2467
793
|
# 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.
|
2468
|
-
sig { returns(String) }
|
794
|
+
sig { returns(T.nilable(String)) }
|
2469
795
|
attr_accessor :tax_behavior
|
2470
796
|
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
2471
|
-
sig { returns(Integer) }
|
797
|
+
sig { returns(T.nilable(Integer)) }
|
2472
798
|
attr_accessor :unit_amount
|
2473
799
|
# 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.
|
2474
|
-
sig { returns(String) }
|
800
|
+
sig { returns(T.nilable(String)) }
|
2475
801
|
attr_accessor :unit_amount_decimal
|
2476
802
|
sig {
|
2477
|
-
params(currency: String, product: String, recurring: ::Stripe::Quote::UpdateParams::LineItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
|
803
|
+
params(currency: String, product: String, recurring: T.nilable(::Stripe::Quote::UpdateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
2478
804
|
}
|
2479
805
|
def initialize(
|
2480
806
|
currency: nil,
|
@@ -2486,25 +812,27 @@ module Stripe
|
|
2486
812
|
); end
|
2487
813
|
end
|
2488
814
|
# The discounts applied to this line item.
|
2489
|
-
sig {
|
815
|
+
sig {
|
816
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Quote::UpdateParams::LineItem::Discount]))))
|
817
|
+
}
|
2490
818
|
attr_accessor :discounts
|
2491
819
|
# The ID of an existing line item on the quote.
|
2492
|
-
sig { returns(String) }
|
820
|
+
sig { returns(T.nilable(String)) }
|
2493
821
|
attr_accessor :id
|
2494
822
|
# The ID of the price object. One of `price` or `price_data` is required.
|
2495
|
-
sig { returns(String) }
|
823
|
+
sig { returns(T.nilable(String)) }
|
2496
824
|
attr_accessor :price
|
2497
825
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
2498
|
-
sig { returns(::Stripe::Quote::UpdateParams::LineItem::PriceData) }
|
826
|
+
sig { returns(T.nilable(::Stripe::Quote::UpdateParams::LineItem::PriceData)) }
|
2499
827
|
attr_accessor :price_data
|
2500
828
|
# The quantity of the line item.
|
2501
|
-
sig { returns(Integer) }
|
829
|
+
sig { returns(T.nilable(Integer)) }
|
2502
830
|
attr_accessor :quantity
|
2503
831
|
# The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
|
2504
|
-
sig { returns(T.nilable(T::Array[String])) }
|
832
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
2505
833
|
attr_accessor :tax_rates
|
2506
834
|
sig {
|
2507
|
-
params(discounts: T.nilable(T::Array[::Stripe::Quote::UpdateParams::LineItem::Discount]), id: String, price: String, price_data: ::Stripe::Quote::UpdateParams::LineItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
|
835
|
+
params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Quote::UpdateParams::LineItem::Discount]))), id: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::Quote::UpdateParams::LineItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
2508
836
|
}
|
2509
837
|
def initialize(
|
2510
838
|
discounts: nil,
|
@@ -2516,374 +844,105 @@ module Stripe
|
|
2516
844
|
); end
|
2517
845
|
end
|
2518
846
|
class SubscriptionData < Stripe::RequestParams
|
2519
|
-
class BillOnAcceptance < Stripe::RequestParams
|
2520
|
-
class BillFrom < Stripe::RequestParams
|
2521
|
-
class LineStartsAt < Stripe::RequestParams
|
2522
|
-
# The ID of a quote line.
|
2523
|
-
sig { returns(String) }
|
2524
|
-
attr_accessor :id
|
2525
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
2526
|
-
sig { returns(Integer) }
|
2527
|
-
attr_accessor :index
|
2528
|
-
sig { params(id: String, index: Integer).void }
|
2529
|
-
def initialize(id: nil, index: nil); end
|
2530
|
-
end
|
2531
|
-
# Details of a Quote line to start the bill period from.
|
2532
|
-
sig {
|
2533
|
-
returns(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt)
|
2534
|
-
}
|
2535
|
-
attr_accessor :line_starts_at
|
2536
|
-
# A precise Unix timestamp.
|
2537
|
-
sig { returns(Integer) }
|
2538
|
-
attr_accessor :timestamp
|
2539
|
-
# The type of method to specify the `bill_from` time.
|
2540
|
-
sig { returns(String) }
|
2541
|
-
attr_accessor :type
|
2542
|
-
sig {
|
2543
|
-
params(line_starts_at: ::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
|
2544
|
-
}
|
2545
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
|
2546
|
-
end
|
2547
|
-
class BillUntil < Stripe::RequestParams
|
2548
|
-
class Duration < Stripe::RequestParams
|
2549
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2550
|
-
sig { returns(String) }
|
2551
|
-
attr_accessor :interval
|
2552
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2553
|
-
sig { returns(Integer) }
|
2554
|
-
attr_accessor :interval_count
|
2555
|
-
sig { params(interval: String, interval_count: Integer).void }
|
2556
|
-
def initialize(interval: nil, interval_count: nil); end
|
2557
|
-
end
|
2558
|
-
class LineEndsAt < Stripe::RequestParams
|
2559
|
-
# The ID of a quote line.
|
2560
|
-
sig { returns(String) }
|
2561
|
-
attr_accessor :id
|
2562
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
2563
|
-
sig { returns(Integer) }
|
2564
|
-
attr_accessor :index
|
2565
|
-
sig { params(id: String, index: Integer).void }
|
2566
|
-
def initialize(id: nil, index: nil); end
|
2567
|
-
end
|
2568
|
-
# Details of the duration over which to bill.
|
2569
|
-
sig {
|
2570
|
-
returns(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration)
|
2571
|
-
}
|
2572
|
-
attr_accessor :duration
|
2573
|
-
# Details of a Quote line item from which to bill until.
|
2574
|
-
sig {
|
2575
|
-
returns(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt)
|
2576
|
-
}
|
2577
|
-
attr_accessor :line_ends_at
|
2578
|
-
# A precise Unix timestamp.
|
2579
|
-
sig { returns(Integer) }
|
2580
|
-
attr_accessor :timestamp
|
2581
|
-
# The type of method to specify the `bill_until` time.
|
2582
|
-
sig { returns(String) }
|
2583
|
-
attr_accessor :type
|
2584
|
-
sig {
|
2585
|
-
params(duration: ::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
|
2586
|
-
}
|
2587
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
|
2588
|
-
end
|
2589
|
-
# The start of the period to bill from when the Quote is accepted.
|
2590
|
-
sig {
|
2591
|
-
returns(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom)
|
2592
|
-
}
|
2593
|
-
attr_accessor :bill_from
|
2594
|
-
# The end of the period to bill until when the Quote is accepted.
|
2595
|
-
sig {
|
2596
|
-
returns(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil)
|
2597
|
-
}
|
2598
|
-
attr_accessor :bill_until
|
2599
|
-
sig {
|
2600
|
-
params(bill_from: ::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom, bill_until: ::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil).void
|
2601
|
-
}
|
2602
|
-
def initialize(bill_from: nil, bill_until: nil); end
|
2603
|
-
end
|
2604
|
-
class Prebilling < Stripe::RequestParams
|
2605
|
-
# This is used to determine the number of billing cycles to prebill.
|
2606
|
-
sig { returns(Integer) }
|
2607
|
-
attr_accessor :iterations
|
2608
|
-
sig { params(iterations: Integer).void }
|
2609
|
-
def initialize(iterations: nil); end
|
2610
|
-
end
|
2611
|
-
# Describes the period to bill for upon accepting the quote.
|
2612
|
-
sig {
|
2613
|
-
returns(T.nilable(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance))
|
2614
|
-
}
|
2615
|
-
attr_accessor :bill_on_acceptance
|
2616
|
-
# Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
|
2617
|
-
sig { returns(String) }
|
2618
|
-
attr_accessor :billing_behavior
|
2619
|
-
# When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
2620
|
-
sig { returns(T.nilable(String)) }
|
2621
|
-
attr_accessor :billing_cycle_anchor
|
2622
847
|
# 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.
|
2623
|
-
sig { returns(T.nilable(String)) }
|
848
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
2624
849
|
attr_accessor :description
|
2625
850
|
# When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
2626
|
-
sig { returns(T.nilable(T.any(String, Integer))) }
|
851
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) }
|
2627
852
|
attr_accessor :effective_date
|
2628
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2629
|
-
sig { returns(String) }
|
2630
|
-
attr_accessor :end_behavior
|
2631
853
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
|
2632
|
-
sig { returns(T::Hash[String, String]) }
|
854
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
2633
855
|
attr_accessor :metadata
|
2634
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
2635
|
-
sig { returns(T.nilable(::Stripe::Quote::UpdateParams::SubscriptionData::Prebilling)) }
|
2636
|
-
attr_accessor :prebilling
|
2637
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
2638
|
-
#
|
2639
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
2640
|
-
#
|
2641
|
-
# Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
2642
|
-
#
|
2643
|
-
# Prorations can be disabled by passing `none`.
|
2644
|
-
sig { returns(String) }
|
2645
|
-
attr_accessor :proration_behavior
|
2646
856
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
2647
|
-
sig { returns(T.nilable(Integer)) }
|
857
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
2648
858
|
attr_accessor :trial_period_days
|
2649
859
|
sig {
|
2650
|
-
params(
|
860
|
+
params(description: T.nilable(T.nilable(String)), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), metadata: T.nilable(T::Hash[String, String]), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void
|
2651
861
|
}
|
2652
862
|
def initialize(
|
2653
|
-
bill_on_acceptance: nil,
|
2654
|
-
billing_behavior: nil,
|
2655
|
-
billing_cycle_anchor: nil,
|
2656
863
|
description: nil,
|
2657
864
|
effective_date: nil,
|
2658
|
-
end_behavior: nil,
|
2659
865
|
metadata: nil,
|
2660
|
-
prebilling: nil,
|
2661
|
-
proration_behavior: nil,
|
2662
866
|
trial_period_days: nil
|
2663
867
|
); end
|
2664
868
|
end
|
2665
|
-
class SubscriptionDataOverride < Stripe::RequestParams
|
2666
|
-
class AppliesTo < Stripe::RequestParams
|
2667
|
-
# A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
2668
|
-
sig { returns(String) }
|
2669
|
-
attr_accessor :new_reference
|
2670
|
-
# The ID of the schedule the line applies to.
|
2671
|
-
sig { returns(String) }
|
2672
|
-
attr_accessor :subscription_schedule
|
2673
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
2674
|
-
sig { returns(String) }
|
2675
|
-
attr_accessor :type
|
2676
|
-
sig { params(new_reference: String, subscription_schedule: String, type: String).void }
|
2677
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
|
2678
|
-
end
|
2679
|
-
class BillOnAcceptance < Stripe::RequestParams
|
2680
|
-
class BillFrom < Stripe::RequestParams
|
2681
|
-
class LineStartsAt < Stripe::RequestParams
|
2682
|
-
# The ID of a quote line.
|
2683
|
-
sig { returns(String) }
|
2684
|
-
attr_accessor :id
|
2685
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
2686
|
-
sig { returns(Integer) }
|
2687
|
-
attr_accessor :index
|
2688
|
-
sig { params(id: String, index: Integer).void }
|
2689
|
-
def initialize(id: nil, index: nil); end
|
2690
|
-
end
|
2691
|
-
# Details of a Quote line to start the bill period from.
|
2692
|
-
sig {
|
2693
|
-
returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt)
|
2694
|
-
}
|
2695
|
-
attr_accessor :line_starts_at
|
2696
|
-
# A precise Unix timestamp.
|
2697
|
-
sig { returns(Integer) }
|
2698
|
-
attr_accessor :timestamp
|
2699
|
-
# The type of method to specify the `bill_from` time.
|
2700
|
-
sig { returns(String) }
|
2701
|
-
attr_accessor :type
|
2702
|
-
sig {
|
2703
|
-
params(line_starts_at: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
|
2704
|
-
}
|
2705
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
|
2706
|
-
end
|
2707
|
-
class BillUntil < Stripe::RequestParams
|
2708
|
-
class Duration < Stripe::RequestParams
|
2709
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2710
|
-
sig { returns(String) }
|
2711
|
-
attr_accessor :interval
|
2712
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2713
|
-
sig { returns(Integer) }
|
2714
|
-
attr_accessor :interval_count
|
2715
|
-
sig { params(interval: String, interval_count: Integer).void }
|
2716
|
-
def initialize(interval: nil, interval_count: nil); end
|
2717
|
-
end
|
2718
|
-
class LineEndsAt < Stripe::RequestParams
|
2719
|
-
# The ID of a quote line.
|
2720
|
-
sig { returns(String) }
|
2721
|
-
attr_accessor :id
|
2722
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
2723
|
-
sig { returns(Integer) }
|
2724
|
-
attr_accessor :index
|
2725
|
-
sig { params(id: String, index: Integer).void }
|
2726
|
-
def initialize(id: nil, index: nil); end
|
2727
|
-
end
|
2728
|
-
# Details of the duration over which to bill.
|
2729
|
-
sig {
|
2730
|
-
returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration)
|
2731
|
-
}
|
2732
|
-
attr_accessor :duration
|
2733
|
-
# Details of a Quote line item from which to bill until.
|
2734
|
-
sig {
|
2735
|
-
returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt)
|
2736
|
-
}
|
2737
|
-
attr_accessor :line_ends_at
|
2738
|
-
# A precise Unix timestamp.
|
2739
|
-
sig { returns(Integer) }
|
2740
|
-
attr_accessor :timestamp
|
2741
|
-
# The type of method to specify the `bill_until` time.
|
2742
|
-
sig { returns(String) }
|
2743
|
-
attr_accessor :type
|
2744
|
-
sig {
|
2745
|
-
params(duration: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
|
2746
|
-
}
|
2747
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
|
2748
|
-
end
|
2749
|
-
# The start of the period to bill from when the Quote is accepted.
|
2750
|
-
sig {
|
2751
|
-
returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom)
|
2752
|
-
}
|
2753
|
-
attr_accessor :bill_from
|
2754
|
-
# The end of the period to bill until when the Quote is accepted.
|
2755
|
-
sig {
|
2756
|
-
returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil)
|
2757
|
-
}
|
2758
|
-
attr_accessor :bill_until
|
2759
|
-
sig {
|
2760
|
-
params(bill_from: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom, bill_until: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil).void
|
2761
|
-
}
|
2762
|
-
def initialize(bill_from: nil, bill_until: nil); end
|
2763
|
-
end
|
2764
|
-
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
2765
|
-
sig { returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::AppliesTo) }
|
2766
|
-
attr_accessor :applies_to
|
2767
|
-
# Describes the period to bill for upon accepting the quote.
|
2768
|
-
sig {
|
2769
|
-
returns(T.nilable(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance))
|
2770
|
-
}
|
2771
|
-
attr_accessor :bill_on_acceptance
|
2772
|
-
# Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
|
2773
|
-
sig { returns(String) }
|
2774
|
-
attr_accessor :billing_behavior
|
2775
|
-
# The customer the Subscription Data override applies to.
|
2776
|
-
sig { returns(String) }
|
2777
|
-
attr_accessor :customer
|
2778
|
-
# 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.
|
2779
|
-
sig { returns(T.nilable(String)) }
|
2780
|
-
attr_accessor :description
|
2781
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2782
|
-
sig { returns(String) }
|
2783
|
-
attr_accessor :end_behavior
|
2784
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
2785
|
-
#
|
2786
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
2787
|
-
#
|
2788
|
-
# Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
2789
|
-
#
|
2790
|
-
# Prorations can be disabled by passing `none`.
|
2791
|
-
sig { returns(String) }
|
2792
|
-
attr_accessor :proration_behavior
|
2793
|
-
sig {
|
2794
|
-
params(applies_to: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::AppliesTo, bill_on_acceptance: T.nilable(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance), billing_behavior: String, customer: String, description: T.nilable(String), end_behavior: String, proration_behavior: String).void
|
2795
|
-
}
|
2796
|
-
def initialize(
|
2797
|
-
applies_to: nil,
|
2798
|
-
bill_on_acceptance: nil,
|
2799
|
-
billing_behavior: nil,
|
2800
|
-
customer: nil,
|
2801
|
-
description: nil,
|
2802
|
-
end_behavior: nil,
|
2803
|
-
proration_behavior: nil
|
2804
|
-
); end
|
2805
|
-
end
|
2806
869
|
class TransferData < Stripe::RequestParams
|
2807
870
|
# The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
|
2808
|
-
sig { returns(Integer) }
|
871
|
+
sig { returns(T.nilable(Integer)) }
|
2809
872
|
attr_accessor :amount
|
2810
873
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
|
2811
|
-
sig { returns(Float) }
|
874
|
+
sig { returns(T.nilable(Float)) }
|
2812
875
|
attr_accessor :amount_percent
|
2813
876
|
# ID of an existing, connected Stripe account.
|
2814
877
|
sig { returns(String) }
|
2815
878
|
attr_accessor :destination
|
2816
|
-
sig {
|
879
|
+
sig {
|
880
|
+
params(amount: T.nilable(Integer), amount_percent: T.nilable(Float), destination: String).void
|
881
|
+
}
|
2817
882
|
def initialize(amount: nil, amount_percent: nil, destination: nil); end
|
2818
883
|
end
|
2819
|
-
# Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
2820
|
-
sig { returns(T::Boolean) }
|
2821
|
-
attr_accessor :allow_backdated_lines
|
2822
884
|
# The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
|
2823
|
-
sig { returns(T.nilable(Integer)) }
|
885
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
2824
886
|
attr_accessor :application_fee_amount
|
2825
887
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
|
2826
|
-
sig { returns(T.nilable(Float)) }
|
888
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
|
2827
889
|
attr_accessor :application_fee_percent
|
2828
890
|
# Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
|
2829
|
-
sig { returns(::Stripe::Quote::UpdateParams::AutomaticTax) }
|
891
|
+
sig { returns(T.nilable(::Stripe::Quote::UpdateParams::AutomaticTax)) }
|
2830
892
|
attr_accessor :automatic_tax
|
2831
893
|
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
|
2832
|
-
sig { returns(String) }
|
894
|
+
sig { returns(T.nilable(String)) }
|
2833
895
|
attr_accessor :collection_method
|
2834
896
|
# The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
2835
|
-
sig { returns(String) }
|
897
|
+
sig { returns(T.nilable(String)) }
|
2836
898
|
attr_accessor :customer
|
2837
899
|
# The tax rates that will apply to any line item that does not have `tax_rates` set.
|
2838
|
-
sig { returns(T.nilable(T::Array[String])) }
|
900
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
2839
901
|
attr_accessor :default_tax_rates
|
2840
902
|
# A description that will be displayed on the quote PDF.
|
2841
|
-
sig { returns(T.nilable(String)) }
|
903
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
2842
904
|
attr_accessor :description
|
2843
905
|
# The discounts applied to the quote.
|
2844
|
-
sig {
|
906
|
+
sig {
|
907
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Quote::UpdateParams::Discount]))))
|
908
|
+
}
|
2845
909
|
attr_accessor :discounts
|
2846
910
|
# Specifies which fields in the response should be expanded.
|
2847
|
-
sig { returns(T::Array[String]) }
|
911
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2848
912
|
attr_accessor :expand
|
2849
913
|
# A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
|
2850
|
-
sig { returns(Integer) }
|
914
|
+
sig { returns(T.nilable(Integer)) }
|
2851
915
|
attr_accessor :expires_at
|
2852
916
|
# A footer that will be displayed on the quote PDF.
|
2853
|
-
sig { returns(T.nilable(String)) }
|
917
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
2854
918
|
attr_accessor :footer
|
2855
919
|
# A header that will be displayed on the quote PDF.
|
2856
|
-
sig { returns(T.nilable(String)) }
|
920
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
2857
921
|
attr_accessor :header
|
2858
922
|
# All invoices will be billed using the specified settings.
|
2859
|
-
sig { returns(::Stripe::Quote::UpdateParams::InvoiceSettings) }
|
923
|
+
sig { returns(T.nilable(::Stripe::Quote::UpdateParams::InvoiceSettings)) }
|
2860
924
|
attr_accessor :invoice_settings
|
2861
925
|
# A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
|
2862
|
-
sig { returns(T::Array[::Stripe::Quote::UpdateParams::LineItem]) }
|
926
|
+
sig { returns(T.nilable(T::Array[::Stripe::Quote::UpdateParams::LineItem])) }
|
2863
927
|
attr_accessor :line_items
|
2864
|
-
# A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
2865
|
-
sig { returns(T::Array[::Stripe::Quote::UpdateParams::Line]) }
|
2866
|
-
attr_accessor :lines
|
2867
928
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2868
|
-
sig { returns(T::Hash[String, String]) }
|
929
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
2869
930
|
attr_accessor :metadata
|
2870
931
|
# The account on behalf of which to charge.
|
2871
|
-
sig { returns(T.nilable(String)) }
|
932
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
2872
933
|
attr_accessor :on_behalf_of
|
2873
934
|
# When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
|
2874
|
-
sig { returns(::Stripe::Quote::UpdateParams::SubscriptionData) }
|
935
|
+
sig { returns(T.nilable(::Stripe::Quote::UpdateParams::SubscriptionData)) }
|
2875
936
|
attr_accessor :subscription_data
|
2876
|
-
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
2877
|
-
sig { returns(T.nilable(T::Array[::Stripe::Quote::UpdateParams::SubscriptionDataOverride])) }
|
2878
|
-
attr_accessor :subscription_data_overrides
|
2879
937
|
# The data with which to automatically create a Transfer for each of the invoices.
|
2880
|
-
sig {
|
938
|
+
sig {
|
939
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::Quote::UpdateParams::TransferData))))
|
940
|
+
}
|
2881
941
|
attr_accessor :transfer_data
|
2882
942
|
sig {
|
2883
|
-
params(
|
943
|
+
params(application_fee_amount: T.nilable(T.nilable(T.any(String, Integer))), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::Quote::UpdateParams::AutomaticTax), collection_method: T.nilable(String), customer: 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::Quote::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), footer: T.nilable(T.nilable(String)), header: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::Quote::UpdateParams::InvoiceSettings), line_items: T.nilable(T::Array[::Stripe::Quote::UpdateParams::LineItem]), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(T.nilable(String)), subscription_data: T.nilable(::Stripe::Quote::UpdateParams::SubscriptionData), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::Quote::UpdateParams::TransferData)))).void
|
2884
944
|
}
|
2885
945
|
def initialize(
|
2886
|
-
allow_backdated_lines: nil,
|
2887
946
|
application_fee_amount: nil,
|
2888
947
|
application_fee_percent: nil,
|
2889
948
|
automatic_tax: nil,
|
@@ -2898,141 +957,79 @@ module Stripe
|
|
2898
957
|
header: nil,
|
2899
958
|
invoice_settings: nil,
|
2900
959
|
line_items: nil,
|
2901
|
-
lines: nil,
|
2902
960
|
metadata: nil,
|
2903
961
|
on_behalf_of: nil,
|
2904
962
|
subscription_data: nil,
|
2905
|
-
subscription_data_overrides: nil,
|
2906
963
|
transfer_data: nil
|
2907
964
|
); end
|
2908
965
|
end
|
2909
966
|
class ListComputedUpfrontLineItemsParams < Stripe::RequestParams
|
2910
967
|
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
2911
|
-
sig { returns(String) }
|
968
|
+
sig { returns(T.nilable(String)) }
|
2912
969
|
attr_accessor :ending_before
|
2913
970
|
# Specifies which fields in the response should be expanded.
|
2914
|
-
sig { returns(T::Array[String]) }
|
971
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2915
972
|
attr_accessor :expand
|
2916
973
|
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
2917
|
-
sig { returns(Integer) }
|
974
|
+
sig { returns(T.nilable(Integer)) }
|
2918
975
|
attr_accessor :limit
|
2919
976
|
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
2920
|
-
sig { returns(String) }
|
977
|
+
sig { returns(T.nilable(String)) }
|
2921
978
|
attr_accessor :starting_after
|
2922
979
|
sig {
|
2923
|
-
params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void
|
980
|
+
params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
|
2924
981
|
}
|
2925
982
|
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
|
2926
983
|
end
|
2927
984
|
class ListLineItemsParams < Stripe::RequestParams
|
2928
985
|
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
2929
|
-
sig { returns(String) }
|
2930
|
-
attr_accessor :ending_before
|
2931
|
-
# Specifies which fields in the response should be expanded.
|
2932
|
-
sig { returns(T::Array[String]) }
|
2933
|
-
attr_accessor :expand
|
2934
|
-
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
2935
|
-
sig { returns(Integer) }
|
2936
|
-
attr_accessor :limit
|
2937
|
-
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
2938
|
-
sig { returns(String) }
|
2939
|
-
attr_accessor :starting_after
|
2940
|
-
sig {
|
2941
|
-
params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void
|
2942
|
-
}
|
2943
|
-
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
|
2944
|
-
end
|
2945
|
-
class ListLinesParams < Stripe::RequestParams
|
2946
|
-
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
2947
|
-
sig { returns(String) }
|
986
|
+
sig { returns(T.nilable(String)) }
|
2948
987
|
attr_accessor :ending_before
|
2949
988
|
# Specifies which fields in the response should be expanded.
|
2950
|
-
sig { returns(T::Array[String]) }
|
989
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2951
990
|
attr_accessor :expand
|
2952
991
|
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
2953
|
-
sig { returns(Integer) }
|
992
|
+
sig { returns(T.nilable(Integer)) }
|
2954
993
|
attr_accessor :limit
|
2955
994
|
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
2956
|
-
sig { returns(String) }
|
995
|
+
sig { returns(T.nilable(String)) }
|
2957
996
|
attr_accessor :starting_after
|
2958
997
|
sig {
|
2959
|
-
params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void
|
998
|
+
params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
|
2960
999
|
}
|
2961
1000
|
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
|
2962
1001
|
end
|
2963
1002
|
class AcceptParams < Stripe::RequestParams
|
2964
1003
|
# Specifies which fields in the response should be expanded.
|
2965
|
-
sig { returns(T::Array[String]) }
|
1004
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2966
1005
|
attr_accessor :expand
|
2967
|
-
sig { params(expand: T::Array[String]).void }
|
1006
|
+
sig { params(expand: T.nilable(T::Array[String])).void }
|
2968
1007
|
def initialize(expand: nil); end
|
2969
1008
|
end
|
2970
1009
|
class CancelParams < Stripe::RequestParams
|
2971
1010
|
# Specifies which fields in the response should be expanded.
|
2972
|
-
sig { returns(T::Array[String]) }
|
1011
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2973
1012
|
attr_accessor :expand
|
2974
|
-
sig { params(expand: T::Array[String]).void }
|
1013
|
+
sig { params(expand: T.nilable(T::Array[String])).void }
|
2975
1014
|
def initialize(expand: nil); end
|
2976
1015
|
end
|
2977
1016
|
class FinalizeQuoteParams < Stripe::RequestParams
|
2978
1017
|
# Specifies which fields in the response should be expanded.
|
2979
|
-
sig { returns(T::Array[String]) }
|
1018
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2980
1019
|
attr_accessor :expand
|
2981
1020
|
# A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
|
2982
|
-
sig { returns(Integer) }
|
1021
|
+
sig { returns(T.nilable(Integer)) }
|
2983
1022
|
attr_accessor :expires_at
|
2984
|
-
sig { params(expand: T::Array[String], expires_at: Integer).void }
|
1023
|
+
sig { params(expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer)).void }
|
2985
1024
|
def initialize(expand: nil, expires_at: nil); end
|
2986
1025
|
end
|
2987
|
-
class MarkDraftParams < Stripe::RequestParams
|
2988
|
-
# Specifies which fields in the response should be expanded.
|
2989
|
-
sig { returns(T::Array[String]) }
|
2990
|
-
attr_accessor :expand
|
2991
|
-
sig { params(expand: T::Array[String]).void }
|
2992
|
-
def initialize(expand: nil); end
|
2993
|
-
end
|
2994
|
-
class MarkStaleParams < Stripe::RequestParams
|
2995
|
-
# Specifies which fields in the response should be expanded.
|
2996
|
-
sig { returns(T::Array[String]) }
|
2997
|
-
attr_accessor :expand
|
2998
|
-
# Reason the Quote is being marked stale.
|
2999
|
-
sig { returns(String) }
|
3000
|
-
attr_accessor :reason
|
3001
|
-
sig { params(expand: T::Array[String], reason: String).void }
|
3002
|
-
def initialize(expand: nil, reason: nil); end
|
3003
|
-
end
|
3004
|
-
class ReestimateParams < Stripe::RequestParams
|
3005
|
-
# Specifies which fields in the response should be expanded.
|
3006
|
-
sig { returns(T::Array[String]) }
|
3007
|
-
attr_accessor :expand
|
3008
|
-
sig { params(expand: T::Array[String]).void }
|
3009
|
-
def initialize(expand: nil); end
|
3010
|
-
end
|
3011
1026
|
class PdfParams < Stripe::RequestParams
|
3012
1027
|
# Specifies which fields in the response should be expanded.
|
3013
|
-
sig { returns(T::Array[String]) }
|
1028
|
+
sig { returns(T.nilable(T::Array[String])) }
|
3014
1029
|
attr_accessor :expand
|
3015
|
-
sig { params(expand: T::Array[String]).void }
|
1030
|
+
sig { params(expand: T.nilable(T::Array[String])).void }
|
3016
1031
|
def initialize(expand: nil); end
|
3017
1032
|
end
|
3018
|
-
class ListPreviewInvoiceLinesParams < Stripe::RequestParams
|
3019
|
-
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
3020
|
-
sig { returns(String) }
|
3021
|
-
attr_accessor :ending_before
|
3022
|
-
# Specifies which fields in the response should be expanded.
|
3023
|
-
sig { returns(T::Array[String]) }
|
3024
|
-
attr_accessor :expand
|
3025
|
-
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
3026
|
-
sig { returns(Integer) }
|
3027
|
-
attr_accessor :limit
|
3028
|
-
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
3029
|
-
sig { returns(String) }
|
3030
|
-
attr_accessor :starting_after
|
3031
|
-
sig {
|
3032
|
-
params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void
|
3033
|
-
}
|
3034
|
-
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
|
3035
|
-
end
|
3036
1033
|
# Accepts the specified quote.
|
3037
1034
|
sig {
|
3038
1035
|
params(params: T.any(::Stripe::Quote::AcceptParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
|
@@ -3105,54 +1102,6 @@ module Stripe
|
|
3105
1102
|
}
|
3106
1103
|
def self.list_line_items(quote, params = {}, opts = {}); end
|
3107
1104
|
|
3108
|
-
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
3109
|
-
sig {
|
3110
|
-
params(params: T.any(::Stripe::Quote::ListLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
|
3111
|
-
}
|
3112
|
-
def list_lines(params = {}, opts = {}); end
|
3113
|
-
|
3114
|
-
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
3115
|
-
sig {
|
3116
|
-
params(quote: String, params: T.any(::Stripe::Quote::ListLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
|
3117
|
-
}
|
3118
|
-
def self.list_lines(quote, params = {}, opts = {}); end
|
3119
|
-
|
3120
|
-
# Preview the invoice line items that would be generated by accepting the quote.
|
3121
|
-
sig {
|
3122
|
-
params(preview_invoice: String, params: T.any(::Stripe::Quote::ListPreviewInvoiceLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
|
3123
|
-
}
|
3124
|
-
def list_preview_invoice_lines(preview_invoice, params = {}, opts = {}); end
|
3125
|
-
|
3126
|
-
# Preview the invoice line items that would be generated by accepting the quote.
|
3127
|
-
sig {
|
3128
|
-
params(quote: String, preview_invoice: String, params: T.any(::Stripe::Quote::ListPreviewInvoiceLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
|
3129
|
-
}
|
3130
|
-
def self.list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {}); end
|
3131
|
-
|
3132
|
-
# Converts a stale quote to draft.
|
3133
|
-
sig {
|
3134
|
-
params(params: T.any(::Stripe::Quote::MarkDraftParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
|
3135
|
-
}
|
3136
|
-
def mark_draft(params = {}, opts = {}); end
|
3137
|
-
|
3138
|
-
# Converts a stale quote to draft.
|
3139
|
-
sig {
|
3140
|
-
params(quote: String, params: T.any(::Stripe::Quote::MarkDraftParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
|
3141
|
-
}
|
3142
|
-
def self.mark_draft(quote, params = {}, opts = {}); end
|
3143
|
-
|
3144
|
-
# Converts a draft or open quote to stale.
|
3145
|
-
sig {
|
3146
|
-
params(params: T.any(::Stripe::Quote::MarkStaleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
|
3147
|
-
}
|
3148
|
-
def mark_stale(params = {}, opts = {}); end
|
3149
|
-
|
3150
|
-
# Converts a draft or open quote to stale.
|
3151
|
-
sig {
|
3152
|
-
params(quote: String, params: T.any(::Stripe::Quote::MarkStaleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
|
3153
|
-
}
|
3154
|
-
def self.mark_stale(quote, params = {}, opts = {}); end
|
3155
|
-
|
3156
1105
|
# Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
|
3157
1106
|
sig {
|
3158
1107
|
params(params: T.any(::Stripe::Quote::PdfParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, read_body_chunk_block: T.untyped).returns(T.untyped)
|
@@ -3165,18 +1114,6 @@ module Stripe
|
|
3165
1114
|
}
|
3166
1115
|
def self.pdf(quote, params = {}, opts = {}, &read_body_chunk_block); end
|
3167
1116
|
|
3168
|
-
# Recompute the upcoming invoice estimate for the quote.
|
3169
|
-
sig {
|
3170
|
-
params(params: T.any(::Stripe::Quote::ReestimateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
|
3171
|
-
}
|
3172
|
-
def reestimate(params = {}, opts = {}); end
|
3173
|
-
|
3174
|
-
# Recompute the upcoming invoice estimate for the quote.
|
3175
|
-
sig {
|
3176
|
-
params(quote: String, params: T.any(::Stripe::Quote::ReestimateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
|
3177
|
-
}
|
3178
|
-
def self.reestimate(quote, params = {}, opts = {}); end
|
3179
|
-
|
3180
1117
|
# A quote models prices and services for a customer.
|
3181
1118
|
sig {
|
3182
1119
|
params(quote: String, params: T.any(::Stripe::Quote::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
|