stripe 15.3.0 → 15.4.0.pre.beta.1
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 +1594 -667
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +28 -0
- data/lib/stripe/api_version.rb +1 -2
- data/lib/stripe/errors.rb +54 -0
- data/lib/stripe/event_types.rb +98 -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_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_completed_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_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_off_session_payment_requires_capture_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 +21 -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 +50 -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_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 +326 -2
- 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 +2 -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 +184 -0
- data/lib/stripe/resources/identity/verification_session.rb +10 -0
- data/lib/stripe/resources/invoice.rb +1063 -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 +2 -53
- 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 +1099 -0
- data/lib/stripe/resources/payment_intent.rb +8540 -3584
- 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 +1628 -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 +663 -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 +288 -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/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 +1755 -0
- data/lib/stripe/resources/v2/core/account_link.rb +56 -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 +58 -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 +75 -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 +72 -0
- data/lib/stripe/resources.rb +104 -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_portal/session_service.rb +4 -0
- 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 +243 -2
- 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_service.rb +1014 -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 +4879 -391
- 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 +249 -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/reader_collected_data_service.rb +28 -0
- data/lib/stripe/services/terminal_service.rb +2 -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 -2
- data/lib/stripe/services/v2/core/account_link_service.rb +76 -0
- data/lib/stripe/services/v2/core/account_service.rb +4170 -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 +43 -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 +137 -0
- data/lib/stripe/services/v2/test_helper_service.rb +15 -0
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +49 -0
- data/lib/stripe/services/v2_services.rb +4 -1
- data/lib/stripe/services.rb +53 -1
- 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 +193855 -0
- data/stripe.gemspec +4 -1
- metadata +161 -324
- data/lib/stripe/services/invoice_payment_service.rb +0 -83
- data/rbi/stripe/resources/account.rbi +0 -4995
- data/rbi/stripe/resources/account_link.rbi +0 -74
- data/rbi/stripe/resources/account_session.rbi +0 -1013
- 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 -645
- 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 -2086
- data/rbi/stripe/resources/checkout/session.rbi +0 -4060
- 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 -149
- 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 -3842
- 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 -9987
- data/rbi/stripe/resources/payment_link.rbi +0 -1801
- 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 -1645
- 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 -2732
- 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 -1387
- 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 -58
- 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 -646
- 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 -511
- 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 -2670
- 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 -3011
- 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 -7989
- data/rbi/stripe/services/payment_link_service.rbi +0 -1352
- 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 -1301
- 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 -1858
- 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 -1118
- 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
|
@@ -636,16 +775,44 @@ module Stripe
|
|
636
775
|
end
|
637
776
|
|
638
777
|
class Discount < Stripe::RequestParams
|
778
|
+
class DiscountEnd < Stripe::RequestParams
|
779
|
+
class Duration < Stripe::RequestParams
|
780
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
781
|
+
attr_accessor :interval
|
782
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
783
|
+
attr_accessor :interval_count
|
784
|
+
|
785
|
+
def initialize(interval: nil, interval_count: nil)
|
786
|
+
@interval = interval
|
787
|
+
@interval_count = interval_count
|
788
|
+
end
|
789
|
+
end
|
790
|
+
# Time span for the redeemed discount.
|
791
|
+
attr_accessor :duration
|
792
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
793
|
+
attr_accessor :timestamp
|
794
|
+
# The type of calculation made to determine when the discount ends.
|
795
|
+
attr_accessor :type
|
796
|
+
|
797
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
798
|
+
@duration = duration
|
799
|
+
@timestamp = timestamp
|
800
|
+
@type = type
|
801
|
+
end
|
802
|
+
end
|
639
803
|
# ID of the coupon to create a new discount for.
|
640
804
|
attr_accessor :coupon
|
641
805
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
642
806
|
attr_accessor :discount
|
807
|
+
# Details to determine how long the discount should be applied for.
|
808
|
+
attr_accessor :discount_end
|
643
809
|
# ID of the promotion code to create a new discount for.
|
644
810
|
attr_accessor :promotion_code
|
645
811
|
|
646
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
812
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
647
813
|
@coupon = coupon
|
648
814
|
@discount = discount
|
815
|
+
@discount_end = discount_end
|
649
816
|
@promotion_code = promotion_code
|
650
817
|
end
|
651
818
|
end
|
@@ -691,6 +858,18 @@ module Stripe
|
|
691
858
|
@unit_amount_decimal = unit_amount_decimal
|
692
859
|
end
|
693
860
|
end
|
861
|
+
|
862
|
+
class Trial < Stripe::RequestParams
|
863
|
+
# 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.
|
864
|
+
attr_accessor :converts_to
|
865
|
+
# Determines the type of trial for this item.
|
866
|
+
attr_accessor :type
|
867
|
+
|
868
|
+
def initialize(converts_to: nil, type: nil)
|
869
|
+
@converts_to = converts_to
|
870
|
+
@type = type
|
871
|
+
end
|
872
|
+
end
|
694
873
|
# 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.
|
695
874
|
attr_accessor :billing_thresholds
|
696
875
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -707,6 +886,8 @@ module Stripe
|
|
707
886
|
attr_accessor :quantity
|
708
887
|
# 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.
|
709
888
|
attr_accessor :tax_rates
|
889
|
+
# Options that configure the trial on the subscription item.
|
890
|
+
attr_accessor :trial
|
710
891
|
|
711
892
|
def initialize(
|
712
893
|
billing_thresholds: nil,
|
@@ -716,7 +897,8 @@ module Stripe
|
|
716
897
|
price: nil,
|
717
898
|
price_data: nil,
|
718
899
|
quantity: nil,
|
719
|
-
tax_rates: nil
|
900
|
+
tax_rates: nil,
|
901
|
+
trial: nil
|
720
902
|
)
|
721
903
|
@billing_thresholds = billing_thresholds
|
722
904
|
@discounts = discounts
|
@@ -726,6 +908,16 @@ module Stripe
|
|
726
908
|
@price_data = price_data
|
727
909
|
@quantity = quantity
|
728
910
|
@tax_rates = tax_rates
|
911
|
+
@trial = trial
|
912
|
+
end
|
913
|
+
end
|
914
|
+
|
915
|
+
class PauseCollection < Stripe::RequestParams
|
916
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
917
|
+
attr_accessor :behavior
|
918
|
+
|
919
|
+
def initialize(behavior: nil)
|
920
|
+
@behavior = behavior
|
729
921
|
end
|
730
922
|
end
|
731
923
|
|
@@ -740,6 +932,23 @@ module Stripe
|
|
740
932
|
@destination = destination
|
741
933
|
end
|
742
934
|
end
|
935
|
+
|
936
|
+
class TrialSettings < Stripe::RequestParams
|
937
|
+
class EndBehavior < Stripe::RequestParams
|
938
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
939
|
+
attr_accessor :prorate_up_front
|
940
|
+
|
941
|
+
def initialize(prorate_up_front: nil)
|
942
|
+
@prorate_up_front = prorate_up_front
|
943
|
+
end
|
944
|
+
end
|
945
|
+
# Defines how the subscription should behave when a trial ends.
|
946
|
+
attr_accessor :end_behavior
|
947
|
+
|
948
|
+
def initialize(end_behavior: nil)
|
949
|
+
@end_behavior = end_behavior
|
950
|
+
end
|
951
|
+
end
|
743
952
|
# 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.
|
744
953
|
attr_accessor :add_invoice_items
|
745
954
|
# 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).
|
@@ -774,14 +983,20 @@ module Stripe
|
|
774
983
|
attr_accessor :metadata
|
775
984
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
776
985
|
attr_accessor :on_behalf_of
|
986
|
+
# 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).
|
987
|
+
attr_accessor :pause_collection
|
777
988
|
# 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.
|
778
989
|
attr_accessor :proration_behavior
|
779
990
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
780
991
|
attr_accessor :transfer_data
|
781
992
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
782
993
|
attr_accessor :trial
|
994
|
+
# Specify trial behavior when crossing phase boundaries
|
995
|
+
attr_accessor :trial_continuation
|
783
996
|
# 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`
|
784
997
|
attr_accessor :trial_end
|
998
|
+
# Settings related to subscription trials.
|
999
|
+
attr_accessor :trial_settings
|
785
1000
|
|
786
1001
|
def initialize(
|
787
1002
|
add_invoice_items: nil,
|
@@ -801,10 +1016,13 @@ module Stripe
|
|
801
1016
|
iterations: nil,
|
802
1017
|
metadata: nil,
|
803
1018
|
on_behalf_of: nil,
|
1019
|
+
pause_collection: nil,
|
804
1020
|
proration_behavior: nil,
|
805
1021
|
transfer_data: nil,
|
806
1022
|
trial: nil,
|
807
|
-
|
1023
|
+
trial_continuation: nil,
|
1024
|
+
trial_end: nil,
|
1025
|
+
trial_settings: nil
|
808
1026
|
)
|
809
1027
|
@add_invoice_items = add_invoice_items
|
810
1028
|
@application_fee_percent = application_fee_percent
|
@@ -823,16 +1041,35 @@ module Stripe
|
|
823
1041
|
@iterations = iterations
|
824
1042
|
@metadata = metadata
|
825
1043
|
@on_behalf_of = on_behalf_of
|
1044
|
+
@pause_collection = pause_collection
|
826
1045
|
@proration_behavior = proration_behavior
|
827
1046
|
@transfer_data = transfer_data
|
828
1047
|
@trial = trial
|
1048
|
+
@trial_continuation = trial_continuation
|
829
1049
|
@trial_end = trial_end
|
1050
|
+
@trial_settings = trial_settings
|
830
1051
|
end
|
831
1052
|
end
|
1053
|
+
|
1054
|
+
class Prebilling < Stripe::RequestParams
|
1055
|
+
# This is used to determine the number of billing cycles to prebill.
|
1056
|
+
attr_accessor :iterations
|
1057
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1058
|
+
attr_accessor :update_behavior
|
1059
|
+
|
1060
|
+
def initialize(iterations: nil, update_behavior: nil)
|
1061
|
+
@iterations = iterations
|
1062
|
+
@update_behavior = update_behavior
|
1063
|
+
end
|
1064
|
+
end
|
1065
|
+
# 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.
|
1066
|
+
attr_accessor :billing_behavior
|
832
1067
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
833
1068
|
attr_accessor :billing_mode
|
834
1069
|
# The identifier of the customer to create the subscription schedule for.
|
835
1070
|
attr_accessor :customer
|
1071
|
+
# The identifier of the account to create the subscription schedule for.
|
1072
|
+
attr_accessor :customer_account
|
836
1073
|
# Object representing the subscription schedule's default settings.
|
837
1074
|
attr_accessor :default_settings
|
838
1075
|
# 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.
|
@@ -845,28 +1082,36 @@ module Stripe
|
|
845
1082
|
attr_accessor :metadata
|
846
1083
|
# 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.
|
847
1084
|
attr_accessor :phases
|
1085
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1086
|
+
attr_accessor :prebilling
|
848
1087
|
# 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.
|
849
1088
|
attr_accessor :start_date
|
850
1089
|
|
851
1090
|
def initialize(
|
1091
|
+
billing_behavior: nil,
|
852
1092
|
billing_mode: nil,
|
853
1093
|
customer: nil,
|
1094
|
+
customer_account: nil,
|
854
1095
|
default_settings: nil,
|
855
1096
|
end_behavior: nil,
|
856
1097
|
expand: nil,
|
857
1098
|
from_subscription: nil,
|
858
1099
|
metadata: nil,
|
859
1100
|
phases: nil,
|
1101
|
+
prebilling: nil,
|
860
1102
|
start_date: nil
|
861
1103
|
)
|
1104
|
+
@billing_behavior = billing_behavior
|
862
1105
|
@billing_mode = billing_mode
|
863
1106
|
@customer = customer
|
1107
|
+
@customer_account = customer_account
|
864
1108
|
@default_settings = default_settings
|
865
1109
|
@end_behavior = end_behavior
|
866
1110
|
@expand = expand
|
867
1111
|
@from_subscription = from_subscription
|
868
1112
|
@metadata = metadata
|
869
1113
|
@phases = phases
|
1114
|
+
@prebilling = prebilling
|
870
1115
|
@start_date = start_date
|
871
1116
|
end
|
872
1117
|
end
|
@@ -994,16 +1239,44 @@ module Stripe
|
|
994
1239
|
class Phase < Stripe::RequestParams
|
995
1240
|
class AddInvoiceItem < Stripe::RequestParams
|
996
1241
|
class Discount < Stripe::RequestParams
|
1242
|
+
class DiscountEnd < Stripe::RequestParams
|
1243
|
+
class Duration < Stripe::RequestParams
|
1244
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1245
|
+
attr_accessor :interval
|
1246
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1247
|
+
attr_accessor :interval_count
|
1248
|
+
|
1249
|
+
def initialize(interval: nil, interval_count: nil)
|
1250
|
+
@interval = interval
|
1251
|
+
@interval_count = interval_count
|
1252
|
+
end
|
1253
|
+
end
|
1254
|
+
# Time span for the redeemed discount.
|
1255
|
+
attr_accessor :duration
|
1256
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1257
|
+
attr_accessor :timestamp
|
1258
|
+
# The type of calculation made to determine when the discount ends.
|
1259
|
+
attr_accessor :type
|
1260
|
+
|
1261
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1262
|
+
@duration = duration
|
1263
|
+
@timestamp = timestamp
|
1264
|
+
@type = type
|
1265
|
+
end
|
1266
|
+
end
|
997
1267
|
# ID of the coupon to create a new discount for.
|
998
1268
|
attr_accessor :coupon
|
999
1269
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1000
1270
|
attr_accessor :discount
|
1271
|
+
# Details to determine how long the discount should be applied for.
|
1272
|
+
attr_accessor :discount_end
|
1001
1273
|
# ID of the promotion code to create a new discount for.
|
1002
1274
|
attr_accessor :promotion_code
|
1003
1275
|
|
1004
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1276
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1005
1277
|
@coupon = coupon
|
1006
1278
|
@discount = discount
|
1279
|
+
@discount_end = discount_end
|
1007
1280
|
@promotion_code = promotion_code
|
1008
1281
|
end
|
1009
1282
|
end
|
@@ -1090,16 +1363,44 @@ module Stripe
|
|
1090
1363
|
end
|
1091
1364
|
|
1092
1365
|
class Discount < Stripe::RequestParams
|
1366
|
+
class DiscountEnd < Stripe::RequestParams
|
1367
|
+
class Duration < Stripe::RequestParams
|
1368
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1369
|
+
attr_accessor :interval
|
1370
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1371
|
+
attr_accessor :interval_count
|
1372
|
+
|
1373
|
+
def initialize(interval: nil, interval_count: nil)
|
1374
|
+
@interval = interval
|
1375
|
+
@interval_count = interval_count
|
1376
|
+
end
|
1377
|
+
end
|
1378
|
+
# Time span for the redeemed discount.
|
1379
|
+
attr_accessor :duration
|
1380
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1381
|
+
attr_accessor :timestamp
|
1382
|
+
# The type of calculation made to determine when the discount ends.
|
1383
|
+
attr_accessor :type
|
1384
|
+
|
1385
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1386
|
+
@duration = duration
|
1387
|
+
@timestamp = timestamp
|
1388
|
+
@type = type
|
1389
|
+
end
|
1390
|
+
end
|
1093
1391
|
# ID of the coupon to create a new discount for.
|
1094
1392
|
attr_accessor :coupon
|
1095
1393
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1096
1394
|
attr_accessor :discount
|
1395
|
+
# Details to determine how long the discount should be applied for.
|
1396
|
+
attr_accessor :discount_end
|
1097
1397
|
# ID of the promotion code to create a new discount for.
|
1098
1398
|
attr_accessor :promotion_code
|
1099
1399
|
|
1100
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1400
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1101
1401
|
@coupon = coupon
|
1102
1402
|
@discount = discount
|
1403
|
+
@discount_end = discount_end
|
1103
1404
|
@promotion_code = promotion_code
|
1104
1405
|
end
|
1105
1406
|
end
|
@@ -1141,16 +1442,44 @@ module Stripe
|
|
1141
1442
|
end
|
1142
1443
|
|
1143
1444
|
class Discount < Stripe::RequestParams
|
1445
|
+
class DiscountEnd < Stripe::RequestParams
|
1446
|
+
class Duration < Stripe::RequestParams
|
1447
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1448
|
+
attr_accessor :interval
|
1449
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1450
|
+
attr_accessor :interval_count
|
1451
|
+
|
1452
|
+
def initialize(interval: nil, interval_count: nil)
|
1453
|
+
@interval = interval
|
1454
|
+
@interval_count = interval_count
|
1455
|
+
end
|
1456
|
+
end
|
1457
|
+
# Time span for the redeemed discount.
|
1458
|
+
attr_accessor :duration
|
1459
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1460
|
+
attr_accessor :timestamp
|
1461
|
+
# The type of calculation made to determine when the discount ends.
|
1462
|
+
attr_accessor :type
|
1463
|
+
|
1464
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1465
|
+
@duration = duration
|
1466
|
+
@timestamp = timestamp
|
1467
|
+
@type = type
|
1468
|
+
end
|
1469
|
+
end
|
1144
1470
|
# ID of the coupon to create a new discount for.
|
1145
1471
|
attr_accessor :coupon
|
1146
1472
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1147
1473
|
attr_accessor :discount
|
1474
|
+
# Details to determine how long the discount should be applied for.
|
1475
|
+
attr_accessor :discount_end
|
1148
1476
|
# ID of the promotion code to create a new discount for.
|
1149
1477
|
attr_accessor :promotion_code
|
1150
1478
|
|
1151
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1479
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1152
1480
|
@coupon = coupon
|
1153
1481
|
@discount = discount
|
1482
|
+
@discount_end = discount_end
|
1154
1483
|
@promotion_code = promotion_code
|
1155
1484
|
end
|
1156
1485
|
end
|
@@ -1196,6 +1525,18 @@ module Stripe
|
|
1196
1525
|
@unit_amount_decimal = unit_amount_decimal
|
1197
1526
|
end
|
1198
1527
|
end
|
1528
|
+
|
1529
|
+
class Trial < Stripe::RequestParams
|
1530
|
+
# 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.
|
1531
|
+
attr_accessor :converts_to
|
1532
|
+
# Determines the type of trial for this item.
|
1533
|
+
attr_accessor :type
|
1534
|
+
|
1535
|
+
def initialize(converts_to: nil, type: nil)
|
1536
|
+
@converts_to = converts_to
|
1537
|
+
@type = type
|
1538
|
+
end
|
1539
|
+
end
|
1199
1540
|
# 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.
|
1200
1541
|
attr_accessor :billing_thresholds
|
1201
1542
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -1212,6 +1553,8 @@ module Stripe
|
|
1212
1553
|
attr_accessor :quantity
|
1213
1554
|
# 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.
|
1214
1555
|
attr_accessor :tax_rates
|
1556
|
+
# Options that configure the trial on the subscription item.
|
1557
|
+
attr_accessor :trial
|
1215
1558
|
|
1216
1559
|
def initialize(
|
1217
1560
|
billing_thresholds: nil,
|
@@ -1221,7 +1564,8 @@ module Stripe
|
|
1221
1564
|
price: nil,
|
1222
1565
|
price_data: nil,
|
1223
1566
|
quantity: nil,
|
1224
|
-
tax_rates: nil
|
1567
|
+
tax_rates: nil,
|
1568
|
+
trial: nil
|
1225
1569
|
)
|
1226
1570
|
@billing_thresholds = billing_thresholds
|
1227
1571
|
@discounts = discounts
|
@@ -1231,6 +1575,16 @@ module Stripe
|
|
1231
1575
|
@price_data = price_data
|
1232
1576
|
@quantity = quantity
|
1233
1577
|
@tax_rates = tax_rates
|
1578
|
+
@trial = trial
|
1579
|
+
end
|
1580
|
+
end
|
1581
|
+
|
1582
|
+
class PauseCollection < Stripe::RequestParams
|
1583
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1584
|
+
attr_accessor :behavior
|
1585
|
+
|
1586
|
+
def initialize(behavior: nil)
|
1587
|
+
@behavior = behavior
|
1234
1588
|
end
|
1235
1589
|
end
|
1236
1590
|
|
@@ -1245,6 +1599,23 @@ module Stripe
|
|
1245
1599
|
@destination = destination
|
1246
1600
|
end
|
1247
1601
|
end
|
1602
|
+
|
1603
|
+
class TrialSettings < Stripe::RequestParams
|
1604
|
+
class EndBehavior < Stripe::RequestParams
|
1605
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1606
|
+
attr_accessor :prorate_up_front
|
1607
|
+
|
1608
|
+
def initialize(prorate_up_front: nil)
|
1609
|
+
@prorate_up_front = prorate_up_front
|
1610
|
+
end
|
1611
|
+
end
|
1612
|
+
# Defines how the subscription should behave when a trial ends.
|
1613
|
+
attr_accessor :end_behavior
|
1614
|
+
|
1615
|
+
def initialize(end_behavior: nil)
|
1616
|
+
@end_behavior = end_behavior
|
1617
|
+
end
|
1618
|
+
end
|
1248
1619
|
# 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.
|
1249
1620
|
attr_accessor :add_invoice_items
|
1250
1621
|
# 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).
|
@@ -1279,6 +1650,8 @@ module Stripe
|
|
1279
1650
|
attr_accessor :metadata
|
1280
1651
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
1281
1652
|
attr_accessor :on_behalf_of
|
1653
|
+
# 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).
|
1654
|
+
attr_accessor :pause_collection
|
1282
1655
|
# 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.
|
1283
1656
|
attr_accessor :proration_behavior
|
1284
1657
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -1287,8 +1660,12 @@ module Stripe
|
|
1287
1660
|
attr_accessor :transfer_data
|
1288
1661
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
1289
1662
|
attr_accessor :trial
|
1663
|
+
# Specify trial behavior when crossing phase boundaries
|
1664
|
+
attr_accessor :trial_continuation
|
1290
1665
|
# 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`
|
1291
1666
|
attr_accessor :trial_end
|
1667
|
+
# Settings related to subscription trials.
|
1668
|
+
attr_accessor :trial_settings
|
1292
1669
|
|
1293
1670
|
def initialize(
|
1294
1671
|
add_invoice_items: nil,
|
@@ -1308,11 +1685,14 @@ module Stripe
|
|
1308
1685
|
iterations: nil,
|
1309
1686
|
metadata: nil,
|
1310
1687
|
on_behalf_of: nil,
|
1688
|
+
pause_collection: nil,
|
1311
1689
|
proration_behavior: nil,
|
1312
1690
|
start_date: nil,
|
1313
1691
|
transfer_data: nil,
|
1314
1692
|
trial: nil,
|
1315
|
-
|
1693
|
+
trial_continuation: nil,
|
1694
|
+
trial_end: nil,
|
1695
|
+
trial_settings: nil
|
1316
1696
|
)
|
1317
1697
|
@add_invoice_items = add_invoice_items
|
1318
1698
|
@application_fee_percent = application_fee_percent
|
@@ -1331,13 +1711,30 @@ module Stripe
|
|
1331
1711
|
@iterations = iterations
|
1332
1712
|
@metadata = metadata
|
1333
1713
|
@on_behalf_of = on_behalf_of
|
1714
|
+
@pause_collection = pause_collection
|
1334
1715
|
@proration_behavior = proration_behavior
|
1335
1716
|
@start_date = start_date
|
1336
1717
|
@transfer_data = transfer_data
|
1337
1718
|
@trial = trial
|
1719
|
+
@trial_continuation = trial_continuation
|
1338
1720
|
@trial_end = trial_end
|
1721
|
+
@trial_settings = trial_settings
|
1339
1722
|
end
|
1340
1723
|
end
|
1724
|
+
|
1725
|
+
class Prebilling < Stripe::RequestParams
|
1726
|
+
# This is used to determine the number of billing cycles to prebill.
|
1727
|
+
attr_accessor :iterations
|
1728
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1729
|
+
attr_accessor :update_behavior
|
1730
|
+
|
1731
|
+
def initialize(iterations: nil, update_behavior: nil)
|
1732
|
+
@iterations = iterations
|
1733
|
+
@update_behavior = update_behavior
|
1734
|
+
end
|
1735
|
+
end
|
1736
|
+
# 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.
|
1737
|
+
attr_accessor :billing_behavior
|
1341
1738
|
# Object representing the subscription schedule's default settings.
|
1342
1739
|
attr_accessor :default_settings
|
1343
1740
|
# 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.
|
@@ -1348,26 +1745,598 @@ module Stripe
|
|
1348
1745
|
attr_accessor :metadata
|
1349
1746
|
# 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.
|
1350
1747
|
attr_accessor :phases
|
1748
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1749
|
+
attr_accessor :prebilling
|
1351
1750
|
# 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`.
|
1352
1751
|
attr_accessor :proration_behavior
|
1353
1752
|
|
1354
1753
|
def initialize(
|
1754
|
+
billing_behavior: nil,
|
1355
1755
|
default_settings: nil,
|
1356
1756
|
end_behavior: nil,
|
1357
1757
|
expand: nil,
|
1358
1758
|
metadata: nil,
|
1359
1759
|
phases: nil,
|
1760
|
+
prebilling: nil,
|
1360
1761
|
proration_behavior: nil
|
1361
1762
|
)
|
1763
|
+
@billing_behavior = billing_behavior
|
1362
1764
|
@default_settings = default_settings
|
1363
1765
|
@end_behavior = end_behavior
|
1364
1766
|
@expand = expand
|
1365
1767
|
@metadata = metadata
|
1366
1768
|
@phases = phases
|
1769
|
+
@prebilling = prebilling
|
1367
1770
|
@proration_behavior = proration_behavior
|
1368
1771
|
end
|
1369
1772
|
end
|
1370
1773
|
|
1774
|
+
class AmendParams < Stripe::RequestParams
|
1775
|
+
class Amendment < Stripe::RequestParams
|
1776
|
+
class AmendmentEnd < Stripe::RequestParams
|
1777
|
+
class DiscountEnd < Stripe::RequestParams
|
1778
|
+
# The ID of a specific discount.
|
1779
|
+
attr_accessor :discount
|
1780
|
+
|
1781
|
+
def initialize(discount: nil)
|
1782
|
+
@discount = discount
|
1783
|
+
end
|
1784
|
+
end
|
1785
|
+
|
1786
|
+
class Duration < Stripe::RequestParams
|
1787
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1788
|
+
attr_accessor :interval
|
1789
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1790
|
+
attr_accessor :interval_count
|
1791
|
+
|
1792
|
+
def initialize(interval: nil, interval_count: nil)
|
1793
|
+
@interval = interval
|
1794
|
+
@interval_count = interval_count
|
1795
|
+
end
|
1796
|
+
end
|
1797
|
+
# Use the `end` time of a given discount.
|
1798
|
+
attr_accessor :discount_end
|
1799
|
+
# Time span for the amendment starting from the `amendment_start`.
|
1800
|
+
attr_accessor :duration
|
1801
|
+
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
1802
|
+
attr_accessor :timestamp
|
1803
|
+
# Select one of three ways to pass the `amendment_end`.
|
1804
|
+
attr_accessor :type
|
1805
|
+
|
1806
|
+
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
1807
|
+
@discount_end = discount_end
|
1808
|
+
@duration = duration
|
1809
|
+
@timestamp = timestamp
|
1810
|
+
@type = type
|
1811
|
+
end
|
1812
|
+
end
|
1813
|
+
|
1814
|
+
class AmendmentStart < Stripe::RequestParams
|
1815
|
+
class AmendmentEnd < Stripe::RequestParams
|
1816
|
+
# 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.
|
1817
|
+
attr_accessor :index
|
1818
|
+
|
1819
|
+
def initialize(index: nil)
|
1820
|
+
@index = index
|
1821
|
+
end
|
1822
|
+
end
|
1823
|
+
|
1824
|
+
class DiscountEnd < Stripe::RequestParams
|
1825
|
+
# The ID of a specific discount.
|
1826
|
+
attr_accessor :discount
|
1827
|
+
|
1828
|
+
def initialize(discount: nil)
|
1829
|
+
@discount = discount
|
1830
|
+
end
|
1831
|
+
end
|
1832
|
+
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
1833
|
+
attr_accessor :amendment_end
|
1834
|
+
# Use the `end` time of a given discount.
|
1835
|
+
attr_accessor :discount_end
|
1836
|
+
# A precise Unix timestamp for the amendment to start.
|
1837
|
+
attr_accessor :timestamp
|
1838
|
+
# Select one of three ways to pass the `amendment_start`.
|
1839
|
+
attr_accessor :type
|
1840
|
+
|
1841
|
+
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
1842
|
+
@amendment_end = amendment_end
|
1843
|
+
@discount_end = discount_end
|
1844
|
+
@timestamp = timestamp
|
1845
|
+
@type = type
|
1846
|
+
end
|
1847
|
+
end
|
1848
|
+
|
1849
|
+
class DiscountAction < Stripe::RequestParams
|
1850
|
+
class Add < Stripe::RequestParams
|
1851
|
+
class DiscountEnd < Stripe::RequestParams
|
1852
|
+
# The type of calculation made to determine when the discount ends.
|
1853
|
+
attr_accessor :type
|
1854
|
+
|
1855
|
+
def initialize(type: nil)
|
1856
|
+
@type = type
|
1857
|
+
end
|
1858
|
+
end
|
1859
|
+
# The coupon code to redeem.
|
1860
|
+
attr_accessor :coupon
|
1861
|
+
# An ID of an existing discount for a coupon that was already redeemed.
|
1862
|
+
attr_accessor :discount
|
1863
|
+
# Details to determine how long the discount should be applied for.
|
1864
|
+
attr_accessor :discount_end
|
1865
|
+
# 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.
|
1866
|
+
attr_accessor :index
|
1867
|
+
# The promotion code to redeem.
|
1868
|
+
attr_accessor :promotion_code
|
1869
|
+
|
1870
|
+
def initialize(
|
1871
|
+
coupon: nil,
|
1872
|
+
discount: nil,
|
1873
|
+
discount_end: nil,
|
1874
|
+
index: nil,
|
1875
|
+
promotion_code: nil
|
1876
|
+
)
|
1877
|
+
@coupon = coupon
|
1878
|
+
@discount = discount
|
1879
|
+
@discount_end = discount_end
|
1880
|
+
@index = index
|
1881
|
+
@promotion_code = promotion_code
|
1882
|
+
end
|
1883
|
+
end
|
1884
|
+
|
1885
|
+
class Remove < Stripe::RequestParams
|
1886
|
+
# The coupon code to remove from the `discounts` array.
|
1887
|
+
attr_accessor :coupon
|
1888
|
+
# The ID of a discount to remove from the `discounts` array.
|
1889
|
+
attr_accessor :discount
|
1890
|
+
# The ID of a promotion code to remove from the `discounts` array.
|
1891
|
+
attr_accessor :promotion_code
|
1892
|
+
|
1893
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1894
|
+
@coupon = coupon
|
1895
|
+
@discount = discount
|
1896
|
+
@promotion_code = promotion_code
|
1897
|
+
end
|
1898
|
+
end
|
1899
|
+
|
1900
|
+
class Set < Stripe::RequestParams
|
1901
|
+
# The coupon code to replace the `discounts` array with.
|
1902
|
+
attr_accessor :coupon
|
1903
|
+
# An ID of an existing discount to replace the `discounts` array with.
|
1904
|
+
attr_accessor :discount
|
1905
|
+
# An ID of an existing promotion code to replace the `discounts` array with.
|
1906
|
+
attr_accessor :promotion_code
|
1907
|
+
|
1908
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1909
|
+
@coupon = coupon
|
1910
|
+
@discount = discount
|
1911
|
+
@promotion_code = promotion_code
|
1912
|
+
end
|
1913
|
+
end
|
1914
|
+
# Details of the discount to add.
|
1915
|
+
attr_accessor :add
|
1916
|
+
# Details of the discount to remove.
|
1917
|
+
attr_accessor :remove
|
1918
|
+
# Details of the discount to replace the existing discounts with.
|
1919
|
+
attr_accessor :set
|
1920
|
+
# Determines the type of discount action.
|
1921
|
+
attr_accessor :type
|
1922
|
+
|
1923
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1924
|
+
@add = add
|
1925
|
+
@remove = remove
|
1926
|
+
@set = set
|
1927
|
+
@type = type
|
1928
|
+
end
|
1929
|
+
end
|
1930
|
+
|
1931
|
+
class ItemAction < Stripe::RequestParams
|
1932
|
+
class Add < Stripe::RequestParams
|
1933
|
+
class Discount < Stripe::RequestParams
|
1934
|
+
class DiscountEnd < Stripe::RequestParams
|
1935
|
+
class Duration < Stripe::RequestParams
|
1936
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1937
|
+
attr_accessor :interval
|
1938
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1939
|
+
attr_accessor :interval_count
|
1940
|
+
|
1941
|
+
def initialize(interval: nil, interval_count: nil)
|
1942
|
+
@interval = interval
|
1943
|
+
@interval_count = interval_count
|
1944
|
+
end
|
1945
|
+
end
|
1946
|
+
# Time span for the redeemed discount.
|
1947
|
+
attr_accessor :duration
|
1948
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1949
|
+
attr_accessor :timestamp
|
1950
|
+
# The type of calculation made to determine when the discount ends.
|
1951
|
+
attr_accessor :type
|
1952
|
+
|
1953
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1954
|
+
@duration = duration
|
1955
|
+
@timestamp = timestamp
|
1956
|
+
@type = type
|
1957
|
+
end
|
1958
|
+
end
|
1959
|
+
# ID of the coupon to create a new discount for.
|
1960
|
+
attr_accessor :coupon
|
1961
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1962
|
+
attr_accessor :discount
|
1963
|
+
# Details to determine how long the discount should be applied for.
|
1964
|
+
attr_accessor :discount_end
|
1965
|
+
# ID of the promotion code to create a new discount for.
|
1966
|
+
attr_accessor :promotion_code
|
1967
|
+
|
1968
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1969
|
+
@coupon = coupon
|
1970
|
+
@discount = discount
|
1971
|
+
@discount_end = discount_end
|
1972
|
+
@promotion_code = promotion_code
|
1973
|
+
end
|
1974
|
+
end
|
1975
|
+
|
1976
|
+
class Trial < Stripe::RequestParams
|
1977
|
+
# 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.
|
1978
|
+
attr_accessor :converts_to
|
1979
|
+
# Determines the type of trial for this item.
|
1980
|
+
attr_accessor :type
|
1981
|
+
|
1982
|
+
def initialize(converts_to: nil, type: nil)
|
1983
|
+
@converts_to = converts_to
|
1984
|
+
@type = type
|
1985
|
+
end
|
1986
|
+
end
|
1987
|
+
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
1988
|
+
attr_accessor :discounts
|
1989
|
+
# 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`.
|
1990
|
+
attr_accessor :metadata
|
1991
|
+
# The ID of the price object.
|
1992
|
+
attr_accessor :price
|
1993
|
+
# Quantity for this item.
|
1994
|
+
attr_accessor :quantity
|
1995
|
+
# 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`.
|
1996
|
+
attr_accessor :tax_rates
|
1997
|
+
# Options that configure the trial on the subscription item.
|
1998
|
+
attr_accessor :trial
|
1999
|
+
|
2000
|
+
def initialize(
|
2001
|
+
discounts: nil,
|
2002
|
+
metadata: nil,
|
2003
|
+
price: nil,
|
2004
|
+
quantity: nil,
|
2005
|
+
tax_rates: nil,
|
2006
|
+
trial: nil
|
2007
|
+
)
|
2008
|
+
@discounts = discounts
|
2009
|
+
@metadata = metadata
|
2010
|
+
@price = price
|
2011
|
+
@quantity = quantity
|
2012
|
+
@tax_rates = tax_rates
|
2013
|
+
@trial = trial
|
2014
|
+
end
|
2015
|
+
end
|
2016
|
+
|
2017
|
+
class Remove < Stripe::RequestParams
|
2018
|
+
# ID of a price to remove.
|
2019
|
+
attr_accessor :price
|
2020
|
+
|
2021
|
+
def initialize(price: nil)
|
2022
|
+
@price = price
|
2023
|
+
end
|
2024
|
+
end
|
2025
|
+
|
2026
|
+
class Set < Stripe::RequestParams
|
2027
|
+
class Discount < Stripe::RequestParams
|
2028
|
+
class DiscountEnd < Stripe::RequestParams
|
2029
|
+
class Duration < Stripe::RequestParams
|
2030
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2031
|
+
attr_accessor :interval
|
2032
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2033
|
+
attr_accessor :interval_count
|
2034
|
+
|
2035
|
+
def initialize(interval: nil, interval_count: nil)
|
2036
|
+
@interval = interval
|
2037
|
+
@interval_count = interval_count
|
2038
|
+
end
|
2039
|
+
end
|
2040
|
+
# Time span for the redeemed discount.
|
2041
|
+
attr_accessor :duration
|
2042
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2043
|
+
attr_accessor :timestamp
|
2044
|
+
# The type of calculation made to determine when the discount ends.
|
2045
|
+
attr_accessor :type
|
2046
|
+
|
2047
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2048
|
+
@duration = duration
|
2049
|
+
@timestamp = timestamp
|
2050
|
+
@type = type
|
2051
|
+
end
|
2052
|
+
end
|
2053
|
+
# ID of the coupon to create a new discount for.
|
2054
|
+
attr_accessor :coupon
|
2055
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2056
|
+
attr_accessor :discount
|
2057
|
+
# Details to determine how long the discount should be applied for.
|
2058
|
+
attr_accessor :discount_end
|
2059
|
+
# ID of the promotion code to create a new discount for.
|
2060
|
+
attr_accessor :promotion_code
|
2061
|
+
|
2062
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2063
|
+
@coupon = coupon
|
2064
|
+
@discount = discount
|
2065
|
+
@discount_end = discount_end
|
2066
|
+
@promotion_code = promotion_code
|
2067
|
+
end
|
2068
|
+
end
|
2069
|
+
|
2070
|
+
class Trial < Stripe::RequestParams
|
2071
|
+
# 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.
|
2072
|
+
attr_accessor :converts_to
|
2073
|
+
# Determines the type of trial for this item.
|
2074
|
+
attr_accessor :type
|
2075
|
+
|
2076
|
+
def initialize(converts_to: nil, type: nil)
|
2077
|
+
@converts_to = converts_to
|
2078
|
+
@type = type
|
2079
|
+
end
|
2080
|
+
end
|
2081
|
+
# 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`.
|
2082
|
+
attr_accessor :discounts
|
2083
|
+
# 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`.
|
2084
|
+
attr_accessor :metadata
|
2085
|
+
# The ID of the price object.
|
2086
|
+
attr_accessor :price
|
2087
|
+
# 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`.
|
2088
|
+
attr_accessor :quantity
|
2089
|
+
# 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`.
|
2090
|
+
attr_accessor :tax_rates
|
2091
|
+
# 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`.
|
2092
|
+
attr_accessor :trial
|
2093
|
+
|
2094
|
+
def initialize(
|
2095
|
+
discounts: nil,
|
2096
|
+
metadata: nil,
|
2097
|
+
price: nil,
|
2098
|
+
quantity: nil,
|
2099
|
+
tax_rates: nil,
|
2100
|
+
trial: nil
|
2101
|
+
)
|
2102
|
+
@discounts = discounts
|
2103
|
+
@metadata = metadata
|
2104
|
+
@price = price
|
2105
|
+
@quantity = quantity
|
2106
|
+
@tax_rates = tax_rates
|
2107
|
+
@trial = trial
|
2108
|
+
end
|
2109
|
+
end
|
2110
|
+
# 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.
|
2111
|
+
attr_accessor :add
|
2112
|
+
# Details of the subscription item to remove.
|
2113
|
+
attr_accessor :remove
|
2114
|
+
# 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.
|
2115
|
+
attr_accessor :set
|
2116
|
+
# Determines the type of item action.
|
2117
|
+
attr_accessor :type
|
2118
|
+
|
2119
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2120
|
+
@add = add
|
2121
|
+
@remove = remove
|
2122
|
+
@set = set
|
2123
|
+
@type = type
|
2124
|
+
end
|
2125
|
+
end
|
2126
|
+
|
2127
|
+
class MetadataAction < Stripe::RequestParams
|
2128
|
+
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
2129
|
+
attr_accessor :add
|
2130
|
+
# Keys to remove from schedule phase metadata.
|
2131
|
+
attr_accessor :remove
|
2132
|
+
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
2133
|
+
attr_accessor :set
|
2134
|
+
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
2135
|
+
attr_accessor :type
|
2136
|
+
|
2137
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2138
|
+
@add = add
|
2139
|
+
@remove = remove
|
2140
|
+
@set = set
|
2141
|
+
@type = type
|
2142
|
+
end
|
2143
|
+
end
|
2144
|
+
|
2145
|
+
class SetPauseCollection < Stripe::RequestParams
|
2146
|
+
class Set < Stripe::RequestParams
|
2147
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2148
|
+
attr_accessor :behavior
|
2149
|
+
|
2150
|
+
def initialize(behavior: nil)
|
2151
|
+
@behavior = behavior
|
2152
|
+
end
|
2153
|
+
end
|
2154
|
+
# Details of the pause_collection behavior to apply to the amendment.
|
2155
|
+
attr_accessor :set
|
2156
|
+
# Determines the type of the pause_collection amendment.
|
2157
|
+
attr_accessor :type
|
2158
|
+
|
2159
|
+
def initialize(set: nil, type: nil)
|
2160
|
+
@set = set
|
2161
|
+
@type = type
|
2162
|
+
end
|
2163
|
+
end
|
2164
|
+
|
2165
|
+
class TrialSettings < Stripe::RequestParams
|
2166
|
+
class EndBehavior < Stripe::RequestParams
|
2167
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2168
|
+
attr_accessor :prorate_up_front
|
2169
|
+
|
2170
|
+
def initialize(prorate_up_front: nil)
|
2171
|
+
@prorate_up_front = prorate_up_front
|
2172
|
+
end
|
2173
|
+
end
|
2174
|
+
# Defines how the subscription should behave when a trial ends.
|
2175
|
+
attr_accessor :end_behavior
|
2176
|
+
|
2177
|
+
def initialize(end_behavior: nil)
|
2178
|
+
@end_behavior = end_behavior
|
2179
|
+
end
|
2180
|
+
end
|
2181
|
+
# 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.
|
2182
|
+
attr_accessor :amendment_end
|
2183
|
+
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2184
|
+
attr_accessor :amendment_start
|
2185
|
+
# 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.
|
2186
|
+
attr_accessor :billing_cycle_anchor
|
2187
|
+
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
2188
|
+
attr_accessor :discount_actions
|
2189
|
+
# Changes to the subscription items during the amendment time span.
|
2190
|
+
attr_accessor :item_actions
|
2191
|
+
# Instructions for how to modify phase metadata
|
2192
|
+
attr_accessor :metadata_actions
|
2193
|
+
# 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`.
|
2194
|
+
attr_accessor :proration_behavior
|
2195
|
+
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2196
|
+
attr_accessor :set_pause_collection
|
2197
|
+
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
2198
|
+
attr_accessor :set_schedule_end
|
2199
|
+
# Settings related to subscription trials.
|
2200
|
+
attr_accessor :trial_settings
|
2201
|
+
|
2202
|
+
def initialize(
|
2203
|
+
amendment_end: nil,
|
2204
|
+
amendment_start: nil,
|
2205
|
+
billing_cycle_anchor: nil,
|
2206
|
+
discount_actions: nil,
|
2207
|
+
item_actions: nil,
|
2208
|
+
metadata_actions: nil,
|
2209
|
+
proration_behavior: nil,
|
2210
|
+
set_pause_collection: nil,
|
2211
|
+
set_schedule_end: nil,
|
2212
|
+
trial_settings: nil
|
2213
|
+
)
|
2214
|
+
@amendment_end = amendment_end
|
2215
|
+
@amendment_start = amendment_start
|
2216
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
2217
|
+
@discount_actions = discount_actions
|
2218
|
+
@item_actions = item_actions
|
2219
|
+
@metadata_actions = metadata_actions
|
2220
|
+
@proration_behavior = proration_behavior
|
2221
|
+
@set_pause_collection = set_pause_collection
|
2222
|
+
@set_schedule_end = set_schedule_end
|
2223
|
+
@trial_settings = trial_settings
|
2224
|
+
end
|
2225
|
+
end
|
2226
|
+
|
2227
|
+
class Prebilling < Stripe::RequestParams
|
2228
|
+
class BillFrom < Stripe::RequestParams
|
2229
|
+
class AmendmentStart < Stripe::RequestParams
|
2230
|
+
# 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.
|
2231
|
+
attr_accessor :index
|
2232
|
+
|
2233
|
+
def initialize(index: nil)
|
2234
|
+
@index = index
|
2235
|
+
end
|
2236
|
+
end
|
2237
|
+
# Start the prebilled period when a specified amendment begins.
|
2238
|
+
attr_accessor :amendment_start
|
2239
|
+
# Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2240
|
+
attr_accessor :timestamp
|
2241
|
+
# Select one of several ways to pass the `bill_from` value.
|
2242
|
+
attr_accessor :type
|
2243
|
+
|
2244
|
+
def initialize(amendment_start: nil, timestamp: nil, type: nil)
|
2245
|
+
@amendment_start = amendment_start
|
2246
|
+
@timestamp = timestamp
|
2247
|
+
@type = type
|
2248
|
+
end
|
2249
|
+
end
|
2250
|
+
|
2251
|
+
class BillUntil < Stripe::RequestParams
|
2252
|
+
class AmendmentEnd < Stripe::RequestParams
|
2253
|
+
# 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.
|
2254
|
+
attr_accessor :index
|
2255
|
+
|
2256
|
+
def initialize(index: nil)
|
2257
|
+
@index = index
|
2258
|
+
end
|
2259
|
+
end
|
2260
|
+
|
2261
|
+
class Duration < Stripe::RequestParams
|
2262
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2263
|
+
attr_accessor :interval
|
2264
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2265
|
+
attr_accessor :interval_count
|
2266
|
+
|
2267
|
+
def initialize(interval: nil, interval_count: nil)
|
2268
|
+
@interval = interval
|
2269
|
+
@interval_count = interval_count
|
2270
|
+
end
|
2271
|
+
end
|
2272
|
+
# End the prebilled period when a specified amendment ends.
|
2273
|
+
attr_accessor :amendment_end
|
2274
|
+
# Time span for prebilling, starting from `bill_from`.
|
2275
|
+
attr_accessor :duration
|
2276
|
+
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2277
|
+
attr_accessor :timestamp
|
2278
|
+
# Select one of several ways to pass the `bill_until` value.
|
2279
|
+
attr_accessor :type
|
2280
|
+
|
2281
|
+
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
2282
|
+
@amendment_end = amendment_end
|
2283
|
+
@duration = duration
|
2284
|
+
@timestamp = timestamp
|
2285
|
+
@type = type
|
2286
|
+
end
|
2287
|
+
end
|
2288
|
+
# The beginning of the prebilled time period. The default value is `now`.
|
2289
|
+
attr_accessor :bill_from
|
2290
|
+
# The end of the prebilled time period.
|
2291
|
+
attr_accessor :bill_until
|
2292
|
+
# When the prebilling invoice should be created. The default value is `now`.
|
2293
|
+
attr_accessor :invoice_at
|
2294
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
2295
|
+
attr_accessor :update_behavior
|
2296
|
+
|
2297
|
+
def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
|
2298
|
+
@bill_from = bill_from
|
2299
|
+
@bill_until = bill_until
|
2300
|
+
@invoice_at = invoice_at
|
2301
|
+
@update_behavior = update_behavior
|
2302
|
+
end
|
2303
|
+
end
|
2304
|
+
|
2305
|
+
class ScheduleSettings < Stripe::RequestParams
|
2306
|
+
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2307
|
+
attr_accessor :end_behavior
|
2308
|
+
|
2309
|
+
def initialize(end_behavior: nil)
|
2310
|
+
@end_behavior = end_behavior
|
2311
|
+
end
|
2312
|
+
end
|
2313
|
+
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
2314
|
+
attr_accessor :amendments
|
2315
|
+
# Specifies which fields in the response should be expanded.
|
2316
|
+
attr_accessor :expand
|
2317
|
+
# Provide any time periods to bill in advance.
|
2318
|
+
attr_accessor :prebilling
|
2319
|
+
# In cases where the amendment changes the currently active phase,
|
2320
|
+
# specifies if and how to prorate at the time of the request.
|
2321
|
+
attr_accessor :proration_behavior
|
2322
|
+
# Changes to apply to the subscription schedule.
|
2323
|
+
attr_accessor :schedule_settings
|
2324
|
+
|
2325
|
+
def initialize(
|
2326
|
+
amendments: nil,
|
2327
|
+
expand: nil,
|
2328
|
+
prebilling: nil,
|
2329
|
+
proration_behavior: nil,
|
2330
|
+
schedule_settings: nil
|
2331
|
+
)
|
2332
|
+
@amendments = amendments
|
2333
|
+
@expand = expand
|
2334
|
+
@prebilling = prebilling
|
2335
|
+
@proration_behavior = proration_behavior
|
2336
|
+
@schedule_settings = schedule_settings
|
2337
|
+
end
|
2338
|
+
end
|
2339
|
+
|
1371
2340
|
class CancelParams < Stripe::RequestParams
|
1372
2341
|
# Specifies which fields in the response should be expanded.
|
1373
2342
|
attr_accessor :expand
|
@@ -1396,6 +2365,8 @@ module Stripe
|
|
1396
2365
|
end
|
1397
2366
|
# ID of the Connect Application that created the schedule.
|
1398
2367
|
attr_reader :application
|
2368
|
+
# 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.
|
2369
|
+
attr_reader :billing_behavior
|
1399
2370
|
# The billing mode of the subscription.
|
1400
2371
|
attr_reader :billing_mode
|
1401
2372
|
# Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
|
@@ -1408,12 +2379,16 @@ module Stripe
|
|
1408
2379
|
attr_reader :current_phase
|
1409
2380
|
# ID of the customer who owns the subscription schedule.
|
1410
2381
|
attr_reader :customer
|
2382
|
+
# ID of the account who owns the subscription schedule.
|
2383
|
+
attr_reader :customer_account
|
1411
2384
|
# Attribute for field default_settings
|
1412
2385
|
attr_reader :default_settings
|
1413
2386
|
# 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.
|
1414
2387
|
attr_reader :end_behavior
|
1415
2388
|
# Unique identifier for the object.
|
1416
2389
|
attr_reader :id
|
2390
|
+
# Details of the most recent price migration that failed for the subscription schedule.
|
2391
|
+
attr_reader :last_price_migration_error
|
1417
2392
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
1418
2393
|
attr_reader :livemode
|
1419
2394
|
# 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.
|
@@ -1422,6 +2397,8 @@ module Stripe
|
|
1422
2397
|
attr_reader :object
|
1423
2398
|
# Configuration for the subscription schedule's phases.
|
1424
2399
|
attr_reader :phases
|
2400
|
+
# Time period and invoice for a Subscription billed in advance.
|
2401
|
+
attr_reader :prebilling
|
1425
2402
|
# Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
|
1426
2403
|
attr_reader :released_at
|
1427
2404
|
# ID of the subscription once managed by the subscription schedule (if it is released).
|
@@ -1433,6 +2410,26 @@ module Stripe
|
|
1433
2410
|
# ID of the test clock this subscription schedule belongs to.
|
1434
2411
|
attr_reader :test_clock
|
1435
2412
|
|
2413
|
+
# Amends an existing subscription schedule.
|
2414
|
+
def amend(params = {}, opts = {})
|
2415
|
+
request_stripe_object(
|
2416
|
+
method: :post,
|
2417
|
+
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
|
2418
|
+
params: params,
|
2419
|
+
opts: opts
|
2420
|
+
)
|
2421
|
+
end
|
2422
|
+
|
2423
|
+
# Amends an existing subscription schedule.
|
2424
|
+
def self.amend(schedule, params = {}, opts = {})
|
2425
|
+
request_stripe_object(
|
2426
|
+
method: :post,
|
2427
|
+
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
2428
|
+
params: params,
|
2429
|
+
opts: opts
|
2430
|
+
)
|
2431
|
+
end
|
2432
|
+
|
1436
2433
|
# 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.
|
1437
2434
|
def cancel(params = {}, opts = {})
|
1438
2435
|
request_stripe_object(
|