stripe 13.6.0.pre.beta.1 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +699 -1457
- data/OPENAPI_VERSION +1 -1
- data/README.md +29 -0
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +2 -0
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/errors.rb +0 -7
- data/lib/stripe/object_types.rb +0 -26
- data/lib/stripe/resources/account.rb +83 -614
- data/lib/stripe/resources/account_session.rb +1 -247
- data/lib/stripe/resources/apple_pay_domain.rb +0 -9
- data/lib/stripe/resources/application_fee.rb +1 -10
- data/lib/stripe/resources/balance.rb +0 -9
- data/lib/stripe/resources/balance_transaction.rb +2 -11
- data/lib/stripe/resources/bank_account.rb +1 -1
- data/lib/stripe/resources/billing/alert.rb +0 -9
- data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -48
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -9
- data/lib/stripe/resources/billing/credit_grant.rb +4 -13
- data/lib/stripe/resources/billing/meter.rb +1 -10
- data/lib/stripe/resources/billing_portal/configuration.rb +0 -9
- data/lib/stripe/resources/card.rb +2 -4
- data/lib/stripe/resources/charge.rb +35 -1457
- data/lib/stripe/resources/checkout/session.rb +100 -293
- data/lib/stripe/resources/climate/order.rb +0 -9
- data/lib/stripe/resources/climate/product.rb +0 -9
- data/lib/stripe/resources/climate/supplier.rb +0 -9
- data/lib/stripe/resources/confirmation_token.rb +74 -156
- data/lib/stripe/resources/country_spec.rb +0 -9
- data/lib/stripe/resources/coupon.rb +0 -9
- data/lib/stripe/resources/credit_note.rb +14 -35
- data/lib/stripe/resources/credit_note_line_item.rb +14 -12
- data/lib/stripe/resources/customer.rb +12 -28
- data/lib/stripe/resources/customer_balance_transaction.rb +3 -1
- data/lib/stripe/resources/dispute.rb +0 -9
- data/lib/stripe/resources/entitlements/active_entitlement.rb +0 -9
- data/lib/stripe/resources/entitlements/feature.rb +0 -9
- data/lib/stripe/resources/event.rb +0 -40
- data/lib/stripe/resources/exchange_rate.rb +0 -9
- data/lib/stripe/resources/file.rb +0 -9
- data/lib/stripe/resources/file_link.rb +0 -9
- data/lib/stripe/resources/financial_connections/account.rb +0 -23
- data/lib/stripe/resources/financial_connections/session.rb +1 -65
- data/lib/stripe/resources/financial_connections/transaction.rb +0 -9
- data/lib/stripe/resources/forwarding/request.rb +0 -9
- data/lib/stripe/resources/identity/verification_report.rb +0 -9
- data/lib/stripe/resources/identity/verification_session.rb +0 -9
- data/lib/stripe/resources/invoice.rb +225 -5120
- data/lib/stripe/resources/invoice_item.rb +65 -110
- data/lib/stripe/resources/invoice_line_item.rb +106 -89
- data/lib/stripe/resources/invoice_payment.rb +53 -4
- data/lib/stripe/resources/invoice_rendering_template.rb +0 -12
- data/lib/stripe/resources/issuing/authorization.rb +0 -9
- data/lib/stripe/resources/issuing/card.rb +0 -9
- data/lib/stripe/resources/issuing/cardholder.rb +1 -11
- data/lib/stripe/resources/issuing/dispute.rb +0 -9
- data/lib/stripe/resources/issuing/personalization_design.rb +0 -9
- data/lib/stripe/resources/issuing/physical_bundle.rb +0 -9
- data/lib/stripe/resources/issuing/token.rb +0 -9
- data/lib/stripe/resources/issuing/transaction.rb +0 -15
- data/lib/stripe/resources/line_item.rb +0 -28
- data/lib/stripe/resources/mandate.rb +6 -33
- data/lib/stripe/resources/payment_intent.rb +642 -4975
- data/lib/stripe/resources/payment_link.rb +84 -15
- data/lib/stripe/resources/payment_method.rb +74 -187
- data/lib/stripe/resources/payment_method_configuration.rb +87 -214
- data/lib/stripe/resources/payment_method_domain.rb +9 -18
- data/lib/stripe/resources/payout.rb +0 -9
- data/lib/stripe/resources/person.rb +9 -9
- data/lib/stripe/resources/plan.rb +0 -15
- data/lib/stripe/resources/price.rb +2 -47
- data/lib/stripe/resources/product.rb +0 -68
- data/lib/stripe/resources/promotion_code.rb +0 -9
- data/lib/stripe/resources/quote.rb +8 -2037
- data/lib/stripe/resources/radar/early_fraud_warning.rb +0 -9
- data/lib/stripe/resources/radar/value_list.rb +0 -9
- data/lib/stripe/resources/radar/value_list_item.rb +0 -9
- data/lib/stripe/resources/refund.rb +13 -18
- data/lib/stripe/resources/reporting/report_run.rb +0 -9
- data/lib/stripe/resources/reporting/report_type.rb +0 -9
- data/lib/stripe/resources/review.rb +2 -11
- data/lib/stripe/resources/setup_attempt.rb +11 -16
- data/lib/stripe/resources/setup_intent.rb +158 -540
- data/lib/stripe/resources/shipping_rate.rb +0 -9
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +0 -9
- data/lib/stripe/resources/source.rb +0 -41
- data/lib/stripe/resources/subscription.rb +14 -385
- data/lib/stripe/resources/subscription_item.rb +9 -134
- data/lib/stripe/resources/subscription_schedule.rb +14 -1135
- data/lib/stripe/resources/tax/calculation.rb +0 -9
- data/lib/stripe/resources/tax/registration.rb +1 -10
- data/lib/stripe/resources/tax/settings.rb +0 -9
- data/lib/stripe/resources/tax/transaction.rb +0 -9
- data/lib/stripe/resources/tax_code.rb +0 -9
- data/lib/stripe/resources/tax_id.rb +0 -9
- data/lib/stripe/resources/tax_rate.rb +0 -9
- data/lib/stripe/resources/terminal/configuration.rb +214 -14
- data/lib/stripe/resources/terminal/location.rb +0 -9
- data/lib/stripe/resources/terminal/reader.rb +0 -408
- data/lib/stripe/resources/test_helpers/test_clock.rb +0 -9
- data/lib/stripe/resources/token.rb +1 -10
- data/lib/stripe/resources/topup.rb +0 -9
- data/lib/stripe/resources/transfer.rb +0 -9
- data/lib/stripe/resources/treasury/credit_reversal.rb +0 -9
- data/lib/stripe/resources/treasury/debit_reversal.rb +0 -9
- data/lib/stripe/resources/treasury/financial_account.rb +4 -32
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
- data/lib/stripe/resources/treasury/inbound_transfer.rb +0 -9
- data/lib/stripe/resources/treasury/outbound_payment.rb +0 -9
- data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -46
- data/lib/stripe/resources/treasury/received_credit.rb +1 -47
- data/lib/stripe/resources/treasury/received_debit.rb +1 -49
- data/lib/stripe/resources/treasury/transaction.rb +0 -9
- data/lib/stripe/resources/treasury/transaction_entry.rb +0 -9
- data/lib/stripe/resources/v2/event.rb +1 -0
- data/lib/stripe/resources/v2/event_destination.rb +1 -0
- data/lib/stripe/resources/webhook_endpoint.rb +0 -9
- data/lib/stripe/resources.rb +0 -25
- data/lib/stripe/services/account_external_account_service.rb +1 -1
- data/lib/stripe/services/account_service.rb +68 -509
- data/lib/stripe/services/account_session_service.rb +1 -217
- data/lib/stripe/services/balance_transaction_service.rb +1 -1
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +2 -2
- data/lib/stripe/services/billing/credit_grant_service.rb +2 -2
- data/lib/stripe/services/billing/meter_service.rb +1 -1
- data/lib/stripe/services/charge_service.rb +1 -1335
- data/lib/stripe/services/checkout/session_service.rb +60 -168
- data/lib/stripe/services/credit_note_preview_lines_service.rb +0 -4
- data/lib/stripe/services/credit_note_service.rb +0 -8
- data/lib/stripe/services/customer_service.rb +0 -16
- data/lib/stripe/services/financial_connections/account_service.rb +1 -3
- data/lib/stripe/services/financial_connections/session_service.rb +1 -30
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/invoice_item_service.rb +34 -88
- data/lib/stripe/services/invoice_line_item_service.rb +25 -41
- data/lib/stripe/services/invoice_payment_service.rb +33 -5
- data/lib/stripe/services/invoice_service.rb +210 -3147
- data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
- data/lib/stripe/services/issuing/transaction_service.rb +0 -4
- data/lib/stripe/services/issuing_service.rb +1 -5
- data/lib/stripe/services/payment_intent_service.rb +568 -4513
- data/lib/stripe/services/payment_link_service.rb +59 -6
- data/lib/stripe/services/payment_method_configuration_service.rb +62 -146
- data/lib/stripe/services/payment_method_domain_service.rb +6 -6
- data/lib/stripe/services/payment_method_service.rb +49 -119
- data/lib/stripe/services/plan_service.rb +0 -4
- data/lib/stripe/services/price_service.rb +2 -25
- data/lib/stripe/services/product_service.rb +0 -38
- data/lib/stripe/services/quote_service.rb +9 -1716
- data/lib/stripe/services/setup_intent_service.rb +158 -492
- data/lib/stripe/services/subscription_item_service.rb +5 -111
- data/lib/stripe/services/subscription_schedule_service.rb +14 -1005
- data/lib/stripe/services/subscription_service.rb +13 -323
- data/lib/stripe/services/tax/registration_service.rb +1 -1
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/configuration_service.rb +170 -4
- data/lib/stripe/services/terminal/reader_service.rb +0 -177
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +49 -87
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -43
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
- data/lib/stripe/services/token_service.rb +1 -1
- data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
- data/lib/stripe/services/treasury/financial_account_service.rb +3 -17
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
- data/lib/stripe/services/v1_services.rb +2 -8
- data/lib/stripe/services/v2/core/event_destination_service.rb +1 -4
- data/lib/stripe/services/v2/core/event_service.rb +1 -4
- data/lib/stripe/services.rb +0 -27
- data/lib/stripe/stripe_client.rb +1 -0
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/util.rb +1 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -45
- data/rbi/stripe/resources/account.rbi +1131 -1479
- data/rbi/stripe/resources/account_link.rbi +9 -9
- data/rbi/stripe/resources/account_session.rbi +118 -367
- data/rbi/stripe/resources/apple_pay_domain.rbi +8 -15
- data/rbi/stripe/resources/application_fee.rbi +15 -20
- data/rbi/stripe/resources/apps/secret.rbi +20 -20
- data/rbi/stripe/resources/balance.rbi +0 -7
- data/rbi/stripe/resources/balance_transaction.rbi +19 -24
- data/rbi/stripe/resources/bank_account.rbi +1 -1
- data/rbi/stripe/resources/billing/alert.rbi +23 -28
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -53
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +6 -13
- data/rbi/stripe/resources/billing/credit_grant.rbi +30 -37
- data/rbi/stripe/resources/billing/meter.rbi +19 -26
- data/rbi/stripe/resources/billing/meter_event.rbi +4 -4
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +5 -5
- data/rbi/stripe/resources/billing_portal/configuration.rbi +86 -81
- data/rbi/stripe/resources/billing_portal/session.rbi +31 -27
- data/rbi/stripe/resources/card.rbi +2 -5
- data/rbi/stripe/resources/charge.rbi +136 -1576
- data/rbi/stripe/resources/checkout/session.rbi +631 -748
- data/rbi/stripe/resources/climate/order.rbi +20 -25
- data/rbi/stripe/resources/climate/product.rbi +5 -12
- data/rbi/stripe/resources/climate/supplier.rbi +5 -12
- data/rbi/stripe/resources/confirmation_token.rbi +274 -268
- data/rbi/stripe/resources/country_spec.rbi +5 -12
- data/rbi/stripe/resources/coupon.rbi +34 -39
- data/rbi/stripe/resources/credit_note.rbi +134 -146
- data/rbi/stripe/resources/credit_note_line_item.rbi +20 -18
- data/rbi/stripe/resources/customer.rbi +172 -164
- data/rbi/stripe/resources/customer_balance_transaction.rbi +4 -1
- data/rbi/stripe/resources/customer_session.rbi +19 -15
- data/rbi/stripe/resources/dispute.rbi +92 -95
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +5 -12
- data/rbi/stripe/resources/entitlements/feature.rbi +15 -22
- data/rbi/stripe/resources/ephemeral_key.rbi +2 -2
- data/rbi/stripe/resources/event.rbi +16 -60
- data/rbi/stripe/resources/exchange_rate.rbi +5 -12
- data/rbi/stripe/resources/file.rbi +20 -25
- data/rbi/stripe/resources/file_link.rbi +23 -28
- data/rbi/stripe/resources/financial_connections/account.rbi +25 -44
- data/rbi/stripe/resources/financial_connections/session.rbi +12 -75
- data/rbi/stripe/resources/financial_connections/transaction.rbi +16 -19
- data/rbi/stripe/resources/forwarding/request.rbi +21 -24
- data/rbi/stripe/resources/identity/verification_report.rbi +18 -21
- data/rbi/stripe/resources/identity/verification_session.rbi +60 -61
- data/rbi/stripe/resources/invoice.rbi +723 -5918
- data/rbi/stripe/resources/invoice_item.rbi +138 -177
- data/rbi/stripe/resources/invoice_line_item.rbi +199 -264
- data/rbi/stripe/resources/invoice_payment.rbi +51 -7
- data/rbi/stripe/resources/invoice_rendering_template.rbi +10 -20
- data/rbi/stripe/resources/issuing/authorization.rbi +216 -199
- data/rbi/stripe/resources/issuing/card.rbi +104 -101
- data/rbi/stripe/resources/issuing/cardholder.rbi +120 -108
- data/rbi/stripe/resources/issuing/dispute.rbi +164 -151
- data/rbi/stripe/resources/issuing/personalization_design.rbi +61 -56
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +7 -14
- data/rbi/stripe/resources/issuing/token.rbi +16 -21
- data/rbi/stripe/resources/issuing/transaction.rbi +180 -176
- data/rbi/stripe/resources/line_item.rbi +0 -36
- data/rbi/stripe/resources/mandate.rbi +8 -40
- data/rbi/stripe/resources/payment_intent.rbi +2252 -6482
- data/rbi/stripe/resources/payment_link.rbi +346 -211
- data/rbi/stripe/resources/payment_method.rbi +226 -330
- data/rbi/stripe/resources/payment_method_configuration.rbi +602 -685
- data/rbi/stripe/resources/payment_method_domain.rbi +26 -31
- data/rbi/stripe/resources/payout.rbi +43 -42
- data/rbi/stripe/resources/person.rbi +9 -9
- data/rbi/stripe/resources/plan.rbi +51 -63
- data/rbi/stripe/resources/price.rbi +114 -151
- data/rbi/stripe/resources/product.rbi +90 -152
- data/rbi/stripe/resources/promotion_code.rbi +42 -47
- data/rbi/stripe/resources/quote.rbi +168 -2231
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +17 -20
- data/rbi/stripe/resources/radar/value_list.rbi +24 -29
- data/rbi/stripe/resources/radar/value_list_item.rbi +18 -21
- data/rbi/stripe/resources/refund.rbi +52 -51
- data/rbi/stripe/resources/reporting/report_run.rbi +27 -30
- data/rbi/stripe/resources/reporting/report_type.rbi +2 -9
- data/rbi/stripe/resources/review.rbi +17 -22
- data/rbi/stripe/resources/setup_attempt.rbi +25 -32
- data/rbi/stripe/resources/setup_intent.rbi +900 -1102
- data/rbi/stripe/resources/shipping_rate.rbi +41 -46
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +5 -12
- data/rbi/stripe/resources/source.rbi +132 -179
- data/rbi/stripe/resources/subscription.rbi +363 -707
- data/rbi/stripe/resources/subscription_item.rbi +69 -177
- data/rbi/stripe/resources/subscription_schedule.rbi +289 -1447
- data/rbi/stripe/resources/tax/calculation.rbi +43 -48
- data/rbi/stripe/resources/tax/registration.rbi +217 -170
- data/rbi/stripe/resources/tax/settings.rbi +14 -21
- data/rbi/stripe/resources/tax/transaction.rbi +20 -25
- data/rbi/stripe/resources/tax_code.rbi +5 -12
- data/rbi/stripe/resources/tax_id.rbi +15 -22
- data/rbi/stripe/resources/tax_rate.rbi +34 -39
- data/rbi/stripe/resources/terminal/configuration.rbi +457 -212
- data/rbi/stripe/resources/terminal/connection_token.rbi +3 -3
- data/rbi/stripe/resources/terminal/location.rbi +28 -35
- data/rbi/stripe/resources/terminal/reader.rbi +71 -441
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +12 -17
- data/rbi/stripe/resources/token.rbi +288 -263
- data/rbi/stripe/resources/topup.rbi +35 -38
- data/rbi/stripe/resources/transfer.rbi +27 -32
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +10 -17
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +11 -18
- data/rbi/stripe/resources/treasury/financial_account.rbi +125 -130
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -3
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +22 -29
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +82 -79
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +44 -86
- data/rbi/stripe/resources/treasury/received_credit.rbi +18 -64
- data/rbi/stripe/resources/treasury/received_debit.rbi +17 -66
- data/rbi/stripe/resources/treasury/transaction.rbi +27 -28
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +25 -26
- data/rbi/stripe/resources/v2/amount.rbi +1 -1
- data/rbi/stripe/resources/v2/event.rbi +1 -0
- data/rbi/stripe/resources/v2/event_destination.rbi +1 -0
- data/rbi/stripe/resources/webhook_endpoint.rbi +18 -25
- data/rbi/stripe/services/account_capability_service.rbi +7 -7
- data/rbi/stripe/services/account_external_account_service.rbi +52 -52
- data/rbi/stripe/services/account_link_service.rbi +9 -9
- data/rbi/stripe/services/account_login_link_service.rbi +2 -2
- data/rbi/stripe/services/account_person_service.rbi +221 -201
- data/rbi/stripe/services/account_service.rbi +1221 -1345
- data/rbi/stripe/services/account_session_service.rbi +115 -346
- data/rbi/stripe/services/apple_pay_domain_service.rbi +10 -10
- data/rbi/stripe/services/application_fee_refund_service.rbi +16 -14
- data/rbi/stripe/services/application_fee_service.rbi +18 -14
- data/rbi/stripe/services/apps/secret_service.rbi +20 -20
- data/rbi/stripe/services/balance_service.rbi +2 -2
- data/rbi/stripe/services/balance_transaction_service.rbi +22 -18
- data/rbi/stripe/services/billing/alert_service.rbi +23 -23
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +10 -10
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +8 -8
- data/rbi/stripe/services/billing/credit_grant_service.rbi +32 -30
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +7 -5
- data/rbi/stripe/services/billing/meter_event_service.rbi +4 -4
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +6 -6
- data/rbi/stripe/services/billing/meter_service.rbi +21 -21
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +90 -76
- data/rbi/stripe/services/billing_portal/session_service.rbi +29 -27
- data/rbi/stripe/services/charge_service.rbi +96 -1464
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +5 -5
- data/rbi/stripe/services/checkout/session_service.rbi +555 -591
- data/rbi/stripe/services/climate/order_service.rbi +22 -20
- data/rbi/stripe/services/climate/product_service.rbi +7 -7
- data/rbi/stripe/services/climate/supplier_service.rbi +7 -7
- data/rbi/stripe/services/confirmation_token_service.rbi +2 -2
- data/rbi/stripe/services/country_spec_service.rbi +7 -7
- data/rbi/stripe/services/coupon_service.rbi +40 -34
- data/rbi/stripe/services/credit_note_line_item_service.rbi +5 -5
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +35 -35
- data/rbi/stripe/services/credit_note_service.rbi +81 -85
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +15 -15
- data/rbi/stripe/services/customer_cash_balance_service.rbi +7 -7
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +7 -7
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +5 -5
- data/rbi/stripe/services/customer_payment_method_service.rbi +9 -9
- data/rbi/stripe/services/customer_payment_source_service.rbi +48 -44
- data/rbi/stripe/services/customer_service.rbi +143 -139
- data/rbi/stripe/services/customer_session_service.rbi +21 -15
- data/rbi/stripe/services/customer_tax_id_service.rbi +9 -9
- data/rbi/stripe/services/dispute_service.rbi +92 -90
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +7 -7
- data/rbi/stripe/services/entitlements/feature_service.rbi +17 -17
- data/rbi/stripe/services/ephemeral_key_service.rbi +8 -8
- data/rbi/stripe/services/event_service.rbi +18 -16
- data/rbi/stripe/services/exchange_rate_service.rbi +7 -7
- data/rbi/stripe/services/file_link_service.rbi +25 -23
- data/rbi/stripe/services/file_service.rbi +22 -20
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +5 -5
- data/rbi/stripe/services/financial_connections/account_service.rbi +22 -21
- data/rbi/stripe/services/financial_connections/session_service.rbi +16 -39
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +16 -14
- data/rbi/stripe/services/financial_connections_service.rbi +0 -1
- data/rbi/stripe/services/forwarding/request_service.rbi +21 -19
- data/rbi/stripe/services/identity/verification_report_service.rbi +18 -16
- data/rbi/stripe/services/identity/verification_session_service.rbi +62 -56
- data/rbi/stripe/services/invoice_item_service.rbi +99 -155
- data/rbi/stripe/services/invoice_line_item_service.rbi +71 -82
- data/rbi/stripe/services/invoice_payment_service.rbi +39 -12
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +13 -13
- data/rbi/stripe/services/invoice_service.rbi +679 -3799
- data/rbi/stripe/services/issuing/authorization_service.rbi +32 -26
- data/rbi/stripe/services/issuing/card_service.rbi +102 -86
- data/rbi/stripe/services/issuing/cardholder_service.rbi +122 -103
- data/rbi/stripe/services/issuing/dispute_service.rbi +152 -146
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +52 -42
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +9 -9
- data/rbi/stripe/services/issuing/token_service.rbi +20 -16
- data/rbi/stripe/services/issuing/transaction_service.rbi +25 -23
- data/rbi/stripe/services/issuing_service.rbi +0 -3
- data/rbi/stripe/services/mandate_service.rbi +2 -2
- data/rbi/stripe/services/payment_intent_service.rbi +2312 -6081
- data/rbi/stripe/services/payment_link_line_item_service.rbi +5 -5
- data/rbi/stripe/services/payment_link_service.rbi +303 -201
- data/rbi/stripe/services/payment_method_configuration_service.rbi +616 -620
- data/rbi/stripe/services/payment_method_domain_service.rbi +25 -23
- data/rbi/stripe/services/payment_method_service.rbi +192 -249
- data/rbi/stripe/services/payout_service.rbi +45 -37
- data/rbi/stripe/services/plan_service.rbi +53 -55
- data/rbi/stripe/services/price_service.rbi +124 -129
- data/rbi/stripe/services/product_feature_service.rbi +9 -9
- data/rbi/stripe/services/product_service.rbi +94 -122
- data/rbi/stripe/services/promotion_code_service.rbi +46 -42
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +5 -5
- data/rbi/stripe/services/quote_line_item_service.rbi +5 -5
- data/rbi/stripe/services/quote_service.rbi +159 -1863
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +17 -15
- data/rbi/stripe/services/radar/value_list_item_service.rbi +20 -16
- data/rbi/stripe/services/radar/value_list_service.rbi +28 -24
- data/rbi/stripe/services/refund_service.rbi +37 -33
- data/rbi/stripe/services/reporting/report_run_service.rbi +29 -25
- data/rbi/stripe/services/reporting/report_type_service.rbi +4 -4
- data/rbi/stripe/services/review_service.rbi +17 -15
- data/rbi/stripe/services/setup_attempt_service.rbi +13 -11
- data/rbi/stripe/services/setup_intent_service.rbi +1028 -1062
- data/rbi/stripe/services/shipping_rate_service.rbi +47 -41
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +7 -7
- data/rbi/stripe/services/source_service.rbi +149 -133
- data/rbi/stripe/services/source_transaction_service.rbi +5 -5
- data/rbi/stripe/services/subscription_item_service.rbi +61 -159
- data/rbi/stripe/services/subscription_schedule_service.rbi +289 -1305
- data/rbi/stripe/services/subscription_service.rbi +366 -640
- data/rbi/stripe/services/tax/calculation_line_item_service.rbi +5 -5
- data/rbi/stripe/services/tax/calculation_service.rbi +40 -38
- data/rbi/stripe/services/tax/registration_service.rbi +337 -165
- data/rbi/stripe/services/tax/settings_service.rbi +16 -16
- data/rbi/stripe/services/tax/transaction_line_item_service.rbi +5 -5
- data/rbi/stripe/services/tax/transaction_service.rbi +19 -15
- data/rbi/stripe/services/tax_code_service.rbi +7 -7
- data/rbi/stripe/services/tax_id_service.rbi +17 -17
- data/rbi/stripe/services/tax_rate_service.rbi +36 -34
- data/rbi/stripe/services/tax_service.rbi +0 -2
- data/rbi/stripe/services/terminal/configuration_service.rbi +464 -204
- data/rbi/stripe/services/terminal/connection_token_service.rbi +3 -3
- data/rbi/stripe/services/terminal/location_service.rbi +30 -30
- data/rbi/stripe/services/terminal/reader_service.rbi +57 -226
- data/rbi/stripe/services/terminal_service.rbi +0 -1
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +157 -198
- data/rbi/stripe/services/test_helpers/customer_service.rbi +3 -3
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +180 -168
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +10 -10
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +11 -9
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +151 -145
- data/rbi/stripe/services/test_helpers/refund_service.rbi +2 -2
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +10 -39
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +14 -12
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +9 -9
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +20 -18
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +20 -18
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +11 -38
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +11 -38
- data/rbi/stripe/services/token_service.rbi +292 -258
- data/rbi/stripe/services/topup_service.rbi +37 -33
- data/rbi/stripe/services/transfer_reversal_service.rbi +18 -16
- data/rbi/stripe/services/transfer_service.rbi +29 -27
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +12 -12
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +13 -13
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +23 -26
- data/rbi/stripe/services/treasury/financial_account_service.rbi +92 -96
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +15 -15
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +60 -56
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +24 -49
- data/rbi/stripe/services/treasury/received_credit_service.rbi +11 -9
- data/rbi/stripe/services/treasury/received_debit_service.rbi +8 -8
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +25 -21
- data/rbi/stripe/services/treasury/transaction_service.rbi +31 -23
- data/rbi/stripe/services/v1_services.rbi +1 -7
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +3 -3
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +3 -3
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +21 -24
- data/rbi/stripe/services/v2/core/event_service.rbi +3 -6
- data/rbi/stripe/services/webhook_endpoint_service.rbi +20 -20
- metadata +4 -109
- data/lib/stripe/request_signing_authenticator.rb +0 -79
- data/lib/stripe/resources/account_notice.rb +0 -132
- data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
- data/lib/stripe/resources/capital/financing_offer.rb +0 -188
- data/lib/stripe/resources/capital/financing_summary.rb +0 -64
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -123
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
- data/lib/stripe/resources/financial_connections/institution.rb +0 -99
- data/lib/stripe/resources/gift_cards/card.rb +0 -217
- data/lib/stripe/resources/gift_cards/transaction.rb +0 -281
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -611
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -84
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -95
- data/lib/stripe/resources/issuing/settlement.rb +0 -49
- data/lib/stripe/resources/margin.rb +0 -124
- data/lib/stripe/resources/order.rb +0 -2868
- data/lib/stripe/resources/payment_attempt_record.rb +0 -184
- data/lib/stripe/resources/payment_record.rb +0 -715
- data/lib/stripe/resources/quote_line.rb +0 -274
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -652
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -362
- data/lib/stripe/resources/tax/association.rb +0 -89
- data/lib/stripe/resources/tax/form.rb +0 -220
- data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -40
- data/lib/stripe/resources/usage_record.rb +0 -30
- data/lib/stripe/resources/usage_record_summary.rb +0 -33
- data/lib/stripe/services/account_notice_service.rb +0 -101
- data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
- data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
- data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
- data/lib/stripe/services/capital_service.rb +0 -15
- data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +0 -37
- data/lib/stripe/services/financial_connections/institution_service.rb +0 -57
- data/lib/stripe/services/gift_cards/card_service.rb +0 -170
- data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
- data/lib/stripe/services/gift_cards_service.rb +0 -14
- data/lib/stripe/services/invoice_upcoming_lines_service.rb +0 -1881
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
- data/lib/stripe/services/margin_service.rb +0 -119
- data/lib/stripe/services/order_line_item_service.rb +0 -35
- data/lib/stripe/services/order_service.rb +0 -2268
- data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
- data/lib/stripe/services/payment_record_service.rb +0 -542
- data/lib/stripe/services/quote_line_service.rb +0 -35
- data/lib/stripe/services/quote_preview_invoice_service.rb +0 -35
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
- data/lib/stripe/services/subscription_item_usage_record_service.rb +0 -41
- data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +0 -37
- data/lib/stripe/services/tax/association_service.rb +0 -31
- data/lib/stripe/services/tax/form_service.rb +0 -100
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
- data/rbi/stripe/resources/account_notice.rbi +0 -139
- data/rbi/stripe/resources/billing/meter_error_report.rbi +0 -71
- data/rbi/stripe/resources/capital/financing_offer.rbi +0 -190
- data/rbi/stripe/resources/capital/financing_summary.rbi +0 -74
- data/rbi/stripe/resources/capital/financing_transaction.rbi +0 -130
- data/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +0 -27
- data/rbi/stripe/resources/financial_connections/institution.rbi +0 -99
- data/rbi/stripe/resources/gift_cards/card.rbi +0 -206
- data/rbi/stripe/resources/gift_cards/transaction.rbi +0 -257
- data/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +0 -622
- data/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +0 -83
- data/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +0 -90
- data/rbi/stripe/resources/issuing/settlement.rbi +0 -62
- data/rbi/stripe/resources/margin.rbi +0 -127
- data/rbi/stripe/resources/order.rbi +0 -3036
- data/rbi/stripe/resources/payment_attempt_record.rbi +0 -215
- data/rbi/stripe/resources/payment_record.rbi +0 -722
- data/rbi/stripe/resources/quote_line.rbi +0 -350
- data/rbi/stripe/resources/quote_preview_invoice.rbi +0 -850
- data/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +0 -474
- data/rbi/stripe/resources/tax/association.rbi +0 -94
- data/rbi/stripe/resources/tax/form.rbi +0 -224
- data/rbi/stripe/resources/terminal/reader_collected_data.rbi +0 -41
- data/rbi/stripe/resources/usage_record.rbi +0 -32
- data/rbi/stripe/resources/usage_record_summary.rbi +0 -38
- data/rbi/stripe/services/account_notice_service.rbi +0 -90
- data/rbi/stripe/services/capital/financing_offer_service.rbi +0 -95
- data/rbi/stripe/services/capital/financing_summary_service.rbi +0 -22
- data/rbi/stripe/services/capital/financing_transaction_service.rbi +0 -68
- data/rbi/stripe/services/capital_service.rbi +0 -11
- data/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi +0 -33
- data/rbi/stripe/services/financial_connections/institution_service.rbi +0 -46
- data/rbi/stripe/services/gift_cards/card_service.rbi +0 -142
- data/rbi/stripe/services/gift_cards/transaction_service.rbi +0 -174
- data/rbi/stripe/services/gift_cards_service.rbi +0 -10
- data/rbi/stripe/services/invoice_upcoming_lines_service.rbi +0 -2023
- data/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi +0 -498
- data/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi +0 -55
- data/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi +0 -73
- data/rbi/stripe/services/margin_service.rbi +0 -104
- data/rbi/stripe/services/order_line_item_service.rbi +0 -31
- data/rbi/stripe/services/order_service.rbi +0 -2320
- data/rbi/stripe/services/payment_attempt_record_service.rbi +0 -36
- data/rbi/stripe/services/payment_record_service.rbi +0 -521
- data/rbi/stripe/services/quote_line_service.rbi +0 -31
- data/rbi/stripe/services/quote_preview_invoice_service.rbi +0 -31
- data/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi +0 -31
- data/rbi/stripe/services/subscription_item_usage_record_service.rbi +0 -37
- data/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi +0 -33
- data/rbi/stripe/services/tax/association_service.rbi +0 -25
- data/rbi/stripe/services/tax/form_service.rbi +0 -85
- data/rbi/stripe/services/terminal/reader_collected_data_service.rbi +0 -22
@@ -7,7 +7,6 @@ module Stripe
|
|
7
7
|
class Quote < APIResource
|
8
8
|
extend Stripe::APIOperations::Create
|
9
9
|
extend Stripe::APIOperations::List
|
10
|
-
extend Stripe::APIOperations::NestedResource
|
11
10
|
include Stripe::APIOperations::Save
|
12
11
|
|
13
12
|
OBJECT_NAME = "quote"
|
@@ -15,9 +14,6 @@ module Stripe
|
|
15
14
|
"quote"
|
16
15
|
end
|
17
16
|
|
18
|
-
nested_resource_class_methods :preview_invoice, operations: %i[list]
|
19
|
-
nested_resource_class_methods :preview_subscription_schedule, operations: %i[list]
|
20
|
-
|
21
17
|
class AutomaticTax < Stripe::StripeObject
|
22
18
|
class Liability < Stripe::StripeObject
|
23
19
|
# The connected account being referenced when `type` is `account`.
|
@@ -34,21 +30,6 @@ module Stripe
|
|
34
30
|
end
|
35
31
|
|
36
32
|
class Computed < Stripe::StripeObject
|
37
|
-
class LastReestimationDetails < Stripe::StripeObject
|
38
|
-
class Failed < Stripe::StripeObject
|
39
|
-
# The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field.
|
40
|
-
attr_reader :failure_code
|
41
|
-
# Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID".
|
42
|
-
attr_reader :message
|
43
|
-
# The reason the reestimation failed.
|
44
|
-
attr_reader :reason
|
45
|
-
end
|
46
|
-
# When `status` is `failed`, provides details about the quote reestimation failure.
|
47
|
-
attr_reader :failed
|
48
|
-
# Latest status of the reestimation.
|
49
|
-
attr_reader :status
|
50
|
-
end
|
51
|
-
|
52
33
|
class Recurring < Stripe::StripeObject
|
53
34
|
class TotalDetails < Stripe::StripeObject
|
54
35
|
class Breakdown < Stripe::StripeObject
|
@@ -148,12 +129,8 @@ module Stripe
|
|
148
129
|
# Attribute for field total_details
|
149
130
|
attr_reader :total_details
|
150
131
|
end
|
151
|
-
# Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation.
|
152
|
-
attr_reader :last_reestimation_details
|
153
132
|
# The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
|
154
133
|
attr_reader :recurring
|
155
|
-
# The time at which the quote's estimated schedules and upcoming invoices were generated.
|
156
|
-
attr_reader :updated_at
|
157
134
|
# Attribute for field upfront
|
158
135
|
attr_reader :upfront
|
159
136
|
end
|
@@ -178,68 +155,6 @@ module Stripe
|
|
178
155
|
attr_reader :issuer
|
179
156
|
end
|
180
157
|
|
181
|
-
class StatusDetails < Stripe::StripeObject
|
182
|
-
class Canceled < Stripe::StripeObject
|
183
|
-
# The reason this quote was marked as canceled.
|
184
|
-
attr_reader :reason
|
185
|
-
# Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch.
|
186
|
-
attr_reader :transitioned_at
|
187
|
-
end
|
188
|
-
|
189
|
-
class Stale < Stripe::StripeObject
|
190
|
-
class LastReason < Stripe::StripeObject
|
191
|
-
class LinesInvalid < Stripe::StripeObject
|
192
|
-
# The timestamp at which the lines were marked as invalid.
|
193
|
-
attr_reader :invalid_at
|
194
|
-
# The list of lines that became invalid at the given timestamp.
|
195
|
-
attr_reader :lines
|
196
|
-
end
|
197
|
-
|
198
|
-
class SubscriptionChanged < Stripe::StripeObject
|
199
|
-
# The subscription's state before the quote was marked as stale.
|
200
|
-
attr_reader :previous_subscription
|
201
|
-
end
|
202
|
-
|
203
|
-
class SubscriptionScheduleChanged < Stripe::StripeObject
|
204
|
-
# The subscription schedule's state before the quote was marked as stale.
|
205
|
-
attr_reader :previous_subscription_schedule
|
206
|
-
end
|
207
|
-
# The ID of the line that is invalid if the stale reason type is `line_invalid`.
|
208
|
-
attr_reader :line_invalid
|
209
|
-
# The IDs of the lines that are invalid if the stale reason type is `lines_invalid`.
|
210
|
-
attr_reader :lines_invalid
|
211
|
-
# The user supplied mark stale reason.
|
212
|
-
attr_reader :marked_stale
|
213
|
-
# The ID of the subscription that was canceled.
|
214
|
-
attr_reader :subscription_canceled
|
215
|
-
# Attribute for field subscription_changed
|
216
|
-
attr_reader :subscription_changed
|
217
|
-
# The ID of the subscription that was expired.
|
218
|
-
attr_reader :subscription_expired
|
219
|
-
# The ID of the subscription schedule that was canceled.
|
220
|
-
attr_reader :subscription_schedule_canceled
|
221
|
-
# Attribute for field subscription_schedule_changed
|
222
|
-
attr_reader :subscription_schedule_changed
|
223
|
-
# The ID of the subscription schedule that was released.
|
224
|
-
attr_reader :subscription_schedule_released
|
225
|
-
# The reason the quote was marked as stale.
|
226
|
-
attr_reader :type
|
227
|
-
end
|
228
|
-
# Time at which the quote expires. Measured in seconds since the Unix epoch.
|
229
|
-
attr_reader :expires_at
|
230
|
-
# The most recent reason this quote was marked as stale.
|
231
|
-
attr_reader :last_reason
|
232
|
-
# Time at which the stale reason was updated. Measured in seconds since the Unix epoch.
|
233
|
-
attr_reader :last_updated_at
|
234
|
-
# Time at which the quote was marked as stale. Measured in seconds since the Unix epoch.
|
235
|
-
attr_reader :transitioned_at
|
236
|
-
end
|
237
|
-
# Attribute for field canceled
|
238
|
-
attr_reader :canceled
|
239
|
-
# Attribute for field stale
|
240
|
-
attr_reader :stale
|
241
|
-
end
|
242
|
-
|
243
158
|
class StatusTransitions < Stripe::StripeObject
|
244
159
|
# The time that the quote was accepted. Measured in seconds since Unix epoch.
|
245
160
|
attr_reader :accepted_at
|
@@ -250,164 +165,16 @@ module Stripe
|
|
250
165
|
end
|
251
166
|
|
252
167
|
class SubscriptionData < Stripe::StripeObject
|
253
|
-
class BillOnAcceptance < Stripe::StripeObject
|
254
|
-
class BillFrom < Stripe::StripeObject
|
255
|
-
class LineStartsAt < Stripe::StripeObject
|
256
|
-
# Unique identifier for the object.
|
257
|
-
attr_reader :id
|
258
|
-
end
|
259
|
-
# The materialized time.
|
260
|
-
attr_reader :computed
|
261
|
-
# The timestamp the given line starts at.
|
262
|
-
attr_reader :line_starts_at
|
263
|
-
# A precise Unix timestamp.
|
264
|
-
attr_reader :timestamp
|
265
|
-
# The type of method to specify the `bill_from` time.
|
266
|
-
attr_reader :type
|
267
|
-
end
|
268
|
-
|
269
|
-
class BillUntil < Stripe::StripeObject
|
270
|
-
class Duration < Stripe::StripeObject
|
271
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
272
|
-
attr_reader :interval
|
273
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
274
|
-
attr_reader :interval_count
|
275
|
-
end
|
276
|
-
|
277
|
-
class LineEndsAt < Stripe::StripeObject
|
278
|
-
# Unique identifier for the object.
|
279
|
-
attr_reader :id
|
280
|
-
end
|
281
|
-
# The materialized time.
|
282
|
-
attr_reader :computed
|
283
|
-
# Time span for the quote line starting from the `starts_at` date.
|
284
|
-
attr_reader :duration
|
285
|
-
# The timestamp the given line ends at.
|
286
|
-
attr_reader :line_ends_at
|
287
|
-
# A precise Unix timestamp.
|
288
|
-
attr_reader :timestamp
|
289
|
-
# The type of method to specify the `bill_until` time.
|
290
|
-
attr_reader :type
|
291
|
-
end
|
292
|
-
# The start of the period to bill from when the Quote is accepted.
|
293
|
-
attr_reader :bill_from
|
294
|
-
# The end of the period to bill until when the Quote is accepted.
|
295
|
-
attr_reader :bill_until
|
296
|
-
end
|
297
|
-
|
298
|
-
class Prebilling < Stripe::StripeObject
|
299
|
-
# Attribute for field iterations
|
300
|
-
attr_reader :iterations
|
301
|
-
end
|
302
|
-
# Describes the period to bill for upon accepting the quote.
|
303
|
-
attr_reader :bill_on_acceptance
|
304
|
-
# 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.
|
305
|
-
attr_reader :billing_behavior
|
306
|
-
# Whether the subscription will always start a new billing period when the quote is accepted.
|
307
|
-
attr_reader :billing_cycle_anchor
|
308
168
|
# 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.
|
309
169
|
attr_reader :description
|
310
170
|
# When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
|
311
171
|
attr_reader :effective_date
|
312
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
313
|
-
attr_reader :end_behavior
|
314
|
-
# The id of the subscription that will be updated when the quote is accepted.
|
315
|
-
attr_reader :from_subscription
|
316
172
|
# 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.
|
317
173
|
attr_reader :metadata
|
318
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
319
|
-
attr_reader :prebilling
|
320
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
321
|
-
attr_reader :proration_behavior
|
322
174
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
323
175
|
attr_reader :trial_period_days
|
324
176
|
end
|
325
177
|
|
326
|
-
class SubscriptionDataOverride < Stripe::StripeObject
|
327
|
-
class AppliesTo < Stripe::StripeObject
|
328
|
-
# 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.
|
329
|
-
attr_reader :new_reference
|
330
|
-
# The ID of the schedule the line applies to.
|
331
|
-
attr_reader :subscription_schedule
|
332
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
333
|
-
attr_reader :type
|
334
|
-
end
|
335
|
-
|
336
|
-
class BillOnAcceptance < Stripe::StripeObject
|
337
|
-
class BillFrom < Stripe::StripeObject
|
338
|
-
class LineStartsAt < Stripe::StripeObject
|
339
|
-
# Unique identifier for the object.
|
340
|
-
attr_reader :id
|
341
|
-
end
|
342
|
-
# The materialized time.
|
343
|
-
attr_reader :computed
|
344
|
-
# The timestamp the given line starts at.
|
345
|
-
attr_reader :line_starts_at
|
346
|
-
# A precise Unix timestamp.
|
347
|
-
attr_reader :timestamp
|
348
|
-
# The type of method to specify the `bill_from` time.
|
349
|
-
attr_reader :type
|
350
|
-
end
|
351
|
-
|
352
|
-
class BillUntil < Stripe::StripeObject
|
353
|
-
class Duration < Stripe::StripeObject
|
354
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
355
|
-
attr_reader :interval
|
356
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
357
|
-
attr_reader :interval_count
|
358
|
-
end
|
359
|
-
|
360
|
-
class LineEndsAt < Stripe::StripeObject
|
361
|
-
# Unique identifier for the object.
|
362
|
-
attr_reader :id
|
363
|
-
end
|
364
|
-
# The materialized time.
|
365
|
-
attr_reader :computed
|
366
|
-
# Time span for the quote line starting from the `starts_at` date.
|
367
|
-
attr_reader :duration
|
368
|
-
# The timestamp the given line ends at.
|
369
|
-
attr_reader :line_ends_at
|
370
|
-
# A precise Unix timestamp.
|
371
|
-
attr_reader :timestamp
|
372
|
-
# The type of method to specify the `bill_until` time.
|
373
|
-
attr_reader :type
|
374
|
-
end
|
375
|
-
# The start of the period to bill from when the Quote is accepted.
|
376
|
-
attr_reader :bill_from
|
377
|
-
# The end of the period to bill until when the Quote is accepted.
|
378
|
-
attr_reader :bill_until
|
379
|
-
end
|
380
|
-
# Attribute for field applies_to
|
381
|
-
attr_reader :applies_to
|
382
|
-
# Describes the period to bill for upon accepting the quote.
|
383
|
-
attr_reader :bill_on_acceptance
|
384
|
-
# 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.
|
385
|
-
attr_reader :billing_behavior
|
386
|
-
# The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
387
|
-
attr_reader :customer
|
388
|
-
# 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.
|
389
|
-
attr_reader :description
|
390
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
391
|
-
attr_reader :end_behavior
|
392
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
393
|
-
attr_reader :proration_behavior
|
394
|
-
end
|
395
|
-
|
396
|
-
class SubscriptionSchedule < Stripe::StripeObject
|
397
|
-
class AppliesTo < Stripe::StripeObject
|
398
|
-
# 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.
|
399
|
-
attr_reader :new_reference
|
400
|
-
# The ID of the schedule the line applies to.
|
401
|
-
attr_reader :subscription_schedule
|
402
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
403
|
-
attr_reader :type
|
404
|
-
end
|
405
|
-
# Attribute for field applies_to
|
406
|
-
attr_reader :applies_to
|
407
|
-
# The subscription schedule that was created or updated from this quote.
|
408
|
-
attr_reader :subscription_schedule
|
409
|
-
end
|
410
|
-
|
411
178
|
class TotalDetails < Stripe::StripeObject
|
412
179
|
class Breakdown < Stripe::StripeObject
|
413
180
|
class Discount < Stripe::StripeObject
|
@@ -463,8 +230,6 @@ module Stripe
|
|
463
230
|
attr_accessor :ending_before
|
464
231
|
# Specifies which fields in the response should be expanded.
|
465
232
|
attr_accessor :expand
|
466
|
-
# The subscription which the quote updates.
|
467
|
-
attr_accessor :from_subscription
|
468
233
|
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
469
234
|
attr_accessor :limit
|
470
235
|
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
@@ -478,7 +243,6 @@ module Stripe
|
|
478
243
|
customer: nil,
|
479
244
|
ending_before: nil,
|
480
245
|
expand: nil,
|
481
|
-
from_subscription: nil,
|
482
246
|
limit: nil,
|
483
247
|
starting_after: nil,
|
484
248
|
status: nil,
|
@@ -487,7 +251,6 @@ module Stripe
|
|
487
251
|
@customer = customer
|
488
252
|
@ending_before = ending_before
|
489
253
|
@expand = expand
|
490
|
-
@from_subscription = from_subscription
|
491
254
|
@limit = limit
|
492
255
|
@starting_after = starting_after
|
493
256
|
@status = status
|
@@ -520,44 +283,16 @@ module Stripe
|
|
520
283
|
end
|
521
284
|
|
522
285
|
class Discount < Stripe::RequestParams
|
523
|
-
class DiscountEnd < Stripe::RequestParams
|
524
|
-
class Duration < Stripe::RequestParams
|
525
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
526
|
-
attr_accessor :interval
|
527
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
528
|
-
attr_accessor :interval_count
|
529
|
-
|
530
|
-
def initialize(interval: nil, interval_count: nil)
|
531
|
-
@interval = interval
|
532
|
-
@interval_count = interval_count
|
533
|
-
end
|
534
|
-
end
|
535
|
-
# Time span for the redeemed discount.
|
536
|
-
attr_accessor :duration
|
537
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
538
|
-
attr_accessor :timestamp
|
539
|
-
# The type of calculation made to determine when the discount ends.
|
540
|
-
attr_accessor :type
|
541
|
-
|
542
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
543
|
-
@duration = duration
|
544
|
-
@timestamp = timestamp
|
545
|
-
@type = type
|
546
|
-
end
|
547
|
-
end
|
548
286
|
# ID of the coupon to create a new discount for.
|
549
287
|
attr_accessor :coupon
|
550
288
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
551
289
|
attr_accessor :discount
|
552
|
-
# Details to determine how long the discount should be applied for.
|
553
|
-
attr_accessor :discount_end
|
554
290
|
# ID of the promotion code to create a new discount for.
|
555
291
|
attr_accessor :promotion_code
|
556
292
|
|
557
|
-
def initialize(coupon: nil, discount: nil,
|
293
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
558
294
|
@coupon = coupon
|
559
295
|
@discount = discount
|
560
|
-
@discount_end = discount_end
|
561
296
|
@promotion_code = promotion_code
|
562
297
|
end
|
563
298
|
end
|
@@ -597,522 +332,18 @@ module Stripe
|
|
597
332
|
end
|
598
333
|
end
|
599
334
|
|
600
|
-
class Line < Stripe::RequestParams
|
601
|
-
class Action < Stripe::RequestParams
|
602
|
-
class AddDiscount < Stripe::RequestParams
|
603
|
-
class DiscountEnd < Stripe::RequestParams
|
604
|
-
# The type of calculation made to determine when the discount ends.
|
605
|
-
attr_accessor :type
|
606
|
-
|
607
|
-
def initialize(type: nil)
|
608
|
-
@type = type
|
609
|
-
end
|
610
|
-
end
|
611
|
-
# The coupon code to redeem.
|
612
|
-
attr_accessor :coupon
|
613
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
614
|
-
attr_accessor :discount
|
615
|
-
# Details to determine how long the discount should be applied for.
|
616
|
-
attr_accessor :discount_end
|
617
|
-
# 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.
|
618
|
-
attr_accessor :index
|
619
|
-
# The promotion code to redeem.
|
620
|
-
attr_accessor :promotion_code
|
621
|
-
|
622
|
-
def initialize(
|
623
|
-
coupon: nil,
|
624
|
-
discount: nil,
|
625
|
-
discount_end: nil,
|
626
|
-
index: nil,
|
627
|
-
promotion_code: nil
|
628
|
-
)
|
629
|
-
@coupon = coupon
|
630
|
-
@discount = discount
|
631
|
-
@discount_end = discount_end
|
632
|
-
@index = index
|
633
|
-
@promotion_code = promotion_code
|
634
|
-
end
|
635
|
-
end
|
636
|
-
|
637
|
-
class AddItem < Stripe::RequestParams
|
638
|
-
class Discount < Stripe::RequestParams
|
639
|
-
class DiscountEnd < Stripe::RequestParams
|
640
|
-
class Duration < Stripe::RequestParams
|
641
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
642
|
-
attr_accessor :interval
|
643
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
644
|
-
attr_accessor :interval_count
|
645
|
-
|
646
|
-
def initialize(interval: nil, interval_count: nil)
|
647
|
-
@interval = interval
|
648
|
-
@interval_count = interval_count
|
649
|
-
end
|
650
|
-
end
|
651
|
-
# Time span for the redeemed discount.
|
652
|
-
attr_accessor :duration
|
653
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
654
|
-
attr_accessor :timestamp
|
655
|
-
# The type of calculation made to determine when the discount ends.
|
656
|
-
attr_accessor :type
|
657
|
-
|
658
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
659
|
-
@duration = duration
|
660
|
-
@timestamp = timestamp
|
661
|
-
@type = type
|
662
|
-
end
|
663
|
-
end
|
664
|
-
# ID of the coupon to create a new discount for.
|
665
|
-
attr_accessor :coupon
|
666
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
667
|
-
attr_accessor :discount
|
668
|
-
# Details to determine how long the discount should be applied for.
|
669
|
-
attr_accessor :discount_end
|
670
|
-
# ID of the promotion code to create a new discount for.
|
671
|
-
attr_accessor :promotion_code
|
672
|
-
|
673
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
674
|
-
@coupon = coupon
|
675
|
-
@discount = discount
|
676
|
-
@discount_end = discount_end
|
677
|
-
@promotion_code = promotion_code
|
678
|
-
end
|
679
|
-
end
|
680
|
-
|
681
|
-
class Trial < Stripe::RequestParams
|
682
|
-
# 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.
|
683
|
-
attr_accessor :converts_to
|
684
|
-
# Determines the type of trial for this item.
|
685
|
-
attr_accessor :type
|
686
|
-
|
687
|
-
def initialize(converts_to: nil, type: nil)
|
688
|
-
@converts_to = converts_to
|
689
|
-
@type = type
|
690
|
-
end
|
691
|
-
end
|
692
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
693
|
-
attr_accessor :discounts
|
694
|
-
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
695
|
-
attr_accessor :metadata
|
696
|
-
# The ID of the price object.
|
697
|
-
attr_accessor :price
|
698
|
-
# Quantity for this item.
|
699
|
-
attr_accessor :quantity
|
700
|
-
# 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`.
|
701
|
-
attr_accessor :tax_rates
|
702
|
-
# Options that configure the trial on the subscription item.
|
703
|
-
attr_accessor :trial
|
704
|
-
|
705
|
-
def initialize(
|
706
|
-
discounts: nil,
|
707
|
-
metadata: nil,
|
708
|
-
price: nil,
|
709
|
-
quantity: nil,
|
710
|
-
tax_rates: nil,
|
711
|
-
trial: nil
|
712
|
-
)
|
713
|
-
@discounts = discounts
|
714
|
-
@metadata = metadata
|
715
|
-
@price = price
|
716
|
-
@quantity = quantity
|
717
|
-
@tax_rates = tax_rates
|
718
|
-
@trial = trial
|
719
|
-
end
|
720
|
-
end
|
721
|
-
|
722
|
-
class RemoveDiscount < Stripe::RequestParams
|
723
|
-
# The coupon code to remove from the `discounts` array.
|
724
|
-
attr_accessor :coupon
|
725
|
-
# The ID of a discount to remove from the `discounts` array.
|
726
|
-
attr_accessor :discount
|
727
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
728
|
-
attr_accessor :promotion_code
|
729
|
-
|
730
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
731
|
-
@coupon = coupon
|
732
|
-
@discount = discount
|
733
|
-
@promotion_code = promotion_code
|
734
|
-
end
|
735
|
-
end
|
736
|
-
|
737
|
-
class RemoveItem < Stripe::RequestParams
|
738
|
-
# ID of a price to remove.
|
739
|
-
attr_accessor :price
|
740
|
-
|
741
|
-
def initialize(price: nil)
|
742
|
-
@price = price
|
743
|
-
end
|
744
|
-
end
|
745
|
-
|
746
|
-
class SetDiscount < Stripe::RequestParams
|
747
|
-
# The coupon code to replace the `discounts` array with.
|
748
|
-
attr_accessor :coupon
|
749
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
750
|
-
attr_accessor :discount
|
751
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
752
|
-
attr_accessor :promotion_code
|
753
|
-
|
754
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
755
|
-
@coupon = coupon
|
756
|
-
@discount = discount
|
757
|
-
@promotion_code = promotion_code
|
758
|
-
end
|
759
|
-
end
|
760
|
-
|
761
|
-
class SetItem < Stripe::RequestParams
|
762
|
-
class Discount < Stripe::RequestParams
|
763
|
-
class DiscountEnd < Stripe::RequestParams
|
764
|
-
class Duration < Stripe::RequestParams
|
765
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
766
|
-
attr_accessor :interval
|
767
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
768
|
-
attr_accessor :interval_count
|
769
|
-
|
770
|
-
def initialize(interval: nil, interval_count: nil)
|
771
|
-
@interval = interval
|
772
|
-
@interval_count = interval_count
|
773
|
-
end
|
774
|
-
end
|
775
|
-
# Time span for the redeemed discount.
|
776
|
-
attr_accessor :duration
|
777
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
778
|
-
attr_accessor :timestamp
|
779
|
-
# The type of calculation made to determine when the discount ends.
|
780
|
-
attr_accessor :type
|
781
|
-
|
782
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
783
|
-
@duration = duration
|
784
|
-
@timestamp = timestamp
|
785
|
-
@type = type
|
786
|
-
end
|
787
|
-
end
|
788
|
-
# ID of the coupon to create a new discount for.
|
789
|
-
attr_accessor :coupon
|
790
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
791
|
-
attr_accessor :discount
|
792
|
-
# Details to determine how long the discount should be applied for.
|
793
|
-
attr_accessor :discount_end
|
794
|
-
# ID of the promotion code to create a new discount for.
|
795
|
-
attr_accessor :promotion_code
|
796
|
-
|
797
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
798
|
-
@coupon = coupon
|
799
|
-
@discount = discount
|
800
|
-
@discount_end = discount_end
|
801
|
-
@promotion_code = promotion_code
|
802
|
-
end
|
803
|
-
end
|
804
|
-
|
805
|
-
class Trial < Stripe::RequestParams
|
806
|
-
# 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.
|
807
|
-
attr_accessor :converts_to
|
808
|
-
# Determines the type of trial for this item.
|
809
|
-
attr_accessor :type
|
810
|
-
|
811
|
-
def initialize(converts_to: nil, type: nil)
|
812
|
-
@converts_to = converts_to
|
813
|
-
@type = type
|
814
|
-
end
|
815
|
-
end
|
816
|
-
# 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`.
|
817
|
-
attr_accessor :discounts
|
818
|
-
# 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`.
|
819
|
-
attr_accessor :metadata
|
820
|
-
# The ID of the price object.
|
821
|
-
attr_accessor :price
|
822
|
-
# 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`.
|
823
|
-
attr_accessor :quantity
|
824
|
-
# 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`.
|
825
|
-
attr_accessor :tax_rates
|
826
|
-
# 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`.
|
827
|
-
attr_accessor :trial
|
828
|
-
|
829
|
-
def initialize(
|
830
|
-
discounts: nil,
|
831
|
-
metadata: nil,
|
832
|
-
price: nil,
|
833
|
-
quantity: nil,
|
834
|
-
tax_rates: nil,
|
835
|
-
trial: nil
|
836
|
-
)
|
837
|
-
@discounts = discounts
|
838
|
-
@metadata = metadata
|
839
|
-
@price = price
|
840
|
-
@quantity = quantity
|
841
|
-
@tax_rates = tax_rates
|
842
|
-
@trial = trial
|
843
|
-
end
|
844
|
-
end
|
845
|
-
# Details for the `add_discount` type.
|
846
|
-
attr_accessor :add_discount
|
847
|
-
# Details for the `add_item` type.
|
848
|
-
attr_accessor :add_item
|
849
|
-
# Details for the `add_metadata` type: specify a hash of key-value pairs.
|
850
|
-
attr_accessor :add_metadata
|
851
|
-
# Details for the `remove_discount` type.
|
852
|
-
attr_accessor :remove_discount
|
853
|
-
# Details for the `remove_item` type.
|
854
|
-
attr_accessor :remove_item
|
855
|
-
# Details for the `remove_metadata` type: specify an array of metadata keys.
|
856
|
-
attr_accessor :remove_metadata
|
857
|
-
# Details for the `set_discounts` type.
|
858
|
-
attr_accessor :set_discounts
|
859
|
-
# Details for the `set_items` type.
|
860
|
-
attr_accessor :set_items
|
861
|
-
# Details for the `set_metadata` type: specify an array of key-value pairs.
|
862
|
-
attr_accessor :set_metadata
|
863
|
-
# The type of action the quote line performs.
|
864
|
-
attr_accessor :type
|
865
|
-
|
866
|
-
def initialize(
|
867
|
-
add_discount: nil,
|
868
|
-
add_item: nil,
|
869
|
-
add_metadata: nil,
|
870
|
-
remove_discount: nil,
|
871
|
-
remove_item: nil,
|
872
|
-
remove_metadata: nil,
|
873
|
-
set_discounts: nil,
|
874
|
-
set_items: nil,
|
875
|
-
set_metadata: nil,
|
876
|
-
type: nil
|
877
|
-
)
|
878
|
-
@add_discount = add_discount
|
879
|
-
@add_item = add_item
|
880
|
-
@add_metadata = add_metadata
|
881
|
-
@remove_discount = remove_discount
|
882
|
-
@remove_item = remove_item
|
883
|
-
@remove_metadata = remove_metadata
|
884
|
-
@set_discounts = set_discounts
|
885
|
-
@set_items = set_items
|
886
|
-
@set_metadata = set_metadata
|
887
|
-
@type = type
|
888
|
-
end
|
889
|
-
end
|
890
|
-
|
891
|
-
class AppliesTo < Stripe::RequestParams
|
892
|
-
# 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.
|
893
|
-
attr_accessor :new_reference
|
894
|
-
# The ID of the schedule the line applies to.
|
895
|
-
attr_accessor :subscription_schedule
|
896
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
897
|
-
attr_accessor :type
|
898
|
-
|
899
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
900
|
-
@new_reference = new_reference
|
901
|
-
@subscription_schedule = subscription_schedule
|
902
|
-
@type = type
|
903
|
-
end
|
904
|
-
end
|
905
|
-
|
906
|
-
class CancelSubscriptionSchedule < Stripe::RequestParams
|
907
|
-
# Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
908
|
-
attr_accessor :cancel_at
|
909
|
-
# 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`.
|
910
|
-
attr_accessor :invoice_now
|
911
|
-
# If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
912
|
-
attr_accessor :prorate
|
913
|
-
|
914
|
-
def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
|
915
|
-
@cancel_at = cancel_at
|
916
|
-
@invoice_now = invoice_now
|
917
|
-
@prorate = prorate
|
918
|
-
end
|
919
|
-
end
|
920
|
-
|
921
|
-
class EndsAt < Stripe::RequestParams
|
922
|
-
class DiscountEnd < Stripe::RequestParams
|
923
|
-
# The ID of a specific discount.
|
924
|
-
attr_accessor :discount
|
925
|
-
|
926
|
-
def initialize(discount: nil)
|
927
|
-
@discount = discount
|
928
|
-
end
|
929
|
-
end
|
930
|
-
|
931
|
-
class Duration < Stripe::RequestParams
|
932
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
933
|
-
attr_accessor :interval
|
934
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
935
|
-
attr_accessor :interval_count
|
936
|
-
|
937
|
-
def initialize(interval: nil, interval_count: nil)
|
938
|
-
@interval = interval
|
939
|
-
@interval_count = interval_count
|
940
|
-
end
|
941
|
-
end
|
942
|
-
# Use the `end` time of a given discount.
|
943
|
-
attr_accessor :discount_end
|
944
|
-
# Time span for the quote line starting from the `starts_at` date.
|
945
|
-
attr_accessor :duration
|
946
|
-
# A precise Unix timestamp.
|
947
|
-
attr_accessor :timestamp
|
948
|
-
# Select a way to pass in `ends_at`.
|
949
|
-
attr_accessor :type
|
950
|
-
|
951
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
952
|
-
@discount_end = discount_end
|
953
|
-
@duration = duration
|
954
|
-
@timestamp = timestamp
|
955
|
-
@type = type
|
956
|
-
end
|
957
|
-
end
|
958
|
-
|
959
|
-
class SetPauseCollection < Stripe::RequestParams
|
960
|
-
class Set < Stripe::RequestParams
|
961
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
962
|
-
attr_accessor :behavior
|
963
|
-
|
964
|
-
def initialize(behavior: nil)
|
965
|
-
@behavior = behavior
|
966
|
-
end
|
967
|
-
end
|
968
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
969
|
-
attr_accessor :set
|
970
|
-
# Determines the type of the pause_collection amendment.
|
971
|
-
attr_accessor :type
|
972
|
-
|
973
|
-
def initialize(set: nil, type: nil)
|
974
|
-
@set = set
|
975
|
-
@type = type
|
976
|
-
end
|
977
|
-
end
|
978
|
-
|
979
|
-
class StartsAt < Stripe::RequestParams
|
980
|
-
class DiscountEnd < Stripe::RequestParams
|
981
|
-
# The ID of a specific discount.
|
982
|
-
attr_accessor :discount
|
983
|
-
|
984
|
-
def initialize(discount: nil)
|
985
|
-
@discount = discount
|
986
|
-
end
|
987
|
-
end
|
988
|
-
|
989
|
-
class LineEndsAt < Stripe::RequestParams
|
990
|
-
# 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.
|
991
|
-
attr_accessor :index
|
992
|
-
|
993
|
-
def initialize(index: nil)
|
994
|
-
@index = index
|
995
|
-
end
|
996
|
-
end
|
997
|
-
# Use the `end` time of a given discount.
|
998
|
-
attr_accessor :discount_end
|
999
|
-
# The timestamp the given line ends at.
|
1000
|
-
attr_accessor :line_ends_at
|
1001
|
-
# A precise Unix timestamp.
|
1002
|
-
attr_accessor :timestamp
|
1003
|
-
# Select a way to pass in `starts_at`.
|
1004
|
-
attr_accessor :type
|
1005
|
-
|
1006
|
-
def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
1007
|
-
@discount_end = discount_end
|
1008
|
-
@line_ends_at = line_ends_at
|
1009
|
-
@timestamp = timestamp
|
1010
|
-
@type = type
|
1011
|
-
end
|
1012
|
-
end
|
1013
|
-
|
1014
|
-
class TrialSettings < Stripe::RequestParams
|
1015
|
-
class EndBehavior < Stripe::RequestParams
|
1016
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1017
|
-
attr_accessor :prorate_up_front
|
1018
|
-
|
1019
|
-
def initialize(prorate_up_front: nil)
|
1020
|
-
@prorate_up_front = prorate_up_front
|
1021
|
-
end
|
1022
|
-
end
|
1023
|
-
# Defines how the subscription should behave when a trial ends.
|
1024
|
-
attr_accessor :end_behavior
|
1025
|
-
|
1026
|
-
def initialize(end_behavior: nil)
|
1027
|
-
@end_behavior = end_behavior
|
1028
|
-
end
|
1029
|
-
end
|
1030
|
-
# An array of operations the quote line performs.
|
1031
|
-
attr_accessor :actions
|
1032
|
-
# Details to identify the subscription schedule the quote line applies to.
|
1033
|
-
attr_accessor :applies_to
|
1034
|
-
# 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.
|
1035
|
-
attr_accessor :billing_cycle_anchor
|
1036
|
-
# 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.
|
1037
|
-
attr_accessor :cancel_subscription_schedule
|
1038
|
-
# 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.
|
1039
|
-
attr_accessor :ends_at
|
1040
|
-
# 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.
|
1041
|
-
attr_accessor :proration_behavior
|
1042
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
1043
|
-
attr_accessor :set_pause_collection
|
1044
|
-
# Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
1045
|
-
attr_accessor :set_schedule_end
|
1046
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
1047
|
-
attr_accessor :starts_at
|
1048
|
-
# Settings related to subscription trials.
|
1049
|
-
attr_accessor :trial_settings
|
1050
|
-
|
1051
|
-
def initialize(
|
1052
|
-
actions: nil,
|
1053
|
-
applies_to: nil,
|
1054
|
-
billing_cycle_anchor: nil,
|
1055
|
-
cancel_subscription_schedule: nil,
|
1056
|
-
ends_at: nil,
|
1057
|
-
proration_behavior: nil,
|
1058
|
-
set_pause_collection: nil,
|
1059
|
-
set_schedule_end: nil,
|
1060
|
-
starts_at: nil,
|
1061
|
-
trial_settings: nil
|
1062
|
-
)
|
1063
|
-
@actions = actions
|
1064
|
-
@applies_to = applies_to
|
1065
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
1066
|
-
@cancel_subscription_schedule = cancel_subscription_schedule
|
1067
|
-
@ends_at = ends_at
|
1068
|
-
@proration_behavior = proration_behavior
|
1069
|
-
@set_pause_collection = set_pause_collection
|
1070
|
-
@set_schedule_end = set_schedule_end
|
1071
|
-
@starts_at = starts_at
|
1072
|
-
@trial_settings = trial_settings
|
1073
|
-
end
|
1074
|
-
end
|
1075
|
-
|
1076
335
|
class LineItem < Stripe::RequestParams
|
1077
336
|
class Discount < Stripe::RequestParams
|
1078
|
-
class DiscountEnd < Stripe::RequestParams
|
1079
|
-
class Duration < Stripe::RequestParams
|
1080
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1081
|
-
attr_accessor :interval
|
1082
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1083
|
-
attr_accessor :interval_count
|
1084
|
-
|
1085
|
-
def initialize(interval: nil, interval_count: nil)
|
1086
|
-
@interval = interval
|
1087
|
-
@interval_count = interval_count
|
1088
|
-
end
|
1089
|
-
end
|
1090
|
-
# Time span for the redeemed discount.
|
1091
|
-
attr_accessor :duration
|
1092
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1093
|
-
attr_accessor :timestamp
|
1094
|
-
# The type of calculation made to determine when the discount ends.
|
1095
|
-
attr_accessor :type
|
1096
|
-
|
1097
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1098
|
-
@duration = duration
|
1099
|
-
@timestamp = timestamp
|
1100
|
-
@type = type
|
1101
|
-
end
|
1102
|
-
end
|
1103
337
|
# ID of the coupon to create a new discount for.
|
1104
338
|
attr_accessor :coupon
|
1105
339
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1106
340
|
attr_accessor :discount
|
1107
|
-
# Details to determine how long the discount should be applied for.
|
1108
|
-
attr_accessor :discount_end
|
1109
341
|
# ID of the promotion code to create a new discount for.
|
1110
342
|
attr_accessor :promotion_code
|
1111
343
|
|
1112
|
-
def initialize(coupon: nil, discount: nil,
|
344
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1113
345
|
@coupon = coupon
|
1114
346
|
@discount = discount
|
1115
|
-
@discount_end = discount_end
|
1116
347
|
@promotion_code = promotion_code
|
1117
348
|
end
|
1118
349
|
end
|
@@ -1131,7 +362,7 @@ module Stripe
|
|
1131
362
|
end
|
1132
363
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1133
364
|
attr_accessor :currency
|
1134
|
-
# The ID of the
|
365
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
1135
366
|
attr_accessor :product
|
1136
367
|
# The recurring components of a price such as `interval` and `interval_count`.
|
1137
368
|
attr_accessor :recurring
|
@@ -1179,281 +410,23 @@ module Stripe
|
|
1179
410
|
end
|
1180
411
|
|
1181
412
|
class SubscriptionData < Stripe::RequestParams
|
1182
|
-
class BillOnAcceptance < Stripe::RequestParams
|
1183
|
-
class BillFrom < Stripe::RequestParams
|
1184
|
-
class LineStartsAt < Stripe::RequestParams
|
1185
|
-
# The ID of a quote line.
|
1186
|
-
attr_accessor :id
|
1187
|
-
# 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.
|
1188
|
-
attr_accessor :index
|
1189
|
-
|
1190
|
-
def initialize(id: nil, index: nil)
|
1191
|
-
@id = id
|
1192
|
-
@index = index
|
1193
|
-
end
|
1194
|
-
end
|
1195
|
-
# Details of a Quote line to start the bill period from.
|
1196
|
-
attr_accessor :line_starts_at
|
1197
|
-
# A precise Unix timestamp.
|
1198
|
-
attr_accessor :timestamp
|
1199
|
-
# The type of method to specify the `bill_from` time.
|
1200
|
-
attr_accessor :type
|
1201
|
-
|
1202
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
1203
|
-
@line_starts_at = line_starts_at
|
1204
|
-
@timestamp = timestamp
|
1205
|
-
@type = type
|
1206
|
-
end
|
1207
|
-
end
|
1208
|
-
|
1209
|
-
class BillUntil < Stripe::RequestParams
|
1210
|
-
class Duration < Stripe::RequestParams
|
1211
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1212
|
-
attr_accessor :interval
|
1213
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1214
|
-
attr_accessor :interval_count
|
1215
|
-
|
1216
|
-
def initialize(interval: nil, interval_count: nil)
|
1217
|
-
@interval = interval
|
1218
|
-
@interval_count = interval_count
|
1219
|
-
end
|
1220
|
-
end
|
1221
|
-
|
1222
|
-
class LineEndsAt < Stripe::RequestParams
|
1223
|
-
# The ID of a quote line.
|
1224
|
-
attr_accessor :id
|
1225
|
-
# 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.
|
1226
|
-
attr_accessor :index
|
1227
|
-
|
1228
|
-
def initialize(id: nil, index: nil)
|
1229
|
-
@id = id
|
1230
|
-
@index = index
|
1231
|
-
end
|
1232
|
-
end
|
1233
|
-
# Details of the duration over which to bill.
|
1234
|
-
attr_accessor :duration
|
1235
|
-
# Details of a Quote line item from which to bill until.
|
1236
|
-
attr_accessor :line_ends_at
|
1237
|
-
# A precise Unix timestamp.
|
1238
|
-
attr_accessor :timestamp
|
1239
|
-
# The type of method to specify the `bill_until` time.
|
1240
|
-
attr_accessor :type
|
1241
|
-
|
1242
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
1243
|
-
@duration = duration
|
1244
|
-
@line_ends_at = line_ends_at
|
1245
|
-
@timestamp = timestamp
|
1246
|
-
@type = type
|
1247
|
-
end
|
1248
|
-
end
|
1249
|
-
# The start of the period to bill from when the Quote is accepted.
|
1250
|
-
attr_accessor :bill_from
|
1251
|
-
# The end of the period to bill until when the Quote is accepted.
|
1252
|
-
attr_accessor :bill_until
|
1253
|
-
|
1254
|
-
def initialize(bill_from: nil, bill_until: nil)
|
1255
|
-
@bill_from = bill_from
|
1256
|
-
@bill_until = bill_until
|
1257
|
-
end
|
1258
|
-
end
|
1259
|
-
|
1260
|
-
class Prebilling < Stripe::RequestParams
|
1261
|
-
# This is used to determine the number of billing cycles to prebill.
|
1262
|
-
attr_accessor :iterations
|
1263
|
-
|
1264
|
-
def initialize(iterations: nil)
|
1265
|
-
@iterations = iterations
|
1266
|
-
end
|
1267
|
-
end
|
1268
|
-
# Describes the period to bill for upon accepting the quote.
|
1269
|
-
attr_accessor :bill_on_acceptance
|
1270
|
-
# 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.
|
1271
|
-
attr_accessor :billing_behavior
|
1272
|
-
# When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
1273
|
-
attr_accessor :billing_cycle_anchor
|
1274
413
|
# 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.
|
1275
414
|
attr_accessor :description
|
1276
415
|
# 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.
|
1277
416
|
attr_accessor :effective_date
|
1278
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
1279
|
-
attr_accessor :end_behavior
|
1280
|
-
# 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.
|
1281
|
-
attr_accessor :from_subscription
|
1282
417
|
# 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.
|
1283
418
|
attr_accessor :metadata
|
1284
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
1285
|
-
attr_accessor :prebilling
|
1286
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
1287
|
-
#
|
1288
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
1289
|
-
#
|
1290
|
-
# 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`.
|
1291
|
-
#
|
1292
|
-
# Prorations can be disabled by passing `none`.
|
1293
|
-
attr_accessor :proration_behavior
|
1294
419
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
1295
420
|
attr_accessor :trial_period_days
|
1296
421
|
|
1297
|
-
def initialize(
|
1298
|
-
bill_on_acceptance: nil,
|
1299
|
-
billing_behavior: nil,
|
1300
|
-
billing_cycle_anchor: nil,
|
1301
|
-
description: nil,
|
1302
|
-
effective_date: nil,
|
1303
|
-
end_behavior: nil,
|
1304
|
-
from_subscription: nil,
|
1305
|
-
metadata: nil,
|
1306
|
-
prebilling: nil,
|
1307
|
-
proration_behavior: nil,
|
1308
|
-
trial_period_days: nil
|
1309
|
-
)
|
1310
|
-
@bill_on_acceptance = bill_on_acceptance
|
1311
|
-
@billing_behavior = billing_behavior
|
1312
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
422
|
+
def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil)
|
1313
423
|
@description = description
|
1314
424
|
@effective_date = effective_date
|
1315
|
-
@end_behavior = end_behavior
|
1316
|
-
@from_subscription = from_subscription
|
1317
425
|
@metadata = metadata
|
1318
|
-
@prebilling = prebilling
|
1319
|
-
@proration_behavior = proration_behavior
|
1320
426
|
@trial_period_days = trial_period_days
|
1321
427
|
end
|
1322
428
|
end
|
1323
429
|
|
1324
|
-
class SubscriptionDataOverride < Stripe::RequestParams
|
1325
|
-
class AppliesTo < Stripe::RequestParams
|
1326
|
-
# 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.
|
1327
|
-
attr_accessor :new_reference
|
1328
|
-
# The ID of the schedule the line applies to.
|
1329
|
-
attr_accessor :subscription_schedule
|
1330
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
1331
|
-
attr_accessor :type
|
1332
|
-
|
1333
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
1334
|
-
@new_reference = new_reference
|
1335
|
-
@subscription_schedule = subscription_schedule
|
1336
|
-
@type = type
|
1337
|
-
end
|
1338
|
-
end
|
1339
|
-
|
1340
|
-
class BillOnAcceptance < Stripe::RequestParams
|
1341
|
-
class BillFrom < Stripe::RequestParams
|
1342
|
-
class LineStartsAt < Stripe::RequestParams
|
1343
|
-
# The ID of a quote line.
|
1344
|
-
attr_accessor :id
|
1345
|
-
# 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.
|
1346
|
-
attr_accessor :index
|
1347
|
-
|
1348
|
-
def initialize(id: nil, index: nil)
|
1349
|
-
@id = id
|
1350
|
-
@index = index
|
1351
|
-
end
|
1352
|
-
end
|
1353
|
-
# Details of a Quote line to start the bill period from.
|
1354
|
-
attr_accessor :line_starts_at
|
1355
|
-
# A precise Unix timestamp.
|
1356
|
-
attr_accessor :timestamp
|
1357
|
-
# The type of method to specify the `bill_from` time.
|
1358
|
-
attr_accessor :type
|
1359
|
-
|
1360
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
1361
|
-
@line_starts_at = line_starts_at
|
1362
|
-
@timestamp = timestamp
|
1363
|
-
@type = type
|
1364
|
-
end
|
1365
|
-
end
|
1366
|
-
|
1367
|
-
class BillUntil < Stripe::RequestParams
|
1368
|
-
class Duration < Stripe::RequestParams
|
1369
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1370
|
-
attr_accessor :interval
|
1371
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1372
|
-
attr_accessor :interval_count
|
1373
|
-
|
1374
|
-
def initialize(interval: nil, interval_count: nil)
|
1375
|
-
@interval = interval
|
1376
|
-
@interval_count = interval_count
|
1377
|
-
end
|
1378
|
-
end
|
1379
|
-
|
1380
|
-
class LineEndsAt < Stripe::RequestParams
|
1381
|
-
# The ID of a quote line.
|
1382
|
-
attr_accessor :id
|
1383
|
-
# 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.
|
1384
|
-
attr_accessor :index
|
1385
|
-
|
1386
|
-
def initialize(id: nil, index: nil)
|
1387
|
-
@id = id
|
1388
|
-
@index = index
|
1389
|
-
end
|
1390
|
-
end
|
1391
|
-
# Details of the duration over which to bill.
|
1392
|
-
attr_accessor :duration
|
1393
|
-
# Details of a Quote line item from which to bill until.
|
1394
|
-
attr_accessor :line_ends_at
|
1395
|
-
# A precise Unix timestamp.
|
1396
|
-
attr_accessor :timestamp
|
1397
|
-
# The type of method to specify the `bill_until` time.
|
1398
|
-
attr_accessor :type
|
1399
|
-
|
1400
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
1401
|
-
@duration = duration
|
1402
|
-
@line_ends_at = line_ends_at
|
1403
|
-
@timestamp = timestamp
|
1404
|
-
@type = type
|
1405
|
-
end
|
1406
|
-
end
|
1407
|
-
# The start of the period to bill from when the Quote is accepted.
|
1408
|
-
attr_accessor :bill_from
|
1409
|
-
# The end of the period to bill until when the Quote is accepted.
|
1410
|
-
attr_accessor :bill_until
|
1411
|
-
|
1412
|
-
def initialize(bill_from: nil, bill_until: nil)
|
1413
|
-
@bill_from = bill_from
|
1414
|
-
@bill_until = bill_until
|
1415
|
-
end
|
1416
|
-
end
|
1417
|
-
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
1418
|
-
attr_accessor :applies_to
|
1419
|
-
# Describes the period to bill for upon accepting the quote.
|
1420
|
-
attr_accessor :bill_on_acceptance
|
1421
|
-
# 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.
|
1422
|
-
attr_accessor :billing_behavior
|
1423
|
-
# The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
|
1424
|
-
attr_accessor :customer
|
1425
|
-
# 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.
|
1426
|
-
attr_accessor :description
|
1427
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
1428
|
-
attr_accessor :end_behavior
|
1429
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
1430
|
-
#
|
1431
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
1432
|
-
#
|
1433
|
-
# 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`.
|
1434
|
-
#
|
1435
|
-
# Prorations can be disabled by passing `none`.
|
1436
|
-
attr_accessor :proration_behavior
|
1437
|
-
|
1438
|
-
def initialize(
|
1439
|
-
applies_to: nil,
|
1440
|
-
bill_on_acceptance: nil,
|
1441
|
-
billing_behavior: nil,
|
1442
|
-
customer: nil,
|
1443
|
-
description: nil,
|
1444
|
-
end_behavior: nil,
|
1445
|
-
proration_behavior: nil
|
1446
|
-
)
|
1447
|
-
@applies_to = applies_to
|
1448
|
-
@bill_on_acceptance = bill_on_acceptance
|
1449
|
-
@billing_behavior = billing_behavior
|
1450
|
-
@customer = customer
|
1451
|
-
@description = description
|
1452
|
-
@end_behavior = end_behavior
|
1453
|
-
@proration_behavior = proration_behavior
|
1454
|
-
end
|
1455
|
-
end
|
1456
|
-
|
1457
430
|
class TransferData < Stripe::RequestParams
|
1458
431
|
# 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.
|
1459
432
|
attr_accessor :amount
|
@@ -1468,8 +441,6 @@ module Stripe
|
|
1468
441
|
@destination = destination
|
1469
442
|
end
|
1470
443
|
end
|
1471
|
-
# Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
1472
|
-
attr_accessor :allow_backdated_lines
|
1473
444
|
# 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.
|
1474
445
|
attr_accessor :application_fee_amount
|
1475
446
|
# 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.
|
@@ -1500,23 +471,18 @@ module Stripe
|
|
1500
471
|
attr_accessor :invoice_settings
|
1501
472
|
# 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.
|
1502
473
|
attr_accessor :line_items
|
1503
|
-
# 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.
|
1504
|
-
attr_accessor :lines
|
1505
474
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1506
475
|
attr_accessor :metadata
|
1507
476
|
# The account on behalf of which to charge.
|
1508
477
|
attr_accessor :on_behalf_of
|
1509
478
|
# 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.
|
1510
479
|
attr_accessor :subscription_data
|
1511
|
-
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
1512
|
-
attr_accessor :subscription_data_overrides
|
1513
480
|
# ID of the test clock to attach to the quote.
|
1514
481
|
attr_accessor :test_clock
|
1515
482
|
# The data with which to automatically create a Transfer for each of the invoices.
|
1516
483
|
attr_accessor :transfer_data
|
1517
484
|
|
1518
485
|
def initialize(
|
1519
|
-
allow_backdated_lines: nil,
|
1520
486
|
application_fee_amount: nil,
|
1521
487
|
application_fee_percent: nil,
|
1522
488
|
automatic_tax: nil,
|
@@ -1532,15 +498,12 @@ module Stripe
|
|
1532
498
|
header: nil,
|
1533
499
|
invoice_settings: nil,
|
1534
500
|
line_items: nil,
|
1535
|
-
lines: nil,
|
1536
501
|
metadata: nil,
|
1537
502
|
on_behalf_of: nil,
|
1538
503
|
subscription_data: nil,
|
1539
|
-
subscription_data_overrides: nil,
|
1540
504
|
test_clock: nil,
|
1541
505
|
transfer_data: nil
|
1542
506
|
)
|
1543
|
-
@allow_backdated_lines = allow_backdated_lines
|
1544
507
|
@application_fee_amount = application_fee_amount
|
1545
508
|
@application_fee_percent = application_fee_percent
|
1546
509
|
@automatic_tax = automatic_tax
|
@@ -1556,25 +519,14 @@ module Stripe
|
|
1556
519
|
@header = header
|
1557
520
|
@invoice_settings = invoice_settings
|
1558
521
|
@line_items = line_items
|
1559
|
-
@lines = lines
|
1560
522
|
@metadata = metadata
|
1561
523
|
@on_behalf_of = on_behalf_of
|
1562
524
|
@subscription_data = subscription_data
|
1563
|
-
@subscription_data_overrides = subscription_data_overrides
|
1564
525
|
@test_clock = test_clock
|
1565
526
|
@transfer_data = transfer_data
|
1566
527
|
end
|
1567
528
|
end
|
1568
529
|
|
1569
|
-
class RetrieveParams < Stripe::RequestParams
|
1570
|
-
# Specifies which fields in the response should be expanded.
|
1571
|
-
attr_accessor :expand
|
1572
|
-
|
1573
|
-
def initialize(expand: nil)
|
1574
|
-
@expand = expand
|
1575
|
-
end
|
1576
|
-
end
|
1577
|
-
|
1578
530
|
class UpdateParams < Stripe::RequestParams
|
1579
531
|
class AutomaticTax < Stripe::RequestParams
|
1580
532
|
class Liability < Stripe::RequestParams
|
@@ -1600,44 +552,16 @@ module Stripe
|
|
1600
552
|
end
|
1601
553
|
|
1602
554
|
class Discount < Stripe::RequestParams
|
1603
|
-
class DiscountEnd < Stripe::RequestParams
|
1604
|
-
class Duration < Stripe::RequestParams
|
1605
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1606
|
-
attr_accessor :interval
|
1607
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1608
|
-
attr_accessor :interval_count
|
1609
|
-
|
1610
|
-
def initialize(interval: nil, interval_count: nil)
|
1611
|
-
@interval = interval
|
1612
|
-
@interval_count = interval_count
|
1613
|
-
end
|
1614
|
-
end
|
1615
|
-
# Time span for the redeemed discount.
|
1616
|
-
attr_accessor :duration
|
1617
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1618
|
-
attr_accessor :timestamp
|
1619
|
-
# The type of calculation made to determine when the discount ends.
|
1620
|
-
attr_accessor :type
|
1621
|
-
|
1622
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1623
|
-
@duration = duration
|
1624
|
-
@timestamp = timestamp
|
1625
|
-
@type = type
|
1626
|
-
end
|
1627
|
-
end
|
1628
555
|
# ID of the coupon to create a new discount for.
|
1629
556
|
attr_accessor :coupon
|
1630
557
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1631
558
|
attr_accessor :discount
|
1632
|
-
# Details to determine how long the discount should be applied for.
|
1633
|
-
attr_accessor :discount_end
|
1634
559
|
# ID of the promotion code to create a new discount for.
|
1635
560
|
attr_accessor :promotion_code
|
1636
561
|
|
1637
|
-
def initialize(coupon: nil, discount: nil,
|
562
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1638
563
|
@coupon = coupon
|
1639
564
|
@discount = discount
|
1640
|
-
@discount_end = discount_end
|
1641
565
|
@promotion_code = promotion_code
|
1642
566
|
end
|
1643
567
|
end
|
@@ -1665,529 +589,18 @@ module Stripe
|
|
1665
589
|
end
|
1666
590
|
end
|
1667
591
|
|
1668
|
-
class Line < Stripe::RequestParams
|
1669
|
-
class Action < Stripe::RequestParams
|
1670
|
-
class AddDiscount < Stripe::RequestParams
|
1671
|
-
class DiscountEnd < Stripe::RequestParams
|
1672
|
-
# The type of calculation made to determine when the discount ends.
|
1673
|
-
attr_accessor :type
|
1674
|
-
|
1675
|
-
def initialize(type: nil)
|
1676
|
-
@type = type
|
1677
|
-
end
|
1678
|
-
end
|
1679
|
-
# The coupon code to redeem.
|
1680
|
-
attr_accessor :coupon
|
1681
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
1682
|
-
attr_accessor :discount
|
1683
|
-
# Details to determine how long the discount should be applied for.
|
1684
|
-
attr_accessor :discount_end
|
1685
|
-
# 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.
|
1686
|
-
attr_accessor :index
|
1687
|
-
# The promotion code to redeem.
|
1688
|
-
attr_accessor :promotion_code
|
1689
|
-
|
1690
|
-
def initialize(
|
1691
|
-
coupon: nil,
|
1692
|
-
discount: nil,
|
1693
|
-
discount_end: nil,
|
1694
|
-
index: nil,
|
1695
|
-
promotion_code: nil
|
1696
|
-
)
|
1697
|
-
@coupon = coupon
|
1698
|
-
@discount = discount
|
1699
|
-
@discount_end = discount_end
|
1700
|
-
@index = index
|
1701
|
-
@promotion_code = promotion_code
|
1702
|
-
end
|
1703
|
-
end
|
1704
|
-
|
1705
|
-
class AddItem < Stripe::RequestParams
|
1706
|
-
class Discount < Stripe::RequestParams
|
1707
|
-
class DiscountEnd < Stripe::RequestParams
|
1708
|
-
class Duration < Stripe::RequestParams
|
1709
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1710
|
-
attr_accessor :interval
|
1711
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1712
|
-
attr_accessor :interval_count
|
1713
|
-
|
1714
|
-
def initialize(interval: nil, interval_count: nil)
|
1715
|
-
@interval = interval
|
1716
|
-
@interval_count = interval_count
|
1717
|
-
end
|
1718
|
-
end
|
1719
|
-
# Time span for the redeemed discount.
|
1720
|
-
attr_accessor :duration
|
1721
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1722
|
-
attr_accessor :timestamp
|
1723
|
-
# The type of calculation made to determine when the discount ends.
|
1724
|
-
attr_accessor :type
|
1725
|
-
|
1726
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1727
|
-
@duration = duration
|
1728
|
-
@timestamp = timestamp
|
1729
|
-
@type = type
|
1730
|
-
end
|
1731
|
-
end
|
1732
|
-
# ID of the coupon to create a new discount for.
|
1733
|
-
attr_accessor :coupon
|
1734
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1735
|
-
attr_accessor :discount
|
1736
|
-
# Details to determine how long the discount should be applied for.
|
1737
|
-
attr_accessor :discount_end
|
1738
|
-
# ID of the promotion code to create a new discount for.
|
1739
|
-
attr_accessor :promotion_code
|
1740
|
-
|
1741
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1742
|
-
@coupon = coupon
|
1743
|
-
@discount = discount
|
1744
|
-
@discount_end = discount_end
|
1745
|
-
@promotion_code = promotion_code
|
1746
|
-
end
|
1747
|
-
end
|
1748
|
-
|
1749
|
-
class Trial < Stripe::RequestParams
|
1750
|
-
# 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.
|
1751
|
-
attr_accessor :converts_to
|
1752
|
-
# Determines the type of trial for this item.
|
1753
|
-
attr_accessor :type
|
1754
|
-
|
1755
|
-
def initialize(converts_to: nil, type: nil)
|
1756
|
-
@converts_to = converts_to
|
1757
|
-
@type = type
|
1758
|
-
end
|
1759
|
-
end
|
1760
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
1761
|
-
attr_accessor :discounts
|
1762
|
-
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1763
|
-
attr_accessor :metadata
|
1764
|
-
# The ID of the price object.
|
1765
|
-
attr_accessor :price
|
1766
|
-
# Quantity for this item.
|
1767
|
-
attr_accessor :quantity
|
1768
|
-
# 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`.
|
1769
|
-
attr_accessor :tax_rates
|
1770
|
-
# Options that configure the trial on the subscription item.
|
1771
|
-
attr_accessor :trial
|
1772
|
-
|
1773
|
-
def initialize(
|
1774
|
-
discounts: nil,
|
1775
|
-
metadata: nil,
|
1776
|
-
price: nil,
|
1777
|
-
quantity: nil,
|
1778
|
-
tax_rates: nil,
|
1779
|
-
trial: nil
|
1780
|
-
)
|
1781
|
-
@discounts = discounts
|
1782
|
-
@metadata = metadata
|
1783
|
-
@price = price
|
1784
|
-
@quantity = quantity
|
1785
|
-
@tax_rates = tax_rates
|
1786
|
-
@trial = trial
|
1787
|
-
end
|
1788
|
-
end
|
1789
|
-
|
1790
|
-
class RemoveDiscount < Stripe::RequestParams
|
1791
|
-
# The coupon code to remove from the `discounts` array.
|
1792
|
-
attr_accessor :coupon
|
1793
|
-
# The ID of a discount to remove from the `discounts` array.
|
1794
|
-
attr_accessor :discount
|
1795
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
1796
|
-
attr_accessor :promotion_code
|
1797
|
-
|
1798
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1799
|
-
@coupon = coupon
|
1800
|
-
@discount = discount
|
1801
|
-
@promotion_code = promotion_code
|
1802
|
-
end
|
1803
|
-
end
|
1804
|
-
|
1805
|
-
class RemoveItem < Stripe::RequestParams
|
1806
|
-
# ID of a price to remove.
|
1807
|
-
attr_accessor :price
|
1808
|
-
|
1809
|
-
def initialize(price: nil)
|
1810
|
-
@price = price
|
1811
|
-
end
|
1812
|
-
end
|
1813
|
-
|
1814
|
-
class SetDiscount < Stripe::RequestParams
|
1815
|
-
# The coupon code to replace the `discounts` array with.
|
1816
|
-
attr_accessor :coupon
|
1817
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
1818
|
-
attr_accessor :discount
|
1819
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
1820
|
-
attr_accessor :promotion_code
|
1821
|
-
|
1822
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1823
|
-
@coupon = coupon
|
1824
|
-
@discount = discount
|
1825
|
-
@promotion_code = promotion_code
|
1826
|
-
end
|
1827
|
-
end
|
1828
|
-
|
1829
|
-
class SetItem < Stripe::RequestParams
|
1830
|
-
class Discount < Stripe::RequestParams
|
1831
|
-
class DiscountEnd < Stripe::RequestParams
|
1832
|
-
class Duration < Stripe::RequestParams
|
1833
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1834
|
-
attr_accessor :interval
|
1835
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1836
|
-
attr_accessor :interval_count
|
1837
|
-
|
1838
|
-
def initialize(interval: nil, interval_count: nil)
|
1839
|
-
@interval = interval
|
1840
|
-
@interval_count = interval_count
|
1841
|
-
end
|
1842
|
-
end
|
1843
|
-
# Time span for the redeemed discount.
|
1844
|
-
attr_accessor :duration
|
1845
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1846
|
-
attr_accessor :timestamp
|
1847
|
-
# The type of calculation made to determine when the discount ends.
|
1848
|
-
attr_accessor :type
|
1849
|
-
|
1850
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1851
|
-
@duration = duration
|
1852
|
-
@timestamp = timestamp
|
1853
|
-
@type = type
|
1854
|
-
end
|
1855
|
-
end
|
1856
|
-
# ID of the coupon to create a new discount for.
|
1857
|
-
attr_accessor :coupon
|
1858
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1859
|
-
attr_accessor :discount
|
1860
|
-
# Details to determine how long the discount should be applied for.
|
1861
|
-
attr_accessor :discount_end
|
1862
|
-
# ID of the promotion code to create a new discount for.
|
1863
|
-
attr_accessor :promotion_code
|
1864
|
-
|
1865
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1866
|
-
@coupon = coupon
|
1867
|
-
@discount = discount
|
1868
|
-
@discount_end = discount_end
|
1869
|
-
@promotion_code = promotion_code
|
1870
|
-
end
|
1871
|
-
end
|
1872
|
-
|
1873
|
-
class Trial < Stripe::RequestParams
|
1874
|
-
# 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.
|
1875
|
-
attr_accessor :converts_to
|
1876
|
-
# Determines the type of trial for this item.
|
1877
|
-
attr_accessor :type
|
1878
|
-
|
1879
|
-
def initialize(converts_to: nil, type: nil)
|
1880
|
-
@converts_to = converts_to
|
1881
|
-
@type = type
|
1882
|
-
end
|
1883
|
-
end
|
1884
|
-
# 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`.
|
1885
|
-
attr_accessor :discounts
|
1886
|
-
# 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`.
|
1887
|
-
attr_accessor :metadata
|
1888
|
-
# The ID of the price object.
|
1889
|
-
attr_accessor :price
|
1890
|
-
# 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`.
|
1891
|
-
attr_accessor :quantity
|
1892
|
-
# 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`.
|
1893
|
-
attr_accessor :tax_rates
|
1894
|
-
# 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`.
|
1895
|
-
attr_accessor :trial
|
1896
|
-
|
1897
|
-
def initialize(
|
1898
|
-
discounts: nil,
|
1899
|
-
metadata: nil,
|
1900
|
-
price: nil,
|
1901
|
-
quantity: nil,
|
1902
|
-
tax_rates: nil,
|
1903
|
-
trial: nil
|
1904
|
-
)
|
1905
|
-
@discounts = discounts
|
1906
|
-
@metadata = metadata
|
1907
|
-
@price = price
|
1908
|
-
@quantity = quantity
|
1909
|
-
@tax_rates = tax_rates
|
1910
|
-
@trial = trial
|
1911
|
-
end
|
1912
|
-
end
|
1913
|
-
# Details for the `add_discount` type.
|
1914
|
-
attr_accessor :add_discount
|
1915
|
-
# Details for the `add_item` type.
|
1916
|
-
attr_accessor :add_item
|
1917
|
-
# Details for the `add_metadata` type: specify a hash of key-value pairs.
|
1918
|
-
attr_accessor :add_metadata
|
1919
|
-
# Details for the `remove_discount` type.
|
1920
|
-
attr_accessor :remove_discount
|
1921
|
-
# Details for the `remove_item` type.
|
1922
|
-
attr_accessor :remove_item
|
1923
|
-
# Details for the `remove_metadata` type: specify an array of metadata keys.
|
1924
|
-
attr_accessor :remove_metadata
|
1925
|
-
# Details for the `set_discounts` type.
|
1926
|
-
attr_accessor :set_discounts
|
1927
|
-
# Details for the `set_items` type.
|
1928
|
-
attr_accessor :set_items
|
1929
|
-
# Details for the `set_metadata` type: specify an array of key-value pairs.
|
1930
|
-
attr_accessor :set_metadata
|
1931
|
-
# The type of action the quote line performs.
|
1932
|
-
attr_accessor :type
|
1933
|
-
|
1934
|
-
def initialize(
|
1935
|
-
add_discount: nil,
|
1936
|
-
add_item: nil,
|
1937
|
-
add_metadata: nil,
|
1938
|
-
remove_discount: nil,
|
1939
|
-
remove_item: nil,
|
1940
|
-
remove_metadata: nil,
|
1941
|
-
set_discounts: nil,
|
1942
|
-
set_items: nil,
|
1943
|
-
set_metadata: nil,
|
1944
|
-
type: nil
|
1945
|
-
)
|
1946
|
-
@add_discount = add_discount
|
1947
|
-
@add_item = add_item
|
1948
|
-
@add_metadata = add_metadata
|
1949
|
-
@remove_discount = remove_discount
|
1950
|
-
@remove_item = remove_item
|
1951
|
-
@remove_metadata = remove_metadata
|
1952
|
-
@set_discounts = set_discounts
|
1953
|
-
@set_items = set_items
|
1954
|
-
@set_metadata = set_metadata
|
1955
|
-
@type = type
|
1956
|
-
end
|
1957
|
-
end
|
1958
|
-
|
1959
|
-
class AppliesTo < Stripe::RequestParams
|
1960
|
-
# 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.
|
1961
|
-
attr_accessor :new_reference
|
1962
|
-
# The ID of the schedule the line applies to.
|
1963
|
-
attr_accessor :subscription_schedule
|
1964
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
1965
|
-
attr_accessor :type
|
1966
|
-
|
1967
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
1968
|
-
@new_reference = new_reference
|
1969
|
-
@subscription_schedule = subscription_schedule
|
1970
|
-
@type = type
|
1971
|
-
end
|
1972
|
-
end
|
1973
|
-
|
1974
|
-
class CancelSubscriptionSchedule < Stripe::RequestParams
|
1975
|
-
# Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
1976
|
-
attr_accessor :cancel_at
|
1977
|
-
# 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`.
|
1978
|
-
attr_accessor :invoice_now
|
1979
|
-
# If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
1980
|
-
attr_accessor :prorate
|
1981
|
-
|
1982
|
-
def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
|
1983
|
-
@cancel_at = cancel_at
|
1984
|
-
@invoice_now = invoice_now
|
1985
|
-
@prorate = prorate
|
1986
|
-
end
|
1987
|
-
end
|
1988
|
-
|
1989
|
-
class EndsAt < Stripe::RequestParams
|
1990
|
-
class DiscountEnd < Stripe::RequestParams
|
1991
|
-
# The ID of a specific discount.
|
1992
|
-
attr_accessor :discount
|
1993
|
-
|
1994
|
-
def initialize(discount: nil)
|
1995
|
-
@discount = discount
|
1996
|
-
end
|
1997
|
-
end
|
1998
|
-
|
1999
|
-
class Duration < Stripe::RequestParams
|
2000
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2001
|
-
attr_accessor :interval
|
2002
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2003
|
-
attr_accessor :interval_count
|
2004
|
-
|
2005
|
-
def initialize(interval: nil, interval_count: nil)
|
2006
|
-
@interval = interval
|
2007
|
-
@interval_count = interval_count
|
2008
|
-
end
|
2009
|
-
end
|
2010
|
-
# Use the `end` time of a given discount.
|
2011
|
-
attr_accessor :discount_end
|
2012
|
-
# Time span for the quote line starting from the `starts_at` date.
|
2013
|
-
attr_accessor :duration
|
2014
|
-
# A precise Unix timestamp.
|
2015
|
-
attr_accessor :timestamp
|
2016
|
-
# Select a way to pass in `ends_at`.
|
2017
|
-
attr_accessor :type
|
2018
|
-
|
2019
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
2020
|
-
@discount_end = discount_end
|
2021
|
-
@duration = duration
|
2022
|
-
@timestamp = timestamp
|
2023
|
-
@type = type
|
2024
|
-
end
|
2025
|
-
end
|
2026
|
-
|
2027
|
-
class SetPauseCollection < Stripe::RequestParams
|
2028
|
-
class Set < Stripe::RequestParams
|
2029
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2030
|
-
attr_accessor :behavior
|
2031
|
-
|
2032
|
-
def initialize(behavior: nil)
|
2033
|
-
@behavior = behavior
|
2034
|
-
end
|
2035
|
-
end
|
2036
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
2037
|
-
attr_accessor :set
|
2038
|
-
# Determines the type of the pause_collection amendment.
|
2039
|
-
attr_accessor :type
|
2040
|
-
|
2041
|
-
def initialize(set: nil, type: nil)
|
2042
|
-
@set = set
|
2043
|
-
@type = type
|
2044
|
-
end
|
2045
|
-
end
|
2046
|
-
|
2047
|
-
class StartsAt < Stripe::RequestParams
|
2048
|
-
class DiscountEnd < Stripe::RequestParams
|
2049
|
-
# The ID of a specific discount.
|
2050
|
-
attr_accessor :discount
|
2051
|
-
|
2052
|
-
def initialize(discount: nil)
|
2053
|
-
@discount = discount
|
2054
|
-
end
|
2055
|
-
end
|
2056
|
-
|
2057
|
-
class LineEndsAt < Stripe::RequestParams
|
2058
|
-
# The ID of a quote line.
|
2059
|
-
attr_accessor :id
|
2060
|
-
# 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.
|
2061
|
-
attr_accessor :index
|
2062
|
-
|
2063
|
-
def initialize(id: nil, index: nil)
|
2064
|
-
@id = id
|
2065
|
-
@index = index
|
2066
|
-
end
|
2067
|
-
end
|
2068
|
-
# Use the `end` time of a given discount.
|
2069
|
-
attr_accessor :discount_end
|
2070
|
-
# The timestamp the given line ends at.
|
2071
|
-
attr_accessor :line_ends_at
|
2072
|
-
# A precise Unix timestamp.
|
2073
|
-
attr_accessor :timestamp
|
2074
|
-
# Select a way to pass in `starts_at`.
|
2075
|
-
attr_accessor :type
|
2076
|
-
|
2077
|
-
def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
2078
|
-
@discount_end = discount_end
|
2079
|
-
@line_ends_at = line_ends_at
|
2080
|
-
@timestamp = timestamp
|
2081
|
-
@type = type
|
2082
|
-
end
|
2083
|
-
end
|
2084
|
-
|
2085
|
-
class TrialSettings < Stripe::RequestParams
|
2086
|
-
class EndBehavior < Stripe::RequestParams
|
2087
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2088
|
-
attr_accessor :prorate_up_front
|
2089
|
-
|
2090
|
-
def initialize(prorate_up_front: nil)
|
2091
|
-
@prorate_up_front = prorate_up_front
|
2092
|
-
end
|
2093
|
-
end
|
2094
|
-
# Defines how the subscription should behave when a trial ends.
|
2095
|
-
attr_accessor :end_behavior
|
2096
|
-
|
2097
|
-
def initialize(end_behavior: nil)
|
2098
|
-
@end_behavior = end_behavior
|
2099
|
-
end
|
2100
|
-
end
|
2101
|
-
# An array of operations the quote line performs.
|
2102
|
-
attr_accessor :actions
|
2103
|
-
# Details to identify the subscription schedule the quote line applies to.
|
2104
|
-
attr_accessor :applies_to
|
2105
|
-
# 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.
|
2106
|
-
attr_accessor :billing_cycle_anchor
|
2107
|
-
# 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.
|
2108
|
-
attr_accessor :cancel_subscription_schedule
|
2109
|
-
# 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.
|
2110
|
-
attr_accessor :ends_at
|
2111
|
-
# The ID of an existing line on the quote.
|
2112
|
-
attr_accessor :id
|
2113
|
-
# 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.
|
2114
|
-
attr_accessor :proration_behavior
|
2115
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2116
|
-
attr_accessor :set_pause_collection
|
2117
|
-
# Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
2118
|
-
attr_accessor :set_schedule_end
|
2119
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2120
|
-
attr_accessor :starts_at
|
2121
|
-
# Settings related to subscription trials.
|
2122
|
-
attr_accessor :trial_settings
|
2123
|
-
|
2124
|
-
def initialize(
|
2125
|
-
actions: nil,
|
2126
|
-
applies_to: nil,
|
2127
|
-
billing_cycle_anchor: nil,
|
2128
|
-
cancel_subscription_schedule: nil,
|
2129
|
-
ends_at: nil,
|
2130
|
-
id: nil,
|
2131
|
-
proration_behavior: nil,
|
2132
|
-
set_pause_collection: nil,
|
2133
|
-
set_schedule_end: nil,
|
2134
|
-
starts_at: nil,
|
2135
|
-
trial_settings: nil
|
2136
|
-
)
|
2137
|
-
@actions = actions
|
2138
|
-
@applies_to = applies_to
|
2139
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
2140
|
-
@cancel_subscription_schedule = cancel_subscription_schedule
|
2141
|
-
@ends_at = ends_at
|
2142
|
-
@id = id
|
2143
|
-
@proration_behavior = proration_behavior
|
2144
|
-
@set_pause_collection = set_pause_collection
|
2145
|
-
@set_schedule_end = set_schedule_end
|
2146
|
-
@starts_at = starts_at
|
2147
|
-
@trial_settings = trial_settings
|
2148
|
-
end
|
2149
|
-
end
|
2150
|
-
|
2151
592
|
class LineItem < Stripe::RequestParams
|
2152
593
|
class Discount < Stripe::RequestParams
|
2153
|
-
class DiscountEnd < Stripe::RequestParams
|
2154
|
-
class Duration < Stripe::RequestParams
|
2155
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2156
|
-
attr_accessor :interval
|
2157
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2158
|
-
attr_accessor :interval_count
|
2159
|
-
|
2160
|
-
def initialize(interval: nil, interval_count: nil)
|
2161
|
-
@interval = interval
|
2162
|
-
@interval_count = interval_count
|
2163
|
-
end
|
2164
|
-
end
|
2165
|
-
# Time span for the redeemed discount.
|
2166
|
-
attr_accessor :duration
|
2167
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2168
|
-
attr_accessor :timestamp
|
2169
|
-
# The type of calculation made to determine when the discount ends.
|
2170
|
-
attr_accessor :type
|
2171
|
-
|
2172
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2173
|
-
@duration = duration
|
2174
|
-
@timestamp = timestamp
|
2175
|
-
@type = type
|
2176
|
-
end
|
2177
|
-
end
|
2178
594
|
# ID of the coupon to create a new discount for.
|
2179
595
|
attr_accessor :coupon
|
2180
596
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2181
597
|
attr_accessor :discount
|
2182
|
-
# Details to determine how long the discount should be applied for.
|
2183
|
-
attr_accessor :discount_end
|
2184
598
|
# ID of the promotion code to create a new discount for.
|
2185
599
|
attr_accessor :promotion_code
|
2186
600
|
|
2187
|
-
def initialize(coupon: nil, discount: nil,
|
601
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2188
602
|
@coupon = coupon
|
2189
603
|
@discount = discount
|
2190
|
-
@discount_end = discount_end
|
2191
604
|
@promotion_code = promotion_code
|
2192
605
|
end
|
2193
606
|
end
|
@@ -2206,7 +619,7 @@ module Stripe
|
|
2206
619
|
end
|
2207
620
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
2208
621
|
attr_accessor :currency
|
2209
|
-
# The ID of the
|
622
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
2210
623
|
attr_accessor :product
|
2211
624
|
# The recurring components of a price such as `interval` and `interval_count`.
|
2212
625
|
attr_accessor :recurring
|
@@ -2264,277 +677,23 @@ module Stripe
|
|
2264
677
|
end
|
2265
678
|
|
2266
679
|
class SubscriptionData < Stripe::RequestParams
|
2267
|
-
class BillOnAcceptance < Stripe::RequestParams
|
2268
|
-
class BillFrom < Stripe::RequestParams
|
2269
|
-
class LineStartsAt < Stripe::RequestParams
|
2270
|
-
# The ID of a quote line.
|
2271
|
-
attr_accessor :id
|
2272
|
-
# 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.
|
2273
|
-
attr_accessor :index
|
2274
|
-
|
2275
|
-
def initialize(id: nil, index: nil)
|
2276
|
-
@id = id
|
2277
|
-
@index = index
|
2278
|
-
end
|
2279
|
-
end
|
2280
|
-
# Details of a Quote line to start the bill period from.
|
2281
|
-
attr_accessor :line_starts_at
|
2282
|
-
# A precise Unix timestamp.
|
2283
|
-
attr_accessor :timestamp
|
2284
|
-
# The type of method to specify the `bill_from` time.
|
2285
|
-
attr_accessor :type
|
2286
|
-
|
2287
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
2288
|
-
@line_starts_at = line_starts_at
|
2289
|
-
@timestamp = timestamp
|
2290
|
-
@type = type
|
2291
|
-
end
|
2292
|
-
end
|
2293
|
-
|
2294
|
-
class BillUntil < Stripe::RequestParams
|
2295
|
-
class Duration < Stripe::RequestParams
|
2296
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2297
|
-
attr_accessor :interval
|
2298
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2299
|
-
attr_accessor :interval_count
|
2300
|
-
|
2301
|
-
def initialize(interval: nil, interval_count: nil)
|
2302
|
-
@interval = interval
|
2303
|
-
@interval_count = interval_count
|
2304
|
-
end
|
2305
|
-
end
|
2306
|
-
|
2307
|
-
class LineEndsAt < Stripe::RequestParams
|
2308
|
-
# The ID of a quote line.
|
2309
|
-
attr_accessor :id
|
2310
|
-
# 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.
|
2311
|
-
attr_accessor :index
|
2312
|
-
|
2313
|
-
def initialize(id: nil, index: nil)
|
2314
|
-
@id = id
|
2315
|
-
@index = index
|
2316
|
-
end
|
2317
|
-
end
|
2318
|
-
# Details of the duration over which to bill.
|
2319
|
-
attr_accessor :duration
|
2320
|
-
# Details of a Quote line item from which to bill until.
|
2321
|
-
attr_accessor :line_ends_at
|
2322
|
-
# A precise Unix timestamp.
|
2323
|
-
attr_accessor :timestamp
|
2324
|
-
# The type of method to specify the `bill_until` time.
|
2325
|
-
attr_accessor :type
|
2326
|
-
|
2327
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
2328
|
-
@duration = duration
|
2329
|
-
@line_ends_at = line_ends_at
|
2330
|
-
@timestamp = timestamp
|
2331
|
-
@type = type
|
2332
|
-
end
|
2333
|
-
end
|
2334
|
-
# The start of the period to bill from when the Quote is accepted.
|
2335
|
-
attr_accessor :bill_from
|
2336
|
-
# The end of the period to bill until when the Quote is accepted.
|
2337
|
-
attr_accessor :bill_until
|
2338
|
-
|
2339
|
-
def initialize(bill_from: nil, bill_until: nil)
|
2340
|
-
@bill_from = bill_from
|
2341
|
-
@bill_until = bill_until
|
2342
|
-
end
|
2343
|
-
end
|
2344
|
-
|
2345
|
-
class Prebilling < Stripe::RequestParams
|
2346
|
-
# This is used to determine the number of billing cycles to prebill.
|
2347
|
-
attr_accessor :iterations
|
2348
|
-
|
2349
|
-
def initialize(iterations: nil)
|
2350
|
-
@iterations = iterations
|
2351
|
-
end
|
2352
|
-
end
|
2353
|
-
# Describes the period to bill for upon accepting the quote.
|
2354
|
-
attr_accessor :bill_on_acceptance
|
2355
|
-
# 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.
|
2356
|
-
attr_accessor :billing_behavior
|
2357
|
-
# When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
2358
|
-
attr_accessor :billing_cycle_anchor
|
2359
680
|
# 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.
|
2360
681
|
attr_accessor :description
|
2361
682
|
# 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.
|
2362
683
|
attr_accessor :effective_date
|
2363
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2364
|
-
attr_accessor :end_behavior
|
2365
684
|
# 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.
|
2366
685
|
attr_accessor :metadata
|
2367
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
2368
|
-
attr_accessor :prebilling
|
2369
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
2370
|
-
#
|
2371
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
2372
|
-
#
|
2373
|
-
# 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`.
|
2374
|
-
#
|
2375
|
-
# Prorations can be disabled by passing `none`.
|
2376
|
-
attr_accessor :proration_behavior
|
2377
686
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
2378
687
|
attr_accessor :trial_period_days
|
2379
688
|
|
2380
|
-
def initialize(
|
2381
|
-
bill_on_acceptance: nil,
|
2382
|
-
billing_behavior: nil,
|
2383
|
-
billing_cycle_anchor: nil,
|
2384
|
-
description: nil,
|
2385
|
-
effective_date: nil,
|
2386
|
-
end_behavior: nil,
|
2387
|
-
metadata: nil,
|
2388
|
-
prebilling: nil,
|
2389
|
-
proration_behavior: nil,
|
2390
|
-
trial_period_days: nil
|
2391
|
-
)
|
2392
|
-
@bill_on_acceptance = bill_on_acceptance
|
2393
|
-
@billing_behavior = billing_behavior
|
2394
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
689
|
+
def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil)
|
2395
690
|
@description = description
|
2396
691
|
@effective_date = effective_date
|
2397
|
-
@end_behavior = end_behavior
|
2398
692
|
@metadata = metadata
|
2399
|
-
@prebilling = prebilling
|
2400
|
-
@proration_behavior = proration_behavior
|
2401
693
|
@trial_period_days = trial_period_days
|
2402
694
|
end
|
2403
695
|
end
|
2404
696
|
|
2405
|
-
class SubscriptionDataOverride < Stripe::RequestParams
|
2406
|
-
class AppliesTo < Stripe::RequestParams
|
2407
|
-
# 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.
|
2408
|
-
attr_accessor :new_reference
|
2409
|
-
# The ID of the schedule the line applies to.
|
2410
|
-
attr_accessor :subscription_schedule
|
2411
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
2412
|
-
attr_accessor :type
|
2413
|
-
|
2414
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
2415
|
-
@new_reference = new_reference
|
2416
|
-
@subscription_schedule = subscription_schedule
|
2417
|
-
@type = type
|
2418
|
-
end
|
2419
|
-
end
|
2420
|
-
|
2421
|
-
class BillOnAcceptance < Stripe::RequestParams
|
2422
|
-
class BillFrom < Stripe::RequestParams
|
2423
|
-
class LineStartsAt < Stripe::RequestParams
|
2424
|
-
# The ID of a quote line.
|
2425
|
-
attr_accessor :id
|
2426
|
-
# 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.
|
2427
|
-
attr_accessor :index
|
2428
|
-
|
2429
|
-
def initialize(id: nil, index: nil)
|
2430
|
-
@id = id
|
2431
|
-
@index = index
|
2432
|
-
end
|
2433
|
-
end
|
2434
|
-
# Details of a Quote line to start the bill period from.
|
2435
|
-
attr_accessor :line_starts_at
|
2436
|
-
# A precise Unix timestamp.
|
2437
|
-
attr_accessor :timestamp
|
2438
|
-
# The type of method to specify the `bill_from` time.
|
2439
|
-
attr_accessor :type
|
2440
|
-
|
2441
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
2442
|
-
@line_starts_at = line_starts_at
|
2443
|
-
@timestamp = timestamp
|
2444
|
-
@type = type
|
2445
|
-
end
|
2446
|
-
end
|
2447
|
-
|
2448
|
-
class BillUntil < Stripe::RequestParams
|
2449
|
-
class Duration < Stripe::RequestParams
|
2450
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2451
|
-
attr_accessor :interval
|
2452
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2453
|
-
attr_accessor :interval_count
|
2454
|
-
|
2455
|
-
def initialize(interval: nil, interval_count: nil)
|
2456
|
-
@interval = interval
|
2457
|
-
@interval_count = interval_count
|
2458
|
-
end
|
2459
|
-
end
|
2460
|
-
|
2461
|
-
class LineEndsAt < Stripe::RequestParams
|
2462
|
-
# The ID of a quote line.
|
2463
|
-
attr_accessor :id
|
2464
|
-
# 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.
|
2465
|
-
attr_accessor :index
|
2466
|
-
|
2467
|
-
def initialize(id: nil, index: nil)
|
2468
|
-
@id = id
|
2469
|
-
@index = index
|
2470
|
-
end
|
2471
|
-
end
|
2472
|
-
# Details of the duration over which to bill.
|
2473
|
-
attr_accessor :duration
|
2474
|
-
# Details of a Quote line item from which to bill until.
|
2475
|
-
attr_accessor :line_ends_at
|
2476
|
-
# A precise Unix timestamp.
|
2477
|
-
attr_accessor :timestamp
|
2478
|
-
# The type of method to specify the `bill_until` time.
|
2479
|
-
attr_accessor :type
|
2480
|
-
|
2481
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
2482
|
-
@duration = duration
|
2483
|
-
@line_ends_at = line_ends_at
|
2484
|
-
@timestamp = timestamp
|
2485
|
-
@type = type
|
2486
|
-
end
|
2487
|
-
end
|
2488
|
-
# The start of the period to bill from when the Quote is accepted.
|
2489
|
-
attr_accessor :bill_from
|
2490
|
-
# The end of the period to bill until when the Quote is accepted.
|
2491
|
-
attr_accessor :bill_until
|
2492
|
-
|
2493
|
-
def initialize(bill_from: nil, bill_until: nil)
|
2494
|
-
@bill_from = bill_from
|
2495
|
-
@bill_until = bill_until
|
2496
|
-
end
|
2497
|
-
end
|
2498
|
-
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
2499
|
-
attr_accessor :applies_to
|
2500
|
-
# Describes the period to bill for upon accepting the quote.
|
2501
|
-
attr_accessor :bill_on_acceptance
|
2502
|
-
# 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.
|
2503
|
-
attr_accessor :billing_behavior
|
2504
|
-
# The customer the Subscription Data override applies to.
|
2505
|
-
attr_accessor :customer
|
2506
|
-
# 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.
|
2507
|
-
attr_accessor :description
|
2508
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2509
|
-
attr_accessor :end_behavior
|
2510
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
2511
|
-
#
|
2512
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
2513
|
-
#
|
2514
|
-
# 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`.
|
2515
|
-
#
|
2516
|
-
# Prorations can be disabled by passing `none`.
|
2517
|
-
attr_accessor :proration_behavior
|
2518
|
-
|
2519
|
-
def initialize(
|
2520
|
-
applies_to: nil,
|
2521
|
-
bill_on_acceptance: nil,
|
2522
|
-
billing_behavior: nil,
|
2523
|
-
customer: nil,
|
2524
|
-
description: nil,
|
2525
|
-
end_behavior: nil,
|
2526
|
-
proration_behavior: nil
|
2527
|
-
)
|
2528
|
-
@applies_to = applies_to
|
2529
|
-
@bill_on_acceptance = bill_on_acceptance
|
2530
|
-
@billing_behavior = billing_behavior
|
2531
|
-
@customer = customer
|
2532
|
-
@description = description
|
2533
|
-
@end_behavior = end_behavior
|
2534
|
-
@proration_behavior = proration_behavior
|
2535
|
-
end
|
2536
|
-
end
|
2537
|
-
|
2538
697
|
class TransferData < Stripe::RequestParams
|
2539
698
|
# 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.
|
2540
699
|
attr_accessor :amount
|
@@ -2549,8 +708,6 @@ module Stripe
|
|
2549
708
|
@destination = destination
|
2550
709
|
end
|
2551
710
|
end
|
2552
|
-
# Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
2553
|
-
attr_accessor :allow_backdated_lines
|
2554
711
|
# 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.
|
2555
712
|
attr_accessor :application_fee_amount
|
2556
713
|
# 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.
|
@@ -2579,21 +736,16 @@ module Stripe
|
|
2579
736
|
attr_accessor :invoice_settings
|
2580
737
|
# 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.
|
2581
738
|
attr_accessor :line_items
|
2582
|
-
# 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.
|
2583
|
-
attr_accessor :lines
|
2584
739
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2585
740
|
attr_accessor :metadata
|
2586
741
|
# The account on behalf of which to charge.
|
2587
742
|
attr_accessor :on_behalf_of
|
2588
743
|
# 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.
|
2589
744
|
attr_accessor :subscription_data
|
2590
|
-
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
2591
|
-
attr_accessor :subscription_data_overrides
|
2592
745
|
# The data with which to automatically create a Transfer for each of the invoices.
|
2593
746
|
attr_accessor :transfer_data
|
2594
747
|
|
2595
748
|
def initialize(
|
2596
|
-
allow_backdated_lines: nil,
|
2597
749
|
application_fee_amount: nil,
|
2598
750
|
application_fee_percent: nil,
|
2599
751
|
automatic_tax: nil,
|
@@ -2608,14 +760,11 @@ module Stripe
|
|
2608
760
|
header: nil,
|
2609
761
|
invoice_settings: nil,
|
2610
762
|
line_items: nil,
|
2611
|
-
lines: nil,
|
2612
763
|
metadata: nil,
|
2613
764
|
on_behalf_of: nil,
|
2614
765
|
subscription_data: nil,
|
2615
|
-
subscription_data_overrides: nil,
|
2616
766
|
transfer_data: nil
|
2617
767
|
)
|
2618
|
-
@allow_backdated_lines = allow_backdated_lines
|
2619
768
|
@application_fee_amount = application_fee_amount
|
2620
769
|
@application_fee_percent = application_fee_percent
|
2621
770
|
@automatic_tax = automatic_tax
|
@@ -2630,11 +779,9 @@ module Stripe
|
|
2630
779
|
@header = header
|
2631
780
|
@invoice_settings = invoice_settings
|
2632
781
|
@line_items = line_items
|
2633
|
-
@lines = lines
|
2634
782
|
@metadata = metadata
|
2635
783
|
@on_behalf_of = on_behalf_of
|
2636
784
|
@subscription_data = subscription_data
|
2637
|
-
@subscription_data_overrides = subscription_data_overrides
|
2638
785
|
@transfer_data = transfer_data
|
2639
786
|
end
|
2640
787
|
end
|
@@ -2675,24 +822,6 @@ module Stripe
|
|
2675
822
|
end
|
2676
823
|
end
|
2677
824
|
|
2678
|
-
class ListLinesParams < Stripe::RequestParams
|
2679
|
-
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
2680
|
-
attr_accessor :ending_before
|
2681
|
-
# Specifies which fields in the response should be expanded.
|
2682
|
-
attr_accessor :expand
|
2683
|
-
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
2684
|
-
attr_accessor :limit
|
2685
|
-
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
2686
|
-
attr_accessor :starting_after
|
2687
|
-
|
2688
|
-
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
2689
|
-
@ending_before = ending_before
|
2690
|
-
@expand = expand
|
2691
|
-
@limit = limit
|
2692
|
-
@starting_after = starting_after
|
2693
|
-
end
|
2694
|
-
end
|
2695
|
-
|
2696
825
|
class AcceptParams < Stripe::RequestParams
|
2697
826
|
# Specifies which fields in the response should be expanded.
|
2698
827
|
attr_accessor :expand
|
@@ -2723,36 +852,6 @@ module Stripe
|
|
2723
852
|
end
|
2724
853
|
end
|
2725
854
|
|
2726
|
-
class MarkDraftParams < Stripe::RequestParams
|
2727
|
-
# Specifies which fields in the response should be expanded.
|
2728
|
-
attr_accessor :expand
|
2729
|
-
|
2730
|
-
def initialize(expand: nil)
|
2731
|
-
@expand = expand
|
2732
|
-
end
|
2733
|
-
end
|
2734
|
-
|
2735
|
-
class MarkStaleParams < Stripe::RequestParams
|
2736
|
-
# Specifies which fields in the response should be expanded.
|
2737
|
-
attr_accessor :expand
|
2738
|
-
# Reason the Quote is being marked stale.
|
2739
|
-
attr_accessor :reason
|
2740
|
-
|
2741
|
-
def initialize(expand: nil, reason: nil)
|
2742
|
-
@expand = expand
|
2743
|
-
@reason = reason
|
2744
|
-
end
|
2745
|
-
end
|
2746
|
-
|
2747
|
-
class ReestimateParams < Stripe::RequestParams
|
2748
|
-
# Specifies which fields in the response should be expanded.
|
2749
|
-
attr_accessor :expand
|
2750
|
-
|
2751
|
-
def initialize(expand: nil)
|
2752
|
-
@expand = expand
|
2753
|
-
end
|
2754
|
-
end
|
2755
|
-
|
2756
855
|
class PdfParams < Stripe::RequestParams
|
2757
856
|
# Specifies which fields in the response should be expanded.
|
2758
857
|
attr_accessor :expand
|
@@ -2761,26 +860,6 @@ module Stripe
|
|
2761
860
|
@expand = expand
|
2762
861
|
end
|
2763
862
|
end
|
2764
|
-
|
2765
|
-
class ListPreviewInvoiceLinesParams < Stripe::RequestParams
|
2766
|
-
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
2767
|
-
attr_accessor :ending_before
|
2768
|
-
# Specifies which fields in the response should be expanded.
|
2769
|
-
attr_accessor :expand
|
2770
|
-
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
2771
|
-
attr_accessor :limit
|
2772
|
-
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
2773
|
-
attr_accessor :starting_after
|
2774
|
-
|
2775
|
-
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
2776
|
-
@ending_before = ending_before
|
2777
|
-
@expand = expand
|
2778
|
-
@limit = limit
|
2779
|
-
@starting_after = starting_after
|
2780
|
-
end
|
2781
|
-
end
|
2782
|
-
# Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
2783
|
-
attr_reader :allow_backdated_lines
|
2784
863
|
# Total before any discounts or taxes are applied.
|
2785
864
|
attr_reader :amount_subtotal
|
2786
865
|
# Total after discounts and taxes are applied.
|
@@ -2825,8 +904,6 @@ module Stripe
|
|
2825
904
|
attr_reader :invoice_settings
|
2826
905
|
# A list of items the customer is being quoted for.
|
2827
906
|
attr_reader :line_items
|
2828
|
-
# 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.
|
2829
|
-
attr_reader :lines
|
2830
907
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
2831
908
|
attr_reader :livemode
|
2832
909
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
@@ -2839,20 +916,14 @@ module Stripe
|
|
2839
916
|
attr_reader :on_behalf_of
|
2840
917
|
# The status of the quote.
|
2841
918
|
attr_reader :status
|
2842
|
-
# Details on when and why a quote has been marked as stale or canceled.
|
2843
|
-
attr_reader :status_details
|
2844
919
|
# Attribute for field status_transitions
|
2845
920
|
attr_reader :status_transitions
|
2846
921
|
# The subscription that was created or updated from this quote.
|
2847
922
|
attr_reader :subscription
|
2848
923
|
# Attribute for field subscription_data
|
2849
924
|
attr_reader :subscription_data
|
2850
|
-
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
2851
|
-
attr_reader :subscription_data_overrides
|
2852
925
|
# The subscription schedule that was created or updated from this quote.
|
2853
926
|
attr_reader :subscription_schedule
|
2854
|
-
# The subscription schedules that were created or updated from this quote.
|
2855
|
-
attr_reader :subscription_schedules
|
2856
927
|
# ID of the test clock this quote belongs to.
|
2857
928
|
attr_reader :test_clock
|
2858
929
|
# Attribute for field total_details
|
@@ -2970,86 +1041,6 @@ module Stripe
|
|
2970
1041
|
)
|
2971
1042
|
end
|
2972
1043
|
|
2973
|
-
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
2974
|
-
def list_lines(params = {}, opts = {})
|
2975
|
-
request_stripe_object(
|
2976
|
-
method: :get,
|
2977
|
-
path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(self["id"]) }),
|
2978
|
-
params: params,
|
2979
|
-
opts: opts
|
2980
|
-
)
|
2981
|
-
end
|
2982
|
-
|
2983
|
-
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
2984
|
-
def self.list_lines(quote, params = {}, opts = {})
|
2985
|
-
request_stripe_object(
|
2986
|
-
method: :get,
|
2987
|
-
path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(quote) }),
|
2988
|
-
params: params,
|
2989
|
-
opts: opts
|
2990
|
-
)
|
2991
|
-
end
|
2992
|
-
|
2993
|
-
# Preview the invoice line items that would be generated by accepting the quote.
|
2994
|
-
def list_preview_invoice_lines(preview_invoice, params = {}, opts = {})
|
2995
|
-
request_stripe_object(
|
2996
|
-
method: :get,
|
2997
|
-
path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(self["id"]), preview_invoice: CGI.escape(preview_invoice) }),
|
2998
|
-
params: params,
|
2999
|
-
opts: opts
|
3000
|
-
)
|
3001
|
-
end
|
3002
|
-
|
3003
|
-
# Preview the invoice line items that would be generated by accepting the quote.
|
3004
|
-
def self.list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {})
|
3005
|
-
request_stripe_object(
|
3006
|
-
method: :get,
|
3007
|
-
path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(quote), preview_invoice: CGI.escape(preview_invoice) }),
|
3008
|
-
params: params,
|
3009
|
-
opts: opts
|
3010
|
-
)
|
3011
|
-
end
|
3012
|
-
|
3013
|
-
# Converts a stale quote to draft.
|
3014
|
-
def mark_draft(params = {}, opts = {})
|
3015
|
-
request_stripe_object(
|
3016
|
-
method: :post,
|
3017
|
-
path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(self["id"]) }),
|
3018
|
-
params: params,
|
3019
|
-
opts: opts
|
3020
|
-
)
|
3021
|
-
end
|
3022
|
-
|
3023
|
-
# Converts a stale quote to draft.
|
3024
|
-
def self.mark_draft(quote, params = {}, opts = {})
|
3025
|
-
request_stripe_object(
|
3026
|
-
method: :post,
|
3027
|
-
path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(quote) }),
|
3028
|
-
params: params,
|
3029
|
-
opts: opts
|
3030
|
-
)
|
3031
|
-
end
|
3032
|
-
|
3033
|
-
# Converts a draft or open quote to stale.
|
3034
|
-
def mark_stale(params = {}, opts = {})
|
3035
|
-
request_stripe_object(
|
3036
|
-
method: :post,
|
3037
|
-
path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(self["id"]) }),
|
3038
|
-
params: params,
|
3039
|
-
opts: opts
|
3040
|
-
)
|
3041
|
-
end
|
3042
|
-
|
3043
|
-
# Converts a draft or open quote to stale.
|
3044
|
-
def self.mark_stale(quote, params = {}, opts = {})
|
3045
|
-
request_stripe_object(
|
3046
|
-
method: :post,
|
3047
|
-
path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(quote) }),
|
3048
|
-
params: params,
|
3049
|
-
opts: opts
|
3050
|
-
)
|
3051
|
-
end
|
3052
|
-
|
3053
1044
|
# Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
|
3054
1045
|
def pdf(params = {}, opts = {}, &read_body_chunk_block)
|
3055
1046
|
opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
|
@@ -3076,26 +1067,6 @@ module Stripe
|
|
3076
1067
|
)
|
3077
1068
|
end
|
3078
1069
|
|
3079
|
-
# Recompute the upcoming invoice estimate for the quote.
|
3080
|
-
def reestimate(params = {}, opts = {})
|
3081
|
-
request_stripe_object(
|
3082
|
-
method: :post,
|
3083
|
-
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(self["id"]) }),
|
3084
|
-
params: params,
|
3085
|
-
opts: opts
|
3086
|
-
)
|
3087
|
-
end
|
3088
|
-
|
3089
|
-
# Recompute the upcoming invoice estimate for the quote.
|
3090
|
-
def self.reestimate(quote, params = {}, opts = {})
|
3091
|
-
request_stripe_object(
|
3092
|
-
method: :post,
|
3093
|
-
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(quote) }),
|
3094
|
-
params: params,
|
3095
|
-
opts: opts
|
3096
|
-
)
|
3097
|
-
end
|
3098
|
-
|
3099
1070
|
# A quote models prices and services for a customer.
|
3100
1071
|
def self.update(quote, params = {}, opts = {})
|
3101
1072
|
request_stripe_object(
|