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
@@ -83,6 +83,8 @@ module Stripe
|
|
83
83
|
attr_accessor :created
|
84
84
|
# Only return subscription schedules for the given customer.
|
85
85
|
attr_accessor :customer
|
86
|
+
# Only return subscription schedules for the given account.
|
87
|
+
attr_accessor :customer_account
|
86
88
|
# 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.
|
87
89
|
attr_accessor :ending_before
|
88
90
|
# Specifies which fields in the response should be expanded.
|
@@ -101,6 +103,7 @@ module Stripe
|
|
101
103
|
completed_at: nil,
|
102
104
|
created: nil,
|
103
105
|
customer: nil,
|
106
|
+
customer_account: nil,
|
104
107
|
ending_before: nil,
|
105
108
|
expand: nil,
|
106
109
|
limit: nil,
|
@@ -112,6 +115,7 @@ module Stripe
|
|
112
115
|
@completed_at = completed_at
|
113
116
|
@created = created
|
114
117
|
@customer = customer
|
118
|
+
@customer_account = customer_account
|
115
119
|
@ending_before = ending_before
|
116
120
|
@expand = expand
|
117
121
|
@limit = limit
|
@@ -253,16 +257,44 @@ module Stripe
|
|
253
257
|
class Phase < Stripe::RequestParams
|
254
258
|
class AddInvoiceItem < Stripe::RequestParams
|
255
259
|
class Discount < Stripe::RequestParams
|
260
|
+
class DiscountEnd < Stripe::RequestParams
|
261
|
+
class Duration < Stripe::RequestParams
|
262
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
263
|
+
attr_accessor :interval
|
264
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
265
|
+
attr_accessor :interval_count
|
266
|
+
|
267
|
+
def initialize(interval: nil, interval_count: nil)
|
268
|
+
@interval = interval
|
269
|
+
@interval_count = interval_count
|
270
|
+
end
|
271
|
+
end
|
272
|
+
# Time span for the redeemed discount.
|
273
|
+
attr_accessor :duration
|
274
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
275
|
+
attr_accessor :timestamp
|
276
|
+
# The type of calculation made to determine when the discount ends.
|
277
|
+
attr_accessor :type
|
278
|
+
|
279
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
280
|
+
@duration = duration
|
281
|
+
@timestamp = timestamp
|
282
|
+
@type = type
|
283
|
+
end
|
284
|
+
end
|
256
285
|
# ID of the coupon to create a new discount for.
|
257
286
|
attr_accessor :coupon
|
258
287
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
259
288
|
attr_accessor :discount
|
289
|
+
# Details to determine how long the discount should be applied for.
|
290
|
+
attr_accessor :discount_end
|
260
291
|
# ID of the promotion code to create a new discount for.
|
261
292
|
attr_accessor :promotion_code
|
262
293
|
|
263
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
294
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
264
295
|
@coupon = coupon
|
265
296
|
@discount = discount
|
297
|
+
@discount_end = discount_end
|
266
298
|
@promotion_code = promotion_code
|
267
299
|
end
|
268
300
|
end
|
@@ -349,16 +381,44 @@ module Stripe
|
|
349
381
|
end
|
350
382
|
|
351
383
|
class Discount < Stripe::RequestParams
|
384
|
+
class DiscountEnd < Stripe::RequestParams
|
385
|
+
class Duration < Stripe::RequestParams
|
386
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
387
|
+
attr_accessor :interval
|
388
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
389
|
+
attr_accessor :interval_count
|
390
|
+
|
391
|
+
def initialize(interval: nil, interval_count: nil)
|
392
|
+
@interval = interval
|
393
|
+
@interval_count = interval_count
|
394
|
+
end
|
395
|
+
end
|
396
|
+
# Time span for the redeemed discount.
|
397
|
+
attr_accessor :duration
|
398
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
399
|
+
attr_accessor :timestamp
|
400
|
+
# The type of calculation made to determine when the discount ends.
|
401
|
+
attr_accessor :type
|
402
|
+
|
403
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
404
|
+
@duration = duration
|
405
|
+
@timestamp = timestamp
|
406
|
+
@type = type
|
407
|
+
end
|
408
|
+
end
|
352
409
|
# ID of the coupon to create a new discount for.
|
353
410
|
attr_accessor :coupon
|
354
411
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
355
412
|
attr_accessor :discount
|
413
|
+
# Details to determine how long the discount should be applied for.
|
414
|
+
attr_accessor :discount_end
|
356
415
|
# ID of the promotion code to create a new discount for.
|
357
416
|
attr_accessor :promotion_code
|
358
417
|
|
359
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
418
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
360
419
|
@coupon = coupon
|
361
420
|
@discount = discount
|
421
|
+
@discount_end = discount_end
|
362
422
|
@promotion_code = promotion_code
|
363
423
|
end
|
364
424
|
end
|
@@ -400,16 +460,44 @@ module Stripe
|
|
400
460
|
end
|
401
461
|
|
402
462
|
class Discount < Stripe::RequestParams
|
463
|
+
class DiscountEnd < Stripe::RequestParams
|
464
|
+
class Duration < Stripe::RequestParams
|
465
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
466
|
+
attr_accessor :interval
|
467
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
468
|
+
attr_accessor :interval_count
|
469
|
+
|
470
|
+
def initialize(interval: nil, interval_count: nil)
|
471
|
+
@interval = interval
|
472
|
+
@interval_count = interval_count
|
473
|
+
end
|
474
|
+
end
|
475
|
+
# Time span for the redeemed discount.
|
476
|
+
attr_accessor :duration
|
477
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
478
|
+
attr_accessor :timestamp
|
479
|
+
# The type of calculation made to determine when the discount ends.
|
480
|
+
attr_accessor :type
|
481
|
+
|
482
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
483
|
+
@duration = duration
|
484
|
+
@timestamp = timestamp
|
485
|
+
@type = type
|
486
|
+
end
|
487
|
+
end
|
403
488
|
# ID of the coupon to create a new discount for.
|
404
489
|
attr_accessor :coupon
|
405
490
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
406
491
|
attr_accessor :discount
|
492
|
+
# Details to determine how long the discount should be applied for.
|
493
|
+
attr_accessor :discount_end
|
407
494
|
# ID of the promotion code to create a new discount for.
|
408
495
|
attr_accessor :promotion_code
|
409
496
|
|
410
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
497
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
411
498
|
@coupon = coupon
|
412
499
|
@discount = discount
|
500
|
+
@discount_end = discount_end
|
413
501
|
@promotion_code = promotion_code
|
414
502
|
end
|
415
503
|
end
|
@@ -455,6 +543,18 @@ module Stripe
|
|
455
543
|
@unit_amount_decimal = unit_amount_decimal
|
456
544
|
end
|
457
545
|
end
|
546
|
+
|
547
|
+
class Trial < Stripe::RequestParams
|
548
|
+
# 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.
|
549
|
+
attr_accessor :converts_to
|
550
|
+
# Determines the type of trial for this item.
|
551
|
+
attr_accessor :type
|
552
|
+
|
553
|
+
def initialize(converts_to: nil, type: nil)
|
554
|
+
@converts_to = converts_to
|
555
|
+
@type = type
|
556
|
+
end
|
557
|
+
end
|
458
558
|
# 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.
|
459
559
|
attr_accessor :billing_thresholds
|
460
560
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -471,6 +571,8 @@ module Stripe
|
|
471
571
|
attr_accessor :quantity
|
472
572
|
# 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.
|
473
573
|
attr_accessor :tax_rates
|
574
|
+
# Options that configure the trial on the subscription item.
|
575
|
+
attr_accessor :trial
|
474
576
|
|
475
577
|
def initialize(
|
476
578
|
billing_thresholds: nil,
|
@@ -480,7 +582,8 @@ module Stripe
|
|
480
582
|
price: nil,
|
481
583
|
price_data: nil,
|
482
584
|
quantity: nil,
|
483
|
-
tax_rates: nil
|
585
|
+
tax_rates: nil,
|
586
|
+
trial: nil
|
484
587
|
)
|
485
588
|
@billing_thresholds = billing_thresholds
|
486
589
|
@discounts = discounts
|
@@ -490,6 +593,16 @@ module Stripe
|
|
490
593
|
@price_data = price_data
|
491
594
|
@quantity = quantity
|
492
595
|
@tax_rates = tax_rates
|
596
|
+
@trial = trial
|
597
|
+
end
|
598
|
+
end
|
599
|
+
|
600
|
+
class PauseCollection < Stripe::RequestParams
|
601
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
602
|
+
attr_accessor :behavior
|
603
|
+
|
604
|
+
def initialize(behavior: nil)
|
605
|
+
@behavior = behavior
|
493
606
|
end
|
494
607
|
end
|
495
608
|
|
@@ -504,6 +617,23 @@ module Stripe
|
|
504
617
|
@destination = destination
|
505
618
|
end
|
506
619
|
end
|
620
|
+
|
621
|
+
class TrialSettings < Stripe::RequestParams
|
622
|
+
class EndBehavior < Stripe::RequestParams
|
623
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
624
|
+
attr_accessor :prorate_up_front
|
625
|
+
|
626
|
+
def initialize(prorate_up_front: nil)
|
627
|
+
@prorate_up_front = prorate_up_front
|
628
|
+
end
|
629
|
+
end
|
630
|
+
# Defines how the subscription should behave when a trial ends.
|
631
|
+
attr_accessor :end_behavior
|
632
|
+
|
633
|
+
def initialize(end_behavior: nil)
|
634
|
+
@end_behavior = end_behavior
|
635
|
+
end
|
636
|
+
end
|
507
637
|
# 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.
|
508
638
|
attr_accessor :add_invoice_items
|
509
639
|
# 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).
|
@@ -538,14 +668,20 @@ module Stripe
|
|
538
668
|
attr_accessor :metadata
|
539
669
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
540
670
|
attr_accessor :on_behalf_of
|
671
|
+
# 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).
|
672
|
+
attr_accessor :pause_collection
|
541
673
|
# 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.
|
542
674
|
attr_accessor :proration_behavior
|
543
675
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
544
676
|
attr_accessor :transfer_data
|
545
677
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
546
678
|
attr_accessor :trial
|
679
|
+
# Specify trial behavior when crossing phase boundaries
|
680
|
+
attr_accessor :trial_continuation
|
547
681
|
# 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`
|
548
682
|
attr_accessor :trial_end
|
683
|
+
# Settings related to subscription trials.
|
684
|
+
attr_accessor :trial_settings
|
549
685
|
|
550
686
|
def initialize(
|
551
687
|
add_invoice_items: nil,
|
@@ -565,10 +701,13 @@ module Stripe
|
|
565
701
|
iterations: nil,
|
566
702
|
metadata: nil,
|
567
703
|
on_behalf_of: nil,
|
704
|
+
pause_collection: nil,
|
568
705
|
proration_behavior: nil,
|
569
706
|
transfer_data: nil,
|
570
707
|
trial: nil,
|
571
|
-
|
708
|
+
trial_continuation: nil,
|
709
|
+
trial_end: nil,
|
710
|
+
trial_settings: nil
|
572
711
|
)
|
573
712
|
@add_invoice_items = add_invoice_items
|
574
713
|
@application_fee_percent = application_fee_percent
|
@@ -587,16 +726,35 @@ module Stripe
|
|
587
726
|
@iterations = iterations
|
588
727
|
@metadata = metadata
|
589
728
|
@on_behalf_of = on_behalf_of
|
729
|
+
@pause_collection = pause_collection
|
590
730
|
@proration_behavior = proration_behavior
|
591
731
|
@transfer_data = transfer_data
|
592
732
|
@trial = trial
|
733
|
+
@trial_continuation = trial_continuation
|
593
734
|
@trial_end = trial_end
|
735
|
+
@trial_settings = trial_settings
|
736
|
+
end
|
737
|
+
end
|
738
|
+
|
739
|
+
class Prebilling < Stripe::RequestParams
|
740
|
+
# This is used to determine the number of billing cycles to prebill.
|
741
|
+
attr_accessor :iterations
|
742
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
743
|
+
attr_accessor :update_behavior
|
744
|
+
|
745
|
+
def initialize(iterations: nil, update_behavior: nil)
|
746
|
+
@iterations = iterations
|
747
|
+
@update_behavior = update_behavior
|
594
748
|
end
|
595
749
|
end
|
750
|
+
# 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.
|
751
|
+
attr_accessor :billing_behavior
|
596
752
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
597
753
|
attr_accessor :billing_mode
|
598
754
|
# The identifier of the customer to create the subscription schedule for.
|
599
755
|
attr_accessor :customer
|
756
|
+
# The identifier of the account to create the subscription schedule for.
|
757
|
+
attr_accessor :customer_account
|
600
758
|
# Object representing the subscription schedule's default settings.
|
601
759
|
attr_accessor :default_settings
|
602
760
|
# 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.
|
@@ -609,28 +767,36 @@ module Stripe
|
|
609
767
|
attr_accessor :metadata
|
610
768
|
# 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.
|
611
769
|
attr_accessor :phases
|
770
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
771
|
+
attr_accessor :prebilling
|
612
772
|
# 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.
|
613
773
|
attr_accessor :start_date
|
614
774
|
|
615
775
|
def initialize(
|
776
|
+
billing_behavior: nil,
|
616
777
|
billing_mode: nil,
|
617
778
|
customer: nil,
|
779
|
+
customer_account: nil,
|
618
780
|
default_settings: nil,
|
619
781
|
end_behavior: nil,
|
620
782
|
expand: nil,
|
621
783
|
from_subscription: nil,
|
622
784
|
metadata: nil,
|
623
785
|
phases: nil,
|
786
|
+
prebilling: nil,
|
624
787
|
start_date: nil
|
625
788
|
)
|
789
|
+
@billing_behavior = billing_behavior
|
626
790
|
@billing_mode = billing_mode
|
627
791
|
@customer = customer
|
792
|
+
@customer_account = customer_account
|
628
793
|
@default_settings = default_settings
|
629
794
|
@end_behavior = end_behavior
|
630
795
|
@expand = expand
|
631
796
|
@from_subscription = from_subscription
|
632
797
|
@metadata = metadata
|
633
798
|
@phases = phases
|
799
|
+
@prebilling = prebilling
|
634
800
|
@start_date = start_date
|
635
801
|
end
|
636
802
|
end
|
@@ -767,16 +933,44 @@ module Stripe
|
|
767
933
|
class Phase < Stripe::RequestParams
|
768
934
|
class AddInvoiceItem < Stripe::RequestParams
|
769
935
|
class Discount < Stripe::RequestParams
|
936
|
+
class DiscountEnd < Stripe::RequestParams
|
937
|
+
class Duration < Stripe::RequestParams
|
938
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
939
|
+
attr_accessor :interval
|
940
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
941
|
+
attr_accessor :interval_count
|
942
|
+
|
943
|
+
def initialize(interval: nil, interval_count: nil)
|
944
|
+
@interval = interval
|
945
|
+
@interval_count = interval_count
|
946
|
+
end
|
947
|
+
end
|
948
|
+
# Time span for the redeemed discount.
|
949
|
+
attr_accessor :duration
|
950
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
951
|
+
attr_accessor :timestamp
|
952
|
+
# The type of calculation made to determine when the discount ends.
|
953
|
+
attr_accessor :type
|
954
|
+
|
955
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
956
|
+
@duration = duration
|
957
|
+
@timestamp = timestamp
|
958
|
+
@type = type
|
959
|
+
end
|
960
|
+
end
|
770
961
|
# ID of the coupon to create a new discount for.
|
771
962
|
attr_accessor :coupon
|
772
963
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
773
964
|
attr_accessor :discount
|
965
|
+
# Details to determine how long the discount should be applied for.
|
966
|
+
attr_accessor :discount_end
|
774
967
|
# ID of the promotion code to create a new discount for.
|
775
968
|
attr_accessor :promotion_code
|
776
969
|
|
777
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
970
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
778
971
|
@coupon = coupon
|
779
972
|
@discount = discount
|
973
|
+
@discount_end = discount_end
|
780
974
|
@promotion_code = promotion_code
|
781
975
|
end
|
782
976
|
end
|
@@ -863,16 +1057,44 @@ module Stripe
|
|
863
1057
|
end
|
864
1058
|
|
865
1059
|
class Discount < Stripe::RequestParams
|
1060
|
+
class DiscountEnd < Stripe::RequestParams
|
1061
|
+
class Duration < Stripe::RequestParams
|
1062
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1063
|
+
attr_accessor :interval
|
1064
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1065
|
+
attr_accessor :interval_count
|
1066
|
+
|
1067
|
+
def initialize(interval: nil, interval_count: nil)
|
1068
|
+
@interval = interval
|
1069
|
+
@interval_count = interval_count
|
1070
|
+
end
|
1071
|
+
end
|
1072
|
+
# Time span for the redeemed discount.
|
1073
|
+
attr_accessor :duration
|
1074
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1075
|
+
attr_accessor :timestamp
|
1076
|
+
# The type of calculation made to determine when the discount ends.
|
1077
|
+
attr_accessor :type
|
1078
|
+
|
1079
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1080
|
+
@duration = duration
|
1081
|
+
@timestamp = timestamp
|
1082
|
+
@type = type
|
1083
|
+
end
|
1084
|
+
end
|
866
1085
|
# ID of the coupon to create a new discount for.
|
867
1086
|
attr_accessor :coupon
|
868
1087
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
869
1088
|
attr_accessor :discount
|
1089
|
+
# Details to determine how long the discount should be applied for.
|
1090
|
+
attr_accessor :discount_end
|
870
1091
|
# ID of the promotion code to create a new discount for.
|
871
1092
|
attr_accessor :promotion_code
|
872
1093
|
|
873
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1094
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
874
1095
|
@coupon = coupon
|
875
1096
|
@discount = discount
|
1097
|
+
@discount_end = discount_end
|
876
1098
|
@promotion_code = promotion_code
|
877
1099
|
end
|
878
1100
|
end
|
@@ -914,16 +1136,44 @@ module Stripe
|
|
914
1136
|
end
|
915
1137
|
|
916
1138
|
class Discount < Stripe::RequestParams
|
1139
|
+
class DiscountEnd < Stripe::RequestParams
|
1140
|
+
class Duration < Stripe::RequestParams
|
1141
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1142
|
+
attr_accessor :interval
|
1143
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1144
|
+
attr_accessor :interval_count
|
1145
|
+
|
1146
|
+
def initialize(interval: nil, interval_count: nil)
|
1147
|
+
@interval = interval
|
1148
|
+
@interval_count = interval_count
|
1149
|
+
end
|
1150
|
+
end
|
1151
|
+
# Time span for the redeemed discount.
|
1152
|
+
attr_accessor :duration
|
1153
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1154
|
+
attr_accessor :timestamp
|
1155
|
+
# The type of calculation made to determine when the discount ends.
|
1156
|
+
attr_accessor :type
|
1157
|
+
|
1158
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1159
|
+
@duration = duration
|
1160
|
+
@timestamp = timestamp
|
1161
|
+
@type = type
|
1162
|
+
end
|
1163
|
+
end
|
917
1164
|
# ID of the coupon to create a new discount for.
|
918
1165
|
attr_accessor :coupon
|
919
1166
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
920
1167
|
attr_accessor :discount
|
1168
|
+
# Details to determine how long the discount should be applied for.
|
1169
|
+
attr_accessor :discount_end
|
921
1170
|
# ID of the promotion code to create a new discount for.
|
922
1171
|
attr_accessor :promotion_code
|
923
1172
|
|
924
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1173
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
925
1174
|
@coupon = coupon
|
926
1175
|
@discount = discount
|
1176
|
+
@discount_end = discount_end
|
927
1177
|
@promotion_code = promotion_code
|
928
1178
|
end
|
929
1179
|
end
|
@@ -969,6 +1219,18 @@ module Stripe
|
|
969
1219
|
@unit_amount_decimal = unit_amount_decimal
|
970
1220
|
end
|
971
1221
|
end
|
1222
|
+
|
1223
|
+
class Trial < Stripe::RequestParams
|
1224
|
+
# 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.
|
1225
|
+
attr_accessor :converts_to
|
1226
|
+
# Determines the type of trial for this item.
|
1227
|
+
attr_accessor :type
|
1228
|
+
|
1229
|
+
def initialize(converts_to: nil, type: nil)
|
1230
|
+
@converts_to = converts_to
|
1231
|
+
@type = type
|
1232
|
+
end
|
1233
|
+
end
|
972
1234
|
# 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.
|
973
1235
|
attr_accessor :billing_thresholds
|
974
1236
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -985,6 +1247,8 @@ module Stripe
|
|
985
1247
|
attr_accessor :quantity
|
986
1248
|
# 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.
|
987
1249
|
attr_accessor :tax_rates
|
1250
|
+
# Options that configure the trial on the subscription item.
|
1251
|
+
attr_accessor :trial
|
988
1252
|
|
989
1253
|
def initialize(
|
990
1254
|
billing_thresholds: nil,
|
@@ -994,7 +1258,8 @@ module Stripe
|
|
994
1258
|
price: nil,
|
995
1259
|
price_data: nil,
|
996
1260
|
quantity: nil,
|
997
|
-
tax_rates: nil
|
1261
|
+
tax_rates: nil,
|
1262
|
+
trial: nil
|
998
1263
|
)
|
999
1264
|
@billing_thresholds = billing_thresholds
|
1000
1265
|
@discounts = discounts
|
@@ -1004,6 +1269,16 @@ module Stripe
|
|
1004
1269
|
@price_data = price_data
|
1005
1270
|
@quantity = quantity
|
1006
1271
|
@tax_rates = tax_rates
|
1272
|
+
@trial = trial
|
1273
|
+
end
|
1274
|
+
end
|
1275
|
+
|
1276
|
+
class PauseCollection < Stripe::RequestParams
|
1277
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1278
|
+
attr_accessor :behavior
|
1279
|
+
|
1280
|
+
def initialize(behavior: nil)
|
1281
|
+
@behavior = behavior
|
1007
1282
|
end
|
1008
1283
|
end
|
1009
1284
|
|
@@ -1018,6 +1293,23 @@ module Stripe
|
|
1018
1293
|
@destination = destination
|
1019
1294
|
end
|
1020
1295
|
end
|
1296
|
+
|
1297
|
+
class TrialSettings < Stripe::RequestParams
|
1298
|
+
class EndBehavior < Stripe::RequestParams
|
1299
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1300
|
+
attr_accessor :prorate_up_front
|
1301
|
+
|
1302
|
+
def initialize(prorate_up_front: nil)
|
1303
|
+
@prorate_up_front = prorate_up_front
|
1304
|
+
end
|
1305
|
+
end
|
1306
|
+
# Defines how the subscription should behave when a trial ends.
|
1307
|
+
attr_accessor :end_behavior
|
1308
|
+
|
1309
|
+
def initialize(end_behavior: nil)
|
1310
|
+
@end_behavior = end_behavior
|
1311
|
+
end
|
1312
|
+
end
|
1021
1313
|
# 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.
|
1022
1314
|
attr_accessor :add_invoice_items
|
1023
1315
|
# 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).
|
@@ -1052,6 +1344,8 @@ module Stripe
|
|
1052
1344
|
attr_accessor :metadata
|
1053
1345
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
1054
1346
|
attr_accessor :on_behalf_of
|
1347
|
+
# 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).
|
1348
|
+
attr_accessor :pause_collection
|
1055
1349
|
# 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.
|
1056
1350
|
attr_accessor :proration_behavior
|
1057
1351
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -1060,8 +1354,12 @@ module Stripe
|
|
1060
1354
|
attr_accessor :transfer_data
|
1061
1355
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
1062
1356
|
attr_accessor :trial
|
1357
|
+
# Specify trial behavior when crossing phase boundaries
|
1358
|
+
attr_accessor :trial_continuation
|
1063
1359
|
# 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`
|
1064
1360
|
attr_accessor :trial_end
|
1361
|
+
# Settings related to subscription trials.
|
1362
|
+
attr_accessor :trial_settings
|
1065
1363
|
|
1066
1364
|
def initialize(
|
1067
1365
|
add_invoice_items: nil,
|
@@ -1081,11 +1379,14 @@ module Stripe
|
|
1081
1379
|
iterations: nil,
|
1082
1380
|
metadata: nil,
|
1083
1381
|
on_behalf_of: nil,
|
1382
|
+
pause_collection: nil,
|
1084
1383
|
proration_behavior: nil,
|
1085
1384
|
start_date: nil,
|
1086
1385
|
transfer_data: nil,
|
1087
1386
|
trial: nil,
|
1088
|
-
|
1387
|
+
trial_continuation: nil,
|
1388
|
+
trial_end: nil,
|
1389
|
+
trial_settings: nil
|
1089
1390
|
)
|
1090
1391
|
@add_invoice_items = add_invoice_items
|
1091
1392
|
@application_fee_percent = application_fee_percent
|
@@ -1104,13 +1405,30 @@ module Stripe
|
|
1104
1405
|
@iterations = iterations
|
1105
1406
|
@metadata = metadata
|
1106
1407
|
@on_behalf_of = on_behalf_of
|
1408
|
+
@pause_collection = pause_collection
|
1107
1409
|
@proration_behavior = proration_behavior
|
1108
1410
|
@start_date = start_date
|
1109
1411
|
@transfer_data = transfer_data
|
1110
1412
|
@trial = trial
|
1413
|
+
@trial_continuation = trial_continuation
|
1111
1414
|
@trial_end = trial_end
|
1415
|
+
@trial_settings = trial_settings
|
1416
|
+
end
|
1417
|
+
end
|
1418
|
+
|
1419
|
+
class Prebilling < Stripe::RequestParams
|
1420
|
+
# This is used to determine the number of billing cycles to prebill.
|
1421
|
+
attr_accessor :iterations
|
1422
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1423
|
+
attr_accessor :update_behavior
|
1424
|
+
|
1425
|
+
def initialize(iterations: nil, update_behavior: nil)
|
1426
|
+
@iterations = iterations
|
1427
|
+
@update_behavior = update_behavior
|
1112
1428
|
end
|
1113
1429
|
end
|
1430
|
+
# 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.
|
1431
|
+
attr_accessor :billing_behavior
|
1114
1432
|
# Object representing the subscription schedule's default settings.
|
1115
1433
|
attr_accessor :default_settings
|
1116
1434
|
# 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.
|
@@ -1121,26 +1439,598 @@ module Stripe
|
|
1121
1439
|
attr_accessor :metadata
|
1122
1440
|
# 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.
|
1123
1441
|
attr_accessor :phases
|
1442
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1443
|
+
attr_accessor :prebilling
|
1124
1444
|
# 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`.
|
1125
1445
|
attr_accessor :proration_behavior
|
1126
1446
|
|
1127
1447
|
def initialize(
|
1448
|
+
billing_behavior: nil,
|
1128
1449
|
default_settings: nil,
|
1129
1450
|
end_behavior: nil,
|
1130
1451
|
expand: nil,
|
1131
1452
|
metadata: nil,
|
1132
1453
|
phases: nil,
|
1454
|
+
prebilling: nil,
|
1133
1455
|
proration_behavior: nil
|
1134
1456
|
)
|
1457
|
+
@billing_behavior = billing_behavior
|
1135
1458
|
@default_settings = default_settings
|
1136
1459
|
@end_behavior = end_behavior
|
1137
1460
|
@expand = expand
|
1138
1461
|
@metadata = metadata
|
1139
1462
|
@phases = phases
|
1463
|
+
@prebilling = prebilling
|
1140
1464
|
@proration_behavior = proration_behavior
|
1141
1465
|
end
|
1142
1466
|
end
|
1143
1467
|
|
1468
|
+
class AmendParams < Stripe::RequestParams
|
1469
|
+
class Amendment < Stripe::RequestParams
|
1470
|
+
class AmendmentEnd < Stripe::RequestParams
|
1471
|
+
class DiscountEnd < Stripe::RequestParams
|
1472
|
+
# The ID of a specific discount.
|
1473
|
+
attr_accessor :discount
|
1474
|
+
|
1475
|
+
def initialize(discount: nil)
|
1476
|
+
@discount = discount
|
1477
|
+
end
|
1478
|
+
end
|
1479
|
+
|
1480
|
+
class Duration < Stripe::RequestParams
|
1481
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1482
|
+
attr_accessor :interval
|
1483
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1484
|
+
attr_accessor :interval_count
|
1485
|
+
|
1486
|
+
def initialize(interval: nil, interval_count: nil)
|
1487
|
+
@interval = interval
|
1488
|
+
@interval_count = interval_count
|
1489
|
+
end
|
1490
|
+
end
|
1491
|
+
# Use the `end` time of a given discount.
|
1492
|
+
attr_accessor :discount_end
|
1493
|
+
# Time span for the amendment starting from the `amendment_start`.
|
1494
|
+
attr_accessor :duration
|
1495
|
+
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
1496
|
+
attr_accessor :timestamp
|
1497
|
+
# Select one of three ways to pass the `amendment_end`.
|
1498
|
+
attr_accessor :type
|
1499
|
+
|
1500
|
+
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
1501
|
+
@discount_end = discount_end
|
1502
|
+
@duration = duration
|
1503
|
+
@timestamp = timestamp
|
1504
|
+
@type = type
|
1505
|
+
end
|
1506
|
+
end
|
1507
|
+
|
1508
|
+
class AmendmentStart < Stripe::RequestParams
|
1509
|
+
class AmendmentEnd < Stripe::RequestParams
|
1510
|
+
# 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.
|
1511
|
+
attr_accessor :index
|
1512
|
+
|
1513
|
+
def initialize(index: nil)
|
1514
|
+
@index = index
|
1515
|
+
end
|
1516
|
+
end
|
1517
|
+
|
1518
|
+
class DiscountEnd < Stripe::RequestParams
|
1519
|
+
# The ID of a specific discount.
|
1520
|
+
attr_accessor :discount
|
1521
|
+
|
1522
|
+
def initialize(discount: nil)
|
1523
|
+
@discount = discount
|
1524
|
+
end
|
1525
|
+
end
|
1526
|
+
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
1527
|
+
attr_accessor :amendment_end
|
1528
|
+
# Use the `end` time of a given discount.
|
1529
|
+
attr_accessor :discount_end
|
1530
|
+
# A precise Unix timestamp for the amendment to start.
|
1531
|
+
attr_accessor :timestamp
|
1532
|
+
# Select one of three ways to pass the `amendment_start`.
|
1533
|
+
attr_accessor :type
|
1534
|
+
|
1535
|
+
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
1536
|
+
@amendment_end = amendment_end
|
1537
|
+
@discount_end = discount_end
|
1538
|
+
@timestamp = timestamp
|
1539
|
+
@type = type
|
1540
|
+
end
|
1541
|
+
end
|
1542
|
+
|
1543
|
+
class DiscountAction < Stripe::RequestParams
|
1544
|
+
class Add < Stripe::RequestParams
|
1545
|
+
class DiscountEnd < Stripe::RequestParams
|
1546
|
+
# The type of calculation made to determine when the discount ends.
|
1547
|
+
attr_accessor :type
|
1548
|
+
|
1549
|
+
def initialize(type: nil)
|
1550
|
+
@type = type
|
1551
|
+
end
|
1552
|
+
end
|
1553
|
+
# The coupon code to redeem.
|
1554
|
+
attr_accessor :coupon
|
1555
|
+
# An ID of an existing discount for a coupon that was already redeemed.
|
1556
|
+
attr_accessor :discount
|
1557
|
+
# Details to determine how long the discount should be applied for.
|
1558
|
+
attr_accessor :discount_end
|
1559
|
+
# 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.
|
1560
|
+
attr_accessor :index
|
1561
|
+
# The promotion code to redeem.
|
1562
|
+
attr_accessor :promotion_code
|
1563
|
+
|
1564
|
+
def initialize(
|
1565
|
+
coupon: nil,
|
1566
|
+
discount: nil,
|
1567
|
+
discount_end: nil,
|
1568
|
+
index: nil,
|
1569
|
+
promotion_code: nil
|
1570
|
+
)
|
1571
|
+
@coupon = coupon
|
1572
|
+
@discount = discount
|
1573
|
+
@discount_end = discount_end
|
1574
|
+
@index = index
|
1575
|
+
@promotion_code = promotion_code
|
1576
|
+
end
|
1577
|
+
end
|
1578
|
+
|
1579
|
+
class Remove < Stripe::RequestParams
|
1580
|
+
# The coupon code to remove from the `discounts` array.
|
1581
|
+
attr_accessor :coupon
|
1582
|
+
# The ID of a discount to remove from the `discounts` array.
|
1583
|
+
attr_accessor :discount
|
1584
|
+
# The ID of a promotion code to remove from the `discounts` array.
|
1585
|
+
attr_accessor :promotion_code
|
1586
|
+
|
1587
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1588
|
+
@coupon = coupon
|
1589
|
+
@discount = discount
|
1590
|
+
@promotion_code = promotion_code
|
1591
|
+
end
|
1592
|
+
end
|
1593
|
+
|
1594
|
+
class Set < Stripe::RequestParams
|
1595
|
+
# The coupon code to replace the `discounts` array with.
|
1596
|
+
attr_accessor :coupon
|
1597
|
+
# An ID of an existing discount to replace the `discounts` array with.
|
1598
|
+
attr_accessor :discount
|
1599
|
+
# An ID of an existing promotion code to replace the `discounts` array with.
|
1600
|
+
attr_accessor :promotion_code
|
1601
|
+
|
1602
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1603
|
+
@coupon = coupon
|
1604
|
+
@discount = discount
|
1605
|
+
@promotion_code = promotion_code
|
1606
|
+
end
|
1607
|
+
end
|
1608
|
+
# Details of the discount to add.
|
1609
|
+
attr_accessor :add
|
1610
|
+
# Details of the discount to remove.
|
1611
|
+
attr_accessor :remove
|
1612
|
+
# Details of the discount to replace the existing discounts with.
|
1613
|
+
attr_accessor :set
|
1614
|
+
# Determines the type of discount action.
|
1615
|
+
attr_accessor :type
|
1616
|
+
|
1617
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1618
|
+
@add = add
|
1619
|
+
@remove = remove
|
1620
|
+
@set = set
|
1621
|
+
@type = type
|
1622
|
+
end
|
1623
|
+
end
|
1624
|
+
|
1625
|
+
class ItemAction < Stripe::RequestParams
|
1626
|
+
class Add < Stripe::RequestParams
|
1627
|
+
class Discount < Stripe::RequestParams
|
1628
|
+
class DiscountEnd < Stripe::RequestParams
|
1629
|
+
class Duration < Stripe::RequestParams
|
1630
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1631
|
+
attr_accessor :interval
|
1632
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1633
|
+
attr_accessor :interval_count
|
1634
|
+
|
1635
|
+
def initialize(interval: nil, interval_count: nil)
|
1636
|
+
@interval = interval
|
1637
|
+
@interval_count = interval_count
|
1638
|
+
end
|
1639
|
+
end
|
1640
|
+
# Time span for the redeemed discount.
|
1641
|
+
attr_accessor :duration
|
1642
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1643
|
+
attr_accessor :timestamp
|
1644
|
+
# The type of calculation made to determine when the discount ends.
|
1645
|
+
attr_accessor :type
|
1646
|
+
|
1647
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1648
|
+
@duration = duration
|
1649
|
+
@timestamp = timestamp
|
1650
|
+
@type = type
|
1651
|
+
end
|
1652
|
+
end
|
1653
|
+
# ID of the coupon to create a new discount for.
|
1654
|
+
attr_accessor :coupon
|
1655
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1656
|
+
attr_accessor :discount
|
1657
|
+
# Details to determine how long the discount should be applied for.
|
1658
|
+
attr_accessor :discount_end
|
1659
|
+
# ID of the promotion code to create a new discount for.
|
1660
|
+
attr_accessor :promotion_code
|
1661
|
+
|
1662
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1663
|
+
@coupon = coupon
|
1664
|
+
@discount = discount
|
1665
|
+
@discount_end = discount_end
|
1666
|
+
@promotion_code = promotion_code
|
1667
|
+
end
|
1668
|
+
end
|
1669
|
+
|
1670
|
+
class Trial < Stripe::RequestParams
|
1671
|
+
# 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.
|
1672
|
+
attr_accessor :converts_to
|
1673
|
+
# Determines the type of trial for this item.
|
1674
|
+
attr_accessor :type
|
1675
|
+
|
1676
|
+
def initialize(converts_to: nil, type: nil)
|
1677
|
+
@converts_to = converts_to
|
1678
|
+
@type = type
|
1679
|
+
end
|
1680
|
+
end
|
1681
|
+
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
1682
|
+
attr_accessor :discounts
|
1683
|
+
# 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`.
|
1684
|
+
attr_accessor :metadata
|
1685
|
+
# The ID of the price object.
|
1686
|
+
attr_accessor :price
|
1687
|
+
# Quantity for this item.
|
1688
|
+
attr_accessor :quantity
|
1689
|
+
# 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`.
|
1690
|
+
attr_accessor :tax_rates
|
1691
|
+
# Options that configure the trial on the subscription item.
|
1692
|
+
attr_accessor :trial
|
1693
|
+
|
1694
|
+
def initialize(
|
1695
|
+
discounts: nil,
|
1696
|
+
metadata: nil,
|
1697
|
+
price: nil,
|
1698
|
+
quantity: nil,
|
1699
|
+
tax_rates: nil,
|
1700
|
+
trial: nil
|
1701
|
+
)
|
1702
|
+
@discounts = discounts
|
1703
|
+
@metadata = metadata
|
1704
|
+
@price = price
|
1705
|
+
@quantity = quantity
|
1706
|
+
@tax_rates = tax_rates
|
1707
|
+
@trial = trial
|
1708
|
+
end
|
1709
|
+
end
|
1710
|
+
|
1711
|
+
class Remove < Stripe::RequestParams
|
1712
|
+
# ID of a price to remove.
|
1713
|
+
attr_accessor :price
|
1714
|
+
|
1715
|
+
def initialize(price: nil)
|
1716
|
+
@price = price
|
1717
|
+
end
|
1718
|
+
end
|
1719
|
+
|
1720
|
+
class Set < Stripe::RequestParams
|
1721
|
+
class Discount < Stripe::RequestParams
|
1722
|
+
class DiscountEnd < Stripe::RequestParams
|
1723
|
+
class Duration < Stripe::RequestParams
|
1724
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1725
|
+
attr_accessor :interval
|
1726
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1727
|
+
attr_accessor :interval_count
|
1728
|
+
|
1729
|
+
def initialize(interval: nil, interval_count: nil)
|
1730
|
+
@interval = interval
|
1731
|
+
@interval_count = interval_count
|
1732
|
+
end
|
1733
|
+
end
|
1734
|
+
# Time span for the redeemed discount.
|
1735
|
+
attr_accessor :duration
|
1736
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1737
|
+
attr_accessor :timestamp
|
1738
|
+
# The type of calculation made to determine when the discount ends.
|
1739
|
+
attr_accessor :type
|
1740
|
+
|
1741
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1742
|
+
@duration = duration
|
1743
|
+
@timestamp = timestamp
|
1744
|
+
@type = type
|
1745
|
+
end
|
1746
|
+
end
|
1747
|
+
# ID of the coupon to create a new discount for.
|
1748
|
+
attr_accessor :coupon
|
1749
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1750
|
+
attr_accessor :discount
|
1751
|
+
# Details to determine how long the discount should be applied for.
|
1752
|
+
attr_accessor :discount_end
|
1753
|
+
# ID of the promotion code to create a new discount for.
|
1754
|
+
attr_accessor :promotion_code
|
1755
|
+
|
1756
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1757
|
+
@coupon = coupon
|
1758
|
+
@discount = discount
|
1759
|
+
@discount_end = discount_end
|
1760
|
+
@promotion_code = promotion_code
|
1761
|
+
end
|
1762
|
+
end
|
1763
|
+
|
1764
|
+
class Trial < Stripe::RequestParams
|
1765
|
+
# 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.
|
1766
|
+
attr_accessor :converts_to
|
1767
|
+
# Determines the type of trial for this item.
|
1768
|
+
attr_accessor :type
|
1769
|
+
|
1770
|
+
def initialize(converts_to: nil, type: nil)
|
1771
|
+
@converts_to = converts_to
|
1772
|
+
@type = type
|
1773
|
+
end
|
1774
|
+
end
|
1775
|
+
# 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`.
|
1776
|
+
attr_accessor :discounts
|
1777
|
+
# 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`.
|
1778
|
+
attr_accessor :metadata
|
1779
|
+
# The ID of the price object.
|
1780
|
+
attr_accessor :price
|
1781
|
+
# 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`.
|
1782
|
+
attr_accessor :quantity
|
1783
|
+
# 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`.
|
1784
|
+
attr_accessor :tax_rates
|
1785
|
+
# 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`.
|
1786
|
+
attr_accessor :trial
|
1787
|
+
|
1788
|
+
def initialize(
|
1789
|
+
discounts: nil,
|
1790
|
+
metadata: nil,
|
1791
|
+
price: nil,
|
1792
|
+
quantity: nil,
|
1793
|
+
tax_rates: nil,
|
1794
|
+
trial: nil
|
1795
|
+
)
|
1796
|
+
@discounts = discounts
|
1797
|
+
@metadata = metadata
|
1798
|
+
@price = price
|
1799
|
+
@quantity = quantity
|
1800
|
+
@tax_rates = tax_rates
|
1801
|
+
@trial = trial
|
1802
|
+
end
|
1803
|
+
end
|
1804
|
+
# 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.
|
1805
|
+
attr_accessor :add
|
1806
|
+
# Details of the subscription item to remove.
|
1807
|
+
attr_accessor :remove
|
1808
|
+
# 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.
|
1809
|
+
attr_accessor :set
|
1810
|
+
# Determines the type of item action.
|
1811
|
+
attr_accessor :type
|
1812
|
+
|
1813
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1814
|
+
@add = add
|
1815
|
+
@remove = remove
|
1816
|
+
@set = set
|
1817
|
+
@type = type
|
1818
|
+
end
|
1819
|
+
end
|
1820
|
+
|
1821
|
+
class MetadataAction < Stripe::RequestParams
|
1822
|
+
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
1823
|
+
attr_accessor :add
|
1824
|
+
# Keys to remove from schedule phase metadata.
|
1825
|
+
attr_accessor :remove
|
1826
|
+
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
1827
|
+
attr_accessor :set
|
1828
|
+
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
1829
|
+
attr_accessor :type
|
1830
|
+
|
1831
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1832
|
+
@add = add
|
1833
|
+
@remove = remove
|
1834
|
+
@set = set
|
1835
|
+
@type = type
|
1836
|
+
end
|
1837
|
+
end
|
1838
|
+
|
1839
|
+
class SetPauseCollection < Stripe::RequestParams
|
1840
|
+
class Set < Stripe::RequestParams
|
1841
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1842
|
+
attr_accessor :behavior
|
1843
|
+
|
1844
|
+
def initialize(behavior: nil)
|
1845
|
+
@behavior = behavior
|
1846
|
+
end
|
1847
|
+
end
|
1848
|
+
# Details of the pause_collection behavior to apply to the amendment.
|
1849
|
+
attr_accessor :set
|
1850
|
+
# Determines the type of the pause_collection amendment.
|
1851
|
+
attr_accessor :type
|
1852
|
+
|
1853
|
+
def initialize(set: nil, type: nil)
|
1854
|
+
@set = set
|
1855
|
+
@type = type
|
1856
|
+
end
|
1857
|
+
end
|
1858
|
+
|
1859
|
+
class TrialSettings < Stripe::RequestParams
|
1860
|
+
class EndBehavior < Stripe::RequestParams
|
1861
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1862
|
+
attr_accessor :prorate_up_front
|
1863
|
+
|
1864
|
+
def initialize(prorate_up_front: nil)
|
1865
|
+
@prorate_up_front = prorate_up_front
|
1866
|
+
end
|
1867
|
+
end
|
1868
|
+
# Defines how the subscription should behave when a trial ends.
|
1869
|
+
attr_accessor :end_behavior
|
1870
|
+
|
1871
|
+
def initialize(end_behavior: nil)
|
1872
|
+
@end_behavior = end_behavior
|
1873
|
+
end
|
1874
|
+
end
|
1875
|
+
# 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.
|
1876
|
+
attr_accessor :amendment_end
|
1877
|
+
# Details to identify the earliest timestamp where the proposed change should take effect.
|
1878
|
+
attr_accessor :amendment_start
|
1879
|
+
# 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.
|
1880
|
+
attr_accessor :billing_cycle_anchor
|
1881
|
+
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
1882
|
+
attr_accessor :discount_actions
|
1883
|
+
# Changes to the subscription items during the amendment time span.
|
1884
|
+
attr_accessor :item_actions
|
1885
|
+
# Instructions for how to modify phase metadata
|
1886
|
+
attr_accessor :metadata_actions
|
1887
|
+
# 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`.
|
1888
|
+
attr_accessor :proration_behavior
|
1889
|
+
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
1890
|
+
attr_accessor :set_pause_collection
|
1891
|
+
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
1892
|
+
attr_accessor :set_schedule_end
|
1893
|
+
# Settings related to subscription trials.
|
1894
|
+
attr_accessor :trial_settings
|
1895
|
+
|
1896
|
+
def initialize(
|
1897
|
+
amendment_end: nil,
|
1898
|
+
amendment_start: nil,
|
1899
|
+
billing_cycle_anchor: nil,
|
1900
|
+
discount_actions: nil,
|
1901
|
+
item_actions: nil,
|
1902
|
+
metadata_actions: nil,
|
1903
|
+
proration_behavior: nil,
|
1904
|
+
set_pause_collection: nil,
|
1905
|
+
set_schedule_end: nil,
|
1906
|
+
trial_settings: nil
|
1907
|
+
)
|
1908
|
+
@amendment_end = amendment_end
|
1909
|
+
@amendment_start = amendment_start
|
1910
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
1911
|
+
@discount_actions = discount_actions
|
1912
|
+
@item_actions = item_actions
|
1913
|
+
@metadata_actions = metadata_actions
|
1914
|
+
@proration_behavior = proration_behavior
|
1915
|
+
@set_pause_collection = set_pause_collection
|
1916
|
+
@set_schedule_end = set_schedule_end
|
1917
|
+
@trial_settings = trial_settings
|
1918
|
+
end
|
1919
|
+
end
|
1920
|
+
|
1921
|
+
class Prebilling < Stripe::RequestParams
|
1922
|
+
class BillFrom < Stripe::RequestParams
|
1923
|
+
class AmendmentStart < Stripe::RequestParams
|
1924
|
+
# 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.
|
1925
|
+
attr_accessor :index
|
1926
|
+
|
1927
|
+
def initialize(index: nil)
|
1928
|
+
@index = index
|
1929
|
+
end
|
1930
|
+
end
|
1931
|
+
# Start the prebilled period when a specified amendment begins.
|
1932
|
+
attr_accessor :amendment_start
|
1933
|
+
# Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
1934
|
+
attr_accessor :timestamp
|
1935
|
+
# Select one of several ways to pass the `bill_from` value.
|
1936
|
+
attr_accessor :type
|
1937
|
+
|
1938
|
+
def initialize(amendment_start: nil, timestamp: nil, type: nil)
|
1939
|
+
@amendment_start = amendment_start
|
1940
|
+
@timestamp = timestamp
|
1941
|
+
@type = type
|
1942
|
+
end
|
1943
|
+
end
|
1944
|
+
|
1945
|
+
class BillUntil < Stripe::RequestParams
|
1946
|
+
class AmendmentEnd < Stripe::RequestParams
|
1947
|
+
# 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.
|
1948
|
+
attr_accessor :index
|
1949
|
+
|
1950
|
+
def initialize(index: nil)
|
1951
|
+
@index = index
|
1952
|
+
end
|
1953
|
+
end
|
1954
|
+
|
1955
|
+
class Duration < Stripe::RequestParams
|
1956
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1957
|
+
attr_accessor :interval
|
1958
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1959
|
+
attr_accessor :interval_count
|
1960
|
+
|
1961
|
+
def initialize(interval: nil, interval_count: nil)
|
1962
|
+
@interval = interval
|
1963
|
+
@interval_count = interval_count
|
1964
|
+
end
|
1965
|
+
end
|
1966
|
+
# End the prebilled period when a specified amendment ends.
|
1967
|
+
attr_accessor :amendment_end
|
1968
|
+
# Time span for prebilling, starting from `bill_from`.
|
1969
|
+
attr_accessor :duration
|
1970
|
+
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
1971
|
+
attr_accessor :timestamp
|
1972
|
+
# Select one of several ways to pass the `bill_until` value.
|
1973
|
+
attr_accessor :type
|
1974
|
+
|
1975
|
+
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
1976
|
+
@amendment_end = amendment_end
|
1977
|
+
@duration = duration
|
1978
|
+
@timestamp = timestamp
|
1979
|
+
@type = type
|
1980
|
+
end
|
1981
|
+
end
|
1982
|
+
# The beginning of the prebilled time period. The default value is `now`.
|
1983
|
+
attr_accessor :bill_from
|
1984
|
+
# The end of the prebilled time period.
|
1985
|
+
attr_accessor :bill_until
|
1986
|
+
# When the prebilling invoice should be created. The default value is `now`.
|
1987
|
+
attr_accessor :invoice_at
|
1988
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1989
|
+
attr_accessor :update_behavior
|
1990
|
+
|
1991
|
+
def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
|
1992
|
+
@bill_from = bill_from
|
1993
|
+
@bill_until = bill_until
|
1994
|
+
@invoice_at = invoice_at
|
1995
|
+
@update_behavior = update_behavior
|
1996
|
+
end
|
1997
|
+
end
|
1998
|
+
|
1999
|
+
class ScheduleSettings < Stripe::RequestParams
|
2000
|
+
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2001
|
+
attr_accessor :end_behavior
|
2002
|
+
|
2003
|
+
def initialize(end_behavior: nil)
|
2004
|
+
@end_behavior = end_behavior
|
2005
|
+
end
|
2006
|
+
end
|
2007
|
+
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
2008
|
+
attr_accessor :amendments
|
2009
|
+
# Specifies which fields in the response should be expanded.
|
2010
|
+
attr_accessor :expand
|
2011
|
+
# Provide any time periods to bill in advance.
|
2012
|
+
attr_accessor :prebilling
|
2013
|
+
# In cases where the amendment changes the currently active phase,
|
2014
|
+
# specifies if and how to prorate at the time of the request.
|
2015
|
+
attr_accessor :proration_behavior
|
2016
|
+
# Changes to apply to the subscription schedule.
|
2017
|
+
attr_accessor :schedule_settings
|
2018
|
+
|
2019
|
+
def initialize(
|
2020
|
+
amendments: nil,
|
2021
|
+
expand: nil,
|
2022
|
+
prebilling: nil,
|
2023
|
+
proration_behavior: nil,
|
2024
|
+
schedule_settings: nil
|
2025
|
+
)
|
2026
|
+
@amendments = amendments
|
2027
|
+
@expand = expand
|
2028
|
+
@prebilling = prebilling
|
2029
|
+
@proration_behavior = proration_behavior
|
2030
|
+
@schedule_settings = schedule_settings
|
2031
|
+
end
|
2032
|
+
end
|
2033
|
+
|
1144
2034
|
class CancelParams < Stripe::RequestParams
|
1145
2035
|
# Specifies which fields in the response should be expanded.
|
1146
2036
|
attr_accessor :expand
|
@@ -1168,6 +2058,17 @@ module Stripe
|
|
1168
2058
|
end
|
1169
2059
|
end
|
1170
2060
|
|
2061
|
+
# Amends an existing subscription schedule.
|
2062
|
+
def amend(schedule, params = {}, opts = {})
|
2063
|
+
request(
|
2064
|
+
method: :post,
|
2065
|
+
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
2066
|
+
params: params,
|
2067
|
+
opts: opts,
|
2068
|
+
base_address: :api
|
2069
|
+
)
|
2070
|
+
end
|
2071
|
+
|
1171
2072
|
# 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.
|
1172
2073
|
def cancel(schedule, params = {}, opts = {})
|
1173
2074
|
request(
|