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
@@ -4,44 +4,37 @@
|
|
4
4
|
# typed: true
|
5
5
|
module Stripe
|
6
6
|
class QuoteService < StripeService
|
7
|
-
attr_reader :preview_invoices
|
8
|
-
attr_reader :preview_subscription_schedules
|
9
|
-
attr_reader :lines
|
10
7
|
attr_reader :line_items
|
11
8
|
attr_reader :computed_upfront_line_items
|
12
9
|
class ListParams < Stripe::RequestParams
|
13
10
|
# The ID of the customer whose quotes will be retrieved.
|
14
|
-
sig { returns(String) }
|
11
|
+
sig { returns(T.nilable(String)) }
|
15
12
|
attr_accessor :customer
|
16
13
|
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
17
|
-
sig { returns(String) }
|
14
|
+
sig { returns(T.nilable(String)) }
|
18
15
|
attr_accessor :ending_before
|
19
16
|
# Specifies which fields in the response should be expanded.
|
20
|
-
sig { returns(T::Array[String]) }
|
17
|
+
sig { returns(T.nilable(T::Array[String])) }
|
21
18
|
attr_accessor :expand
|
22
|
-
# The subscription which the quote updates.
|
23
|
-
sig { returns(String) }
|
24
|
-
attr_accessor :from_subscription
|
25
19
|
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
26
|
-
sig { returns(Integer) }
|
20
|
+
sig { returns(T.nilable(Integer)) }
|
27
21
|
attr_accessor :limit
|
28
22
|
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
29
|
-
sig { returns(String) }
|
23
|
+
sig { returns(T.nilable(String)) }
|
30
24
|
attr_accessor :starting_after
|
31
25
|
# The status of the quote.
|
32
|
-
sig { returns(String) }
|
26
|
+
sig { returns(T.nilable(String)) }
|
33
27
|
attr_accessor :status
|
34
28
|
# 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.
|
35
|
-
sig { returns(String) }
|
29
|
+
sig { returns(T.nilable(String)) }
|
36
30
|
attr_accessor :test_clock
|
37
31
|
sig {
|
38
|
-
params(customer: String, ending_before: String, expand: T::Array[String],
|
32
|
+
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
|
39
33
|
}
|
40
34
|
def initialize(
|
41
35
|
customer: nil,
|
42
36
|
ending_before: nil,
|
43
37
|
expand: nil,
|
44
|
-
from_subscription: nil,
|
45
38
|
limit: nil,
|
46
39
|
starting_after: nil,
|
47
40
|
status: nil,
|
@@ -52,626 +45,87 @@ module Stripe
|
|
52
45
|
class AutomaticTax < Stripe::RequestParams
|
53
46
|
class Liability < Stripe::RequestParams
|
54
47
|
# The connected account being referenced when `type` is `account`.
|
55
|
-
sig { returns(String) }
|
48
|
+
sig { returns(T.nilable(String)) }
|
56
49
|
attr_accessor :account
|
57
50
|
# Type of the account referenced in the request.
|
58
51
|
sig { returns(String) }
|
59
52
|
attr_accessor :type
|
60
|
-
sig { params(account: String, type: String).void }
|
53
|
+
sig { params(account: T.nilable(String), type: String).void }
|
61
54
|
def initialize(account: nil, type: nil); end
|
62
55
|
end
|
63
56
|
# Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
|
64
57
|
sig { returns(T::Boolean) }
|
65
58
|
attr_accessor :enabled
|
66
59
|
# 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.
|
67
|
-
sig { returns(::Stripe::QuoteService::CreateParams::AutomaticTax::Liability) }
|
60
|
+
sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::AutomaticTax::Liability)) }
|
68
61
|
attr_accessor :liability
|
69
62
|
sig {
|
70
|
-
params(enabled: T::Boolean, liability: ::Stripe::QuoteService::CreateParams::AutomaticTax::Liability).void
|
63
|
+
params(enabled: T::Boolean, liability: T.nilable(::Stripe::QuoteService::CreateParams::AutomaticTax::Liability)).void
|
71
64
|
}
|
72
65
|
def initialize(enabled: nil, liability: nil); end
|
73
66
|
end
|
74
67
|
class Discount < Stripe::RequestParams
|
75
|
-
class DiscountEnd < Stripe::RequestParams
|
76
|
-
class Duration < Stripe::RequestParams
|
77
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
78
|
-
sig { returns(String) }
|
79
|
-
attr_accessor :interval
|
80
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
81
|
-
sig { returns(Integer) }
|
82
|
-
attr_accessor :interval_count
|
83
|
-
sig { params(interval: String, interval_count: Integer).void }
|
84
|
-
def initialize(interval: nil, interval_count: nil); end
|
85
|
-
end
|
86
|
-
# Time span for the redeemed discount.
|
87
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Discount::DiscountEnd::Duration) }
|
88
|
-
attr_accessor :duration
|
89
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
90
|
-
sig { returns(Integer) }
|
91
|
-
attr_accessor :timestamp
|
92
|
-
# The type of calculation made to determine when the discount ends.
|
93
|
-
sig { returns(String) }
|
94
|
-
attr_accessor :type
|
95
|
-
sig {
|
96
|
-
params(duration: ::Stripe::QuoteService::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
97
|
-
}
|
98
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
99
|
-
end
|
100
68
|
# ID of the coupon to create a new discount for.
|
101
|
-
sig { returns(String) }
|
69
|
+
sig { returns(T.nilable(String)) }
|
102
70
|
attr_accessor :coupon
|
103
71
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
104
|
-
sig { returns(String) }
|
72
|
+
sig { returns(T.nilable(String)) }
|
105
73
|
attr_accessor :discount
|
106
|
-
# Details to determine how long the discount should be applied for.
|
107
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Discount::DiscountEnd) }
|
108
|
-
attr_accessor :discount_end
|
109
74
|
# ID of the promotion code to create a new discount for.
|
110
|
-
sig { returns(String) }
|
75
|
+
sig { returns(T.nilable(String)) }
|
111
76
|
attr_accessor :promotion_code
|
112
77
|
sig {
|
113
|
-
params(coupon: String, discount: String,
|
78
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
114
79
|
}
|
115
|
-
def initialize(coupon: nil, discount: nil,
|
80
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
116
81
|
end
|
117
82
|
class FromQuote < Stripe::RequestParams
|
118
83
|
# Whether this quote is a revision of the previous quote.
|
119
|
-
sig { returns(T::Boolean) }
|
84
|
+
sig { returns(T.nilable(T::Boolean)) }
|
120
85
|
attr_accessor :is_revision
|
121
86
|
# The `id` of the quote that will be cloned.
|
122
87
|
sig { returns(String) }
|
123
88
|
attr_accessor :quote
|
124
|
-
sig { params(is_revision: T::Boolean, quote: String).void }
|
89
|
+
sig { params(is_revision: T.nilable(T::Boolean), quote: String).void }
|
125
90
|
def initialize(is_revision: nil, quote: nil); end
|
126
91
|
end
|
127
92
|
class InvoiceSettings < Stripe::RequestParams
|
128
93
|
class Issuer < Stripe::RequestParams
|
129
94
|
# The connected account being referenced when `type` is `account`.
|
130
|
-
sig { returns(String) }
|
95
|
+
sig { returns(T.nilable(String)) }
|
131
96
|
attr_accessor :account
|
132
97
|
# Type of the account referenced in the request.
|
133
98
|
sig { returns(String) }
|
134
99
|
attr_accessor :type
|
135
|
-
sig { params(account: String, type: String).void }
|
100
|
+
sig { params(account: T.nilable(String), type: String).void }
|
136
101
|
def initialize(account: nil, type: nil); end
|
137
102
|
end
|
138
103
|
# 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`.
|
139
|
-
sig { returns(Integer) }
|
104
|
+
sig { returns(T.nilable(Integer)) }
|
140
105
|
attr_accessor :days_until_due
|
141
106
|
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
142
|
-
sig { returns(::Stripe::QuoteService::CreateParams::InvoiceSettings::Issuer) }
|
107
|
+
sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::InvoiceSettings::Issuer)) }
|
143
108
|
attr_accessor :issuer
|
144
109
|
sig {
|
145
|
-
params(days_until_due: Integer, issuer: ::Stripe::QuoteService::CreateParams::InvoiceSettings::Issuer).void
|
110
|
+
params(days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::QuoteService::CreateParams::InvoiceSettings::Issuer)).void
|
146
111
|
}
|
147
112
|
def initialize(days_until_due: nil, issuer: nil); end
|
148
113
|
end
|
149
|
-
class Line < Stripe::RequestParams
|
150
|
-
class Action < Stripe::RequestParams
|
151
|
-
class AddDiscount < Stripe::RequestParams
|
152
|
-
class DiscountEnd < Stripe::RequestParams
|
153
|
-
# The type of calculation made to determine when the discount ends.
|
154
|
-
sig { returns(String) }
|
155
|
-
attr_accessor :type
|
156
|
-
sig { params(type: String).void }
|
157
|
-
def initialize(type: nil); end
|
158
|
-
end
|
159
|
-
# The coupon code to redeem.
|
160
|
-
sig { returns(String) }
|
161
|
-
attr_accessor :coupon
|
162
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
163
|
-
sig { returns(String) }
|
164
|
-
attr_accessor :discount
|
165
|
-
# Details to determine how long the discount should be applied for.
|
166
|
-
sig {
|
167
|
-
returns(::Stripe::QuoteService::CreateParams::Line::Action::AddDiscount::DiscountEnd)
|
168
|
-
}
|
169
|
-
attr_accessor :discount_end
|
170
|
-
# 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.
|
171
|
-
sig { returns(Integer) }
|
172
|
-
attr_accessor :index
|
173
|
-
# The promotion code to redeem.
|
174
|
-
sig { returns(String) }
|
175
|
-
attr_accessor :promotion_code
|
176
|
-
sig {
|
177
|
-
params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::CreateParams::Line::Action::AddDiscount::DiscountEnd, index: Integer, promotion_code: String).void
|
178
|
-
}
|
179
|
-
def initialize(
|
180
|
-
coupon: nil,
|
181
|
-
discount: nil,
|
182
|
-
discount_end: nil,
|
183
|
-
index: nil,
|
184
|
-
promotion_code: nil
|
185
|
-
); end
|
186
|
-
end
|
187
|
-
class AddItem < Stripe::RequestParams
|
188
|
-
class Discount < Stripe::RequestParams
|
189
|
-
class DiscountEnd < Stripe::RequestParams
|
190
|
-
class Duration < Stripe::RequestParams
|
191
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
192
|
-
sig { returns(String) }
|
193
|
-
attr_accessor :interval
|
194
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
195
|
-
sig { returns(Integer) }
|
196
|
-
attr_accessor :interval_count
|
197
|
-
sig { params(interval: String, interval_count: Integer).void }
|
198
|
-
def initialize(interval: nil, interval_count: nil); end
|
199
|
-
end
|
200
|
-
# Time span for the redeemed discount.
|
201
|
-
sig {
|
202
|
-
returns(::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration)
|
203
|
-
}
|
204
|
-
attr_accessor :duration
|
205
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
206
|
-
sig { returns(Integer) }
|
207
|
-
attr_accessor :timestamp
|
208
|
-
# The type of calculation made to determine when the discount ends.
|
209
|
-
sig { returns(String) }
|
210
|
-
attr_accessor :type
|
211
|
-
sig {
|
212
|
-
params(duration: ::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
213
|
-
}
|
214
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
215
|
-
end
|
216
|
-
# ID of the coupon to create a new discount for.
|
217
|
-
sig { returns(String) }
|
218
|
-
attr_accessor :coupon
|
219
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
220
|
-
sig { returns(String) }
|
221
|
-
attr_accessor :discount
|
222
|
-
# Details to determine how long the discount should be applied for.
|
223
|
-
sig {
|
224
|
-
returns(::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount::DiscountEnd)
|
225
|
-
}
|
226
|
-
attr_accessor :discount_end
|
227
|
-
# ID of the promotion code to create a new discount for.
|
228
|
-
sig { returns(String) }
|
229
|
-
attr_accessor :promotion_code
|
230
|
-
sig {
|
231
|
-
params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount::DiscountEnd, promotion_code: String).void
|
232
|
-
}
|
233
|
-
def initialize(
|
234
|
-
coupon: nil,
|
235
|
-
discount: nil,
|
236
|
-
discount_end: nil,
|
237
|
-
promotion_code: nil
|
238
|
-
); end
|
239
|
-
end
|
240
|
-
class Trial < Stripe::RequestParams
|
241
|
-
# 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.
|
242
|
-
sig { returns(T::Array[String]) }
|
243
|
-
attr_accessor :converts_to
|
244
|
-
# Determines the type of trial for this item.
|
245
|
-
sig { returns(String) }
|
246
|
-
attr_accessor :type
|
247
|
-
sig { params(converts_to: T::Array[String], type: String).void }
|
248
|
-
def initialize(converts_to: nil, type: nil); end
|
249
|
-
end
|
250
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
251
|
-
sig {
|
252
|
-
returns(T::Array[::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount])
|
253
|
-
}
|
254
|
-
attr_accessor :discounts
|
255
|
-
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
256
|
-
sig { returns(T::Hash[String, String]) }
|
257
|
-
attr_accessor :metadata
|
258
|
-
# The ID of the price object.
|
259
|
-
sig { returns(String) }
|
260
|
-
attr_accessor :price
|
261
|
-
# Quantity for this item.
|
262
|
-
sig { returns(Integer) }
|
263
|
-
attr_accessor :quantity
|
264
|
-
# 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`.
|
265
|
-
sig { returns(T::Array[String]) }
|
266
|
-
attr_accessor :tax_rates
|
267
|
-
# Options that configure the trial on the subscription item.
|
268
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Trial) }
|
269
|
-
attr_accessor :trial
|
270
|
-
sig {
|
271
|
-
params(discounts: T::Array[::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Trial).void
|
272
|
-
}
|
273
|
-
def initialize(
|
274
|
-
discounts: nil,
|
275
|
-
metadata: nil,
|
276
|
-
price: nil,
|
277
|
-
quantity: nil,
|
278
|
-
tax_rates: nil,
|
279
|
-
trial: nil
|
280
|
-
); end
|
281
|
-
end
|
282
|
-
class RemoveDiscount < Stripe::RequestParams
|
283
|
-
# The coupon code to remove from the `discounts` array.
|
284
|
-
sig { returns(String) }
|
285
|
-
attr_accessor :coupon
|
286
|
-
# The ID of a discount to remove from the `discounts` array.
|
287
|
-
sig { returns(String) }
|
288
|
-
attr_accessor :discount
|
289
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
290
|
-
sig { returns(String) }
|
291
|
-
attr_accessor :promotion_code
|
292
|
-
sig { params(coupon: String, discount: String, promotion_code: String).void }
|
293
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
294
|
-
end
|
295
|
-
class RemoveItem < Stripe::RequestParams
|
296
|
-
# ID of a price to remove.
|
297
|
-
sig { returns(String) }
|
298
|
-
attr_accessor :price
|
299
|
-
sig { params(price: String).void }
|
300
|
-
def initialize(price: nil); end
|
301
|
-
end
|
302
|
-
class SetDiscount < Stripe::RequestParams
|
303
|
-
# The coupon code to replace the `discounts` array with.
|
304
|
-
sig { returns(String) }
|
305
|
-
attr_accessor :coupon
|
306
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
307
|
-
sig { returns(String) }
|
308
|
-
attr_accessor :discount
|
309
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
310
|
-
sig { returns(String) }
|
311
|
-
attr_accessor :promotion_code
|
312
|
-
sig { params(coupon: String, discount: String, promotion_code: String).void }
|
313
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
314
|
-
end
|
315
|
-
class SetItem < Stripe::RequestParams
|
316
|
-
class Discount < Stripe::RequestParams
|
317
|
-
class DiscountEnd < Stripe::RequestParams
|
318
|
-
class Duration < Stripe::RequestParams
|
319
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
320
|
-
sig { returns(String) }
|
321
|
-
attr_accessor :interval
|
322
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
323
|
-
sig { returns(Integer) }
|
324
|
-
attr_accessor :interval_count
|
325
|
-
sig { params(interval: String, interval_count: Integer).void }
|
326
|
-
def initialize(interval: nil, interval_count: nil); end
|
327
|
-
end
|
328
|
-
# Time span for the redeemed discount.
|
329
|
-
sig {
|
330
|
-
returns(::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration)
|
331
|
-
}
|
332
|
-
attr_accessor :duration
|
333
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
334
|
-
sig { returns(Integer) }
|
335
|
-
attr_accessor :timestamp
|
336
|
-
# The type of calculation made to determine when the discount ends.
|
337
|
-
sig { returns(String) }
|
338
|
-
attr_accessor :type
|
339
|
-
sig {
|
340
|
-
params(duration: ::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
341
|
-
}
|
342
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
343
|
-
end
|
344
|
-
# ID of the coupon to create a new discount for.
|
345
|
-
sig { returns(String) }
|
346
|
-
attr_accessor :coupon
|
347
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
348
|
-
sig { returns(String) }
|
349
|
-
attr_accessor :discount
|
350
|
-
# Details to determine how long the discount should be applied for.
|
351
|
-
sig {
|
352
|
-
returns(::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount::DiscountEnd)
|
353
|
-
}
|
354
|
-
attr_accessor :discount_end
|
355
|
-
# ID of the promotion code to create a new discount for.
|
356
|
-
sig { returns(String) }
|
357
|
-
attr_accessor :promotion_code
|
358
|
-
sig {
|
359
|
-
params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount::DiscountEnd, promotion_code: String).void
|
360
|
-
}
|
361
|
-
def initialize(
|
362
|
-
coupon: nil,
|
363
|
-
discount: nil,
|
364
|
-
discount_end: nil,
|
365
|
-
promotion_code: nil
|
366
|
-
); end
|
367
|
-
end
|
368
|
-
class Trial < Stripe::RequestParams
|
369
|
-
# 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.
|
370
|
-
sig { returns(T::Array[String]) }
|
371
|
-
attr_accessor :converts_to
|
372
|
-
# Determines the type of trial for this item.
|
373
|
-
sig { returns(String) }
|
374
|
-
attr_accessor :type
|
375
|
-
sig { params(converts_to: T::Array[String], type: String).void }
|
376
|
-
def initialize(converts_to: nil, type: nil); end
|
377
|
-
end
|
378
|
-
# 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`.
|
379
|
-
sig {
|
380
|
-
returns(T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount])
|
381
|
-
}
|
382
|
-
attr_accessor :discounts
|
383
|
-
# 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`.
|
384
|
-
sig { returns(T::Hash[String, String]) }
|
385
|
-
attr_accessor :metadata
|
386
|
-
# The ID of the price object.
|
387
|
-
sig { returns(String) }
|
388
|
-
attr_accessor :price
|
389
|
-
# 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`.
|
390
|
-
sig { returns(Integer) }
|
391
|
-
attr_accessor :quantity
|
392
|
-
# 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`.
|
393
|
-
sig { returns(T::Array[String]) }
|
394
|
-
attr_accessor :tax_rates
|
395
|
-
# 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`.
|
396
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Trial) }
|
397
|
-
attr_accessor :trial
|
398
|
-
sig {
|
399
|
-
params(discounts: T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Trial).void
|
400
|
-
}
|
401
|
-
def initialize(
|
402
|
-
discounts: nil,
|
403
|
-
metadata: nil,
|
404
|
-
price: nil,
|
405
|
-
quantity: nil,
|
406
|
-
tax_rates: nil,
|
407
|
-
trial: nil
|
408
|
-
); end
|
409
|
-
end
|
410
|
-
# Details for the `add_discount` type.
|
411
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::AddDiscount) }
|
412
|
-
attr_accessor :add_discount
|
413
|
-
# Details for the `add_item` type.
|
414
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::AddItem) }
|
415
|
-
attr_accessor :add_item
|
416
|
-
# Details for the `add_metadata` type: specify a hash of key-value pairs.
|
417
|
-
sig { returns(T::Hash[String, String]) }
|
418
|
-
attr_accessor :add_metadata
|
419
|
-
# Details for the `remove_discount` type.
|
420
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::RemoveDiscount) }
|
421
|
-
attr_accessor :remove_discount
|
422
|
-
# Details for the `remove_item` type.
|
423
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::RemoveItem) }
|
424
|
-
attr_accessor :remove_item
|
425
|
-
# Details for the `remove_metadata` type: specify an array of metadata keys.
|
426
|
-
sig { returns(T::Array[String]) }
|
427
|
-
attr_accessor :remove_metadata
|
428
|
-
# Details for the `set_discounts` type.
|
429
|
-
sig { returns(T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetDiscount]) }
|
430
|
-
attr_accessor :set_discounts
|
431
|
-
# Details for the `set_items` type.
|
432
|
-
sig { returns(T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetItem]) }
|
433
|
-
attr_accessor :set_items
|
434
|
-
# Details for the `set_metadata` type: specify an array of key-value pairs.
|
435
|
-
sig { returns(T.nilable(T::Hash[String, String])) }
|
436
|
-
attr_accessor :set_metadata
|
437
|
-
# The type of action the quote line performs.
|
438
|
-
sig { returns(String) }
|
439
|
-
attr_accessor :type
|
440
|
-
sig {
|
441
|
-
params(add_discount: ::Stripe::QuoteService::CreateParams::Line::Action::AddDiscount, add_item: ::Stripe::QuoteService::CreateParams::Line::Action::AddItem, add_metadata: T::Hash[String, String], remove_discount: ::Stripe::QuoteService::CreateParams::Line::Action::RemoveDiscount, remove_item: ::Stripe::QuoteService::CreateParams::Line::Action::RemoveItem, remove_metadata: T::Array[String], set_discounts: T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetDiscount], set_items: T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetItem], set_metadata: T.nilable(T::Hash[String, String]), type: String).void
|
442
|
-
}
|
443
|
-
def initialize(
|
444
|
-
add_discount: nil,
|
445
|
-
add_item: nil,
|
446
|
-
add_metadata: nil,
|
447
|
-
remove_discount: nil,
|
448
|
-
remove_item: nil,
|
449
|
-
remove_metadata: nil,
|
450
|
-
set_discounts: nil,
|
451
|
-
set_items: nil,
|
452
|
-
set_metadata: nil,
|
453
|
-
type: nil
|
454
|
-
); end
|
455
|
-
end
|
456
|
-
class AppliesTo < Stripe::RequestParams
|
457
|
-
# 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.
|
458
|
-
sig { returns(String) }
|
459
|
-
attr_accessor :new_reference
|
460
|
-
# The ID of the schedule the line applies to.
|
461
|
-
sig { returns(String) }
|
462
|
-
attr_accessor :subscription_schedule
|
463
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
464
|
-
sig { returns(String) }
|
465
|
-
attr_accessor :type
|
466
|
-
sig { params(new_reference: String, subscription_schedule: String, type: String).void }
|
467
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
|
468
|
-
end
|
469
|
-
class CancelSubscriptionSchedule < Stripe::RequestParams
|
470
|
-
# Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
471
|
-
sig { returns(String) }
|
472
|
-
attr_accessor :cancel_at
|
473
|
-
# 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`.
|
474
|
-
sig { returns(T::Boolean) }
|
475
|
-
attr_accessor :invoice_now
|
476
|
-
# If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
477
|
-
sig { returns(T::Boolean) }
|
478
|
-
attr_accessor :prorate
|
479
|
-
sig { params(cancel_at: String, invoice_now: T::Boolean, prorate: T::Boolean).void }
|
480
|
-
def initialize(cancel_at: nil, invoice_now: nil, prorate: nil); end
|
481
|
-
end
|
482
|
-
class EndsAt < Stripe::RequestParams
|
483
|
-
class DiscountEnd < Stripe::RequestParams
|
484
|
-
# The ID of a specific discount.
|
485
|
-
sig { returns(String) }
|
486
|
-
attr_accessor :discount
|
487
|
-
sig { params(discount: String).void }
|
488
|
-
def initialize(discount: nil); end
|
489
|
-
end
|
490
|
-
class Duration < Stripe::RequestParams
|
491
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
492
|
-
sig { returns(String) }
|
493
|
-
attr_accessor :interval
|
494
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
495
|
-
sig { returns(Integer) }
|
496
|
-
attr_accessor :interval_count
|
497
|
-
sig { params(interval: String, interval_count: Integer).void }
|
498
|
-
def initialize(interval: nil, interval_count: nil); end
|
499
|
-
end
|
500
|
-
# Use the `end` time of a given discount.
|
501
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::EndsAt::DiscountEnd) }
|
502
|
-
attr_accessor :discount_end
|
503
|
-
# Time span for the quote line starting from the `starts_at` date.
|
504
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::EndsAt::Duration) }
|
505
|
-
attr_accessor :duration
|
506
|
-
# A precise Unix timestamp.
|
507
|
-
sig { returns(Integer) }
|
508
|
-
attr_accessor :timestamp
|
509
|
-
# Select a way to pass in `ends_at`.
|
510
|
-
sig { returns(String) }
|
511
|
-
attr_accessor :type
|
512
|
-
sig {
|
513
|
-
params(discount_end: ::Stripe::QuoteService::CreateParams::Line::EndsAt::DiscountEnd, duration: ::Stripe::QuoteService::CreateParams::Line::EndsAt::Duration, timestamp: Integer, type: String).void
|
514
|
-
}
|
515
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end
|
516
|
-
end
|
517
|
-
class SetPauseCollection < Stripe::RequestParams
|
518
|
-
class Set < Stripe::RequestParams
|
519
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
520
|
-
sig { returns(String) }
|
521
|
-
attr_accessor :behavior
|
522
|
-
sig { params(behavior: String).void }
|
523
|
-
def initialize(behavior: nil); end
|
524
|
-
end
|
525
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
526
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::SetPauseCollection::Set) }
|
527
|
-
attr_accessor :set
|
528
|
-
# Determines the type of the pause_collection amendment.
|
529
|
-
sig { returns(String) }
|
530
|
-
attr_accessor :type
|
531
|
-
sig {
|
532
|
-
params(set: ::Stripe::QuoteService::CreateParams::Line::SetPauseCollection::Set, type: String).void
|
533
|
-
}
|
534
|
-
def initialize(set: nil, type: nil); end
|
535
|
-
end
|
536
|
-
class StartsAt < Stripe::RequestParams
|
537
|
-
class DiscountEnd < Stripe::RequestParams
|
538
|
-
# The ID of a specific discount.
|
539
|
-
sig { returns(String) }
|
540
|
-
attr_accessor :discount
|
541
|
-
sig { params(discount: String).void }
|
542
|
-
def initialize(discount: nil); end
|
543
|
-
end
|
544
|
-
class LineEndsAt < Stripe::RequestParams
|
545
|
-
# 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.
|
546
|
-
sig { returns(Integer) }
|
547
|
-
attr_accessor :index
|
548
|
-
sig { params(index: Integer).void }
|
549
|
-
def initialize(index: nil); end
|
550
|
-
end
|
551
|
-
# Use the `end` time of a given discount.
|
552
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::StartsAt::DiscountEnd) }
|
553
|
-
attr_accessor :discount_end
|
554
|
-
# The timestamp the given line ends at.
|
555
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::StartsAt::LineEndsAt) }
|
556
|
-
attr_accessor :line_ends_at
|
557
|
-
# A precise Unix timestamp.
|
558
|
-
sig { returns(Integer) }
|
559
|
-
attr_accessor :timestamp
|
560
|
-
# Select a way to pass in `starts_at`.
|
561
|
-
sig { returns(String) }
|
562
|
-
attr_accessor :type
|
563
|
-
sig {
|
564
|
-
params(discount_end: ::Stripe::QuoteService::CreateParams::Line::StartsAt::DiscountEnd, line_ends_at: ::Stripe::QuoteService::CreateParams::Line::StartsAt::LineEndsAt, timestamp: Integer, type: String).void
|
565
|
-
}
|
566
|
-
def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil); end
|
567
|
-
end
|
568
|
-
class TrialSettings < Stripe::RequestParams
|
569
|
-
class EndBehavior < Stripe::RequestParams
|
570
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
571
|
-
sig { returns(String) }
|
572
|
-
attr_accessor :prorate_up_front
|
573
|
-
sig { params(prorate_up_front: String).void }
|
574
|
-
def initialize(prorate_up_front: nil); end
|
575
|
-
end
|
576
|
-
# Defines how the subscription should behave when a trial ends.
|
577
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::TrialSettings::EndBehavior) }
|
578
|
-
attr_accessor :end_behavior
|
579
|
-
sig {
|
580
|
-
params(end_behavior: ::Stripe::QuoteService::CreateParams::Line::TrialSettings::EndBehavior).void
|
581
|
-
}
|
582
|
-
def initialize(end_behavior: nil); end
|
583
|
-
end
|
584
|
-
# An array of operations the quote line performs.
|
585
|
-
sig { returns(T::Array[::Stripe::QuoteService::CreateParams::Line::Action]) }
|
586
|
-
attr_accessor :actions
|
587
|
-
# Details to identify the subscription schedule the quote line applies to.
|
588
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::AppliesTo) }
|
589
|
-
attr_accessor :applies_to
|
590
|
-
# 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.
|
591
|
-
sig { returns(String) }
|
592
|
-
attr_accessor :billing_cycle_anchor
|
593
|
-
# 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.
|
594
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::CancelSubscriptionSchedule) }
|
595
|
-
attr_accessor :cancel_subscription_schedule
|
596
|
-
# 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.
|
597
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::EndsAt) }
|
598
|
-
attr_accessor :ends_at
|
599
|
-
# 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.
|
600
|
-
sig { returns(String) }
|
601
|
-
attr_accessor :proration_behavior
|
602
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
603
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::SetPauseCollection) }
|
604
|
-
attr_accessor :set_pause_collection
|
605
|
-
# Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
606
|
-
sig { returns(String) }
|
607
|
-
attr_accessor :set_schedule_end
|
608
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
609
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::StartsAt) }
|
610
|
-
attr_accessor :starts_at
|
611
|
-
# Settings related to subscription trials.
|
612
|
-
sig { returns(::Stripe::QuoteService::CreateParams::Line::TrialSettings) }
|
613
|
-
attr_accessor :trial_settings
|
614
|
-
sig {
|
615
|
-
params(actions: T::Array[::Stripe::QuoteService::CreateParams::Line::Action], applies_to: ::Stripe::QuoteService::CreateParams::Line::AppliesTo, billing_cycle_anchor: String, cancel_subscription_schedule: ::Stripe::QuoteService::CreateParams::Line::CancelSubscriptionSchedule, ends_at: ::Stripe::QuoteService::CreateParams::Line::EndsAt, proration_behavior: String, set_pause_collection: ::Stripe::QuoteService::CreateParams::Line::SetPauseCollection, set_schedule_end: String, starts_at: ::Stripe::QuoteService::CreateParams::Line::StartsAt, trial_settings: ::Stripe::QuoteService::CreateParams::Line::TrialSettings).void
|
616
|
-
}
|
617
|
-
def initialize(
|
618
|
-
actions: nil,
|
619
|
-
applies_to: nil,
|
620
|
-
billing_cycle_anchor: nil,
|
621
|
-
cancel_subscription_schedule: nil,
|
622
|
-
ends_at: nil,
|
623
|
-
proration_behavior: nil,
|
624
|
-
set_pause_collection: nil,
|
625
|
-
set_schedule_end: nil,
|
626
|
-
starts_at: nil,
|
627
|
-
trial_settings: nil
|
628
|
-
); end
|
629
|
-
end
|
630
114
|
class LineItem < Stripe::RequestParams
|
631
115
|
class Discount < Stripe::RequestParams
|
632
|
-
class DiscountEnd < Stripe::RequestParams
|
633
|
-
class Duration < Stripe::RequestParams
|
634
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
635
|
-
sig { returns(String) }
|
636
|
-
attr_accessor :interval
|
637
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
638
|
-
sig { returns(Integer) }
|
639
|
-
attr_accessor :interval_count
|
640
|
-
sig { params(interval: String, interval_count: Integer).void }
|
641
|
-
def initialize(interval: nil, interval_count: nil); end
|
642
|
-
end
|
643
|
-
# Time span for the redeemed discount.
|
644
|
-
sig {
|
645
|
-
returns(::Stripe::QuoteService::CreateParams::LineItem::Discount::DiscountEnd::Duration)
|
646
|
-
}
|
647
|
-
attr_accessor :duration
|
648
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
649
|
-
sig { returns(Integer) }
|
650
|
-
attr_accessor :timestamp
|
651
|
-
# The type of calculation made to determine when the discount ends.
|
652
|
-
sig { returns(String) }
|
653
|
-
attr_accessor :type
|
654
|
-
sig {
|
655
|
-
params(duration: ::Stripe::QuoteService::CreateParams::LineItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
656
|
-
}
|
657
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
658
|
-
end
|
659
116
|
# ID of the coupon to create a new discount for.
|
660
|
-
sig { returns(String) }
|
117
|
+
sig { returns(T.nilable(String)) }
|
661
118
|
attr_accessor :coupon
|
662
119
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
663
|
-
sig { returns(String) }
|
120
|
+
sig { returns(T.nilable(String)) }
|
664
121
|
attr_accessor :discount
|
665
|
-
# Details to determine how long the discount should be applied for.
|
666
|
-
sig { returns(::Stripe::QuoteService::CreateParams::LineItem::Discount::DiscountEnd) }
|
667
|
-
attr_accessor :discount_end
|
668
122
|
# ID of the promotion code to create a new discount for.
|
669
|
-
sig { returns(String) }
|
123
|
+
sig { returns(T.nilable(String)) }
|
670
124
|
attr_accessor :promotion_code
|
671
125
|
sig {
|
672
|
-
params(coupon: String, discount: String,
|
126
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
673
127
|
}
|
674
|
-
def initialize(coupon: nil, discount: nil,
|
128
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
675
129
|
end
|
676
130
|
class PriceData < Stripe::RequestParams
|
677
131
|
class Recurring < Stripe::RequestParams
|
@@ -679,31 +133,33 @@ module Stripe
|
|
679
133
|
sig { returns(String) }
|
680
134
|
attr_accessor :interval
|
681
135
|
# 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).
|
682
|
-
sig { returns(Integer) }
|
136
|
+
sig { returns(T.nilable(Integer)) }
|
683
137
|
attr_accessor :interval_count
|
684
|
-
sig { params(interval: String, interval_count: Integer).void }
|
138
|
+
sig { params(interval: String, interval_count: T.nilable(Integer)).void }
|
685
139
|
def initialize(interval: nil, interval_count: nil); end
|
686
140
|
end
|
687
141
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
688
142
|
sig { returns(String) }
|
689
143
|
attr_accessor :currency
|
690
|
-
# The ID of the
|
144
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
691
145
|
sig { returns(String) }
|
692
146
|
attr_accessor :product
|
693
147
|
# The recurring components of a price such as `interval` and `interval_count`.
|
694
|
-
sig {
|
148
|
+
sig {
|
149
|
+
returns(T.nilable(::Stripe::QuoteService::CreateParams::LineItem::PriceData::Recurring))
|
150
|
+
}
|
695
151
|
attr_accessor :recurring
|
696
152
|
# 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.
|
697
|
-
sig { returns(String) }
|
153
|
+
sig { returns(T.nilable(String)) }
|
698
154
|
attr_accessor :tax_behavior
|
699
155
|
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
700
|
-
sig { returns(Integer) }
|
156
|
+
sig { returns(T.nilable(Integer)) }
|
701
157
|
attr_accessor :unit_amount
|
702
158
|
# 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.
|
703
|
-
sig { returns(String) }
|
159
|
+
sig { returns(T.nilable(String)) }
|
704
160
|
attr_accessor :unit_amount_decimal
|
705
161
|
sig {
|
706
|
-
params(currency: String, product: String, recurring: ::Stripe::QuoteService::CreateParams::LineItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
|
162
|
+
params(currency: String, product: String, recurring: T.nilable(::Stripe::QuoteService::CreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
707
163
|
}
|
708
164
|
def initialize(
|
709
165
|
currency: nil,
|
@@ -716,23 +172,23 @@ module Stripe
|
|
716
172
|
end
|
717
173
|
# The discounts applied to this line item.
|
718
174
|
sig {
|
719
|
-
returns(T.nilable(T::Array[::Stripe::QuoteService::CreateParams::LineItem::Discount]))
|
175
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::QuoteService::CreateParams::LineItem::Discount]))))
|
720
176
|
}
|
721
177
|
attr_accessor :discounts
|
722
178
|
# The ID of the price object. One of `price` or `price_data` is required.
|
723
|
-
sig { returns(String) }
|
179
|
+
sig { returns(T.nilable(String)) }
|
724
180
|
attr_accessor :price
|
725
181
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
726
|
-
sig { returns(::Stripe::QuoteService::CreateParams::LineItem::PriceData) }
|
182
|
+
sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::LineItem::PriceData)) }
|
727
183
|
attr_accessor :price_data
|
728
184
|
# The quantity of the line item.
|
729
|
-
sig { returns(Integer) }
|
185
|
+
sig { returns(T.nilable(Integer)) }
|
730
186
|
attr_accessor :quantity
|
731
187
|
# 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.
|
732
|
-
sig { returns(T.nilable(T::Array[String])) }
|
188
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
733
189
|
attr_accessor :tax_rates
|
734
190
|
sig {
|
735
|
-
params(discounts: T.nilable(T::Array[::Stripe::QuoteService::CreateParams::LineItem::Discount]), price: String, price_data: ::Stripe::QuoteService::CreateParams::LineItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
|
191
|
+
params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::QuoteService::CreateParams::LineItem::Discount]))), price: T.nilable(String), price_data: T.nilable(::Stripe::QuoteService::CreateParams::LineItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
736
192
|
}
|
737
193
|
def initialize(
|
738
194
|
discounts: nil,
|
@@ -743,384 +199,111 @@ module Stripe
|
|
743
199
|
); end
|
744
200
|
end
|
745
201
|
class SubscriptionData < Stripe::RequestParams
|
746
|
-
class BillOnAcceptance < Stripe::RequestParams
|
747
|
-
class BillFrom < Stripe::RequestParams
|
748
|
-
class LineStartsAt < Stripe::RequestParams
|
749
|
-
# The ID of a quote line.
|
750
|
-
sig { returns(String) }
|
751
|
-
attr_accessor :id
|
752
|
-
# 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.
|
753
|
-
sig { returns(Integer) }
|
754
|
-
attr_accessor :index
|
755
|
-
sig { params(id: String, index: Integer).void }
|
756
|
-
def initialize(id: nil, index: nil); end
|
757
|
-
end
|
758
|
-
# Details of a Quote line to start the bill period from.
|
759
|
-
sig {
|
760
|
-
returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt)
|
761
|
-
}
|
762
|
-
attr_accessor :line_starts_at
|
763
|
-
# A precise Unix timestamp.
|
764
|
-
sig { returns(Integer) }
|
765
|
-
attr_accessor :timestamp
|
766
|
-
# The type of method to specify the `bill_from` time.
|
767
|
-
sig { returns(String) }
|
768
|
-
attr_accessor :type
|
769
|
-
sig {
|
770
|
-
params(line_starts_at: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
|
771
|
-
}
|
772
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
|
773
|
-
end
|
774
|
-
class BillUntil < Stripe::RequestParams
|
775
|
-
class Duration < Stripe::RequestParams
|
776
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
777
|
-
sig { returns(String) }
|
778
|
-
attr_accessor :interval
|
779
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
780
|
-
sig { returns(Integer) }
|
781
|
-
attr_accessor :interval_count
|
782
|
-
sig { params(interval: String, interval_count: Integer).void }
|
783
|
-
def initialize(interval: nil, interval_count: nil); end
|
784
|
-
end
|
785
|
-
class LineEndsAt < Stripe::RequestParams
|
786
|
-
# The ID of a quote line.
|
787
|
-
sig { returns(String) }
|
788
|
-
attr_accessor :id
|
789
|
-
# 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.
|
790
|
-
sig { returns(Integer) }
|
791
|
-
attr_accessor :index
|
792
|
-
sig { params(id: String, index: Integer).void }
|
793
|
-
def initialize(id: nil, index: nil); end
|
794
|
-
end
|
795
|
-
# Details of the duration over which to bill.
|
796
|
-
sig {
|
797
|
-
returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration)
|
798
|
-
}
|
799
|
-
attr_accessor :duration
|
800
|
-
# Details of a Quote line item from which to bill until.
|
801
|
-
sig {
|
802
|
-
returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt)
|
803
|
-
}
|
804
|
-
attr_accessor :line_ends_at
|
805
|
-
# A precise Unix timestamp.
|
806
|
-
sig { returns(Integer) }
|
807
|
-
attr_accessor :timestamp
|
808
|
-
# The type of method to specify the `bill_until` time.
|
809
|
-
sig { returns(String) }
|
810
|
-
attr_accessor :type
|
811
|
-
sig {
|
812
|
-
params(duration: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
|
813
|
-
}
|
814
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
|
815
|
-
end
|
816
|
-
# The start of the period to bill from when the Quote is accepted.
|
817
|
-
sig {
|
818
|
-
returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom)
|
819
|
-
}
|
820
|
-
attr_accessor :bill_from
|
821
|
-
# The end of the period to bill until when the Quote is accepted.
|
822
|
-
sig {
|
823
|
-
returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil)
|
824
|
-
}
|
825
|
-
attr_accessor :bill_until
|
826
|
-
sig {
|
827
|
-
params(bill_from: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom, bill_until: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil).void
|
828
|
-
}
|
829
|
-
def initialize(bill_from: nil, bill_until: nil); end
|
830
|
-
end
|
831
|
-
class Prebilling < Stripe::RequestParams
|
832
|
-
# This is used to determine the number of billing cycles to prebill.
|
833
|
-
sig { returns(Integer) }
|
834
|
-
attr_accessor :iterations
|
835
|
-
sig { params(iterations: Integer).void }
|
836
|
-
def initialize(iterations: nil); end
|
837
|
-
end
|
838
|
-
# Describes the period to bill for upon accepting the quote.
|
839
|
-
sig { returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance) }
|
840
|
-
attr_accessor :bill_on_acceptance
|
841
|
-
# 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.
|
842
|
-
sig { returns(String) }
|
843
|
-
attr_accessor :billing_behavior
|
844
|
-
# When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
845
|
-
sig { returns(T.nilable(String)) }
|
846
|
-
attr_accessor :billing_cycle_anchor
|
847
202
|
# 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.
|
848
|
-
sig { returns(String) }
|
203
|
+
sig { returns(T.nilable(String)) }
|
849
204
|
attr_accessor :description
|
850
205
|
# 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.
|
851
|
-
sig { returns(T.nilable(T.any(String, Integer))) }
|
206
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) }
|
852
207
|
attr_accessor :effective_date
|
853
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
854
|
-
sig { returns(String) }
|
855
|
-
attr_accessor :end_behavior
|
856
|
-
# 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.
|
857
|
-
sig { returns(String) }
|
858
|
-
attr_accessor :from_subscription
|
859
208
|
# 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.
|
860
|
-
sig { returns(T::Hash[String, String]) }
|
209
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
861
210
|
attr_accessor :metadata
|
862
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
863
|
-
sig {
|
864
|
-
returns(T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData::Prebilling))
|
865
|
-
}
|
866
|
-
attr_accessor :prebilling
|
867
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
868
|
-
#
|
869
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
870
|
-
#
|
871
|
-
# 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`.
|
872
|
-
#
|
873
|
-
# Prorations can be disabled by passing `none`.
|
874
|
-
sig { returns(String) }
|
875
|
-
attr_accessor :proration_behavior
|
876
211
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
877
|
-
sig { returns(T.nilable(Integer)) }
|
212
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
878
213
|
attr_accessor :trial_period_days
|
879
214
|
sig {
|
880
|
-
params(
|
215
|
+
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
|
881
216
|
}
|
882
217
|
def initialize(
|
883
|
-
bill_on_acceptance: nil,
|
884
|
-
billing_behavior: nil,
|
885
|
-
billing_cycle_anchor: nil,
|
886
218
|
description: nil,
|
887
219
|
effective_date: nil,
|
888
|
-
end_behavior: nil,
|
889
|
-
from_subscription: nil,
|
890
220
|
metadata: nil,
|
891
|
-
prebilling: nil,
|
892
|
-
proration_behavior: nil,
|
893
221
|
trial_period_days: nil
|
894
222
|
); end
|
895
223
|
end
|
896
|
-
class SubscriptionDataOverride < Stripe::RequestParams
|
897
|
-
class AppliesTo < Stripe::RequestParams
|
898
|
-
# 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.
|
899
|
-
sig { returns(String) }
|
900
|
-
attr_accessor :new_reference
|
901
|
-
# The ID of the schedule the line applies to.
|
902
|
-
sig { returns(String) }
|
903
|
-
attr_accessor :subscription_schedule
|
904
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
905
|
-
sig { returns(String) }
|
906
|
-
attr_accessor :type
|
907
|
-
sig { params(new_reference: String, subscription_schedule: String, type: String).void }
|
908
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
|
909
|
-
end
|
910
|
-
class BillOnAcceptance < Stripe::RequestParams
|
911
|
-
class BillFrom < Stripe::RequestParams
|
912
|
-
class LineStartsAt < Stripe::RequestParams
|
913
|
-
# The ID of a quote line.
|
914
|
-
sig { returns(String) }
|
915
|
-
attr_accessor :id
|
916
|
-
# 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.
|
917
|
-
sig { returns(Integer) }
|
918
|
-
attr_accessor :index
|
919
|
-
sig { params(id: String, index: Integer).void }
|
920
|
-
def initialize(id: nil, index: nil); end
|
921
|
-
end
|
922
|
-
# Details of a Quote line to start the bill period from.
|
923
|
-
sig {
|
924
|
-
returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt)
|
925
|
-
}
|
926
|
-
attr_accessor :line_starts_at
|
927
|
-
# A precise Unix timestamp.
|
928
|
-
sig { returns(Integer) }
|
929
|
-
attr_accessor :timestamp
|
930
|
-
# The type of method to specify the `bill_from` time.
|
931
|
-
sig { returns(String) }
|
932
|
-
attr_accessor :type
|
933
|
-
sig {
|
934
|
-
params(line_starts_at: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
|
935
|
-
}
|
936
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
|
937
|
-
end
|
938
|
-
class BillUntil < Stripe::RequestParams
|
939
|
-
class Duration < Stripe::RequestParams
|
940
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
941
|
-
sig { returns(String) }
|
942
|
-
attr_accessor :interval
|
943
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
944
|
-
sig { returns(Integer) }
|
945
|
-
attr_accessor :interval_count
|
946
|
-
sig { params(interval: String, interval_count: Integer).void }
|
947
|
-
def initialize(interval: nil, interval_count: nil); end
|
948
|
-
end
|
949
|
-
class LineEndsAt < Stripe::RequestParams
|
950
|
-
# The ID of a quote line.
|
951
|
-
sig { returns(String) }
|
952
|
-
attr_accessor :id
|
953
|
-
# 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.
|
954
|
-
sig { returns(Integer) }
|
955
|
-
attr_accessor :index
|
956
|
-
sig { params(id: String, index: Integer).void }
|
957
|
-
def initialize(id: nil, index: nil); end
|
958
|
-
end
|
959
|
-
# Details of the duration over which to bill.
|
960
|
-
sig {
|
961
|
-
returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration)
|
962
|
-
}
|
963
|
-
attr_accessor :duration
|
964
|
-
# Details of a Quote line item from which to bill until.
|
965
|
-
sig {
|
966
|
-
returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt)
|
967
|
-
}
|
968
|
-
attr_accessor :line_ends_at
|
969
|
-
# A precise Unix timestamp.
|
970
|
-
sig { returns(Integer) }
|
971
|
-
attr_accessor :timestamp
|
972
|
-
# The type of method to specify the `bill_until` time.
|
973
|
-
sig { returns(String) }
|
974
|
-
attr_accessor :type
|
975
|
-
sig {
|
976
|
-
params(duration: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
|
977
|
-
}
|
978
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
|
979
|
-
end
|
980
|
-
# The start of the period to bill from when the Quote is accepted.
|
981
|
-
sig {
|
982
|
-
returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom)
|
983
|
-
}
|
984
|
-
attr_accessor :bill_from
|
985
|
-
# The end of the period to bill until when the Quote is accepted.
|
986
|
-
sig {
|
987
|
-
returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil)
|
988
|
-
}
|
989
|
-
attr_accessor :bill_until
|
990
|
-
sig {
|
991
|
-
params(bill_from: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom, bill_until: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil).void
|
992
|
-
}
|
993
|
-
def initialize(bill_from: nil, bill_until: nil); end
|
994
|
-
end
|
995
|
-
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
996
|
-
sig { returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::AppliesTo) }
|
997
|
-
attr_accessor :applies_to
|
998
|
-
# Describes the period to bill for upon accepting the quote.
|
999
|
-
sig {
|
1000
|
-
returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance)
|
1001
|
-
}
|
1002
|
-
attr_accessor :bill_on_acceptance
|
1003
|
-
# 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.
|
1004
|
-
sig { returns(String) }
|
1005
|
-
attr_accessor :billing_behavior
|
1006
|
-
# The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
|
1007
|
-
sig { returns(String) }
|
1008
|
-
attr_accessor :customer
|
1009
|
-
# 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.
|
1010
|
-
sig { returns(String) }
|
1011
|
-
attr_accessor :description
|
1012
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
1013
|
-
sig { returns(String) }
|
1014
|
-
attr_accessor :end_behavior
|
1015
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
1016
|
-
#
|
1017
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
1018
|
-
#
|
1019
|
-
# 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`.
|
1020
|
-
#
|
1021
|
-
# Prorations can be disabled by passing `none`.
|
1022
|
-
sig { returns(String) }
|
1023
|
-
attr_accessor :proration_behavior
|
1024
|
-
sig {
|
1025
|
-
params(applies_to: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::AppliesTo, bill_on_acceptance: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance, billing_behavior: String, customer: String, description: String, end_behavior: String, proration_behavior: String).void
|
1026
|
-
}
|
1027
|
-
def initialize(
|
1028
|
-
applies_to: nil,
|
1029
|
-
bill_on_acceptance: nil,
|
1030
|
-
billing_behavior: nil,
|
1031
|
-
customer: nil,
|
1032
|
-
description: nil,
|
1033
|
-
end_behavior: nil,
|
1034
|
-
proration_behavior: nil
|
1035
|
-
); end
|
1036
|
-
end
|
1037
224
|
class TransferData < Stripe::RequestParams
|
1038
225
|
# 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.
|
1039
|
-
sig { returns(Integer) }
|
226
|
+
sig { returns(T.nilable(Integer)) }
|
1040
227
|
attr_accessor :amount
|
1041
228
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
|
1042
|
-
sig { returns(Float) }
|
229
|
+
sig { returns(T.nilable(Float)) }
|
1043
230
|
attr_accessor :amount_percent
|
1044
231
|
# ID of an existing, connected Stripe account.
|
1045
232
|
sig { returns(String) }
|
1046
233
|
attr_accessor :destination
|
1047
|
-
sig {
|
234
|
+
sig {
|
235
|
+
params(amount: T.nilable(Integer), amount_percent: T.nilable(Float), destination: String).void
|
236
|
+
}
|
1048
237
|
def initialize(amount: nil, amount_percent: nil, destination: nil); end
|
1049
238
|
end
|
1050
|
-
# Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
1051
|
-
sig { returns(T::Boolean) }
|
1052
|
-
attr_accessor :allow_backdated_lines
|
1053
239
|
# 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.
|
1054
|
-
sig { returns(T.nilable(Integer)) }
|
240
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
1055
241
|
attr_accessor :application_fee_amount
|
1056
242
|
# 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.
|
1057
|
-
sig { returns(T.nilable(Float)) }
|
243
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
|
1058
244
|
attr_accessor :application_fee_percent
|
1059
245
|
# Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
|
1060
|
-
sig { returns(::Stripe::QuoteService::CreateParams::AutomaticTax) }
|
246
|
+
sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::AutomaticTax)) }
|
1061
247
|
attr_accessor :automatic_tax
|
1062
248
|
# 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`.
|
1063
|
-
sig { returns(String) }
|
249
|
+
sig { returns(T.nilable(String)) }
|
1064
250
|
attr_accessor :collection_method
|
1065
251
|
# The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
1066
|
-
sig { returns(String) }
|
252
|
+
sig { returns(T.nilable(String)) }
|
1067
253
|
attr_accessor :customer
|
1068
254
|
# The tax rates that will apply to any line item that does not have `tax_rates` set.
|
1069
|
-
sig { returns(T.nilable(T::Array[String])) }
|
255
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1070
256
|
attr_accessor :default_tax_rates
|
1071
257
|
# 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.
|
1072
|
-
sig { returns(T.nilable(String)) }
|
258
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1073
259
|
attr_accessor :description
|
1074
260
|
# The discounts applied to the quote.
|
1075
|
-
sig {
|
261
|
+
sig {
|
262
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::QuoteService::CreateParams::Discount]))))
|
263
|
+
}
|
1076
264
|
attr_accessor :discounts
|
1077
265
|
# Specifies which fields in the response should be expanded.
|
1078
|
-
sig { returns(T::Array[String]) }
|
266
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1079
267
|
attr_accessor :expand
|
1080
268
|
# 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.
|
1081
|
-
sig { returns(Integer) }
|
269
|
+
sig { returns(T.nilable(Integer)) }
|
1082
270
|
attr_accessor :expires_at
|
1083
271
|
# 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.
|
1084
|
-
sig { returns(T.nilable(String)) }
|
272
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1085
273
|
attr_accessor :footer
|
1086
274
|
# 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`.
|
1087
|
-
sig { returns(::Stripe::QuoteService::CreateParams::FromQuote) }
|
275
|
+
sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::FromQuote)) }
|
1088
276
|
attr_accessor :from_quote
|
1089
277
|
# 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.
|
1090
|
-
sig { returns(T.nilable(String)) }
|
278
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1091
279
|
attr_accessor :header
|
1092
280
|
# All invoices will be billed using the specified settings.
|
1093
|
-
sig { returns(::Stripe::QuoteService::CreateParams::InvoiceSettings) }
|
281
|
+
sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::InvoiceSettings)) }
|
1094
282
|
attr_accessor :invoice_settings
|
1095
283
|
# 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.
|
1096
|
-
sig { returns(T::Array[::Stripe::QuoteService::CreateParams::LineItem]) }
|
284
|
+
sig { returns(T.nilable(T::Array[::Stripe::QuoteService::CreateParams::LineItem])) }
|
1097
285
|
attr_accessor :line_items
|
1098
|
-
# 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.
|
1099
|
-
sig { returns(T::Array[::Stripe::QuoteService::CreateParams::Line]) }
|
1100
|
-
attr_accessor :lines
|
1101
286
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1102
|
-
sig { returns(T::Hash[String, String]) }
|
287
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
1103
288
|
attr_accessor :metadata
|
1104
289
|
# The account on behalf of which to charge.
|
1105
|
-
sig { returns(T.nilable(String)) }
|
290
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1106
291
|
attr_accessor :on_behalf_of
|
1107
292
|
# 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.
|
1108
|
-
sig { returns(::Stripe::QuoteService::CreateParams::SubscriptionData) }
|
293
|
+
sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData)) }
|
1109
294
|
attr_accessor :subscription_data
|
1110
|
-
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
1111
|
-
sig { returns(T::Array[::Stripe::QuoteService::CreateParams::SubscriptionDataOverride]) }
|
1112
|
-
attr_accessor :subscription_data_overrides
|
1113
295
|
# ID of the test clock to attach to the quote.
|
1114
|
-
sig { returns(String) }
|
296
|
+
sig { returns(T.nilable(String)) }
|
1115
297
|
attr_accessor :test_clock
|
1116
298
|
# The data with which to automatically create a Transfer for each of the invoices.
|
1117
|
-
sig {
|
299
|
+
sig {
|
300
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::QuoteService::CreateParams::TransferData))))
|
301
|
+
}
|
1118
302
|
attr_accessor :transfer_data
|
1119
303
|
sig {
|
1120
|
-
params(
|
304
|
+
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::QuoteService::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::QuoteService::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer), footer: T.nilable(T.nilable(String)), from_quote: T.nilable(::Stripe::QuoteService::CreateParams::FromQuote), header: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::QuoteService::CreateParams::InvoiceSettings), line_items: T.nilable(T::Array[::Stripe::QuoteService::CreateParams::LineItem]), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(T.nilable(String)), subscription_data: T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData), test_clock: T.nilable(String), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::QuoteService::CreateParams::TransferData)))).void
|
1121
305
|
}
|
1122
306
|
def initialize(
|
1123
|
-
allow_backdated_lines: nil,
|
1124
307
|
application_fee_amount: nil,
|
1125
308
|
application_fee_percent: nil,
|
1126
309
|
automatic_tax: nil,
|
@@ -1136,643 +319,95 @@ module Stripe
|
|
1136
319
|
header: nil,
|
1137
320
|
invoice_settings: nil,
|
1138
321
|
line_items: nil,
|
1139
|
-
lines: nil,
|
1140
322
|
metadata: nil,
|
1141
323
|
on_behalf_of: nil,
|
1142
324
|
subscription_data: nil,
|
1143
|
-
subscription_data_overrides: nil,
|
1144
325
|
test_clock: nil,
|
1145
326
|
transfer_data: nil
|
1146
327
|
); end
|
1147
328
|
end
|
1148
329
|
class RetrieveParams < Stripe::RequestParams
|
1149
330
|
# Specifies which fields in the response should be expanded.
|
1150
|
-
sig { returns(T::Array[String]) }
|
331
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1151
332
|
attr_accessor :expand
|
1152
|
-
sig { params(expand: T::Array[String]).void }
|
333
|
+
sig { params(expand: T.nilable(T::Array[String])).void }
|
1153
334
|
def initialize(expand: nil); end
|
1154
335
|
end
|
1155
336
|
class UpdateParams < Stripe::RequestParams
|
1156
337
|
class AutomaticTax < Stripe::RequestParams
|
1157
338
|
class Liability < Stripe::RequestParams
|
1158
339
|
# The connected account being referenced when `type` is `account`.
|
1159
|
-
sig { returns(String) }
|
340
|
+
sig { returns(T.nilable(String)) }
|
1160
341
|
attr_accessor :account
|
1161
342
|
# Type of the account referenced in the request.
|
1162
343
|
sig { returns(String) }
|
1163
344
|
attr_accessor :type
|
1164
|
-
sig { params(account: String, type: String).void }
|
345
|
+
sig { params(account: T.nilable(String), type: String).void }
|
1165
346
|
def initialize(account: nil, type: nil); end
|
1166
347
|
end
|
1167
348
|
# Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
|
1168
349
|
sig { returns(T::Boolean) }
|
1169
350
|
attr_accessor :enabled
|
1170
351
|
# 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.
|
1171
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::AutomaticTax::Liability) }
|
352
|
+
sig { returns(T.nilable(::Stripe::QuoteService::UpdateParams::AutomaticTax::Liability)) }
|
1172
353
|
attr_accessor :liability
|
1173
354
|
sig {
|
1174
|
-
params(enabled: T::Boolean, liability: ::Stripe::QuoteService::UpdateParams::AutomaticTax::Liability).void
|
355
|
+
params(enabled: T::Boolean, liability: T.nilable(::Stripe::QuoteService::UpdateParams::AutomaticTax::Liability)).void
|
1175
356
|
}
|
1176
357
|
def initialize(enabled: nil, liability: nil); end
|
1177
358
|
end
|
1178
359
|
class Discount < Stripe::RequestParams
|
1179
|
-
class DiscountEnd < Stripe::RequestParams
|
1180
|
-
class Duration < Stripe::RequestParams
|
1181
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1182
|
-
sig { returns(String) }
|
1183
|
-
attr_accessor :interval
|
1184
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1185
|
-
sig { returns(Integer) }
|
1186
|
-
attr_accessor :interval_count
|
1187
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1188
|
-
def initialize(interval: nil, interval_count: nil); end
|
1189
|
-
end
|
1190
|
-
# Time span for the redeemed discount.
|
1191
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Discount::DiscountEnd::Duration) }
|
1192
|
-
attr_accessor :duration
|
1193
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1194
|
-
sig { returns(Integer) }
|
1195
|
-
attr_accessor :timestamp
|
1196
|
-
# The type of calculation made to determine when the discount ends.
|
1197
|
-
sig { returns(String) }
|
1198
|
-
attr_accessor :type
|
1199
|
-
sig {
|
1200
|
-
params(duration: ::Stripe::QuoteService::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
1201
|
-
}
|
1202
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
1203
|
-
end
|
1204
360
|
# ID of the coupon to create a new discount for.
|
1205
|
-
sig { returns(String) }
|
361
|
+
sig { returns(T.nilable(String)) }
|
1206
362
|
attr_accessor :coupon
|
1207
363
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1208
|
-
sig { returns(String) }
|
364
|
+
sig { returns(T.nilable(String)) }
|
1209
365
|
attr_accessor :discount
|
1210
|
-
# Details to determine how long the discount should be applied for.
|
1211
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Discount::DiscountEnd) }
|
1212
|
-
attr_accessor :discount_end
|
1213
366
|
# ID of the promotion code to create a new discount for.
|
1214
|
-
sig { returns(String) }
|
367
|
+
sig { returns(T.nilable(String)) }
|
1215
368
|
attr_accessor :promotion_code
|
1216
369
|
sig {
|
1217
|
-
params(coupon: String, discount: String,
|
370
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
1218
371
|
}
|
1219
|
-
def initialize(coupon: nil, discount: nil,
|
372
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
1220
373
|
end
|
1221
374
|
class InvoiceSettings < Stripe::RequestParams
|
1222
375
|
class Issuer < Stripe::RequestParams
|
1223
376
|
# The connected account being referenced when `type` is `account`.
|
1224
|
-
sig { returns(String) }
|
377
|
+
sig { returns(T.nilable(String)) }
|
1225
378
|
attr_accessor :account
|
1226
379
|
# Type of the account referenced in the request.
|
1227
380
|
sig { returns(String) }
|
1228
381
|
attr_accessor :type
|
1229
|
-
sig { params(account: String, type: String).void }
|
382
|
+
sig { params(account: T.nilable(String), type: String).void }
|
1230
383
|
def initialize(account: nil, type: nil); end
|
1231
384
|
end
|
1232
385
|
# 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`.
|
1233
|
-
sig { returns(Integer) }
|
386
|
+
sig { returns(T.nilable(Integer)) }
|
1234
387
|
attr_accessor :days_until_due
|
1235
388
|
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
1236
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::InvoiceSettings::Issuer) }
|
389
|
+
sig { returns(T.nilable(::Stripe::QuoteService::UpdateParams::InvoiceSettings::Issuer)) }
|
1237
390
|
attr_accessor :issuer
|
1238
391
|
sig {
|
1239
|
-
params(days_until_due: Integer, issuer: ::Stripe::QuoteService::UpdateParams::InvoiceSettings::Issuer).void
|
392
|
+
params(days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::QuoteService::UpdateParams::InvoiceSettings::Issuer)).void
|
1240
393
|
}
|
1241
394
|
def initialize(days_until_due: nil, issuer: nil); end
|
1242
395
|
end
|
1243
|
-
class Line < Stripe::RequestParams
|
1244
|
-
class Action < Stripe::RequestParams
|
1245
|
-
class AddDiscount < Stripe::RequestParams
|
1246
|
-
class DiscountEnd < Stripe::RequestParams
|
1247
|
-
# The type of calculation made to determine when the discount ends.
|
1248
|
-
sig { returns(String) }
|
1249
|
-
attr_accessor :type
|
1250
|
-
sig { params(type: String).void }
|
1251
|
-
def initialize(type: nil); end
|
1252
|
-
end
|
1253
|
-
# The coupon code to redeem.
|
1254
|
-
sig { returns(String) }
|
1255
|
-
attr_accessor :coupon
|
1256
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
1257
|
-
sig { returns(String) }
|
1258
|
-
attr_accessor :discount
|
1259
|
-
# Details to determine how long the discount should be applied for.
|
1260
|
-
sig {
|
1261
|
-
returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddDiscount::DiscountEnd)
|
1262
|
-
}
|
1263
|
-
attr_accessor :discount_end
|
1264
|
-
# 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.
|
1265
|
-
sig { returns(Integer) }
|
1266
|
-
attr_accessor :index
|
1267
|
-
# The promotion code to redeem.
|
1268
|
-
sig { returns(String) }
|
1269
|
-
attr_accessor :promotion_code
|
1270
|
-
sig {
|
1271
|
-
params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::UpdateParams::Line::Action::AddDiscount::DiscountEnd, index: Integer, promotion_code: String).void
|
1272
|
-
}
|
1273
|
-
def initialize(
|
1274
|
-
coupon: nil,
|
1275
|
-
discount: nil,
|
1276
|
-
discount_end: nil,
|
1277
|
-
index: nil,
|
1278
|
-
promotion_code: nil
|
1279
|
-
); end
|
1280
|
-
end
|
1281
|
-
class AddItem < Stripe::RequestParams
|
1282
|
-
class Discount < Stripe::RequestParams
|
1283
|
-
class DiscountEnd < Stripe::RequestParams
|
1284
|
-
class Duration < Stripe::RequestParams
|
1285
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1286
|
-
sig { returns(String) }
|
1287
|
-
attr_accessor :interval
|
1288
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1289
|
-
sig { returns(Integer) }
|
1290
|
-
attr_accessor :interval_count
|
1291
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1292
|
-
def initialize(interval: nil, interval_count: nil); end
|
1293
|
-
end
|
1294
|
-
# Time span for the redeemed discount.
|
1295
|
-
sig {
|
1296
|
-
returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration)
|
1297
|
-
}
|
1298
|
-
attr_accessor :duration
|
1299
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1300
|
-
sig { returns(Integer) }
|
1301
|
-
attr_accessor :timestamp
|
1302
|
-
# The type of calculation made to determine when the discount ends.
|
1303
|
-
sig { returns(String) }
|
1304
|
-
attr_accessor :type
|
1305
|
-
sig {
|
1306
|
-
params(duration: ::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
1307
|
-
}
|
1308
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
1309
|
-
end
|
1310
|
-
# ID of the coupon to create a new discount for.
|
1311
|
-
sig { returns(String) }
|
1312
|
-
attr_accessor :coupon
|
1313
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1314
|
-
sig { returns(String) }
|
1315
|
-
attr_accessor :discount
|
1316
|
-
# Details to determine how long the discount should be applied for.
|
1317
|
-
sig {
|
1318
|
-
returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd)
|
1319
|
-
}
|
1320
|
-
attr_accessor :discount_end
|
1321
|
-
# ID of the promotion code to create a new discount for.
|
1322
|
-
sig { returns(String) }
|
1323
|
-
attr_accessor :promotion_code
|
1324
|
-
sig {
|
1325
|
-
params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd, promotion_code: String).void
|
1326
|
-
}
|
1327
|
-
def initialize(
|
1328
|
-
coupon: nil,
|
1329
|
-
discount: nil,
|
1330
|
-
discount_end: nil,
|
1331
|
-
promotion_code: nil
|
1332
|
-
); end
|
1333
|
-
end
|
1334
|
-
class Trial < Stripe::RequestParams
|
1335
|
-
# 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.
|
1336
|
-
sig { returns(T::Array[String]) }
|
1337
|
-
attr_accessor :converts_to
|
1338
|
-
# Determines the type of trial for this item.
|
1339
|
-
sig { returns(String) }
|
1340
|
-
attr_accessor :type
|
1341
|
-
sig { params(converts_to: T::Array[String], type: String).void }
|
1342
|
-
def initialize(converts_to: nil, type: nil); end
|
1343
|
-
end
|
1344
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
1345
|
-
sig {
|
1346
|
-
returns(T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount])
|
1347
|
-
}
|
1348
|
-
attr_accessor :discounts
|
1349
|
-
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1350
|
-
sig { returns(T::Hash[String, String]) }
|
1351
|
-
attr_accessor :metadata
|
1352
|
-
# The ID of the price object.
|
1353
|
-
sig { returns(String) }
|
1354
|
-
attr_accessor :price
|
1355
|
-
# Quantity for this item.
|
1356
|
-
sig { returns(Integer) }
|
1357
|
-
attr_accessor :quantity
|
1358
|
-
# 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`.
|
1359
|
-
sig { returns(T::Array[String]) }
|
1360
|
-
attr_accessor :tax_rates
|
1361
|
-
# Options that configure the trial on the subscription item.
|
1362
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Trial) }
|
1363
|
-
attr_accessor :trial
|
1364
|
-
sig {
|
1365
|
-
params(discounts: T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Trial).void
|
1366
|
-
}
|
1367
|
-
def initialize(
|
1368
|
-
discounts: nil,
|
1369
|
-
metadata: nil,
|
1370
|
-
price: nil,
|
1371
|
-
quantity: nil,
|
1372
|
-
tax_rates: nil,
|
1373
|
-
trial: nil
|
1374
|
-
); end
|
1375
|
-
end
|
1376
|
-
class RemoveDiscount < Stripe::RequestParams
|
1377
|
-
# The coupon code to remove from the `discounts` array.
|
1378
|
-
sig { returns(String) }
|
1379
|
-
attr_accessor :coupon
|
1380
|
-
# The ID of a discount to remove from the `discounts` array.
|
1381
|
-
sig { returns(String) }
|
1382
|
-
attr_accessor :discount
|
1383
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
1384
|
-
sig { returns(String) }
|
1385
|
-
attr_accessor :promotion_code
|
1386
|
-
sig { params(coupon: String, discount: String, promotion_code: String).void }
|
1387
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
1388
|
-
end
|
1389
|
-
class RemoveItem < Stripe::RequestParams
|
1390
|
-
# ID of a price to remove.
|
1391
|
-
sig { returns(String) }
|
1392
|
-
attr_accessor :price
|
1393
|
-
sig { params(price: String).void }
|
1394
|
-
def initialize(price: nil); end
|
1395
|
-
end
|
1396
|
-
class SetDiscount < Stripe::RequestParams
|
1397
|
-
# The coupon code to replace the `discounts` array with.
|
1398
|
-
sig { returns(String) }
|
1399
|
-
attr_accessor :coupon
|
1400
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
1401
|
-
sig { returns(String) }
|
1402
|
-
attr_accessor :discount
|
1403
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
1404
|
-
sig { returns(String) }
|
1405
|
-
attr_accessor :promotion_code
|
1406
|
-
sig { params(coupon: String, discount: String, promotion_code: String).void }
|
1407
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
1408
|
-
end
|
1409
|
-
class SetItem < Stripe::RequestParams
|
1410
|
-
class Discount < Stripe::RequestParams
|
1411
|
-
class DiscountEnd < Stripe::RequestParams
|
1412
|
-
class Duration < Stripe::RequestParams
|
1413
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1414
|
-
sig { returns(String) }
|
1415
|
-
attr_accessor :interval
|
1416
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1417
|
-
sig { returns(Integer) }
|
1418
|
-
attr_accessor :interval_count
|
1419
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1420
|
-
def initialize(interval: nil, interval_count: nil); end
|
1421
|
-
end
|
1422
|
-
# Time span for the redeemed discount.
|
1423
|
-
sig {
|
1424
|
-
returns(::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration)
|
1425
|
-
}
|
1426
|
-
attr_accessor :duration
|
1427
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1428
|
-
sig { returns(Integer) }
|
1429
|
-
attr_accessor :timestamp
|
1430
|
-
# The type of calculation made to determine when the discount ends.
|
1431
|
-
sig { returns(String) }
|
1432
|
-
attr_accessor :type
|
1433
|
-
sig {
|
1434
|
-
params(duration: ::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
1435
|
-
}
|
1436
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
1437
|
-
end
|
1438
|
-
# ID of the coupon to create a new discount for.
|
1439
|
-
sig { returns(String) }
|
1440
|
-
attr_accessor :coupon
|
1441
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1442
|
-
sig { returns(String) }
|
1443
|
-
attr_accessor :discount
|
1444
|
-
# Details to determine how long the discount should be applied for.
|
1445
|
-
sig {
|
1446
|
-
returns(::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd)
|
1447
|
-
}
|
1448
|
-
attr_accessor :discount_end
|
1449
|
-
# ID of the promotion code to create a new discount for.
|
1450
|
-
sig { returns(String) }
|
1451
|
-
attr_accessor :promotion_code
|
1452
|
-
sig {
|
1453
|
-
params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd, promotion_code: String).void
|
1454
|
-
}
|
1455
|
-
def initialize(
|
1456
|
-
coupon: nil,
|
1457
|
-
discount: nil,
|
1458
|
-
discount_end: nil,
|
1459
|
-
promotion_code: nil
|
1460
|
-
); end
|
1461
|
-
end
|
1462
|
-
class Trial < Stripe::RequestParams
|
1463
|
-
# 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.
|
1464
|
-
sig { returns(T::Array[String]) }
|
1465
|
-
attr_accessor :converts_to
|
1466
|
-
# Determines the type of trial for this item.
|
1467
|
-
sig { returns(String) }
|
1468
|
-
attr_accessor :type
|
1469
|
-
sig { params(converts_to: T::Array[String], type: String).void }
|
1470
|
-
def initialize(converts_to: nil, type: nil); end
|
1471
|
-
end
|
1472
|
-
# 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`.
|
1473
|
-
sig {
|
1474
|
-
returns(T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount])
|
1475
|
-
}
|
1476
|
-
attr_accessor :discounts
|
1477
|
-
# 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`.
|
1478
|
-
sig { returns(T::Hash[String, String]) }
|
1479
|
-
attr_accessor :metadata
|
1480
|
-
# The ID of the price object.
|
1481
|
-
sig { returns(String) }
|
1482
|
-
attr_accessor :price
|
1483
|
-
# 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`.
|
1484
|
-
sig { returns(Integer) }
|
1485
|
-
attr_accessor :quantity
|
1486
|
-
# 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`.
|
1487
|
-
sig { returns(T::Array[String]) }
|
1488
|
-
attr_accessor :tax_rates
|
1489
|
-
# 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`.
|
1490
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Trial) }
|
1491
|
-
attr_accessor :trial
|
1492
|
-
sig {
|
1493
|
-
params(discounts: T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Trial).void
|
1494
|
-
}
|
1495
|
-
def initialize(
|
1496
|
-
discounts: nil,
|
1497
|
-
metadata: nil,
|
1498
|
-
price: nil,
|
1499
|
-
quantity: nil,
|
1500
|
-
tax_rates: nil,
|
1501
|
-
trial: nil
|
1502
|
-
); end
|
1503
|
-
end
|
1504
|
-
# Details for the `add_discount` type.
|
1505
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddDiscount) }
|
1506
|
-
attr_accessor :add_discount
|
1507
|
-
# Details for the `add_item` type.
|
1508
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddItem) }
|
1509
|
-
attr_accessor :add_item
|
1510
|
-
# Details for the `add_metadata` type: specify a hash of key-value pairs.
|
1511
|
-
sig { returns(T::Hash[String, String]) }
|
1512
|
-
attr_accessor :add_metadata
|
1513
|
-
# Details for the `remove_discount` type.
|
1514
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::RemoveDiscount) }
|
1515
|
-
attr_accessor :remove_discount
|
1516
|
-
# Details for the `remove_item` type.
|
1517
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::RemoveItem) }
|
1518
|
-
attr_accessor :remove_item
|
1519
|
-
# Details for the `remove_metadata` type: specify an array of metadata keys.
|
1520
|
-
sig { returns(T::Array[String]) }
|
1521
|
-
attr_accessor :remove_metadata
|
1522
|
-
# Details for the `set_discounts` type.
|
1523
|
-
sig { returns(T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetDiscount]) }
|
1524
|
-
attr_accessor :set_discounts
|
1525
|
-
# Details for the `set_items` type.
|
1526
|
-
sig { returns(T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetItem]) }
|
1527
|
-
attr_accessor :set_items
|
1528
|
-
# Details for the `set_metadata` type: specify an array of key-value pairs.
|
1529
|
-
sig { returns(T.nilable(T::Hash[String, String])) }
|
1530
|
-
attr_accessor :set_metadata
|
1531
|
-
# The type of action the quote line performs.
|
1532
|
-
sig { returns(String) }
|
1533
|
-
attr_accessor :type
|
1534
|
-
sig {
|
1535
|
-
params(add_discount: ::Stripe::QuoteService::UpdateParams::Line::Action::AddDiscount, add_item: ::Stripe::QuoteService::UpdateParams::Line::Action::AddItem, add_metadata: T::Hash[String, String], remove_discount: ::Stripe::QuoteService::UpdateParams::Line::Action::RemoveDiscount, remove_item: ::Stripe::QuoteService::UpdateParams::Line::Action::RemoveItem, remove_metadata: T::Array[String], set_discounts: T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetDiscount], set_items: T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetItem], set_metadata: T.nilable(T::Hash[String, String]), type: String).void
|
1536
|
-
}
|
1537
|
-
def initialize(
|
1538
|
-
add_discount: nil,
|
1539
|
-
add_item: nil,
|
1540
|
-
add_metadata: nil,
|
1541
|
-
remove_discount: nil,
|
1542
|
-
remove_item: nil,
|
1543
|
-
remove_metadata: nil,
|
1544
|
-
set_discounts: nil,
|
1545
|
-
set_items: nil,
|
1546
|
-
set_metadata: nil,
|
1547
|
-
type: nil
|
1548
|
-
); end
|
1549
|
-
end
|
1550
|
-
class AppliesTo < Stripe::RequestParams
|
1551
|
-
# 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.
|
1552
|
-
sig { returns(String) }
|
1553
|
-
attr_accessor :new_reference
|
1554
|
-
# The ID of the schedule the line applies to.
|
1555
|
-
sig { returns(String) }
|
1556
|
-
attr_accessor :subscription_schedule
|
1557
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
1558
|
-
sig { returns(String) }
|
1559
|
-
attr_accessor :type
|
1560
|
-
sig { params(new_reference: String, subscription_schedule: String, type: String).void }
|
1561
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
|
1562
|
-
end
|
1563
|
-
class CancelSubscriptionSchedule < Stripe::RequestParams
|
1564
|
-
# Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
1565
|
-
sig { returns(String) }
|
1566
|
-
attr_accessor :cancel_at
|
1567
|
-
# 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`.
|
1568
|
-
sig { returns(T::Boolean) }
|
1569
|
-
attr_accessor :invoice_now
|
1570
|
-
# If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
1571
|
-
sig { returns(T::Boolean) }
|
1572
|
-
attr_accessor :prorate
|
1573
|
-
sig { params(cancel_at: String, invoice_now: T::Boolean, prorate: T::Boolean).void }
|
1574
|
-
def initialize(cancel_at: nil, invoice_now: nil, prorate: nil); end
|
1575
|
-
end
|
1576
|
-
class EndsAt < Stripe::RequestParams
|
1577
|
-
class DiscountEnd < Stripe::RequestParams
|
1578
|
-
# The ID of a specific discount.
|
1579
|
-
sig { returns(String) }
|
1580
|
-
attr_accessor :discount
|
1581
|
-
sig { params(discount: String).void }
|
1582
|
-
def initialize(discount: nil); end
|
1583
|
-
end
|
1584
|
-
class Duration < Stripe::RequestParams
|
1585
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1586
|
-
sig { returns(String) }
|
1587
|
-
attr_accessor :interval
|
1588
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1589
|
-
sig { returns(Integer) }
|
1590
|
-
attr_accessor :interval_count
|
1591
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1592
|
-
def initialize(interval: nil, interval_count: nil); end
|
1593
|
-
end
|
1594
|
-
# Use the `end` time of a given discount.
|
1595
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::EndsAt::DiscountEnd) }
|
1596
|
-
attr_accessor :discount_end
|
1597
|
-
# Time span for the quote line starting from the `starts_at` date.
|
1598
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::EndsAt::Duration) }
|
1599
|
-
attr_accessor :duration
|
1600
|
-
# A precise Unix timestamp.
|
1601
|
-
sig { returns(Integer) }
|
1602
|
-
attr_accessor :timestamp
|
1603
|
-
# Select a way to pass in `ends_at`.
|
1604
|
-
sig { returns(String) }
|
1605
|
-
attr_accessor :type
|
1606
|
-
sig {
|
1607
|
-
params(discount_end: ::Stripe::QuoteService::UpdateParams::Line::EndsAt::DiscountEnd, duration: ::Stripe::QuoteService::UpdateParams::Line::EndsAt::Duration, timestamp: Integer, type: String).void
|
1608
|
-
}
|
1609
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end
|
1610
|
-
end
|
1611
|
-
class SetPauseCollection < Stripe::RequestParams
|
1612
|
-
class Set < Stripe::RequestParams
|
1613
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1614
|
-
sig { returns(String) }
|
1615
|
-
attr_accessor :behavior
|
1616
|
-
sig { params(behavior: String).void }
|
1617
|
-
def initialize(behavior: nil); end
|
1618
|
-
end
|
1619
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
1620
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::SetPauseCollection::Set) }
|
1621
|
-
attr_accessor :set
|
1622
|
-
# Determines the type of the pause_collection amendment.
|
1623
|
-
sig { returns(String) }
|
1624
|
-
attr_accessor :type
|
1625
|
-
sig {
|
1626
|
-
params(set: ::Stripe::QuoteService::UpdateParams::Line::SetPauseCollection::Set, type: String).void
|
1627
|
-
}
|
1628
|
-
def initialize(set: nil, type: nil); end
|
1629
|
-
end
|
1630
|
-
class StartsAt < Stripe::RequestParams
|
1631
|
-
class DiscountEnd < Stripe::RequestParams
|
1632
|
-
# The ID of a specific discount.
|
1633
|
-
sig { returns(String) }
|
1634
|
-
attr_accessor :discount
|
1635
|
-
sig { params(discount: String).void }
|
1636
|
-
def initialize(discount: nil); end
|
1637
|
-
end
|
1638
|
-
class LineEndsAt < Stripe::RequestParams
|
1639
|
-
# The ID of a quote line.
|
1640
|
-
sig { returns(String) }
|
1641
|
-
attr_accessor :id
|
1642
|
-
# 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.
|
1643
|
-
sig { returns(Integer) }
|
1644
|
-
attr_accessor :index
|
1645
|
-
sig { params(id: String, index: Integer).void }
|
1646
|
-
def initialize(id: nil, index: nil); end
|
1647
|
-
end
|
1648
|
-
# Use the `end` time of a given discount.
|
1649
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::StartsAt::DiscountEnd) }
|
1650
|
-
attr_accessor :discount_end
|
1651
|
-
# The timestamp the given line ends at.
|
1652
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::StartsAt::LineEndsAt) }
|
1653
|
-
attr_accessor :line_ends_at
|
1654
|
-
# A precise Unix timestamp.
|
1655
|
-
sig { returns(Integer) }
|
1656
|
-
attr_accessor :timestamp
|
1657
|
-
# Select a way to pass in `starts_at`.
|
1658
|
-
sig { returns(String) }
|
1659
|
-
attr_accessor :type
|
1660
|
-
sig {
|
1661
|
-
params(discount_end: ::Stripe::QuoteService::UpdateParams::Line::StartsAt::DiscountEnd, line_ends_at: ::Stripe::QuoteService::UpdateParams::Line::StartsAt::LineEndsAt, timestamp: Integer, type: String).void
|
1662
|
-
}
|
1663
|
-
def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil); end
|
1664
|
-
end
|
1665
|
-
class TrialSettings < Stripe::RequestParams
|
1666
|
-
class EndBehavior < Stripe::RequestParams
|
1667
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1668
|
-
sig { returns(String) }
|
1669
|
-
attr_accessor :prorate_up_front
|
1670
|
-
sig { params(prorate_up_front: String).void }
|
1671
|
-
def initialize(prorate_up_front: nil); end
|
1672
|
-
end
|
1673
|
-
# Defines how the subscription should behave when a trial ends.
|
1674
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::TrialSettings::EndBehavior) }
|
1675
|
-
attr_accessor :end_behavior
|
1676
|
-
sig {
|
1677
|
-
params(end_behavior: ::Stripe::QuoteService::UpdateParams::Line::TrialSettings::EndBehavior).void
|
1678
|
-
}
|
1679
|
-
def initialize(end_behavior: nil); end
|
1680
|
-
end
|
1681
|
-
# An array of operations the quote line performs.
|
1682
|
-
sig { returns(T::Array[::Stripe::QuoteService::UpdateParams::Line::Action]) }
|
1683
|
-
attr_accessor :actions
|
1684
|
-
# Details to identify the subscription schedule the quote line applies to.
|
1685
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::AppliesTo) }
|
1686
|
-
attr_accessor :applies_to
|
1687
|
-
# 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.
|
1688
|
-
sig { returns(String) }
|
1689
|
-
attr_accessor :billing_cycle_anchor
|
1690
|
-
# 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.
|
1691
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::CancelSubscriptionSchedule) }
|
1692
|
-
attr_accessor :cancel_subscription_schedule
|
1693
|
-
# 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.
|
1694
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::EndsAt) }
|
1695
|
-
attr_accessor :ends_at
|
1696
|
-
# The ID of an existing line on the quote.
|
1697
|
-
sig { returns(String) }
|
1698
|
-
attr_accessor :id
|
1699
|
-
# 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.
|
1700
|
-
sig { returns(String) }
|
1701
|
-
attr_accessor :proration_behavior
|
1702
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
1703
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::SetPauseCollection) }
|
1704
|
-
attr_accessor :set_pause_collection
|
1705
|
-
# Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
1706
|
-
sig { returns(String) }
|
1707
|
-
attr_accessor :set_schedule_end
|
1708
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
1709
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::StartsAt) }
|
1710
|
-
attr_accessor :starts_at
|
1711
|
-
# Settings related to subscription trials.
|
1712
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::Line::TrialSettings) }
|
1713
|
-
attr_accessor :trial_settings
|
1714
|
-
sig {
|
1715
|
-
params(actions: T::Array[::Stripe::QuoteService::UpdateParams::Line::Action], applies_to: ::Stripe::QuoteService::UpdateParams::Line::AppliesTo, billing_cycle_anchor: String, cancel_subscription_schedule: ::Stripe::QuoteService::UpdateParams::Line::CancelSubscriptionSchedule, ends_at: ::Stripe::QuoteService::UpdateParams::Line::EndsAt, id: String, proration_behavior: String, set_pause_collection: ::Stripe::QuoteService::UpdateParams::Line::SetPauseCollection, set_schedule_end: String, starts_at: ::Stripe::QuoteService::UpdateParams::Line::StartsAt, trial_settings: ::Stripe::QuoteService::UpdateParams::Line::TrialSettings).void
|
1716
|
-
}
|
1717
|
-
def initialize(
|
1718
|
-
actions: nil,
|
1719
|
-
applies_to: nil,
|
1720
|
-
billing_cycle_anchor: nil,
|
1721
|
-
cancel_subscription_schedule: nil,
|
1722
|
-
ends_at: nil,
|
1723
|
-
id: nil,
|
1724
|
-
proration_behavior: nil,
|
1725
|
-
set_pause_collection: nil,
|
1726
|
-
set_schedule_end: nil,
|
1727
|
-
starts_at: nil,
|
1728
|
-
trial_settings: nil
|
1729
|
-
); end
|
1730
|
-
end
|
1731
396
|
class LineItem < Stripe::RequestParams
|
1732
397
|
class Discount < Stripe::RequestParams
|
1733
|
-
class DiscountEnd < Stripe::RequestParams
|
1734
|
-
class Duration < Stripe::RequestParams
|
1735
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1736
|
-
sig { returns(String) }
|
1737
|
-
attr_accessor :interval
|
1738
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1739
|
-
sig { returns(Integer) }
|
1740
|
-
attr_accessor :interval_count
|
1741
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1742
|
-
def initialize(interval: nil, interval_count: nil); end
|
1743
|
-
end
|
1744
|
-
# Time span for the redeemed discount.
|
1745
|
-
sig {
|
1746
|
-
returns(::Stripe::QuoteService::UpdateParams::LineItem::Discount::DiscountEnd::Duration)
|
1747
|
-
}
|
1748
|
-
attr_accessor :duration
|
1749
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1750
|
-
sig { returns(Integer) }
|
1751
|
-
attr_accessor :timestamp
|
1752
|
-
# The type of calculation made to determine when the discount ends.
|
1753
|
-
sig { returns(String) }
|
1754
|
-
attr_accessor :type
|
1755
|
-
sig {
|
1756
|
-
params(duration: ::Stripe::QuoteService::UpdateParams::LineItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
|
1757
|
-
}
|
1758
|
-
def initialize(duration: nil, timestamp: nil, type: nil); end
|
1759
|
-
end
|
1760
398
|
# ID of the coupon to create a new discount for.
|
1761
|
-
sig { returns(String) }
|
399
|
+
sig { returns(T.nilable(String)) }
|
1762
400
|
attr_accessor :coupon
|
1763
401
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1764
|
-
sig { returns(String) }
|
402
|
+
sig { returns(T.nilable(String)) }
|
1765
403
|
attr_accessor :discount
|
1766
|
-
# Details to determine how long the discount should be applied for.
|
1767
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::LineItem::Discount::DiscountEnd) }
|
1768
|
-
attr_accessor :discount_end
|
1769
404
|
# ID of the promotion code to create a new discount for.
|
1770
|
-
sig { returns(String) }
|
405
|
+
sig { returns(T.nilable(String)) }
|
1771
406
|
attr_accessor :promotion_code
|
1772
407
|
sig {
|
1773
|
-
params(coupon: String, discount: String,
|
408
|
+
params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
|
1774
409
|
}
|
1775
|
-
def initialize(coupon: nil, discount: nil,
|
410
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil); end
|
1776
411
|
end
|
1777
412
|
class PriceData < Stripe::RequestParams
|
1778
413
|
class Recurring < Stripe::RequestParams
|
@@ -1780,31 +415,33 @@ module Stripe
|
|
1780
415
|
sig { returns(String) }
|
1781
416
|
attr_accessor :interval
|
1782
417
|
# 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).
|
1783
|
-
sig { returns(Integer) }
|
418
|
+
sig { returns(T.nilable(Integer)) }
|
1784
419
|
attr_accessor :interval_count
|
1785
|
-
sig { params(interval: String, interval_count: Integer).void }
|
420
|
+
sig { params(interval: String, interval_count: T.nilable(Integer)).void }
|
1786
421
|
def initialize(interval: nil, interval_count: nil); end
|
1787
422
|
end
|
1788
423
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1789
424
|
sig { returns(String) }
|
1790
425
|
attr_accessor :currency
|
1791
|
-
# The ID of the
|
426
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
1792
427
|
sig { returns(String) }
|
1793
428
|
attr_accessor :product
|
1794
429
|
# The recurring components of a price such as `interval` and `interval_count`.
|
1795
|
-
sig {
|
430
|
+
sig {
|
431
|
+
returns(T.nilable(::Stripe::QuoteService::UpdateParams::LineItem::PriceData::Recurring))
|
432
|
+
}
|
1796
433
|
attr_accessor :recurring
|
1797
434
|
# 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.
|
1798
|
-
sig { returns(String) }
|
435
|
+
sig { returns(T.nilable(String)) }
|
1799
436
|
attr_accessor :tax_behavior
|
1800
437
|
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
1801
|
-
sig { returns(Integer) }
|
438
|
+
sig { returns(T.nilable(Integer)) }
|
1802
439
|
attr_accessor :unit_amount
|
1803
440
|
# 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.
|
1804
|
-
sig { returns(String) }
|
441
|
+
sig { returns(T.nilable(String)) }
|
1805
442
|
attr_accessor :unit_amount_decimal
|
1806
443
|
sig {
|
1807
|
-
params(currency: String, product: String, recurring: ::Stripe::QuoteService::UpdateParams::LineItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
|
444
|
+
params(currency: String, product: String, recurring: T.nilable(::Stripe::QuoteService::UpdateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
|
1808
445
|
}
|
1809
446
|
def initialize(
|
1810
447
|
currency: nil,
|
@@ -1817,26 +454,26 @@ module Stripe
|
|
1817
454
|
end
|
1818
455
|
# The discounts applied to this line item.
|
1819
456
|
sig {
|
1820
|
-
returns(T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::LineItem::Discount]))
|
457
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::QuoteService::UpdateParams::LineItem::Discount]))))
|
1821
458
|
}
|
1822
459
|
attr_accessor :discounts
|
1823
460
|
# The ID of an existing line item on the quote.
|
1824
|
-
sig { returns(String) }
|
461
|
+
sig { returns(T.nilable(String)) }
|
1825
462
|
attr_accessor :id
|
1826
463
|
# The ID of the price object. One of `price` or `price_data` is required.
|
1827
|
-
sig { returns(String) }
|
464
|
+
sig { returns(T.nilable(String)) }
|
1828
465
|
attr_accessor :price
|
1829
466
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
1830
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::LineItem::PriceData) }
|
467
|
+
sig { returns(T.nilable(::Stripe::QuoteService::UpdateParams::LineItem::PriceData)) }
|
1831
468
|
attr_accessor :price_data
|
1832
469
|
# The quantity of the line item.
|
1833
|
-
sig { returns(Integer) }
|
470
|
+
sig { returns(T.nilable(Integer)) }
|
1834
471
|
attr_accessor :quantity
|
1835
472
|
# 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.
|
1836
|
-
sig { returns(T.nilable(T::Array[String])) }
|
473
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
1837
474
|
attr_accessor :tax_rates
|
1838
475
|
sig {
|
1839
|
-
params(discounts: T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::LineItem::Discount]), id: String, price: String, price_data: ::Stripe::QuoteService::UpdateParams::LineItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
|
476
|
+
params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::QuoteService::UpdateParams::LineItem::Discount]))), id: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::QuoteService::UpdateParams::LineItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
|
1840
477
|
}
|
1841
478
|
def initialize(
|
1842
479
|
discounts: nil,
|
@@ -1848,378 +485,105 @@ module Stripe
|
|
1848
485
|
); end
|
1849
486
|
end
|
1850
487
|
class SubscriptionData < Stripe::RequestParams
|
1851
|
-
class BillOnAcceptance < Stripe::RequestParams
|
1852
|
-
class BillFrom < Stripe::RequestParams
|
1853
|
-
class LineStartsAt < Stripe::RequestParams
|
1854
|
-
# The ID of a quote line.
|
1855
|
-
sig { returns(String) }
|
1856
|
-
attr_accessor :id
|
1857
|
-
# 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.
|
1858
|
-
sig { returns(Integer) }
|
1859
|
-
attr_accessor :index
|
1860
|
-
sig { params(id: String, index: Integer).void }
|
1861
|
-
def initialize(id: nil, index: nil); end
|
1862
|
-
end
|
1863
|
-
# Details of a Quote line to start the bill period from.
|
1864
|
-
sig {
|
1865
|
-
returns(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt)
|
1866
|
-
}
|
1867
|
-
attr_accessor :line_starts_at
|
1868
|
-
# A precise Unix timestamp.
|
1869
|
-
sig { returns(Integer) }
|
1870
|
-
attr_accessor :timestamp
|
1871
|
-
# The type of method to specify the `bill_from` time.
|
1872
|
-
sig { returns(String) }
|
1873
|
-
attr_accessor :type
|
1874
|
-
sig {
|
1875
|
-
params(line_starts_at: ::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
|
1876
|
-
}
|
1877
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
|
1878
|
-
end
|
1879
|
-
class BillUntil < Stripe::RequestParams
|
1880
|
-
class Duration < Stripe::RequestParams
|
1881
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1882
|
-
sig { returns(String) }
|
1883
|
-
attr_accessor :interval
|
1884
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1885
|
-
sig { returns(Integer) }
|
1886
|
-
attr_accessor :interval_count
|
1887
|
-
sig { params(interval: String, interval_count: Integer).void }
|
1888
|
-
def initialize(interval: nil, interval_count: nil); end
|
1889
|
-
end
|
1890
|
-
class LineEndsAt < Stripe::RequestParams
|
1891
|
-
# The ID of a quote line.
|
1892
|
-
sig { returns(String) }
|
1893
|
-
attr_accessor :id
|
1894
|
-
# 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.
|
1895
|
-
sig { returns(Integer) }
|
1896
|
-
attr_accessor :index
|
1897
|
-
sig { params(id: String, index: Integer).void }
|
1898
|
-
def initialize(id: nil, index: nil); end
|
1899
|
-
end
|
1900
|
-
# Details of the duration over which to bill.
|
1901
|
-
sig {
|
1902
|
-
returns(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration)
|
1903
|
-
}
|
1904
|
-
attr_accessor :duration
|
1905
|
-
# Details of a Quote line item from which to bill until.
|
1906
|
-
sig {
|
1907
|
-
returns(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt)
|
1908
|
-
}
|
1909
|
-
attr_accessor :line_ends_at
|
1910
|
-
# A precise Unix timestamp.
|
1911
|
-
sig { returns(Integer) }
|
1912
|
-
attr_accessor :timestamp
|
1913
|
-
# The type of method to specify the `bill_until` time.
|
1914
|
-
sig { returns(String) }
|
1915
|
-
attr_accessor :type
|
1916
|
-
sig {
|
1917
|
-
params(duration: ::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
|
1918
|
-
}
|
1919
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
|
1920
|
-
end
|
1921
|
-
# The start of the period to bill from when the Quote is accepted.
|
1922
|
-
sig {
|
1923
|
-
returns(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom)
|
1924
|
-
}
|
1925
|
-
attr_accessor :bill_from
|
1926
|
-
# The end of the period to bill until when the Quote is accepted.
|
1927
|
-
sig {
|
1928
|
-
returns(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil)
|
1929
|
-
}
|
1930
|
-
attr_accessor :bill_until
|
1931
|
-
sig {
|
1932
|
-
params(bill_from: ::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom, bill_until: ::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil).void
|
1933
|
-
}
|
1934
|
-
def initialize(bill_from: nil, bill_until: nil); end
|
1935
|
-
end
|
1936
|
-
class Prebilling < Stripe::RequestParams
|
1937
|
-
# This is used to determine the number of billing cycles to prebill.
|
1938
|
-
sig { returns(Integer) }
|
1939
|
-
attr_accessor :iterations
|
1940
|
-
sig { params(iterations: Integer).void }
|
1941
|
-
def initialize(iterations: nil); end
|
1942
|
-
end
|
1943
|
-
# Describes the period to bill for upon accepting the quote.
|
1944
|
-
sig {
|
1945
|
-
returns(T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance))
|
1946
|
-
}
|
1947
|
-
attr_accessor :bill_on_acceptance
|
1948
|
-
# 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.
|
1949
|
-
sig { returns(String) }
|
1950
|
-
attr_accessor :billing_behavior
|
1951
|
-
# When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
1952
|
-
sig { returns(T.nilable(String)) }
|
1953
|
-
attr_accessor :billing_cycle_anchor
|
1954
488
|
# 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.
|
1955
|
-
sig { returns(T.nilable(String)) }
|
489
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
1956
490
|
attr_accessor :description
|
1957
491
|
# 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.
|
1958
|
-
sig { returns(T.nilable(T.any(String, Integer))) }
|
492
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T.any(String, Integer))))) }
|
1959
493
|
attr_accessor :effective_date
|
1960
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
1961
|
-
sig { returns(String) }
|
1962
|
-
attr_accessor :end_behavior
|
1963
494
|
# 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.
|
1964
|
-
sig { returns(T::Hash[String, String]) }
|
495
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
1965
496
|
attr_accessor :metadata
|
1966
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
1967
|
-
sig {
|
1968
|
-
returns(T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionData::Prebilling))
|
1969
|
-
}
|
1970
|
-
attr_accessor :prebilling
|
1971
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
1972
|
-
#
|
1973
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
1974
|
-
#
|
1975
|
-
# 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`.
|
1976
|
-
#
|
1977
|
-
# Prorations can be disabled by passing `none`.
|
1978
|
-
sig { returns(String) }
|
1979
|
-
attr_accessor :proration_behavior
|
1980
497
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
1981
|
-
sig { returns(T.nilable(Integer)) }
|
498
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
1982
499
|
attr_accessor :trial_period_days
|
1983
500
|
sig {
|
1984
|
-
params(
|
501
|
+
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
|
1985
502
|
}
|
1986
503
|
def initialize(
|
1987
|
-
bill_on_acceptance: nil,
|
1988
|
-
billing_behavior: nil,
|
1989
|
-
billing_cycle_anchor: nil,
|
1990
504
|
description: nil,
|
1991
505
|
effective_date: nil,
|
1992
|
-
end_behavior: nil,
|
1993
506
|
metadata: nil,
|
1994
|
-
prebilling: nil,
|
1995
|
-
proration_behavior: nil,
|
1996
507
|
trial_period_days: nil
|
1997
508
|
); end
|
1998
509
|
end
|
1999
|
-
class SubscriptionDataOverride < Stripe::RequestParams
|
2000
|
-
class AppliesTo < Stripe::RequestParams
|
2001
|
-
# 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.
|
2002
|
-
sig { returns(String) }
|
2003
|
-
attr_accessor :new_reference
|
2004
|
-
# The ID of the schedule the line applies to.
|
2005
|
-
sig { returns(String) }
|
2006
|
-
attr_accessor :subscription_schedule
|
2007
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
2008
|
-
sig { returns(String) }
|
2009
|
-
attr_accessor :type
|
2010
|
-
sig { params(new_reference: String, subscription_schedule: String, type: String).void }
|
2011
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end
|
2012
|
-
end
|
2013
|
-
class BillOnAcceptance < Stripe::RequestParams
|
2014
|
-
class BillFrom < Stripe::RequestParams
|
2015
|
-
class LineStartsAt < Stripe::RequestParams
|
2016
|
-
# The ID of a quote line.
|
2017
|
-
sig { returns(String) }
|
2018
|
-
attr_accessor :id
|
2019
|
-
# 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.
|
2020
|
-
sig { returns(Integer) }
|
2021
|
-
attr_accessor :index
|
2022
|
-
sig { params(id: String, index: Integer).void }
|
2023
|
-
def initialize(id: nil, index: nil); end
|
2024
|
-
end
|
2025
|
-
# Details of a Quote line to start the bill period from.
|
2026
|
-
sig {
|
2027
|
-
returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt)
|
2028
|
-
}
|
2029
|
-
attr_accessor :line_starts_at
|
2030
|
-
# A precise Unix timestamp.
|
2031
|
-
sig { returns(Integer) }
|
2032
|
-
attr_accessor :timestamp
|
2033
|
-
# The type of method to specify the `bill_from` time.
|
2034
|
-
sig { returns(String) }
|
2035
|
-
attr_accessor :type
|
2036
|
-
sig {
|
2037
|
-
params(line_starts_at: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void
|
2038
|
-
}
|
2039
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil); end
|
2040
|
-
end
|
2041
|
-
class BillUntil < Stripe::RequestParams
|
2042
|
-
class Duration < Stripe::RequestParams
|
2043
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2044
|
-
sig { returns(String) }
|
2045
|
-
attr_accessor :interval
|
2046
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2047
|
-
sig { returns(Integer) }
|
2048
|
-
attr_accessor :interval_count
|
2049
|
-
sig { params(interval: String, interval_count: Integer).void }
|
2050
|
-
def initialize(interval: nil, interval_count: nil); end
|
2051
|
-
end
|
2052
|
-
class LineEndsAt < Stripe::RequestParams
|
2053
|
-
# The ID of a quote line.
|
2054
|
-
sig { returns(String) }
|
2055
|
-
attr_accessor :id
|
2056
|
-
# 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.
|
2057
|
-
sig { returns(Integer) }
|
2058
|
-
attr_accessor :index
|
2059
|
-
sig { params(id: String, index: Integer).void }
|
2060
|
-
def initialize(id: nil, index: nil); end
|
2061
|
-
end
|
2062
|
-
# Details of the duration over which to bill.
|
2063
|
-
sig {
|
2064
|
-
returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration)
|
2065
|
-
}
|
2066
|
-
attr_accessor :duration
|
2067
|
-
# Details of a Quote line item from which to bill until.
|
2068
|
-
sig {
|
2069
|
-
returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt)
|
2070
|
-
}
|
2071
|
-
attr_accessor :line_ends_at
|
2072
|
-
# A precise Unix timestamp.
|
2073
|
-
sig { returns(Integer) }
|
2074
|
-
attr_accessor :timestamp
|
2075
|
-
# The type of method to specify the `bill_until` time.
|
2076
|
-
sig { returns(String) }
|
2077
|
-
attr_accessor :type
|
2078
|
-
sig {
|
2079
|
-
params(duration: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void
|
2080
|
-
}
|
2081
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end
|
2082
|
-
end
|
2083
|
-
# The start of the period to bill from when the Quote is accepted.
|
2084
|
-
sig {
|
2085
|
-
returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom)
|
2086
|
-
}
|
2087
|
-
attr_accessor :bill_from
|
2088
|
-
# The end of the period to bill until when the Quote is accepted.
|
2089
|
-
sig {
|
2090
|
-
returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil)
|
2091
|
-
}
|
2092
|
-
attr_accessor :bill_until
|
2093
|
-
sig {
|
2094
|
-
params(bill_from: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom, bill_until: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil).void
|
2095
|
-
}
|
2096
|
-
def initialize(bill_from: nil, bill_until: nil); end
|
2097
|
-
end
|
2098
|
-
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
2099
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::AppliesTo) }
|
2100
|
-
attr_accessor :applies_to
|
2101
|
-
# Describes the period to bill for upon accepting the quote.
|
2102
|
-
sig {
|
2103
|
-
returns(T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance))
|
2104
|
-
}
|
2105
|
-
attr_accessor :bill_on_acceptance
|
2106
|
-
# 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.
|
2107
|
-
sig { returns(String) }
|
2108
|
-
attr_accessor :billing_behavior
|
2109
|
-
# The customer the Subscription Data override applies to.
|
2110
|
-
sig { returns(String) }
|
2111
|
-
attr_accessor :customer
|
2112
|
-
# 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.
|
2113
|
-
sig { returns(T.nilable(String)) }
|
2114
|
-
attr_accessor :description
|
2115
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2116
|
-
sig { returns(String) }
|
2117
|
-
attr_accessor :end_behavior
|
2118
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
2119
|
-
#
|
2120
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
2121
|
-
#
|
2122
|
-
# 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`.
|
2123
|
-
#
|
2124
|
-
# Prorations can be disabled by passing `none`.
|
2125
|
-
sig { returns(String) }
|
2126
|
-
attr_accessor :proration_behavior
|
2127
|
-
sig {
|
2128
|
-
params(applies_to: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::AppliesTo, bill_on_acceptance: T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance), billing_behavior: String, customer: String, description: T.nilable(String), end_behavior: String, proration_behavior: String).void
|
2129
|
-
}
|
2130
|
-
def initialize(
|
2131
|
-
applies_to: nil,
|
2132
|
-
bill_on_acceptance: nil,
|
2133
|
-
billing_behavior: nil,
|
2134
|
-
customer: nil,
|
2135
|
-
description: nil,
|
2136
|
-
end_behavior: nil,
|
2137
|
-
proration_behavior: nil
|
2138
|
-
); end
|
2139
|
-
end
|
2140
510
|
class TransferData < Stripe::RequestParams
|
2141
511
|
# 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.
|
2142
|
-
sig { returns(Integer) }
|
512
|
+
sig { returns(T.nilable(Integer)) }
|
2143
513
|
attr_accessor :amount
|
2144
514
|
# 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.
|
2145
|
-
sig { returns(Float) }
|
515
|
+
sig { returns(T.nilable(Float)) }
|
2146
516
|
attr_accessor :amount_percent
|
2147
517
|
# ID of an existing, connected Stripe account.
|
2148
518
|
sig { returns(String) }
|
2149
519
|
attr_accessor :destination
|
2150
|
-
sig {
|
520
|
+
sig {
|
521
|
+
params(amount: T.nilable(Integer), amount_percent: T.nilable(Float), destination: String).void
|
522
|
+
}
|
2151
523
|
def initialize(amount: nil, amount_percent: nil, destination: nil); end
|
2152
524
|
end
|
2153
|
-
# Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
2154
|
-
sig { returns(T::Boolean) }
|
2155
|
-
attr_accessor :allow_backdated_lines
|
2156
525
|
# 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.
|
2157
|
-
sig { returns(T.nilable(Integer)) }
|
526
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
|
2158
527
|
attr_accessor :application_fee_amount
|
2159
528
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
|
2160
|
-
sig { returns(T.nilable(Float)) }
|
529
|
+
sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
|
2161
530
|
attr_accessor :application_fee_percent
|
2162
531
|
# Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
|
2163
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::AutomaticTax) }
|
532
|
+
sig { returns(T.nilable(::Stripe::QuoteService::UpdateParams::AutomaticTax)) }
|
2164
533
|
attr_accessor :automatic_tax
|
2165
534
|
# 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`.
|
2166
|
-
sig { returns(String) }
|
535
|
+
sig { returns(T.nilable(String)) }
|
2167
536
|
attr_accessor :collection_method
|
2168
537
|
# The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
2169
|
-
sig { returns(String) }
|
538
|
+
sig { returns(T.nilable(String)) }
|
2170
539
|
attr_accessor :customer
|
2171
540
|
# The tax rates that will apply to any line item that does not have `tax_rates` set.
|
2172
|
-
sig { returns(T.nilable(T::Array[String])) }
|
541
|
+
sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
|
2173
542
|
attr_accessor :default_tax_rates
|
2174
543
|
# A description that will be displayed on the quote PDF.
|
2175
|
-
sig { returns(T.nilable(String)) }
|
544
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
2176
545
|
attr_accessor :description
|
2177
546
|
# The discounts applied to the quote.
|
2178
|
-
sig {
|
547
|
+
sig {
|
548
|
+
returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::QuoteService::UpdateParams::Discount]))))
|
549
|
+
}
|
2179
550
|
attr_accessor :discounts
|
2180
551
|
# Specifies which fields in the response should be expanded.
|
2181
|
-
sig { returns(T::Array[String]) }
|
552
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2182
553
|
attr_accessor :expand
|
2183
554
|
# A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
|
2184
|
-
sig { returns(Integer) }
|
555
|
+
sig { returns(T.nilable(Integer)) }
|
2185
556
|
attr_accessor :expires_at
|
2186
557
|
# A footer that will be displayed on the quote PDF.
|
2187
|
-
sig { returns(T.nilable(String)) }
|
558
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
2188
559
|
attr_accessor :footer
|
2189
560
|
# A header that will be displayed on the quote PDF.
|
2190
|
-
sig { returns(T.nilable(String)) }
|
561
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
2191
562
|
attr_accessor :header
|
2192
563
|
# All invoices will be billed using the specified settings.
|
2193
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::InvoiceSettings) }
|
564
|
+
sig { returns(T.nilable(::Stripe::QuoteService::UpdateParams::InvoiceSettings)) }
|
2194
565
|
attr_accessor :invoice_settings
|
2195
566
|
# 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.
|
2196
|
-
sig { returns(T::Array[::Stripe::QuoteService::UpdateParams::LineItem]) }
|
567
|
+
sig { returns(T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::LineItem])) }
|
2197
568
|
attr_accessor :line_items
|
2198
|
-
# 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.
|
2199
|
-
sig { returns(T::Array[::Stripe::QuoteService::UpdateParams::Line]) }
|
2200
|
-
attr_accessor :lines
|
2201
569
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2202
|
-
sig { returns(T::Hash[String, String]) }
|
570
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
2203
571
|
attr_accessor :metadata
|
2204
572
|
# The account on behalf of which to charge.
|
2205
|
-
sig { returns(T.nilable(String)) }
|
573
|
+
sig { returns(T.nilable(T.nilable(String))) }
|
2206
574
|
attr_accessor :on_behalf_of
|
2207
575
|
# 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.
|
2208
|
-
sig { returns(::Stripe::QuoteService::UpdateParams::SubscriptionData) }
|
576
|
+
sig { returns(T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionData)) }
|
2209
577
|
attr_accessor :subscription_data
|
2210
|
-
#
|
578
|
+
# The data with which to automatically create a Transfer for each of the invoices.
|
2211
579
|
sig {
|
2212
|
-
returns(T.nilable(T::
|
580
|
+
returns(T.nilable(T.nilable(T.any(String, ::Stripe::QuoteService::UpdateParams::TransferData))))
|
2213
581
|
}
|
2214
|
-
attr_accessor :subscription_data_overrides
|
2215
|
-
# The data with which to automatically create a Transfer for each of the invoices.
|
2216
|
-
sig { returns(T.nilable(::Stripe::QuoteService::UpdateParams::TransferData)) }
|
2217
582
|
attr_accessor :transfer_data
|
2218
583
|
sig {
|
2219
|
-
params(
|
584
|
+
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::QuoteService::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::QuoteService::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::QuoteService::UpdateParams::InvoiceSettings), line_items: T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::LineItem]), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(T.nilable(String)), subscription_data: T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionData), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::QuoteService::UpdateParams::TransferData)))).void
|
2220
585
|
}
|
2221
586
|
def initialize(
|
2222
|
-
allow_backdated_lines: nil,
|
2223
587
|
application_fee_amount: nil,
|
2224
588
|
application_fee_percent: nil,
|
2225
589
|
automatic_tax: nil,
|
@@ -2234,87 +598,43 @@ module Stripe
|
|
2234
598
|
header: nil,
|
2235
599
|
invoice_settings: nil,
|
2236
600
|
line_items: nil,
|
2237
|
-
lines: nil,
|
2238
601
|
metadata: nil,
|
2239
602
|
on_behalf_of: nil,
|
2240
603
|
subscription_data: nil,
|
2241
|
-
subscription_data_overrides: nil,
|
2242
604
|
transfer_data: nil
|
2243
605
|
); end
|
2244
606
|
end
|
2245
607
|
class AcceptParams < Stripe::RequestParams
|
2246
608
|
# Specifies which fields in the response should be expanded.
|
2247
|
-
sig { returns(T::Array[String]) }
|
609
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2248
610
|
attr_accessor :expand
|
2249
|
-
sig { params(expand: T::Array[String]).void }
|
611
|
+
sig { params(expand: T.nilable(T::Array[String])).void }
|
2250
612
|
def initialize(expand: nil); end
|
2251
613
|
end
|
2252
614
|
class CancelParams < Stripe::RequestParams
|
2253
615
|
# Specifies which fields in the response should be expanded.
|
2254
|
-
sig { returns(T::Array[String]) }
|
616
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2255
617
|
attr_accessor :expand
|
2256
|
-
sig { params(expand: T::Array[String]).void }
|
618
|
+
sig { params(expand: T.nilable(T::Array[String])).void }
|
2257
619
|
def initialize(expand: nil); end
|
2258
620
|
end
|
2259
621
|
class FinalizeQuoteParams < Stripe::RequestParams
|
2260
622
|
# Specifies which fields in the response should be expanded.
|
2261
|
-
sig { returns(T::Array[String]) }
|
623
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2262
624
|
attr_accessor :expand
|
2263
625
|
# A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
|
2264
|
-
sig { returns(Integer) }
|
626
|
+
sig { returns(T.nilable(Integer)) }
|
2265
627
|
attr_accessor :expires_at
|
2266
|
-
sig { params(expand: T::Array[String], expires_at: Integer).void }
|
628
|
+
sig { params(expand: T.nilable(T::Array[String]), expires_at: T.nilable(Integer)).void }
|
2267
629
|
def initialize(expand: nil, expires_at: nil); end
|
2268
630
|
end
|
2269
|
-
class MarkDraftParams < Stripe::RequestParams
|
2270
|
-
# Specifies which fields in the response should be expanded.
|
2271
|
-
sig { returns(T::Array[String]) }
|
2272
|
-
attr_accessor :expand
|
2273
|
-
sig { params(expand: T::Array[String]).void }
|
2274
|
-
def initialize(expand: nil); end
|
2275
|
-
end
|
2276
|
-
class MarkStaleParams < Stripe::RequestParams
|
2277
|
-
# Specifies which fields in the response should be expanded.
|
2278
|
-
sig { returns(T::Array[String]) }
|
2279
|
-
attr_accessor :expand
|
2280
|
-
# Reason the Quote is being marked stale.
|
2281
|
-
sig { returns(String) }
|
2282
|
-
attr_accessor :reason
|
2283
|
-
sig { params(expand: T::Array[String], reason: String).void }
|
2284
|
-
def initialize(expand: nil, reason: nil); end
|
2285
|
-
end
|
2286
|
-
class ReestimateParams < Stripe::RequestParams
|
2287
|
-
# Specifies which fields in the response should be expanded.
|
2288
|
-
sig { returns(T::Array[String]) }
|
2289
|
-
attr_accessor :expand
|
2290
|
-
sig { params(expand: T::Array[String]).void }
|
2291
|
-
def initialize(expand: nil); end
|
2292
|
-
end
|
2293
631
|
class PdfParams < Stripe::RequestParams
|
2294
632
|
# Specifies which fields in the response should be expanded.
|
2295
|
-
sig { returns(T::Array[String]) }
|
633
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2296
634
|
attr_accessor :expand
|
2297
|
-
sig { params(expand: T::Array[String]).void }
|
635
|
+
sig { params(expand: T.nilable(T::Array[String])).void }
|
2298
636
|
def initialize(expand: nil); end
|
2299
637
|
end
|
2300
|
-
class ListPreviewInvoiceLinesParams < Stripe::RequestParams
|
2301
|
-
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
2302
|
-
sig { returns(String) }
|
2303
|
-
attr_accessor :ending_before
|
2304
|
-
# Specifies which fields in the response should be expanded.
|
2305
|
-
sig { returns(T::Array[String]) }
|
2306
|
-
attr_accessor :expand
|
2307
|
-
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
2308
|
-
sig { returns(Integer) }
|
2309
|
-
attr_accessor :limit
|
2310
|
-
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
2311
|
-
sig { returns(String) }
|
2312
|
-
attr_accessor :starting_after
|
2313
|
-
sig {
|
2314
|
-
params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void
|
2315
|
-
}
|
2316
|
-
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end
|
2317
|
-
end
|
2318
638
|
# Accepts the specified quote.
|
2319
639
|
sig {
|
2320
640
|
params(quote: String, params: T.any(::Stripe::QuoteService::AcceptParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
|
@@ -2345,36 +665,12 @@ module Stripe
|
|
2345
665
|
}
|
2346
666
|
def list(params = {}, opts = {}); end
|
2347
667
|
|
2348
|
-
# Preview the invoice line items that would be generated by accepting the quote.
|
2349
|
-
sig {
|
2350
|
-
params(quote: String, preview_invoice: String, params: T.any(::Stripe::QuoteService::ListPreviewInvoiceLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
|
2351
|
-
}
|
2352
|
-
def list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {}); end
|
2353
|
-
|
2354
|
-
# Converts a stale quote to draft.
|
2355
|
-
sig {
|
2356
|
-
params(quote: String, params: T.any(::Stripe::QuoteService::MarkDraftParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
|
2357
|
-
}
|
2358
|
-
def mark_draft(quote, params = {}, opts = {}); end
|
2359
|
-
|
2360
|
-
# Converts a draft or open quote to stale.
|
2361
|
-
sig {
|
2362
|
-
params(quote: String, params: T.any(::Stripe::QuoteService::MarkStaleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
|
2363
|
-
}
|
2364
|
-
def mark_stale(quote, params = {}, opts = {}); end
|
2365
|
-
|
2366
668
|
# Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
|
2367
669
|
sig {
|
2368
670
|
params(quote: String, params: T.any(::Stripe::QuoteService::PdfParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, read_body_chunk_block: T.untyped).returns(T.untyped)
|
2369
671
|
}
|
2370
672
|
def pdf(quote, params = {}, opts = {}, &read_body_chunk_block); end
|
2371
673
|
|
2372
|
-
# Recompute the upcoming invoice estimate for the quote.
|
2373
|
-
sig {
|
2374
|
-
params(quote: String, params: T.any(::Stripe::QuoteService::ReestimateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
|
2375
|
-
}
|
2376
|
-
def reestimate(quote, params = {}, opts = {}); end
|
2377
|
-
|
2378
674
|
# Retrieves the quote with the given ID.
|
2379
675
|
sig {
|
2380
676
|
params(quote: String, params: T.any(::Stripe::QuoteService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote)
|