stripe 15.4.0 → 15.5.0.pre.beta.2
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/API_VERSION +1 -1
- data/CHANGELOG.md +1639 -662
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +32 -0
- data/lib/stripe/api_version.rb +1 -2
- data/lib/stripe/errors.rb +60 -0
- data/lib/stripe/event_types.rb +102 -0
- data/lib/stripe/events/v2_core_account_closed_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_created_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_link_returned_event.rb +13 -0
- data/lib/stripe/events/v2_core_account_person_created_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_person_deleted_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_person_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +23 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +23 -0
- data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_transaction_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +22 -0
- data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +21 -0
- data/lib/stripe/object_types.rb +53 -0
- data/lib/stripe/resources/account.rb +653 -1
- data/lib/stripe/resources/account_notice.rb +123 -0
- data/lib/stripe/resources/account_session.rb +256 -1
- data/lib/stripe/resources/balance_settings.rb +105 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +2 -0
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +4 -0
- data/lib/stripe/resources/billing/credit_grant.rb +10 -0
- data/lib/stripe/resources/billing/meter_usage.rb +23 -0
- data/lib/stripe/resources/billing/meter_usage_row.rb +28 -0
- data/lib/stripe/resources/billing_portal/session.rb +6 -0
- data/lib/stripe/resources/capital/financing_offer.rb +179 -0
- data/lib/stripe/resources/capital/financing_summary.rb +55 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +114 -0
- data/lib/stripe/resources/card.rb +2 -0
- data/lib/stripe/resources/cash_balance.rb +2 -0
- data/lib/stripe/resources/charge.rb +1538 -0
- data/lib/stripe/resources/checkout/session.rb +399 -3
- data/lib/stripe/resources/confirmation_token.rb +170 -0
- data/lib/stripe/resources/coupon.rb +30 -1
- data/lib/stripe/resources/credit_note.rb +6 -0
- data/lib/stripe/resources/credit_note_line_item.rb +9 -0
- data/lib/stripe/resources/customer.rb +2 -0
- data/lib/stripe/resources/customer_balance_transaction.rb +2 -0
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +2 -0
- data/lib/stripe/resources/customer_session.rb +6 -1
- data/lib/stripe/resources/discount.rb +2 -0
- data/lib/stripe/resources/dispute.rb +11 -0
- data/lib/stripe/resources/event.rb +31 -0
- data/lib/stripe/resources/financial_connections/account.rb +22 -1
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
- data/lib/stripe/resources/financial_connections/institution.rb +92 -0
- data/lib/stripe/resources/financial_connections/session.rb +62 -2
- data/lib/stripe/resources/fx_quote.rb +186 -0
- data/lib/stripe/resources/identity/verification_session.rb +10 -0
- data/lib/stripe/resources/invoice.rb +1140 -16
- data/lib/stripe/resources/invoice_item.rb +78 -2
- data/lib/stripe/resources/invoice_line_item.rb +55 -1
- data/lib/stripe/resources/invoice_payment.rb +6 -1
- data/lib/stripe/resources/issuing/cardholder.rb +2 -1
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +602 -0
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +82 -0
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +86 -0
- data/lib/stripe/resources/issuing/settlement.rb +53 -0
- data/lib/stripe/resources/issuing/transaction.rb +6 -0
- data/lib/stripe/resources/line_item.rb +37 -0
- data/lib/stripe/resources/mandate.rb +24 -0
- data/lib/stripe/resources/margin.rb +115 -0
- data/lib/stripe/resources/order.rb +2958 -0
- data/lib/stripe/resources/payment_attempt_record.rb +1101 -0
- data/lib/stripe/resources/payment_intent.rb +9469 -3712
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +72 -0
- data/lib/stripe/resources/payment_method.rb +192 -1
- data/lib/stripe/resources/payment_method_configuration.rb +295 -0
- data/lib/stripe/resources/payment_record.rb +1630 -0
- data/lib/stripe/resources/payout.rb +6 -0
- data/lib/stripe/resources/price.rb +30 -0
- data/lib/stripe/resources/privacy/redaction_job.rb +298 -0
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +33 -0
- data/lib/stripe/resources/promotion_code.rb +10 -0
- data/lib/stripe/resources/quote.rb +2038 -7
- data/lib/stripe/resources/quote_line.rb +274 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +680 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +371 -0
- data/lib/stripe/resources/refund.rb +9 -0
- data/lib/stripe/resources/setup_attempt.rb +21 -0
- data/lib/stripe/resources/setup_intent.rb +578 -9
- data/lib/stripe/resources/source.rb +29 -0
- data/lib/stripe/resources/subscription.rb +365 -9
- data/lib/stripe/resources/subscription_item.rb +84 -3
- data/lib/stripe/resources/subscription_schedule.rb +1007 -10
- data/lib/stripe/resources/tax/association.rb +66 -0
- data/lib/stripe/resources/tax/form.rb +211 -0
- data/lib/stripe/resources/tax_id.rb +12 -2
- data/lib/stripe/resources/terminal/onboarding_link.rb +84 -0
- data/lib/stripe/resources/terminal/reader.rb +8 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +31 -0
- data/lib/stripe/resources/transfer.rb +6 -0
- data/lib/stripe/resources/treasury/financial_account.rb +22 -3
- data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +37 -0
- data/lib/stripe/resources/treasury/received_credit.rb +38 -1
- data/lib/stripe/resources/treasury/received_debit.rb +40 -1
- data/lib/stripe/resources/v2/core/account.rb +1930 -0
- data/lib/stripe/resources/v2/core/account_link.rb +72 -0
- data/lib/stripe/resources/v2/core/person.rb +276 -0
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +74 -0
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +39 -0
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +20 -0
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +22 -0
- data/lib/stripe/resources/v2/money_management/adjustment.rb +51 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +77 -0
- data/lib/stripe/resources/v2/money_management/financial_address.rb +68 -0
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +94 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +129 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +82 -0
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +45 -0
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +117 -0
- data/lib/stripe/resources/v2/money_management/payout_method.rb +77 -0
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +49 -0
- data/lib/stripe/resources/v2/money_management/received_credit.rb +122 -0
- data/lib/stripe/resources/v2/money_management/received_debit.rb +84 -0
- data/lib/stripe/resources/v2/money_management/transaction.rb +78 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +68 -0
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +89 -0
- data/lib/stripe/resources.rb +109 -0
- data/lib/stripe/services/account_notice_service.rb +101 -0
- data/lib/stripe/services/account_service.rb +562 -1
- data/lib/stripe/services/account_session_service.rb +226 -1
- data/lib/stripe/services/balance_settings_service.rb +96 -0
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +4 -1
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +4 -0
- data/lib/stripe/services/billing/credit_grant_service.rb +8 -0
- data/lib/stripe/services/billing/meter_usage_service.rb +76 -0
- data/lib/stripe/services/billing_portal/session_service.rb +4 -0
- data/lib/stripe/services/billing_service.rb +2 -1
- data/lib/stripe/services/capital/financing_offer_service.rb +112 -0
- data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
- data/lib/stripe/services/capital/financing_transaction_service.rb +79 -0
- data/lib/stripe/services/capital_service.rb +15 -0
- data/lib/stripe/services/charge_service.rb +1418 -0
- data/lib/stripe/services/checkout/session_service.rb +316 -3
- data/lib/stripe/services/coupon_service.rb +17 -1
- data/lib/stripe/services/credit_note_service.rb +4 -0
- data/lib/stripe/services/customer_session_service.rb +4 -1
- data/{rbi/stripe/services/account_external_account_service.rbi → lib/stripe/services/external_account_service.rb} +135 -122
- data/{rbi/stripe/services/tax/transaction_line_item_service.rbi → lib/stripe/services/financial_connections/account_inferred_balance_service.rb} +21 -17
- data/lib/stripe/services/financial_connections/account_service.rb +7 -2
- data/{rbi/stripe/services/climate/supplier_service.rbi → lib/stripe/services/financial_connections/institution_service.rb} +36 -25
- data/lib/stripe/services/financial_connections/session_service.rb +34 -2
- data/lib/stripe/services/financial_connections_service.rb +2 -1
- data/lib/stripe/services/fx_quote_service.rb +123 -0
- data/lib/stripe/services/identity/verification_session_service.rb +8 -0
- data/lib/stripe/services/invoice_item_service.rb +74 -2
- data/lib/stripe/services/invoice_line_item_service.rb +33 -1
- data/lib/stripe/services/invoice_payment_service.rb +4 -1
- data/lib/stripe/services/invoice_service.rb +1074 -16
- data/lib/stripe/services/issuing/cardholder_service.rb +2 -1
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +504 -0
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +66 -0
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +83 -0
- data/lib/stripe/services/issuing/transaction_service.rb +4 -0
- data/lib/stripe/services/issuing_service.rb +5 -1
- data/lib/stripe/services/margin_service.rb +119 -0
- data/{rbi/stripe/services/source_transaction_service.rbi → lib/stripe/services/order_line_item_service.rb} +20 -16
- data/lib/stripe/services/order_service.rb +2388 -0
- data/lib/stripe/services/payment_attempt_record_service.rb +49 -0
- data/{rbi/stripe/services/quote_line_item_service.rbi → lib/stripe/services/payment_intent_amount_details_line_item_service.rb} +20 -16
- data/lib/stripe/services/payment_intent_service.rb +5724 -435
- data/lib/stripe/services/payment_method_configuration_service.rb +210 -0
- data/lib/stripe/services/payment_method_service.rb +120 -1
- data/lib/stripe/services/payment_record_service.rb +542 -0
- data/lib/stripe/services/payout_service.rb +4 -0
- data/lib/stripe/services/price_service.rb +19 -0
- data/lib/stripe/services/privacy/redaction_job_service.rb +240 -0
- data/{rbi/stripe/services/tax/calculation_line_item_service.rbi → lib/stripe/services/privacy/redaction_job_validation_error_service.rb} +21 -17
- data/lib/stripe/services/privacy_service.rb +13 -0
- data/lib/stripe/services/promotion_code_service.rb +8 -0
- data/{rbi/stripe/services/credit_note_line_item_service.rbi → lib/stripe/services/quote_line_service.rb} +20 -16
- data/{rbi/stripe/services/payment_link_line_item_service.rbi → lib/stripe/services/quote_preview_invoice_service.rb} +20 -16
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +35 -0
- data/lib/stripe/services/quote_service.rb +1723 -8
- data/lib/stripe/services/setup_intent_service.rb +538 -9
- data/lib/stripe/services/subscription_item_service.rb +75 -3
- data/lib/stripe/services/subscription_schedule_service.rb +911 -10
- data/lib/stripe/services/subscription_service.rb +309 -9
- data/lib/stripe/services/tax/association_service.rb +31 -0
- data/lib/stripe/services/tax/form_service.rb +100 -0
- data/lib/stripe/services/tax_id_service.rb +8 -2
- data/lib/stripe/services/tax_service.rb +3 -1
- data/lib/stripe/services/terminal/onboarding_link_service.rb +56 -0
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
- data/lib/stripe/services/terminal_service.rb +3 -1
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +97 -0
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +25 -1
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +25 -1
- data/lib/stripe/services/transfer_service.rb +4 -0
- data/lib/stripe/services/treasury/financial_account_features_service.rb +4 -1
- data/lib/stripe/services/treasury/financial_account_service.rb +16 -2
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +24 -0
- data/lib/stripe/services/v1_services.rb +11 -1
- data/lib/stripe/services/v2/core/account_link_service.rb +114 -0
- data/lib/stripe/services/v2/core/account_service.rb +4522 -0
- data/lib/stripe/services/v2/core/accounts/person_service.rb +1045 -0
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +130 -0
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +107 -0
- data/lib/stripe/services/v2/core/vault_service.rb +18 -0
- data/lib/stripe/services/v2/core_service.rb +4 -1
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +74 -0
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +116 -0
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +82 -0
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +125 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +95 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +199 -0
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +235 -0
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +172 -0
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +90 -0
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +70 -0
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +43 -0
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +69 -0
- data/lib/stripe/services/v2/money_management/transaction_service.rb +73 -0
- data/lib/stripe/services/v2/money_management_service.rb +31 -0
- data/lib/stripe/services/v2/payment_service.rb +15 -0
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +152 -0
- data/lib/stripe/services/v2/test_helper_service.rb +15 -0
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +53 -0
- data/lib/stripe/services/v2_services.rb +4 -1
- data/lib/stripe/services.rb +55 -0
- data/lib/stripe/stripe_configuration.rb +3 -1
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/util.rb +7 -1
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +53 -0
- data/rbi/stripe.rbi +199145 -0
- data/stripe.gemspec +4 -1
- metadata +169 -324
- data/rbi/stripe/resources/account.rbi +0 -4995
- data/rbi/stripe/resources/account_link.rbi +0 -76
- data/rbi/stripe/resources/account_session.rbi +0 -1074
- data/rbi/stripe/resources/apple_pay_domain.rbi +0 -88
- data/rbi/stripe/resources/application.rbi +0 -20
- data/rbi/stripe/resources/application_fee.rbi +0 -118
- data/rbi/stripe/resources/application_fee_refund.rbi +0 -37
- data/rbi/stripe/resources/apps/secret.rbi +0 -195
- data/rbi/stripe/resources/balance.rbi +0 -235
- data/rbi/stripe/resources/balance_transaction.rbi +0 -147
- data/rbi/stripe/resources/bank_account.rbi +0 -127
- data/rbi/stripe/resources/billing/alert.rbi +0 -201
- data/rbi/stripe/resources/billing/alert_triggered.rbi +0 -28
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -63
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +0 -147
- data/rbi/stripe/resources/billing/credit_grant.rbi +0 -291
- data/rbi/stripe/resources/billing/meter.rbi +0 -226
- data/rbi/stripe/resources/billing/meter_event.rbi +0 -64
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +0 -64
- data/rbi/stripe/resources/billing/meter_event_summary.rbi +0 -35
- data/rbi/stripe/resources/billing_portal/configuration.rbi +0 -703
- data/rbi/stripe/resources/billing_portal/session.rbi +0 -345
- data/rbi/stripe/resources/capability.rbi +0 -125
- data/rbi/stripe/resources/card.rbi +0 -125
- data/rbi/stripe/resources/cash_balance.rbi +0 -32
- data/rbi/stripe/resources/charge.rbi +0 -2089
- data/rbi/stripe/resources/checkout/session.rbi +0 -4095
- data/rbi/stripe/resources/climate/order.rbi +0 -245
- data/rbi/stripe/resources/climate/product.rbi +0 -75
- data/rbi/stripe/resources/climate/supplier.rbi +0 -72
- data/rbi/stripe/resources/confirmation_token.rbi +0 -1818
- data/rbi/stripe/resources/connect_collection_transfer.rbi +0 -26
- data/rbi/stripe/resources/country_spec.rbi +0 -85
- data/rbi/stripe/resources/coupon.rbi +0 -250
- data/rbi/stripe/resources/credit_note.rbi +0 -752
- data/rbi/stripe/resources/credit_note_line_item.rbi +0 -101
- data/rbi/stripe/resources/customer.rbi +0 -1005
- data/rbi/stripe/resources/customer_balance_transaction.rbi +0 -56
- data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +0 -151
- data/rbi/stripe/resources/customer_session.rbi +0 -200
- data/rbi/stripe/resources/discount.rbi +0 -53
- data/rbi/stripe/resources/dispute.rbi +0 -761
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +0 -58
- data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +0 -23
- data/rbi/stripe/resources/entitlements/feature.rbi +0 -117
- data/rbi/stripe/resources/ephemeral_key.rbi +0 -44
- data/rbi/stripe/resources/event.rbi +0 -137
- data/rbi/stripe/resources/exchange_rate.rbi +0 -66
- data/rbi/stripe/resources/file.rbi +0 -143
- data/rbi/stripe/resources/file_link.rbi +0 -141
- data/rbi/stripe/resources/financial_connections/account.rbi +0 -339
- data/rbi/stripe/resources/financial_connections/account_owner.rbi +0 -35
- data/rbi/stripe/resources/financial_connections/account_ownership.rbi +0 -23
- data/rbi/stripe/resources/financial_connections/session.rbi +0 -123
- data/rbi/stripe/resources/financial_connections/transaction.rbi +0 -124
- data/rbi/stripe/resources/forwarding/request.rbi +0 -216
- data/rbi/stripe/resources/funding_instructions.rbi +0 -437
- data/rbi/stripe/resources/identity/verification_report.rbi +0 -360
- data/rbi/stripe/resources/identity/verification_session.rbi +0 -564
- data/rbi/stripe/resources/invoice.rbi +0 -3858
- data/rbi/stripe/resources/invoice_item.rbi +0 -470
- data/rbi/stripe/resources/invoice_line_item.rbi +0 -432
- data/rbi/stripe/resources/invoice_payment.rbi +0 -121
- data/rbi/stripe/resources/invoice_rendering_template.rbi +0 -104
- data/rbi/stripe/resources/issuing/authorization.rbi +0 -1283
- data/rbi/stripe/resources/issuing/card.rbi +0 -741
- data/rbi/stripe/resources/issuing/cardholder.rbi +0 -744
- data/rbi/stripe/resources/issuing/dispute.rbi +0 -913
- data/rbi/stripe/resources/issuing/personalization_design.rbi +0 -338
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +0 -79
- data/rbi/stripe/resources/issuing/token.rbi +0 -226
- data/rbi/stripe/resources/issuing/transaction.rbi +0 -1061
- data/rbi/stripe/resources/line_item.rbi +0 -72
- data/rbi/stripe/resources/login_link.rbi +0 -19
- data/rbi/stripe/resources/mandate.rbi +0 -191
- data/rbi/stripe/resources/payment_intent.rbi +0 -9997
- data/rbi/stripe/resources/payment_link.rbi +0 -1893
- data/rbi/stripe/resources/payment_method.rbi +0 -1770
- data/rbi/stripe/resources/payment_method_configuration.rbi +0 -3550
- data/rbi/stripe/resources/payment_method_domain.rbi +0 -228
- data/rbi/stripe/resources/payout.rbi +0 -300
- data/rbi/stripe/resources/person.rbi +0 -401
- data/rbi/stripe/resources/plan.rbi +0 -371
- data/rbi/stripe/resources/price.rbi +0 -694
- data/rbi/stripe/resources/product.rbi +0 -555
- data/rbi/stripe/resources/product_feature.rbi +0 -26
- data/rbi/stripe/resources/promotion_code.rbi +0 -261
- data/rbi/stripe/resources/quote.rbi +0 -1145
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +0 -98
- data/rbi/stripe/resources/radar/value_list.rbi +0 -168
- data/rbi/stripe/resources/radar/value_list_item.rbi +0 -129
- data/rbi/stripe/resources/refund.rbi +0 -523
- data/rbi/stripe/resources/reporting/report_run.rbi +0 -191
- data/rbi/stripe/resources/reporting/report_type.rbi +0 -57
- data/rbi/stripe/resources/reserve_transaction.rbi +0 -23
- data/rbi/stripe/resources/reversal.rbi +0 -51
- data/rbi/stripe/resources/review.rbi +0 -154
- data/rbi/stripe/resources/setup_attempt.rbi +0 -477
- data/rbi/stripe/resources/setup_intent.rbi +0 -3978
- data/rbi/stripe/resources/shipping_rate.rbi +0 -305
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +0 -75
- data/rbi/stripe/resources/source.rbi +0 -1496
- data/rbi/stripe/resources/source_mandate_notification.rbi +0 -77
- data/rbi/stripe/resources/source_transaction.rbi +0 -127
- data/rbi/stripe/resources/subscription.rbi +0 -2080
- data/rbi/stripe/resources/subscription_item.rbi +0 -404
- data/rbi/stripe/resources/subscription_schedule.rbi +0 -1673
- data/rbi/stripe/resources/tax/calculation.rbi +0 -478
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +0 -91
- data/rbi/stripe/resources/tax/registration.rbi +0 -3216
- data/rbi/stripe/resources/tax/settings.rbi +0 -141
- data/rbi/stripe/resources/tax/transaction.rbi +0 -351
- data/rbi/stripe/resources/tax/transaction_line_item.rbi +0 -54
- data/rbi/stripe/resources/tax_code.rbi +0 -44
- data/rbi/stripe/resources/tax_deducted_at_source.rbi +0 -23
- data/rbi/stripe/resources/tax_id.rbi +0 -165
- data/rbi/stripe/resources/tax_rate.rbi +0 -239
- data/rbi/stripe/resources/terminal/configuration.rbi +0 -1595
- data/rbi/stripe/resources/terminal/connection_token.rbi +0 -37
- data/rbi/stripe/resources/terminal/location.rbi +0 -222
- data/rbi/stripe/resources/terminal/reader.rbi +0 -994
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +0 -132
- data/rbi/stripe/resources/token.rbi +0 -1283
- data/rbi/stripe/resources/topup.rbi +0 -222
- data/rbi/stripe/resources/transfer.rbi +0 -199
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +0 -119
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +0 -131
- data/rbi/stripe/resources/treasury/financial_account.rbi +0 -869
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -260
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +0 -295
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +0 -592
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +0 -431
- data/rbi/stripe/resources/treasury/received_credit.rbi +0 -302
- data/rbi/stripe/resources/treasury/received_debit.rbi +0 -256
- data/rbi/stripe/resources/treasury/transaction.rbi +0 -215
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +0 -192
- data/rbi/stripe/resources/v2/amount.rbi +0 -14
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +0 -37
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +0 -41
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +0 -31
- data/rbi/stripe/resources/v2/event.rbi +0 -48
- data/rbi/stripe/resources/v2/event_destination.rbi +0 -91
- data/rbi/stripe/resources/webhook_endpoint.rbi +0 -168
- data/rbi/stripe/services/account_capability_service.rbi +0 -51
- data/rbi/stripe/services/account_link_service.rbi +0 -60
- data/rbi/stripe/services/account_login_link_service.rbi +0 -22
- data/rbi/stripe/services/account_person_service.rbi +0 -1011
- data/rbi/stripe/services/account_service.rbi +0 -4281
- data/rbi/stripe/services/account_session_service.rbi +0 -685
- data/rbi/stripe/services/apple_pay_domain_service.rbi +0 -76
- data/rbi/stripe/services/application_fee_refund_service.rbi +0 -93
- data/rbi/stripe/services/application_fee_service.rbi +0 -78
- data/rbi/stripe/services/apps/secret_service.rbi +0 -151
- data/rbi/stripe/services/apps_service.rbi +0 -9
- data/rbi/stripe/services/balance_service.rbi +0 -21
- data/rbi/stripe/services/balance_transaction_service.rbi +0 -93
- data/rbi/stripe/services/billing/alert_service.rbi +0 -152
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +0 -68
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +0 -59
- data/rbi/stripe/services/billing/credit_grant_service.rbi +0 -211
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +0 -42
- data/rbi/stripe/services/billing/meter_event_service.rbi +0 -42
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +0 -54
- data/rbi/stripe/services/billing/meter_service.rbi +0 -163
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +0 -555
- data/rbi/stripe/services/billing_portal/session_service.rbi +0 -204
- data/rbi/stripe/services/billing_portal_service.rbi +0 -10
- data/rbi/stripe/services/billing_service.rbi +0 -15
- data/rbi/stripe/services/charge_service.rbi +0 -448
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +0 -33
- data/rbi/stripe/services/checkout/session_service.rbi +0 -2690
- data/rbi/stripe/services/checkout_service.rbi +0 -9
- data/rbi/stripe/services/climate/order_service.rbi +0 -142
- data/rbi/stripe/services/climate/product_service.rbi +0 -46
- data/rbi/stripe/services/climate_service.rbi +0 -11
- data/rbi/stripe/services/confirmation_token_service.rbi +0 -20
- data/rbi/stripe/services/country_spec_service.rbi +0 -44
- data/rbi/stripe/services/coupon_service.rbi +0 -194
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +0 -167
- data/rbi/stripe/services/credit_note_service.rbi +0 -415
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +0 -92
- data/rbi/stripe/services/customer_cash_balance_service.rbi +0 -45
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +0 -44
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +0 -59
- data/rbi/stripe/services/customer_payment_method_service.rbi +0 -57
- data/rbi/stripe/services/customer_payment_source_service.rbi +0 -232
- data/rbi/stripe/services/customer_service.rbi +0 -647
- data/rbi/stripe/services/customer_session_service.rbi +0 -116
- data/rbi/stripe/services/customer_tax_id_service.rbi +0 -70
- data/rbi/stripe/services/dispute_service.rbi +0 -424
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +0 -55
- data/rbi/stripe/services/entitlements/feature_service.rbi +0 -107
- data/rbi/stripe/services/entitlements_service.rbi +0 -10
- data/rbi/stripe/services/ephemeral_key_service.rbi +0 -53
- data/rbi/stripe/services/event_service.rbi +0 -83
- data/rbi/stripe/services/exchange_rate_service.rbi +0 -44
- data/rbi/stripe/services/file_link_service.rbi +0 -124
- data/rbi/stripe/services/file_service.rbi +0 -116
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +0 -42
- data/rbi/stripe/services/financial_connections/account_service.rbi +0 -133
- data/rbi/stripe/services/financial_connections/session_service.rbi +0 -88
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +0 -92
- data/rbi/stripe/services/financial_connections_service.rbi +0 -11
- data/rbi/stripe/services/forwarding/request_service.rbi +0 -134
- data/rbi/stripe/services/forwarding_service.rbi +0 -9
- data/rbi/stripe/services/identity/verification_report_service.rbi +0 -87
- data/rbi/stripe/services/identity/verification_session_service.rbi +0 -339
- data/rbi/stripe/services/identity_service.rbi +0 -10
- data/rbi/stripe/services/invoice_item_service.rbi +0 -366
- data/rbi/stripe/services/invoice_line_item_service.rbi +0 -259
- data/rbi/stripe/services/invoice_payment_service.rbi +0 -71
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +0 -82
- data/rbi/stripe/services/invoice_service.rbi +0 -3027
- data/rbi/stripe/services/issuing/authorization_service.rbi +0 -146
- data/rbi/stripe/services/issuing/card_service.rbi +0 -495
- data/rbi/stripe/services/issuing/cardholder_service.rbi +0 -587
- data/rbi/stripe/services/issuing/dispute_service.rbi +0 -707
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +0 -243
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +0 -59
- data/rbi/stripe/services/issuing/token_service.rbi +0 -99
- data/rbi/stripe/services/issuing/transaction_service.rbi +0 -105
- data/rbi/stripe/services/issuing_service.rbi +0 -16
- data/rbi/stripe/services/mandate_service.rbi +0 -20
- data/rbi/stripe/services/payment_intent_service.rbi +0 -7994
- data/rbi/stripe/services/payment_link_service.rbi +0 -1441
- data/rbi/stripe/services/payment_method_configuration_service.rbi +0 -2487
- data/rbi/stripe/services/payment_method_domain_service.rbi +0 -112
- data/rbi/stripe/services/payment_method_service.rbi +0 -781
- data/rbi/stripe/services/payout_service.rbi +0 -205
- data/rbi/stripe/services/plan_service.rbi +0 -282
- data/rbi/stripe/services/price_service.rbi +0 -546
- data/rbi/stripe/services/product_feature_service.rbi +0 -67
- data/rbi/stripe/services/product_service.rbi +0 -477
- data/rbi/stripe/services/promotion_code_service.rbi +0 -214
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +0 -31
- data/rbi/stripe/services/quote_service.rbi +0 -699
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +0 -85
- data/rbi/stripe/services/radar/value_list_item_service.rbi +0 -109
- data/rbi/stripe/services/radar/value_list_service.rbi +0 -141
- data/rbi/stripe/services/radar_service.rbi +0 -11
- data/rbi/stripe/services/refund_service.rbi +0 -185
- data/rbi/stripe/services/reporting/report_run_service.rbi +0 -135
- data/rbi/stripe/services/reporting/report_type_service.rbi +0 -35
- data/rbi/stripe/services/reporting_service.rbi +0 -10
- data/rbi/stripe/services/review_service.rbi +0 -84
- data/rbi/stripe/services/setup_attempt_service.rbi +0 -65
- data/rbi/stripe/services/setup_intent_service.rbi +0 -3709
- data/rbi/stripe/services/shipping_rate_service.rbi +0 -241
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +0 -46
- data/rbi/stripe/services/sigma_service.rbi +0 -9
- data/rbi/stripe/services/source_service.rbi +0 -663
- data/rbi/stripe/services/subscription_item_service.rbi +0 -350
- data/rbi/stripe/services/subscription_schedule_service.rbi +0 -1333
- data/rbi/stripe/services/subscription_service.rbi +0 -1684
- data/rbi/stripe/services/tax/calculation_service.rbi +0 -234
- data/rbi/stripe/services/tax/registration_service.rbi +0 -2278
- data/rbi/stripe/services/tax/settings_service.rbi +0 -93
- data/rbi/stripe/services/tax/transaction_service.rbi +0 -146
- data/rbi/stripe/services/tax_code_service.rbi +0 -44
- data/rbi/stripe/services/tax_id_service.rbi +0 -110
- data/rbi/stripe/services/tax_rate_service.rbi +0 -185
- data/rbi/stripe/services/tax_service.rbi +0 -12
- data/rbi/stripe/services/terminal/configuration_service.rbi +0 -1286
- data/rbi/stripe/services/terminal/connection_token_service.rbi +0 -25
- data/rbi/stripe/services/terminal/location_service.rbi +0 -182
- data/rbi/stripe/services/terminal/reader_service.rbi +0 -540
- data/rbi/stripe/services/terminal_service.rbi +0 -12
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +0 -746
- data/rbi/stripe/services/test_helpers/customer_service.rbi +0 -33
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +0 -848
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +0 -76
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +0 -69
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +0 -711
- data/rbi/stripe/services/test_helpers/issuing_service.rbi +0 -14
- data/rbi/stripe/services/test_helpers/refund_service.rbi +0 -22
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +0 -93
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +0 -11
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +0 -90
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +0 -64
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +0 -125
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +0 -125
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +0 -87
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +0 -87
- data/rbi/stripe/services/test_helpers/treasury_service.rbi +0 -15
- data/rbi/stripe/services/test_helpers_service.rbi +0 -15
- data/rbi/stripe/services/token_service.rbi +0 -1257
- data/rbi/stripe/services/topup_service.rbi +0 -176
- data/rbi/stripe/services/transfer_reversal_service.rbi +0 -101
- data/rbi/stripe/services/transfer_service.rbi +0 -152
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +0 -84
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +0 -88
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +0 -198
- data/rbi/stripe/services/treasury/financial_account_service.rbi +0 -566
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +0 -117
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +0 -304
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +0 -157
- data/rbi/stripe/services/treasury/received_credit_service.rbi +0 -72
- data/rbi/stripe/services/treasury/received_debit_service.rbi +0 -59
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +0 -111
- data/rbi/stripe/services/treasury/transaction_service.rbi +0 -122
- data/rbi/stripe/services/treasury_service.rbi +0 -18
- data/rbi/stripe/services/v1_services.rbi +0 -77
- data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +0 -39
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +0 -42
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +0 -18
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +0 -55
- data/rbi/stripe/services/v2/billing_service.rbi +0 -14
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +0 -192
- data/rbi/stripe/services/v2/core/event_service.rbi +0 -36
- data/rbi/stripe/services/v2/core_service.rbi +0 -12
- data/rbi/stripe/services/v2_services.rbi +0 -10
- data/rbi/stripe/services/webhook_endpoint_service.rbi +0 -129
@@ -95,13 +95,36 @@ module Stripe
|
|
95
95
|
attr_reader :transfer_data
|
96
96
|
end
|
97
97
|
|
98
|
+
class LastPriceMigrationError < Stripe::StripeObject
|
99
|
+
class FailedTransition < Stripe::StripeObject
|
100
|
+
# The original price to be migrated.
|
101
|
+
attr_reader :source_price
|
102
|
+
# The intended resulting price of the migration.
|
103
|
+
attr_reader :target_price
|
104
|
+
end
|
105
|
+
# The time at which the price migration encountered an error.
|
106
|
+
attr_reader :errored_at
|
107
|
+
# The involved price pairs in each failed transition.
|
108
|
+
attr_reader :failed_transitions
|
109
|
+
# The type of error encountered by the price migration.
|
110
|
+
attr_reader :type
|
111
|
+
end
|
112
|
+
|
98
113
|
class Phase < Stripe::StripeObject
|
99
114
|
class AddInvoiceItem < Stripe::StripeObject
|
100
115
|
class Discount < Stripe::StripeObject
|
116
|
+
class DiscountEnd < Stripe::StripeObject
|
117
|
+
# The discount end timestamp.
|
118
|
+
attr_reader :timestamp
|
119
|
+
# The discount end type.
|
120
|
+
attr_reader :type
|
121
|
+
end
|
101
122
|
# ID of the coupon to create a new discount for.
|
102
123
|
attr_reader :coupon
|
103
124
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
104
125
|
attr_reader :discount
|
126
|
+
# Details to determine how long the discount should be applied for.
|
127
|
+
attr_reader :discount_end
|
105
128
|
# ID of the promotion code to create a new discount for.
|
106
129
|
attr_reader :promotion_code
|
107
130
|
end
|
@@ -138,10 +161,18 @@ module Stripe
|
|
138
161
|
end
|
139
162
|
|
140
163
|
class Discount < Stripe::StripeObject
|
164
|
+
class DiscountEnd < Stripe::StripeObject
|
165
|
+
# The discount end timestamp.
|
166
|
+
attr_reader :timestamp
|
167
|
+
# The discount end type.
|
168
|
+
attr_reader :type
|
169
|
+
end
|
141
170
|
# ID of the coupon to create a new discount for.
|
142
171
|
attr_reader :coupon
|
143
172
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
144
173
|
attr_reader :discount
|
174
|
+
# Details to determine how long the discount should be applied for.
|
175
|
+
attr_reader :discount_end
|
145
176
|
# ID of the promotion code to create a new discount for.
|
146
177
|
attr_reader :promotion_code
|
147
178
|
end
|
@@ -168,13 +199,28 @@ module Stripe
|
|
168
199
|
end
|
169
200
|
|
170
201
|
class Discount < Stripe::StripeObject
|
202
|
+
class DiscountEnd < Stripe::StripeObject
|
203
|
+
# The discount end timestamp.
|
204
|
+
attr_reader :timestamp
|
205
|
+
# The discount end type.
|
206
|
+
attr_reader :type
|
207
|
+
end
|
171
208
|
# ID of the coupon to create a new discount for.
|
172
209
|
attr_reader :coupon
|
173
210
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
174
211
|
attr_reader :discount
|
212
|
+
# Details to determine how long the discount should be applied for.
|
213
|
+
attr_reader :discount_end
|
175
214
|
# ID of the promotion code to create a new discount for.
|
176
215
|
attr_reader :promotion_code
|
177
216
|
end
|
217
|
+
|
218
|
+
class Trial < Stripe::StripeObject
|
219
|
+
# List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
|
220
|
+
attr_reader :converts_to
|
221
|
+
# Determines the type of trial for this item.
|
222
|
+
attr_reader :type
|
223
|
+
end
|
178
224
|
# Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
179
225
|
attr_reader :billing_thresholds
|
180
226
|
# The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
|
@@ -189,6 +235,13 @@ module Stripe
|
|
189
235
|
attr_reader :quantity
|
190
236
|
# The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.
|
191
237
|
attr_reader :tax_rates
|
238
|
+
# Options that configure the trial on the subscription item.
|
239
|
+
attr_reader :trial
|
240
|
+
end
|
241
|
+
|
242
|
+
class PauseCollection < Stripe::StripeObject
|
243
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
244
|
+
attr_reader :behavior
|
192
245
|
end
|
193
246
|
|
194
247
|
class TransferData < Stripe::StripeObject
|
@@ -197,6 +250,15 @@ module Stripe
|
|
197
250
|
# The account where funds from the payment will be transferred to upon payment success.
|
198
251
|
attr_reader :destination
|
199
252
|
end
|
253
|
+
|
254
|
+
class TrialSettings < Stripe::StripeObject
|
255
|
+
class EndBehavior < Stripe::StripeObject
|
256
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
257
|
+
attr_reader :prorate_up_front
|
258
|
+
end
|
259
|
+
# Defines how the subscription should behave when a trial ends.
|
260
|
+
attr_reader :end_behavior
|
261
|
+
end
|
200
262
|
# A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
|
201
263
|
attr_reader :add_invoice_items
|
202
264
|
# 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 during this phase of the schedule.
|
@@ -229,14 +291,31 @@ module Stripe
|
|
229
291
|
attr_reader :metadata
|
230
292
|
# The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
|
231
293
|
attr_reader :on_behalf_of
|
294
|
+
# If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
295
|
+
attr_reader :pause_collection
|
232
296
|
# When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
|
233
297
|
attr_reader :proration_behavior
|
234
298
|
# The start of this phase of the subscription schedule.
|
235
299
|
attr_reader :start_date
|
236
300
|
# The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
|
237
301
|
attr_reader :transfer_data
|
302
|
+
# Specify behavior of the trial when crossing schedule phase boundaries
|
303
|
+
attr_reader :trial_continuation
|
238
304
|
# When the trial ends within the phase.
|
239
305
|
attr_reader :trial_end
|
306
|
+
# Settings related to any trials on the subscription during this phase.
|
307
|
+
attr_reader :trial_settings
|
308
|
+
end
|
309
|
+
|
310
|
+
class Prebilling < Stripe::StripeObject
|
311
|
+
# ID of the prebilling invoice.
|
312
|
+
attr_reader :invoice
|
313
|
+
# The end of the last period for which the invoice pre-bills.
|
314
|
+
attr_reader :period_end
|
315
|
+
# The start of the first period for which the invoice pre-bills.
|
316
|
+
attr_reader :period_start
|
317
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
|
318
|
+
attr_reader :update_behavior
|
240
319
|
end
|
241
320
|
|
242
321
|
class ListParams < Stripe::RequestParams
|
@@ -319,6 +398,8 @@ module Stripe
|
|
319
398
|
attr_accessor :created
|
320
399
|
# Only return subscription schedules for the given customer.
|
321
400
|
attr_accessor :customer
|
401
|
+
# Only return subscription schedules for the given account.
|
402
|
+
attr_accessor :customer_account
|
322
403
|
# 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.
|
323
404
|
attr_accessor :ending_before
|
324
405
|
# Specifies which fields in the response should be expanded.
|
@@ -337,6 +418,7 @@ module Stripe
|
|
337
418
|
completed_at: nil,
|
338
419
|
created: nil,
|
339
420
|
customer: nil,
|
421
|
+
customer_account: nil,
|
340
422
|
ending_before: nil,
|
341
423
|
expand: nil,
|
342
424
|
limit: nil,
|
@@ -348,6 +430,7 @@ module Stripe
|
|
348
430
|
@completed_at = completed_at
|
349
431
|
@created = created
|
350
432
|
@customer = customer
|
433
|
+
@customer_account = customer_account
|
351
434
|
@ending_before = ending_before
|
352
435
|
@expand = expand
|
353
436
|
@limit = limit
|
@@ -489,16 +572,44 @@ module Stripe
|
|
489
572
|
class Phase < Stripe::RequestParams
|
490
573
|
class AddInvoiceItem < Stripe::RequestParams
|
491
574
|
class Discount < Stripe::RequestParams
|
575
|
+
class DiscountEnd < Stripe::RequestParams
|
576
|
+
class Duration < Stripe::RequestParams
|
577
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
578
|
+
attr_accessor :interval
|
579
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
580
|
+
attr_accessor :interval_count
|
581
|
+
|
582
|
+
def initialize(interval: nil, interval_count: nil)
|
583
|
+
@interval = interval
|
584
|
+
@interval_count = interval_count
|
585
|
+
end
|
586
|
+
end
|
587
|
+
# Time span for the redeemed discount.
|
588
|
+
attr_accessor :duration
|
589
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
590
|
+
attr_accessor :timestamp
|
591
|
+
# The type of calculation made to determine when the discount ends.
|
592
|
+
attr_accessor :type
|
593
|
+
|
594
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
595
|
+
@duration = duration
|
596
|
+
@timestamp = timestamp
|
597
|
+
@type = type
|
598
|
+
end
|
599
|
+
end
|
492
600
|
# ID of the coupon to create a new discount for.
|
493
601
|
attr_accessor :coupon
|
494
602
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
495
603
|
attr_accessor :discount
|
604
|
+
# Details to determine how long the discount should be applied for.
|
605
|
+
attr_accessor :discount_end
|
496
606
|
# ID of the promotion code to create a new discount for.
|
497
607
|
attr_accessor :promotion_code
|
498
608
|
|
499
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
609
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
500
610
|
@coupon = coupon
|
501
611
|
@discount = discount
|
612
|
+
@discount_end = discount_end
|
502
613
|
@promotion_code = promotion_code
|
503
614
|
end
|
504
615
|
end
|
@@ -585,16 +696,44 @@ module Stripe
|
|
585
696
|
end
|
586
697
|
|
587
698
|
class Discount < Stripe::RequestParams
|
699
|
+
class DiscountEnd < Stripe::RequestParams
|
700
|
+
class Duration < Stripe::RequestParams
|
701
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
702
|
+
attr_accessor :interval
|
703
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
704
|
+
attr_accessor :interval_count
|
705
|
+
|
706
|
+
def initialize(interval: nil, interval_count: nil)
|
707
|
+
@interval = interval
|
708
|
+
@interval_count = interval_count
|
709
|
+
end
|
710
|
+
end
|
711
|
+
# Time span for the redeemed discount.
|
712
|
+
attr_accessor :duration
|
713
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
714
|
+
attr_accessor :timestamp
|
715
|
+
# The type of calculation made to determine when the discount ends.
|
716
|
+
attr_accessor :type
|
717
|
+
|
718
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
719
|
+
@duration = duration
|
720
|
+
@timestamp = timestamp
|
721
|
+
@type = type
|
722
|
+
end
|
723
|
+
end
|
588
724
|
# ID of the coupon to create a new discount for.
|
589
725
|
attr_accessor :coupon
|
590
726
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
591
727
|
attr_accessor :discount
|
728
|
+
# Details to determine how long the discount should be applied for.
|
729
|
+
attr_accessor :discount_end
|
592
730
|
# ID of the promotion code to create a new discount for.
|
593
731
|
attr_accessor :promotion_code
|
594
732
|
|
595
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
733
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
596
734
|
@coupon = coupon
|
597
735
|
@discount = discount
|
736
|
+
@discount_end = discount_end
|
598
737
|
@promotion_code = promotion_code
|
599
738
|
end
|
600
739
|
end
|
@@ -648,16 +787,44 @@ module Stripe
|
|
648
787
|
end
|
649
788
|
|
650
789
|
class Discount < Stripe::RequestParams
|
790
|
+
class DiscountEnd < Stripe::RequestParams
|
791
|
+
class Duration < Stripe::RequestParams
|
792
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
793
|
+
attr_accessor :interval
|
794
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
795
|
+
attr_accessor :interval_count
|
796
|
+
|
797
|
+
def initialize(interval: nil, interval_count: nil)
|
798
|
+
@interval = interval
|
799
|
+
@interval_count = interval_count
|
800
|
+
end
|
801
|
+
end
|
802
|
+
# Time span for the redeemed discount.
|
803
|
+
attr_accessor :duration
|
804
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
805
|
+
attr_accessor :timestamp
|
806
|
+
# The type of calculation made to determine when the discount ends.
|
807
|
+
attr_accessor :type
|
808
|
+
|
809
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
810
|
+
@duration = duration
|
811
|
+
@timestamp = timestamp
|
812
|
+
@type = type
|
813
|
+
end
|
814
|
+
end
|
651
815
|
# ID of the coupon to create a new discount for.
|
652
816
|
attr_accessor :coupon
|
653
817
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
654
818
|
attr_accessor :discount
|
819
|
+
# Details to determine how long the discount should be applied for.
|
820
|
+
attr_accessor :discount_end
|
655
821
|
# ID of the promotion code to create a new discount for.
|
656
822
|
attr_accessor :promotion_code
|
657
823
|
|
658
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
824
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
659
825
|
@coupon = coupon
|
660
826
|
@discount = discount
|
827
|
+
@discount_end = discount_end
|
661
828
|
@promotion_code = promotion_code
|
662
829
|
end
|
663
830
|
end
|
@@ -703,6 +870,18 @@ module Stripe
|
|
703
870
|
@unit_amount_decimal = unit_amount_decimal
|
704
871
|
end
|
705
872
|
end
|
873
|
+
|
874
|
+
class Trial < Stripe::RequestParams
|
875
|
+
# 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.
|
876
|
+
attr_accessor :converts_to
|
877
|
+
# Determines the type of trial for this item.
|
878
|
+
attr_accessor :type
|
879
|
+
|
880
|
+
def initialize(converts_to: nil, type: nil)
|
881
|
+
@converts_to = converts_to
|
882
|
+
@type = type
|
883
|
+
end
|
884
|
+
end
|
706
885
|
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
707
886
|
attr_accessor :billing_thresholds
|
708
887
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -719,6 +898,8 @@ module Stripe
|
|
719
898
|
attr_accessor :quantity
|
720
899
|
# A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
721
900
|
attr_accessor :tax_rates
|
901
|
+
# Options that configure the trial on the subscription item.
|
902
|
+
attr_accessor :trial
|
722
903
|
|
723
904
|
def initialize(
|
724
905
|
billing_thresholds: nil,
|
@@ -728,7 +909,8 @@ module Stripe
|
|
728
909
|
price: nil,
|
729
910
|
price_data: nil,
|
730
911
|
quantity: nil,
|
731
|
-
tax_rates: nil
|
912
|
+
tax_rates: nil,
|
913
|
+
trial: nil
|
732
914
|
)
|
733
915
|
@billing_thresholds = billing_thresholds
|
734
916
|
@discounts = discounts
|
@@ -738,6 +920,16 @@ module Stripe
|
|
738
920
|
@price_data = price_data
|
739
921
|
@quantity = quantity
|
740
922
|
@tax_rates = tax_rates
|
923
|
+
@trial = trial
|
924
|
+
end
|
925
|
+
end
|
926
|
+
|
927
|
+
class PauseCollection < Stripe::RequestParams
|
928
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
929
|
+
attr_accessor :behavior
|
930
|
+
|
931
|
+
def initialize(behavior: nil)
|
932
|
+
@behavior = behavior
|
741
933
|
end
|
742
934
|
end
|
743
935
|
|
@@ -752,6 +944,23 @@ module Stripe
|
|
752
944
|
@destination = destination
|
753
945
|
end
|
754
946
|
end
|
947
|
+
|
948
|
+
class TrialSettings < Stripe::RequestParams
|
949
|
+
class EndBehavior < Stripe::RequestParams
|
950
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
951
|
+
attr_accessor :prorate_up_front
|
952
|
+
|
953
|
+
def initialize(prorate_up_front: nil)
|
954
|
+
@prorate_up_front = prorate_up_front
|
955
|
+
end
|
956
|
+
end
|
957
|
+
# Defines how the subscription should behave when a trial ends.
|
958
|
+
attr_accessor :end_behavior
|
959
|
+
|
960
|
+
def initialize(end_behavior: nil)
|
961
|
+
@end_behavior = end_behavior
|
962
|
+
end
|
963
|
+
end
|
755
964
|
# A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
|
756
965
|
attr_accessor :add_invoice_items
|
757
966
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
|
@@ -788,14 +997,20 @@ module Stripe
|
|
788
997
|
attr_accessor :metadata
|
789
998
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
790
999
|
attr_accessor :on_behalf_of
|
1000
|
+
# If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
1001
|
+
attr_accessor :pause_collection
|
791
1002
|
# Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
792
1003
|
attr_accessor :proration_behavior
|
793
1004
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
794
1005
|
attr_accessor :transfer_data
|
795
1006
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
796
1007
|
attr_accessor :trial
|
1008
|
+
# Specify trial behavior when crossing phase boundaries
|
1009
|
+
attr_accessor :trial_continuation
|
797
1010
|
# Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
|
798
1011
|
attr_accessor :trial_end
|
1012
|
+
# Settings related to subscription trials.
|
1013
|
+
attr_accessor :trial_settings
|
799
1014
|
|
800
1015
|
def initialize(
|
801
1016
|
add_invoice_items: nil,
|
@@ -816,10 +1031,13 @@ module Stripe
|
|
816
1031
|
iterations: nil,
|
817
1032
|
metadata: nil,
|
818
1033
|
on_behalf_of: nil,
|
1034
|
+
pause_collection: nil,
|
819
1035
|
proration_behavior: nil,
|
820
1036
|
transfer_data: nil,
|
821
1037
|
trial: nil,
|
822
|
-
|
1038
|
+
trial_continuation: nil,
|
1039
|
+
trial_end: nil,
|
1040
|
+
trial_settings: nil
|
823
1041
|
)
|
824
1042
|
@add_invoice_items = add_invoice_items
|
825
1043
|
@application_fee_percent = application_fee_percent
|
@@ -839,16 +1057,35 @@ module Stripe
|
|
839
1057
|
@iterations = iterations
|
840
1058
|
@metadata = metadata
|
841
1059
|
@on_behalf_of = on_behalf_of
|
1060
|
+
@pause_collection = pause_collection
|
842
1061
|
@proration_behavior = proration_behavior
|
843
1062
|
@transfer_data = transfer_data
|
844
1063
|
@trial = trial
|
1064
|
+
@trial_continuation = trial_continuation
|
845
1065
|
@trial_end = trial_end
|
1066
|
+
@trial_settings = trial_settings
|
846
1067
|
end
|
847
1068
|
end
|
1069
|
+
|
1070
|
+
class Prebilling < Stripe::RequestParams
|
1071
|
+
# This is used to determine the number of billing cycles to prebill.
|
1072
|
+
attr_accessor :iterations
|
1073
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1074
|
+
attr_accessor :update_behavior
|
1075
|
+
|
1076
|
+
def initialize(iterations: nil, update_behavior: nil)
|
1077
|
+
@iterations = iterations
|
1078
|
+
@update_behavior = update_behavior
|
1079
|
+
end
|
1080
|
+
end
|
1081
|
+
# 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.
|
1082
|
+
attr_accessor :billing_behavior
|
848
1083
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
849
1084
|
attr_accessor :billing_mode
|
850
1085
|
# The identifier of the customer to create the subscription schedule for.
|
851
1086
|
attr_accessor :customer
|
1087
|
+
# The identifier of the account to create the subscription schedule for.
|
1088
|
+
attr_accessor :customer_account
|
852
1089
|
# Object representing the subscription schedule's default settings.
|
853
1090
|
attr_accessor :default_settings
|
854
1091
|
# Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
|
@@ -861,28 +1098,36 @@ module Stripe
|
|
861
1098
|
attr_accessor :metadata
|
862
1099
|
# List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
|
863
1100
|
attr_accessor :phases
|
1101
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1102
|
+
attr_accessor :prebilling
|
864
1103
|
# When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
|
865
1104
|
attr_accessor :start_date
|
866
1105
|
|
867
1106
|
def initialize(
|
1107
|
+
billing_behavior: nil,
|
868
1108
|
billing_mode: nil,
|
869
1109
|
customer: nil,
|
1110
|
+
customer_account: nil,
|
870
1111
|
default_settings: nil,
|
871
1112
|
end_behavior: nil,
|
872
1113
|
expand: nil,
|
873
1114
|
from_subscription: nil,
|
874
1115
|
metadata: nil,
|
875
1116
|
phases: nil,
|
1117
|
+
prebilling: nil,
|
876
1118
|
start_date: nil
|
877
1119
|
)
|
1120
|
+
@billing_behavior = billing_behavior
|
878
1121
|
@billing_mode = billing_mode
|
879
1122
|
@customer = customer
|
1123
|
+
@customer_account = customer_account
|
880
1124
|
@default_settings = default_settings
|
881
1125
|
@end_behavior = end_behavior
|
882
1126
|
@expand = expand
|
883
1127
|
@from_subscription = from_subscription
|
884
1128
|
@metadata = metadata
|
885
1129
|
@phases = phases
|
1130
|
+
@prebilling = prebilling
|
886
1131
|
@start_date = start_date
|
887
1132
|
end
|
888
1133
|
end
|
@@ -1010,16 +1255,44 @@ module Stripe
|
|
1010
1255
|
class Phase < Stripe::RequestParams
|
1011
1256
|
class AddInvoiceItem < Stripe::RequestParams
|
1012
1257
|
class Discount < Stripe::RequestParams
|
1258
|
+
class DiscountEnd < Stripe::RequestParams
|
1259
|
+
class Duration < Stripe::RequestParams
|
1260
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1261
|
+
attr_accessor :interval
|
1262
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1263
|
+
attr_accessor :interval_count
|
1264
|
+
|
1265
|
+
def initialize(interval: nil, interval_count: nil)
|
1266
|
+
@interval = interval
|
1267
|
+
@interval_count = interval_count
|
1268
|
+
end
|
1269
|
+
end
|
1270
|
+
# Time span for the redeemed discount.
|
1271
|
+
attr_accessor :duration
|
1272
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1273
|
+
attr_accessor :timestamp
|
1274
|
+
# The type of calculation made to determine when the discount ends.
|
1275
|
+
attr_accessor :type
|
1276
|
+
|
1277
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1278
|
+
@duration = duration
|
1279
|
+
@timestamp = timestamp
|
1280
|
+
@type = type
|
1281
|
+
end
|
1282
|
+
end
|
1013
1283
|
# ID of the coupon to create a new discount for.
|
1014
1284
|
attr_accessor :coupon
|
1015
1285
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1016
1286
|
attr_accessor :discount
|
1287
|
+
# Details to determine how long the discount should be applied for.
|
1288
|
+
attr_accessor :discount_end
|
1017
1289
|
# ID of the promotion code to create a new discount for.
|
1018
1290
|
attr_accessor :promotion_code
|
1019
1291
|
|
1020
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1292
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1021
1293
|
@coupon = coupon
|
1022
1294
|
@discount = discount
|
1295
|
+
@discount_end = discount_end
|
1023
1296
|
@promotion_code = promotion_code
|
1024
1297
|
end
|
1025
1298
|
end
|
@@ -1106,16 +1379,44 @@ module Stripe
|
|
1106
1379
|
end
|
1107
1380
|
|
1108
1381
|
class Discount < Stripe::RequestParams
|
1382
|
+
class DiscountEnd < Stripe::RequestParams
|
1383
|
+
class Duration < Stripe::RequestParams
|
1384
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1385
|
+
attr_accessor :interval
|
1386
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1387
|
+
attr_accessor :interval_count
|
1388
|
+
|
1389
|
+
def initialize(interval: nil, interval_count: nil)
|
1390
|
+
@interval = interval
|
1391
|
+
@interval_count = interval_count
|
1392
|
+
end
|
1393
|
+
end
|
1394
|
+
# Time span for the redeemed discount.
|
1395
|
+
attr_accessor :duration
|
1396
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1397
|
+
attr_accessor :timestamp
|
1398
|
+
# The type of calculation made to determine when the discount ends.
|
1399
|
+
attr_accessor :type
|
1400
|
+
|
1401
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1402
|
+
@duration = duration
|
1403
|
+
@timestamp = timestamp
|
1404
|
+
@type = type
|
1405
|
+
end
|
1406
|
+
end
|
1109
1407
|
# ID of the coupon to create a new discount for.
|
1110
1408
|
attr_accessor :coupon
|
1111
1409
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1112
1410
|
attr_accessor :discount
|
1411
|
+
# Details to determine how long the discount should be applied for.
|
1412
|
+
attr_accessor :discount_end
|
1113
1413
|
# ID of the promotion code to create a new discount for.
|
1114
1414
|
attr_accessor :promotion_code
|
1115
1415
|
|
1116
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1416
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1117
1417
|
@coupon = coupon
|
1118
1418
|
@discount = discount
|
1419
|
+
@discount_end = discount_end
|
1119
1420
|
@promotion_code = promotion_code
|
1120
1421
|
end
|
1121
1422
|
end
|
@@ -1169,16 +1470,44 @@ module Stripe
|
|
1169
1470
|
end
|
1170
1471
|
|
1171
1472
|
class Discount < Stripe::RequestParams
|
1473
|
+
class DiscountEnd < Stripe::RequestParams
|
1474
|
+
class Duration < Stripe::RequestParams
|
1475
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1476
|
+
attr_accessor :interval
|
1477
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1478
|
+
attr_accessor :interval_count
|
1479
|
+
|
1480
|
+
def initialize(interval: nil, interval_count: nil)
|
1481
|
+
@interval = interval
|
1482
|
+
@interval_count = interval_count
|
1483
|
+
end
|
1484
|
+
end
|
1485
|
+
# Time span for the redeemed discount.
|
1486
|
+
attr_accessor :duration
|
1487
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1488
|
+
attr_accessor :timestamp
|
1489
|
+
# The type of calculation made to determine when the discount ends.
|
1490
|
+
attr_accessor :type
|
1491
|
+
|
1492
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1493
|
+
@duration = duration
|
1494
|
+
@timestamp = timestamp
|
1495
|
+
@type = type
|
1496
|
+
end
|
1497
|
+
end
|
1172
1498
|
# ID of the coupon to create a new discount for.
|
1173
1499
|
attr_accessor :coupon
|
1174
1500
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1175
1501
|
attr_accessor :discount
|
1502
|
+
# Details to determine how long the discount should be applied for.
|
1503
|
+
attr_accessor :discount_end
|
1176
1504
|
# ID of the promotion code to create a new discount for.
|
1177
1505
|
attr_accessor :promotion_code
|
1178
1506
|
|
1179
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1507
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1180
1508
|
@coupon = coupon
|
1181
1509
|
@discount = discount
|
1510
|
+
@discount_end = discount_end
|
1182
1511
|
@promotion_code = promotion_code
|
1183
1512
|
end
|
1184
1513
|
end
|
@@ -1224,6 +1553,18 @@ module Stripe
|
|
1224
1553
|
@unit_amount_decimal = unit_amount_decimal
|
1225
1554
|
end
|
1226
1555
|
end
|
1556
|
+
|
1557
|
+
class Trial < Stripe::RequestParams
|
1558
|
+
# 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.
|
1559
|
+
attr_accessor :converts_to
|
1560
|
+
# Determines the type of trial for this item.
|
1561
|
+
attr_accessor :type
|
1562
|
+
|
1563
|
+
def initialize(converts_to: nil, type: nil)
|
1564
|
+
@converts_to = converts_to
|
1565
|
+
@type = type
|
1566
|
+
end
|
1567
|
+
end
|
1227
1568
|
# Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
1228
1569
|
attr_accessor :billing_thresholds
|
1229
1570
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -1240,6 +1581,8 @@ module Stripe
|
|
1240
1581
|
attr_accessor :quantity
|
1241
1582
|
# A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
1242
1583
|
attr_accessor :tax_rates
|
1584
|
+
# Options that configure the trial on the subscription item.
|
1585
|
+
attr_accessor :trial
|
1243
1586
|
|
1244
1587
|
def initialize(
|
1245
1588
|
billing_thresholds: nil,
|
@@ -1249,7 +1592,8 @@ module Stripe
|
|
1249
1592
|
price: nil,
|
1250
1593
|
price_data: nil,
|
1251
1594
|
quantity: nil,
|
1252
|
-
tax_rates: nil
|
1595
|
+
tax_rates: nil,
|
1596
|
+
trial: nil
|
1253
1597
|
)
|
1254
1598
|
@billing_thresholds = billing_thresholds
|
1255
1599
|
@discounts = discounts
|
@@ -1259,6 +1603,16 @@ module Stripe
|
|
1259
1603
|
@price_data = price_data
|
1260
1604
|
@quantity = quantity
|
1261
1605
|
@tax_rates = tax_rates
|
1606
|
+
@trial = trial
|
1607
|
+
end
|
1608
|
+
end
|
1609
|
+
|
1610
|
+
class PauseCollection < Stripe::RequestParams
|
1611
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1612
|
+
attr_accessor :behavior
|
1613
|
+
|
1614
|
+
def initialize(behavior: nil)
|
1615
|
+
@behavior = behavior
|
1262
1616
|
end
|
1263
1617
|
end
|
1264
1618
|
|
@@ -1273,6 +1627,23 @@ module Stripe
|
|
1273
1627
|
@destination = destination
|
1274
1628
|
end
|
1275
1629
|
end
|
1630
|
+
|
1631
|
+
class TrialSettings < Stripe::RequestParams
|
1632
|
+
class EndBehavior < Stripe::RequestParams
|
1633
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1634
|
+
attr_accessor :prorate_up_front
|
1635
|
+
|
1636
|
+
def initialize(prorate_up_front: nil)
|
1637
|
+
@prorate_up_front = prorate_up_front
|
1638
|
+
end
|
1639
|
+
end
|
1640
|
+
# Defines how the subscription should behave when a trial ends.
|
1641
|
+
attr_accessor :end_behavior
|
1642
|
+
|
1643
|
+
def initialize(end_behavior: nil)
|
1644
|
+
@end_behavior = end_behavior
|
1645
|
+
end
|
1646
|
+
end
|
1276
1647
|
# A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
|
1277
1648
|
attr_accessor :add_invoice_items
|
1278
1649
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
|
@@ -1309,6 +1680,8 @@ module Stripe
|
|
1309
1680
|
attr_accessor :metadata
|
1310
1681
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
1311
1682
|
attr_accessor :on_behalf_of
|
1683
|
+
# If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
1684
|
+
attr_accessor :pause_collection
|
1312
1685
|
# Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
1313
1686
|
attr_accessor :proration_behavior
|
1314
1687
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -1317,8 +1690,12 @@ module Stripe
|
|
1317
1690
|
attr_accessor :transfer_data
|
1318
1691
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
1319
1692
|
attr_accessor :trial
|
1693
|
+
# Specify trial behavior when crossing phase boundaries
|
1694
|
+
attr_accessor :trial_continuation
|
1320
1695
|
# Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
|
1321
1696
|
attr_accessor :trial_end
|
1697
|
+
# Settings related to subscription trials.
|
1698
|
+
attr_accessor :trial_settings
|
1322
1699
|
|
1323
1700
|
def initialize(
|
1324
1701
|
add_invoice_items: nil,
|
@@ -1339,11 +1716,14 @@ module Stripe
|
|
1339
1716
|
iterations: nil,
|
1340
1717
|
metadata: nil,
|
1341
1718
|
on_behalf_of: nil,
|
1719
|
+
pause_collection: nil,
|
1342
1720
|
proration_behavior: nil,
|
1343
1721
|
start_date: nil,
|
1344
1722
|
transfer_data: nil,
|
1345
1723
|
trial: nil,
|
1346
|
-
|
1724
|
+
trial_continuation: nil,
|
1725
|
+
trial_end: nil,
|
1726
|
+
trial_settings: nil
|
1347
1727
|
)
|
1348
1728
|
@add_invoice_items = add_invoice_items
|
1349
1729
|
@application_fee_percent = application_fee_percent
|
@@ -1363,13 +1743,30 @@ module Stripe
|
|
1363
1743
|
@iterations = iterations
|
1364
1744
|
@metadata = metadata
|
1365
1745
|
@on_behalf_of = on_behalf_of
|
1746
|
+
@pause_collection = pause_collection
|
1366
1747
|
@proration_behavior = proration_behavior
|
1367
1748
|
@start_date = start_date
|
1368
1749
|
@transfer_data = transfer_data
|
1369
1750
|
@trial = trial
|
1751
|
+
@trial_continuation = trial_continuation
|
1370
1752
|
@trial_end = trial_end
|
1753
|
+
@trial_settings = trial_settings
|
1371
1754
|
end
|
1372
1755
|
end
|
1756
|
+
|
1757
|
+
class Prebilling < Stripe::RequestParams
|
1758
|
+
# This is used to determine the number of billing cycles to prebill.
|
1759
|
+
attr_accessor :iterations
|
1760
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1761
|
+
attr_accessor :update_behavior
|
1762
|
+
|
1763
|
+
def initialize(iterations: nil, update_behavior: nil)
|
1764
|
+
@iterations = iterations
|
1765
|
+
@update_behavior = update_behavior
|
1766
|
+
end
|
1767
|
+
end
|
1768
|
+
# 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.
|
1769
|
+
attr_accessor :billing_behavior
|
1373
1770
|
# Object representing the subscription schedule's default settings.
|
1374
1771
|
attr_accessor :default_settings
|
1375
1772
|
# Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
|
@@ -1380,26 +1777,598 @@ module Stripe
|
|
1380
1777
|
attr_accessor :metadata
|
1381
1778
|
# List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.
|
1382
1779
|
attr_accessor :phases
|
1780
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1781
|
+
attr_accessor :prebilling
|
1383
1782
|
# If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`.
|
1384
1783
|
attr_accessor :proration_behavior
|
1385
1784
|
|
1386
1785
|
def initialize(
|
1786
|
+
billing_behavior: nil,
|
1387
1787
|
default_settings: nil,
|
1388
1788
|
end_behavior: nil,
|
1389
1789
|
expand: nil,
|
1390
1790
|
metadata: nil,
|
1391
1791
|
phases: nil,
|
1792
|
+
prebilling: nil,
|
1392
1793
|
proration_behavior: nil
|
1393
1794
|
)
|
1795
|
+
@billing_behavior = billing_behavior
|
1394
1796
|
@default_settings = default_settings
|
1395
1797
|
@end_behavior = end_behavior
|
1396
1798
|
@expand = expand
|
1397
1799
|
@metadata = metadata
|
1398
1800
|
@phases = phases
|
1801
|
+
@prebilling = prebilling
|
1399
1802
|
@proration_behavior = proration_behavior
|
1400
1803
|
end
|
1401
1804
|
end
|
1402
1805
|
|
1806
|
+
class AmendParams < Stripe::RequestParams
|
1807
|
+
class Amendment < Stripe::RequestParams
|
1808
|
+
class AmendmentEnd < Stripe::RequestParams
|
1809
|
+
class DiscountEnd < Stripe::RequestParams
|
1810
|
+
# The ID of a specific discount.
|
1811
|
+
attr_accessor :discount
|
1812
|
+
|
1813
|
+
def initialize(discount: nil)
|
1814
|
+
@discount = discount
|
1815
|
+
end
|
1816
|
+
end
|
1817
|
+
|
1818
|
+
class Duration < Stripe::RequestParams
|
1819
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1820
|
+
attr_accessor :interval
|
1821
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1822
|
+
attr_accessor :interval_count
|
1823
|
+
|
1824
|
+
def initialize(interval: nil, interval_count: nil)
|
1825
|
+
@interval = interval
|
1826
|
+
@interval_count = interval_count
|
1827
|
+
end
|
1828
|
+
end
|
1829
|
+
# Use the `end` time of a given discount.
|
1830
|
+
attr_accessor :discount_end
|
1831
|
+
# Time span for the amendment starting from the `amendment_start`.
|
1832
|
+
attr_accessor :duration
|
1833
|
+
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
1834
|
+
attr_accessor :timestamp
|
1835
|
+
# Select one of three ways to pass the `amendment_end`.
|
1836
|
+
attr_accessor :type
|
1837
|
+
|
1838
|
+
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
1839
|
+
@discount_end = discount_end
|
1840
|
+
@duration = duration
|
1841
|
+
@timestamp = timestamp
|
1842
|
+
@type = type
|
1843
|
+
end
|
1844
|
+
end
|
1845
|
+
|
1846
|
+
class AmendmentStart < Stripe::RequestParams
|
1847
|
+
class AmendmentEnd < Stripe::RequestParams
|
1848
|
+
# The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array.
|
1849
|
+
attr_accessor :index
|
1850
|
+
|
1851
|
+
def initialize(index: nil)
|
1852
|
+
@index = index
|
1853
|
+
end
|
1854
|
+
end
|
1855
|
+
|
1856
|
+
class DiscountEnd < Stripe::RequestParams
|
1857
|
+
# The ID of a specific discount.
|
1858
|
+
attr_accessor :discount
|
1859
|
+
|
1860
|
+
def initialize(discount: nil)
|
1861
|
+
@discount = discount
|
1862
|
+
end
|
1863
|
+
end
|
1864
|
+
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
1865
|
+
attr_accessor :amendment_end
|
1866
|
+
# Use the `end` time of a given discount.
|
1867
|
+
attr_accessor :discount_end
|
1868
|
+
# A precise Unix timestamp for the amendment to start.
|
1869
|
+
attr_accessor :timestamp
|
1870
|
+
# Select one of three ways to pass the `amendment_start`.
|
1871
|
+
attr_accessor :type
|
1872
|
+
|
1873
|
+
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
1874
|
+
@amendment_end = amendment_end
|
1875
|
+
@discount_end = discount_end
|
1876
|
+
@timestamp = timestamp
|
1877
|
+
@type = type
|
1878
|
+
end
|
1879
|
+
end
|
1880
|
+
|
1881
|
+
class DiscountAction < Stripe::RequestParams
|
1882
|
+
class Add < Stripe::RequestParams
|
1883
|
+
class DiscountEnd < Stripe::RequestParams
|
1884
|
+
# The type of calculation made to determine when the discount ends.
|
1885
|
+
attr_accessor :type
|
1886
|
+
|
1887
|
+
def initialize(type: nil)
|
1888
|
+
@type = type
|
1889
|
+
end
|
1890
|
+
end
|
1891
|
+
# The coupon code to redeem.
|
1892
|
+
attr_accessor :coupon
|
1893
|
+
# An ID of an existing discount for a coupon that was already redeemed.
|
1894
|
+
attr_accessor :discount
|
1895
|
+
# Details to determine how long the discount should be applied for.
|
1896
|
+
attr_accessor :discount_end
|
1897
|
+
# 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.
|
1898
|
+
attr_accessor :index
|
1899
|
+
# The promotion code to redeem.
|
1900
|
+
attr_accessor :promotion_code
|
1901
|
+
|
1902
|
+
def initialize(
|
1903
|
+
coupon: nil,
|
1904
|
+
discount: nil,
|
1905
|
+
discount_end: nil,
|
1906
|
+
index: nil,
|
1907
|
+
promotion_code: nil
|
1908
|
+
)
|
1909
|
+
@coupon = coupon
|
1910
|
+
@discount = discount
|
1911
|
+
@discount_end = discount_end
|
1912
|
+
@index = index
|
1913
|
+
@promotion_code = promotion_code
|
1914
|
+
end
|
1915
|
+
end
|
1916
|
+
|
1917
|
+
class Remove < Stripe::RequestParams
|
1918
|
+
# The coupon code to remove from the `discounts` array.
|
1919
|
+
attr_accessor :coupon
|
1920
|
+
# The ID of a discount to remove from the `discounts` array.
|
1921
|
+
attr_accessor :discount
|
1922
|
+
# The ID of a promotion code to remove from the `discounts` array.
|
1923
|
+
attr_accessor :promotion_code
|
1924
|
+
|
1925
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1926
|
+
@coupon = coupon
|
1927
|
+
@discount = discount
|
1928
|
+
@promotion_code = promotion_code
|
1929
|
+
end
|
1930
|
+
end
|
1931
|
+
|
1932
|
+
class Set < Stripe::RequestParams
|
1933
|
+
# The coupon code to replace the `discounts` array with.
|
1934
|
+
attr_accessor :coupon
|
1935
|
+
# An ID of an existing discount to replace the `discounts` array with.
|
1936
|
+
attr_accessor :discount
|
1937
|
+
# An ID of an existing promotion code to replace the `discounts` array with.
|
1938
|
+
attr_accessor :promotion_code
|
1939
|
+
|
1940
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1941
|
+
@coupon = coupon
|
1942
|
+
@discount = discount
|
1943
|
+
@promotion_code = promotion_code
|
1944
|
+
end
|
1945
|
+
end
|
1946
|
+
# Details of the discount to add.
|
1947
|
+
attr_accessor :add
|
1948
|
+
# Details of the discount to remove.
|
1949
|
+
attr_accessor :remove
|
1950
|
+
# Details of the discount to replace the existing discounts with.
|
1951
|
+
attr_accessor :set
|
1952
|
+
# Determines the type of discount action.
|
1953
|
+
attr_accessor :type
|
1954
|
+
|
1955
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1956
|
+
@add = add
|
1957
|
+
@remove = remove
|
1958
|
+
@set = set
|
1959
|
+
@type = type
|
1960
|
+
end
|
1961
|
+
end
|
1962
|
+
|
1963
|
+
class ItemAction < Stripe::RequestParams
|
1964
|
+
class Add < Stripe::RequestParams
|
1965
|
+
class Discount < Stripe::RequestParams
|
1966
|
+
class DiscountEnd < Stripe::RequestParams
|
1967
|
+
class Duration < Stripe::RequestParams
|
1968
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1969
|
+
attr_accessor :interval
|
1970
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1971
|
+
attr_accessor :interval_count
|
1972
|
+
|
1973
|
+
def initialize(interval: nil, interval_count: nil)
|
1974
|
+
@interval = interval
|
1975
|
+
@interval_count = interval_count
|
1976
|
+
end
|
1977
|
+
end
|
1978
|
+
# Time span for the redeemed discount.
|
1979
|
+
attr_accessor :duration
|
1980
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1981
|
+
attr_accessor :timestamp
|
1982
|
+
# The type of calculation made to determine when the discount ends.
|
1983
|
+
attr_accessor :type
|
1984
|
+
|
1985
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1986
|
+
@duration = duration
|
1987
|
+
@timestamp = timestamp
|
1988
|
+
@type = type
|
1989
|
+
end
|
1990
|
+
end
|
1991
|
+
# ID of the coupon to create a new discount for.
|
1992
|
+
attr_accessor :coupon
|
1993
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1994
|
+
attr_accessor :discount
|
1995
|
+
# Details to determine how long the discount should be applied for.
|
1996
|
+
attr_accessor :discount_end
|
1997
|
+
# ID of the promotion code to create a new discount for.
|
1998
|
+
attr_accessor :promotion_code
|
1999
|
+
|
2000
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2001
|
+
@coupon = coupon
|
2002
|
+
@discount = discount
|
2003
|
+
@discount_end = discount_end
|
2004
|
+
@promotion_code = promotion_code
|
2005
|
+
end
|
2006
|
+
end
|
2007
|
+
|
2008
|
+
class Trial < Stripe::RequestParams
|
2009
|
+
# 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.
|
2010
|
+
attr_accessor :converts_to
|
2011
|
+
# Determines the type of trial for this item.
|
2012
|
+
attr_accessor :type
|
2013
|
+
|
2014
|
+
def initialize(converts_to: nil, type: nil)
|
2015
|
+
@converts_to = converts_to
|
2016
|
+
@type = type
|
2017
|
+
end
|
2018
|
+
end
|
2019
|
+
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
2020
|
+
attr_accessor :discounts
|
2021
|
+
# 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`.
|
2022
|
+
attr_accessor :metadata
|
2023
|
+
# The ID of the price object.
|
2024
|
+
attr_accessor :price
|
2025
|
+
# Quantity for this item.
|
2026
|
+
attr_accessor :quantity
|
2027
|
+
# 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`.
|
2028
|
+
attr_accessor :tax_rates
|
2029
|
+
# Options that configure the trial on the subscription item.
|
2030
|
+
attr_accessor :trial
|
2031
|
+
|
2032
|
+
def initialize(
|
2033
|
+
discounts: nil,
|
2034
|
+
metadata: nil,
|
2035
|
+
price: nil,
|
2036
|
+
quantity: nil,
|
2037
|
+
tax_rates: nil,
|
2038
|
+
trial: nil
|
2039
|
+
)
|
2040
|
+
@discounts = discounts
|
2041
|
+
@metadata = metadata
|
2042
|
+
@price = price
|
2043
|
+
@quantity = quantity
|
2044
|
+
@tax_rates = tax_rates
|
2045
|
+
@trial = trial
|
2046
|
+
end
|
2047
|
+
end
|
2048
|
+
|
2049
|
+
class Remove < Stripe::RequestParams
|
2050
|
+
# ID of a price to remove.
|
2051
|
+
attr_accessor :price
|
2052
|
+
|
2053
|
+
def initialize(price: nil)
|
2054
|
+
@price = price
|
2055
|
+
end
|
2056
|
+
end
|
2057
|
+
|
2058
|
+
class Set < Stripe::RequestParams
|
2059
|
+
class Discount < Stripe::RequestParams
|
2060
|
+
class DiscountEnd < Stripe::RequestParams
|
2061
|
+
class Duration < Stripe::RequestParams
|
2062
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2063
|
+
attr_accessor :interval
|
2064
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2065
|
+
attr_accessor :interval_count
|
2066
|
+
|
2067
|
+
def initialize(interval: nil, interval_count: nil)
|
2068
|
+
@interval = interval
|
2069
|
+
@interval_count = interval_count
|
2070
|
+
end
|
2071
|
+
end
|
2072
|
+
# Time span for the redeemed discount.
|
2073
|
+
attr_accessor :duration
|
2074
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2075
|
+
attr_accessor :timestamp
|
2076
|
+
# The type of calculation made to determine when the discount ends.
|
2077
|
+
attr_accessor :type
|
2078
|
+
|
2079
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2080
|
+
@duration = duration
|
2081
|
+
@timestamp = timestamp
|
2082
|
+
@type = type
|
2083
|
+
end
|
2084
|
+
end
|
2085
|
+
# ID of the coupon to create a new discount for.
|
2086
|
+
attr_accessor :coupon
|
2087
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2088
|
+
attr_accessor :discount
|
2089
|
+
# Details to determine how long the discount should be applied for.
|
2090
|
+
attr_accessor :discount_end
|
2091
|
+
# ID of the promotion code to create a new discount for.
|
2092
|
+
attr_accessor :promotion_code
|
2093
|
+
|
2094
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2095
|
+
@coupon = coupon
|
2096
|
+
@discount = discount
|
2097
|
+
@discount_end = discount_end
|
2098
|
+
@promotion_code = promotion_code
|
2099
|
+
end
|
2100
|
+
end
|
2101
|
+
|
2102
|
+
class Trial < Stripe::RequestParams
|
2103
|
+
# 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.
|
2104
|
+
attr_accessor :converts_to
|
2105
|
+
# Determines the type of trial for this item.
|
2106
|
+
attr_accessor :type
|
2107
|
+
|
2108
|
+
def initialize(converts_to: nil, type: nil)
|
2109
|
+
@converts_to = converts_to
|
2110
|
+
@type = type
|
2111
|
+
end
|
2112
|
+
end
|
2113
|
+
# 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`.
|
2114
|
+
attr_accessor :discounts
|
2115
|
+
# 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`.
|
2116
|
+
attr_accessor :metadata
|
2117
|
+
# The ID of the price object.
|
2118
|
+
attr_accessor :price
|
2119
|
+
# 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`.
|
2120
|
+
attr_accessor :quantity
|
2121
|
+
# 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`.
|
2122
|
+
attr_accessor :tax_rates
|
2123
|
+
# 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`.
|
2124
|
+
attr_accessor :trial
|
2125
|
+
|
2126
|
+
def initialize(
|
2127
|
+
discounts: nil,
|
2128
|
+
metadata: nil,
|
2129
|
+
price: nil,
|
2130
|
+
quantity: nil,
|
2131
|
+
tax_rates: nil,
|
2132
|
+
trial: nil
|
2133
|
+
)
|
2134
|
+
@discounts = discounts
|
2135
|
+
@metadata = metadata
|
2136
|
+
@price = price
|
2137
|
+
@quantity = quantity
|
2138
|
+
@tax_rates = tax_rates
|
2139
|
+
@trial = trial
|
2140
|
+
end
|
2141
|
+
end
|
2142
|
+
# Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item.
|
2143
|
+
attr_accessor :add
|
2144
|
+
# Details of the subscription item to remove.
|
2145
|
+
attr_accessor :remove
|
2146
|
+
# Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item.
|
2147
|
+
attr_accessor :set
|
2148
|
+
# Determines the type of item action.
|
2149
|
+
attr_accessor :type
|
2150
|
+
|
2151
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2152
|
+
@add = add
|
2153
|
+
@remove = remove
|
2154
|
+
@set = set
|
2155
|
+
@type = type
|
2156
|
+
end
|
2157
|
+
end
|
2158
|
+
|
2159
|
+
class MetadataAction < Stripe::RequestParams
|
2160
|
+
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
2161
|
+
attr_accessor :add
|
2162
|
+
# Keys to remove from schedule phase metadata.
|
2163
|
+
attr_accessor :remove
|
2164
|
+
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
2165
|
+
attr_accessor :set
|
2166
|
+
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
2167
|
+
attr_accessor :type
|
2168
|
+
|
2169
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2170
|
+
@add = add
|
2171
|
+
@remove = remove
|
2172
|
+
@set = set
|
2173
|
+
@type = type
|
2174
|
+
end
|
2175
|
+
end
|
2176
|
+
|
2177
|
+
class SetPauseCollection < Stripe::RequestParams
|
2178
|
+
class Set < Stripe::RequestParams
|
2179
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2180
|
+
attr_accessor :behavior
|
2181
|
+
|
2182
|
+
def initialize(behavior: nil)
|
2183
|
+
@behavior = behavior
|
2184
|
+
end
|
2185
|
+
end
|
2186
|
+
# Details of the pause_collection behavior to apply to the amendment.
|
2187
|
+
attr_accessor :set
|
2188
|
+
# Determines the type of the pause_collection amendment.
|
2189
|
+
attr_accessor :type
|
2190
|
+
|
2191
|
+
def initialize(set: nil, type: nil)
|
2192
|
+
@set = set
|
2193
|
+
@type = type
|
2194
|
+
end
|
2195
|
+
end
|
2196
|
+
|
2197
|
+
class TrialSettings < Stripe::RequestParams
|
2198
|
+
class EndBehavior < Stripe::RequestParams
|
2199
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2200
|
+
attr_accessor :prorate_up_front
|
2201
|
+
|
2202
|
+
def initialize(prorate_up_front: nil)
|
2203
|
+
@prorate_up_front = prorate_up_front
|
2204
|
+
end
|
2205
|
+
end
|
2206
|
+
# Defines how the subscription should behave when a trial ends.
|
2207
|
+
attr_accessor :end_behavior
|
2208
|
+
|
2209
|
+
def initialize(end_behavior: nil)
|
2210
|
+
@end_behavior = end_behavior
|
2211
|
+
end
|
2212
|
+
end
|
2213
|
+
# Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment.
|
2214
|
+
attr_accessor :amendment_end
|
2215
|
+
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2216
|
+
attr_accessor :amendment_start
|
2217
|
+
# For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.
|
2218
|
+
attr_accessor :billing_cycle_anchor
|
2219
|
+
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
2220
|
+
attr_accessor :discount_actions
|
2221
|
+
# Changes to the subscription items during the amendment time span.
|
2222
|
+
attr_accessor :item_actions
|
2223
|
+
# Instructions for how to modify phase metadata
|
2224
|
+
attr_accessor :metadata_actions
|
2225
|
+
# Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`.
|
2226
|
+
attr_accessor :proration_behavior
|
2227
|
+
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2228
|
+
attr_accessor :set_pause_collection
|
2229
|
+
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
2230
|
+
attr_accessor :set_schedule_end
|
2231
|
+
# Settings related to subscription trials.
|
2232
|
+
attr_accessor :trial_settings
|
2233
|
+
|
2234
|
+
def initialize(
|
2235
|
+
amendment_end: nil,
|
2236
|
+
amendment_start: nil,
|
2237
|
+
billing_cycle_anchor: nil,
|
2238
|
+
discount_actions: nil,
|
2239
|
+
item_actions: nil,
|
2240
|
+
metadata_actions: nil,
|
2241
|
+
proration_behavior: nil,
|
2242
|
+
set_pause_collection: nil,
|
2243
|
+
set_schedule_end: nil,
|
2244
|
+
trial_settings: nil
|
2245
|
+
)
|
2246
|
+
@amendment_end = amendment_end
|
2247
|
+
@amendment_start = amendment_start
|
2248
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
2249
|
+
@discount_actions = discount_actions
|
2250
|
+
@item_actions = item_actions
|
2251
|
+
@metadata_actions = metadata_actions
|
2252
|
+
@proration_behavior = proration_behavior
|
2253
|
+
@set_pause_collection = set_pause_collection
|
2254
|
+
@set_schedule_end = set_schedule_end
|
2255
|
+
@trial_settings = trial_settings
|
2256
|
+
end
|
2257
|
+
end
|
2258
|
+
|
2259
|
+
class Prebilling < Stripe::RequestParams
|
2260
|
+
class BillFrom < Stripe::RequestParams
|
2261
|
+
class AmendmentStart < Stripe::RequestParams
|
2262
|
+
# The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments.
|
2263
|
+
attr_accessor :index
|
2264
|
+
|
2265
|
+
def initialize(index: nil)
|
2266
|
+
@index = index
|
2267
|
+
end
|
2268
|
+
end
|
2269
|
+
# Start the prebilled period when a specified amendment begins.
|
2270
|
+
attr_accessor :amendment_start
|
2271
|
+
# Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2272
|
+
attr_accessor :timestamp
|
2273
|
+
# Select one of several ways to pass the `bill_from` value.
|
2274
|
+
attr_accessor :type
|
2275
|
+
|
2276
|
+
def initialize(amendment_start: nil, timestamp: nil, type: nil)
|
2277
|
+
@amendment_start = amendment_start
|
2278
|
+
@timestamp = timestamp
|
2279
|
+
@type = type
|
2280
|
+
end
|
2281
|
+
end
|
2282
|
+
|
2283
|
+
class BillUntil < Stripe::RequestParams
|
2284
|
+
class AmendmentEnd < Stripe::RequestParams
|
2285
|
+
# The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments.
|
2286
|
+
attr_accessor :index
|
2287
|
+
|
2288
|
+
def initialize(index: nil)
|
2289
|
+
@index = index
|
2290
|
+
end
|
2291
|
+
end
|
2292
|
+
|
2293
|
+
class Duration < Stripe::RequestParams
|
2294
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2295
|
+
attr_accessor :interval
|
2296
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2297
|
+
attr_accessor :interval_count
|
2298
|
+
|
2299
|
+
def initialize(interval: nil, interval_count: nil)
|
2300
|
+
@interval = interval
|
2301
|
+
@interval_count = interval_count
|
2302
|
+
end
|
2303
|
+
end
|
2304
|
+
# End the prebilled period when a specified amendment ends.
|
2305
|
+
attr_accessor :amendment_end
|
2306
|
+
# Time span for prebilling, starting from `bill_from`.
|
2307
|
+
attr_accessor :duration
|
2308
|
+
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2309
|
+
attr_accessor :timestamp
|
2310
|
+
# Select one of several ways to pass the `bill_until` value.
|
2311
|
+
attr_accessor :type
|
2312
|
+
|
2313
|
+
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
2314
|
+
@amendment_end = amendment_end
|
2315
|
+
@duration = duration
|
2316
|
+
@timestamp = timestamp
|
2317
|
+
@type = type
|
2318
|
+
end
|
2319
|
+
end
|
2320
|
+
# The beginning of the prebilled time period. The default value is `now`.
|
2321
|
+
attr_accessor :bill_from
|
2322
|
+
# The end of the prebilled time period.
|
2323
|
+
attr_accessor :bill_until
|
2324
|
+
# When the prebilling invoice should be created. The default value is `now`.
|
2325
|
+
attr_accessor :invoice_at
|
2326
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
2327
|
+
attr_accessor :update_behavior
|
2328
|
+
|
2329
|
+
def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
|
2330
|
+
@bill_from = bill_from
|
2331
|
+
@bill_until = bill_until
|
2332
|
+
@invoice_at = invoice_at
|
2333
|
+
@update_behavior = update_behavior
|
2334
|
+
end
|
2335
|
+
end
|
2336
|
+
|
2337
|
+
class ScheduleSettings < Stripe::RequestParams
|
2338
|
+
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2339
|
+
attr_accessor :end_behavior
|
2340
|
+
|
2341
|
+
def initialize(end_behavior: nil)
|
2342
|
+
@end_behavior = end_behavior
|
2343
|
+
end
|
2344
|
+
end
|
2345
|
+
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
2346
|
+
attr_accessor :amendments
|
2347
|
+
# Specifies which fields in the response should be expanded.
|
2348
|
+
attr_accessor :expand
|
2349
|
+
# Provide any time periods to bill in advance.
|
2350
|
+
attr_accessor :prebilling
|
2351
|
+
# In cases where the amendment changes the currently active phase,
|
2352
|
+
# specifies if and how to prorate at the time of the request.
|
2353
|
+
attr_accessor :proration_behavior
|
2354
|
+
# Changes to apply to the subscription schedule.
|
2355
|
+
attr_accessor :schedule_settings
|
2356
|
+
|
2357
|
+
def initialize(
|
2358
|
+
amendments: nil,
|
2359
|
+
expand: nil,
|
2360
|
+
prebilling: nil,
|
2361
|
+
proration_behavior: nil,
|
2362
|
+
schedule_settings: nil
|
2363
|
+
)
|
2364
|
+
@amendments = amendments
|
2365
|
+
@expand = expand
|
2366
|
+
@prebilling = prebilling
|
2367
|
+
@proration_behavior = proration_behavior
|
2368
|
+
@schedule_settings = schedule_settings
|
2369
|
+
end
|
2370
|
+
end
|
2371
|
+
|
1403
2372
|
class CancelParams < Stripe::RequestParams
|
1404
2373
|
# Specifies which fields in the response should be expanded.
|
1405
2374
|
attr_accessor :expand
|
@@ -1428,6 +2397,8 @@ module Stripe
|
|
1428
2397
|
end
|
1429
2398
|
# ID of the Connect Application that created the schedule.
|
1430
2399
|
attr_reader :application
|
2400
|
+
# 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.
|
2401
|
+
attr_reader :billing_behavior
|
1431
2402
|
# The billing mode of the subscription.
|
1432
2403
|
attr_reader :billing_mode
|
1433
2404
|
# Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
|
@@ -1440,12 +2411,16 @@ module Stripe
|
|
1440
2411
|
attr_reader :current_phase
|
1441
2412
|
# ID of the customer who owns the subscription schedule.
|
1442
2413
|
attr_reader :customer
|
2414
|
+
# ID of the account who owns the subscription schedule.
|
2415
|
+
attr_reader :customer_account
|
1443
2416
|
# Attribute for field default_settings
|
1444
2417
|
attr_reader :default_settings
|
1445
2418
|
# Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
|
1446
2419
|
attr_reader :end_behavior
|
1447
2420
|
# Unique identifier for the object.
|
1448
2421
|
attr_reader :id
|
2422
|
+
# Details of the most recent price migration that failed for the subscription schedule.
|
2423
|
+
attr_reader :last_price_migration_error
|
1449
2424
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
1450
2425
|
attr_reader :livemode
|
1451
2426
|
# 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.
|
@@ -1454,6 +2429,8 @@ module Stripe
|
|
1454
2429
|
attr_reader :object
|
1455
2430
|
# Configuration for the subscription schedule's phases.
|
1456
2431
|
attr_reader :phases
|
2432
|
+
# Time period and invoice for a Subscription billed in advance.
|
2433
|
+
attr_reader :prebilling
|
1457
2434
|
# Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
|
1458
2435
|
attr_reader :released_at
|
1459
2436
|
# ID of the subscription once managed by the subscription schedule (if it is released).
|
@@ -1465,6 +2442,26 @@ module Stripe
|
|
1465
2442
|
# ID of the test clock this subscription schedule belongs to.
|
1466
2443
|
attr_reader :test_clock
|
1467
2444
|
|
2445
|
+
# Amends an existing subscription schedule.
|
2446
|
+
def amend(params = {}, opts = {})
|
2447
|
+
request_stripe_object(
|
2448
|
+
method: :post,
|
2449
|
+
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
|
2450
|
+
params: params,
|
2451
|
+
opts: opts
|
2452
|
+
)
|
2453
|
+
end
|
2454
|
+
|
2455
|
+
# Amends an existing subscription schedule.
|
2456
|
+
def self.amend(schedule, params = {}, opts = {})
|
2457
|
+
request_stripe_object(
|
2458
|
+
method: :post,
|
2459
|
+
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
2460
|
+
params: params,
|
2461
|
+
opts: opts
|
2462
|
+
)
|
2463
|
+
end
|
2464
|
+
|
1468
2465
|
# Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
|
1469
2466
|
def cancel(params = {}, opts = {})
|
1470
2467
|
request_stripe_object(
|