stripe 20.1.0 → 20.2.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/lib/stripe/api_requestor.rb +4 -0
- data/lib/stripe/api_version.rb +2 -2
- data/lib/stripe/errors.rb +6 -0
- data/lib/stripe/event_types.rb +193 -0
- data/lib/stripe/events/unknown_event_notification.rb +1 -0
- data/lib/stripe/events/v2_core_account_including_configuration_money_manager_capability_status_updated_event.rb +63 -0
- data/lib/stripe/events/v2_core_account_including_configuration_money_manager_updated_event.rb +44 -0
- data/lib/stripe/events/v2_core_approval_request_approved_event.rb +44 -0
- data/lib/stripe/events/v2_core_approval_request_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_core_approval_request_created_event.rb +44 -0
- data/lib/stripe/events/v2_core_approval_request_expired_event.rb +44 -0
- data/lib/stripe/events/v2_core_approval_request_failed_event.rb +44 -0
- data/lib/stripe/events/v2_core_approval_request_rejected_event.rb +44 -0
- data/lib/stripe/events/v2_core_approval_request_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_batch_failed_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_completed_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_created_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_ready_for_upload_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_timeout_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_updated_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_upload_timeout_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_validating_event.rb +44 -0
- data/lib/stripe/events/v2_core_batch_job_validation_failed_event.rb +44 -0
- data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +78 -0
- data/lib/stripe/events/v2_data_query_run_created_event.rb +44 -0
- data/lib/stripe/events/v2_data_query_run_failed_event.rb +44 -0
- data/lib/stripe/events/v2_data_query_run_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_data_query_run_updated_event.rb +44 -0
- data/lib/stripe/events/v2_data_report_run_created_event.rb +44 -0
- data/lib/stripe/events/v2_data_report_run_failed_event.rb +44 -0
- data/lib/stripe/events/v2_data_report_run_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_data_report_run_updated_event.rb +44 -0
- data/lib/stripe/events/v2_data_reporting_query_run_created_event.rb +44 -0
- data/lib/stripe/events/v2_data_reporting_query_run_failed_event.rb +44 -0
- data/lib/stripe/events/v2_data_reporting_query_run_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_data_reporting_query_run_updated_event.rb +44 -0
- data/lib/stripe/events/v2_extend_workflow_run_failed_event.rb +75 -0
- data/lib/stripe/events/v2_extend_workflow_run_started_event.rb +44 -0
- data/lib/stripe/events/v2_extend_workflow_run_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_under_review_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +44 -0
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_confirmed_event.rb +97 -0
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_created_event.rb +97 -0
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_partially_confirmed_event.rb +97 -0
- data/lib/stripe/events/v2_orchestrated_commerce_agreement_terminated_event.rb +97 -0
- data/lib/stripe/events/v2_signals_account_evaluation_complete_event.rb +44 -0
- data/lib/stripe/events/v2_signals_account_signal_fraudulent_merchant_ready_event.rb +44 -0
- data/lib/stripe/events/v2_signals_account_signal_fraudulent_website_ready_event.rb +44 -0
- data/lib/stripe/object_types.rb +53 -0
- data/lib/stripe/params/account_create_params.rb +299 -1
- data/lib/stripe/params/account_notice_list_params.rb +25 -0
- data/lib/stripe/params/account_notice_retrieve_params.rb +13 -0
- data/lib/stripe/params/account_notice_update_params.rb +36 -0
- data/lib/stripe/params/account_session_create_params.rb +191 -0
- data/lib/stripe/params/account_update_params.rb +261 -0
- data/lib/stripe/params/balance_settings_update_params.rb +9 -1
- data/lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb +65 -0
- data/lib/stripe/params/capital/financing_offer_list_params.rb +58 -0
- data/lib/stripe/params/capital/financing_offer_mark_delivered_params.rb +15 -0
- data/lib/stripe/params/capital/financing_offer_retrieve_params.rb +15 -0
- data/lib/stripe/params/capital/financing_summary_retrieve_params.rb +15 -0
- data/lib/stripe/params/capital/financing_transaction_list_params.rb +45 -0
- data/lib/stripe/params/capital/financing_transaction_retrieve_params.rb +15 -0
- data/lib/stripe/params/charge_capture_params.rb +1646 -0
- data/lib/stripe/params/charge_update_params.rb +1646 -0
- data/lib/stripe/params/checkout/session_create_params.rb +87 -3
- data/lib/stripe/params/checkout/session_update_params.rb +161 -1
- data/lib/stripe/params/confirmation_token_create_params.rb +92 -0
- data/lib/stripe/params/coupon_create_params.rb +17 -1
- data/lib/stripe/params/customer_session_create_params.rb +32 -1
- data/lib/stripe/params/external_account_create_params.rb +134 -0
- data/lib/stripe/params/external_account_delete_params.rb +6 -0
- data/lib/stripe/params/external_account_list_params.rb +25 -0
- data/lib/stripe/params/external_account_retrieve_params.rb +13 -0
- data/lib/stripe/params/external_account_update_params.rb +91 -0
- data/lib/stripe/params/financial_connections/account_inferred_balance_list_params.rb +24 -0
- data/lib/stripe/params/financial_connections/authorization_retrieve_params.rb +15 -0
- data/lib/stripe/params/financial_connections/institution_list_params.rb +24 -0
- data/lib/stripe/params/financial_connections/institution_retrieve_params.rb +15 -0
- data/lib/stripe/params/financial_connections/session_create_params.rb +38 -1
- data/lib/stripe/params/fx_quote_create_params.rb +73 -0
- data/lib/stripe/params/fx_quote_list_params.rb +22 -0
- data/lib/stripe/params/fx_quote_retrieve_params.rb +13 -0
- data/lib/stripe/params/invoice_add_lines_params.rb +33 -1
- data/lib/stripe/params/invoice_attach_payment_params.rb +43 -1
- data/lib/stripe/params/invoice_create_params.rb +64 -2
- data/lib/stripe/params/invoice_create_preview_params.rb +772 -9
- data/lib/stripe/params/invoice_detach_payment_params.rb +16 -0
- data/lib/stripe/params/invoice_item_create_params.rb +33 -1
- data/lib/stripe/params/invoice_item_update_params.rb +33 -1
- data/lib/stripe/params/invoice_line_item_update_params.rb +33 -1
- data/lib/stripe/params/invoice_update_lines_params.rb +33 -1
- data/lib/stripe/params/invoice_update_params.rb +64 -2
- data/lib/stripe/params/issuing/cardholder_create_params.rb +2 -1
- data/lib/stripe/params/issuing/cardholder_update_params.rb +4 -0
- data/lib/stripe/params/issuing/credit_underwriting_record_correct_params.rb +163 -0
- data/lib/stripe/params/issuing/credit_underwriting_record_create_from_application_params.rb +50 -0
- data/lib/stripe/params/issuing/credit_underwriting_record_create_from_proactive_review_params.rb +128 -0
- data/lib/stripe/params/issuing/credit_underwriting_record_list_params.rb +24 -0
- data/lib/stripe/params/issuing/credit_underwriting_record_report_decision_params.rb +86 -0
- data/lib/stripe/params/issuing/credit_underwriting_record_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/dispute_settlement_detail_list_params.rb +33 -0
- data/lib/stripe/params/issuing/dispute_settlement_detail_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/fraud_liability_debit_list_params.rb +44 -0
- data/lib/stripe/params/issuing/fraud_liability_debit_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/transaction_list_params.rb +4 -0
- data/lib/stripe/params/mandate_list_params.rb +39 -0
- data/lib/stripe/params/margin_create_params.rb +25 -0
- data/lib/stripe/params/margin_list_params.rb +25 -0
- data/lib/stripe/params/margin_retrieve_params.rb +13 -0
- data/lib/stripe/params/margin_update_params.rb +22 -0
- data/lib/stripe/params/order_create_params.rb +2083 -0
- data/lib/stripe/params/order_list_params.rb +25 -0
- data/lib/stripe/params/order_retrieve_params.rb +13 -0
- data/lib/stripe/params/order_submit_params.rb +16 -0
- data/lib/stripe/params/order_update_params.rb +2087 -0
- data/lib/stripe/params/payment_intent_capture_params.rb +1643 -1
- data/lib/stripe/params/payment_intent_confirm_params.rb +3038 -85
- data/lib/stripe/params/payment_intent_create_params.rb +3050 -97
- data/lib/stripe/params/payment_intent_decrement_authorization_params.rb +297 -0
- data/lib/stripe/params/payment_intent_increment_authorization_params.rb +37 -0
- data/lib/stripe/params/payment_intent_trigger_action_params.rb +27 -0
- data/lib/stripe/params/payment_intent_update_params.rb +3039 -55
- data/lib/stripe/params/payment_method_configuration_create_params.rb +105 -0
- data/lib/stripe/params/payment_method_configuration_update_params.rb +105 -0
- data/lib/stripe/params/payment_method_create_params.rb +88 -0
- data/lib/stripe/params/payment_plan_create_params.rb +128 -0
- data/lib/stripe/params/payment_plan_list_params.rb +25 -0
- data/lib/stripe/params/payment_plan_retrieve_params.rb +13 -0
- data/lib/stripe/params/payment_plan_update_params.rb +105 -0
- data/lib/stripe/params/price_update_params.rb +19 -0
- data/lib/stripe/params/privacy/redaction_job_cancel_params.rb +15 -0
- data/lib/stripe/params/privacy/redaction_job_create_params.rb +67 -0
- data/lib/stripe/params/privacy/redaction_job_list_params.rb +27 -0
- data/lib/stripe/params/privacy/redaction_job_retrieve_params.rb +15 -0
- data/lib/stripe/params/privacy/redaction_job_run_params.rb +15 -0
- data/lib/stripe/params/privacy/redaction_job_update_params.rb +18 -0
- data/lib/stripe/params/privacy/redaction_job_validate_params.rb +15 -0
- data/lib/stripe/params/privacy/redaction_job_validation_error_list_params.rb +24 -0
- data/lib/stripe/params/quote_create_params.rb +809 -3
- data/lib/stripe/params/quote_line_list_params.rb +22 -0
- data/lib/stripe/params/quote_list_lines_params.rb +22 -0
- data/lib/stripe/params/quote_list_params.rb +4 -0
- data/lib/stripe/params/quote_list_preview_invoice_lines_params.rb +22 -0
- data/lib/stripe/params/quote_mark_draft_params.rb +13 -0
- data/lib/stripe/params/quote_mark_stale_params.rb +16 -0
- data/lib/stripe/params/quote_preview_invoice_list_params.rb +22 -0
- data/lib/stripe/params/quote_preview_subscription_schedule_list_params.rb +22 -0
- data/lib/stripe/params/quote_reestimate_params.rb +13 -0
- data/lib/stripe/params/quote_update_params.rb +817 -4
- data/lib/stripe/params/radar/billing_evaluation_create_params.rb +231 -0
- data/lib/stripe/params/reserve/hold_list_params.rb +53 -0
- data/lib/stripe/params/reserve/hold_retrieve_params.rb +15 -0
- data/lib/stripe/params/reserve/plan_list_params.rb +37 -0
- data/lib/stripe/params/reserve/plan_retrieve_params.rb +15 -0
- data/lib/stripe/params/reserve/release_list_params.rb +41 -0
- data/lib/stripe/params/reserve/release_retrieve_params.rb +15 -0
- data/lib/stripe/params/setup_intent_confirm_params.rb +122 -3
- data/lib/stripe/params/setup_intent_create_params.rb +122 -3
- data/lib/stripe/params/setup_intent_update_params.rb +122 -3
- data/lib/stripe/params/shared_payment/granted_token_create_params.rb +47 -0
- data/lib/stripe/params/shared_payment/granted_token_retrieve_params.rb +15 -0
- data/lib/stripe/params/shared_payment/granted_token_revoke_params.rb +15 -0
- data/lib/stripe/params/shared_payment/issued_token_create_params.rb +71 -0
- data/lib/stripe/params/shared_payment/issued_token_retrieve_params.rb +15 -0
- data/lib/stripe/params/shared_payment/issued_token_revoke_params.rb +15 -0
- data/lib/stripe/params/subscription_create_params.rb +133 -6
- data/lib/stripe/params/subscription_item_create_params.rb +50 -3
- data/lib/stripe/params/subscription_item_update_params.rb +33 -2
- data/lib/stripe/params/subscription_schedule_amend_params.rb +578 -0
- data/lib/stripe/params/subscription_schedule_create_params.rb +167 -5
- data/lib/stripe/params/subscription_schedule_update_params.rb +167 -5
- data/lib/stripe/params/subscription_update_params.rb +116 -5
- data/lib/stripe/params/tax/form_list_params.rb +51 -0
- data/lib/stripe/params/tax/form_pdf_params.rb +15 -0
- data/lib/stripe/params/tax/form_retrieve_params.rb +15 -0
- data/lib/stripe/params/tax/registration_create_params.rb +13 -1
- data/lib/stripe/params/terminal/reader_collected_data_retrieve_params.rb +15 -0
- data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +92 -0
- data/lib/stripe/params/test_helpers/shared_payment/granted_token_create_params.rb +49 -0
- data/lib/stripe/params/test_helpers/shared_payment/granted_token_revoke_params.rb +17 -0
- data/lib/stripe/params/test_helpers/treasury/received_credit_create_params.rb +25 -1
- data/lib/stripe/params/test_helpers/treasury/received_debit_create_params.rb +25 -1
- data/lib/stripe/params/transfer_create_params.rb +4 -0
- data/lib/stripe/params/treasury/financial_account_create_params.rb +8 -1
- data/lib/stripe/params/treasury/financial_account_features_update_params.rb +4 -1
- data/lib/stripe/params/treasury/financial_account_update_features_params.rb +4 -1
- data/lib/stripe/params/treasury/financial_account_update_params.rb +8 -1
- data/lib/stripe/params/treasury/outbound_payment_create_params.rb +19 -0
- data/lib/stripe/params/treasury/outbound_transfer_create_params.rb +24 -0
- data/lib/stripe/params/treasury/received_credit_create_params.rb +25 -1
- data/lib/stripe/params/treasury/received_debit_create_params.rb +25 -1
- data/lib/stripe/params/v2/billing/bill_setting_create_params.rb +74 -0
- data/lib/stripe/params/v2/billing/bill_setting_list_params.rb +21 -0
- data/lib/stripe/params/v2/billing/bill_setting_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/bill_setting_update_params.rb +80 -0
- data/lib/stripe/params/v2/billing/bill_settings/version_list_params.rb +19 -0
- data/lib/stripe/params/v2/billing/bill_settings/version_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/billing/cadence_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/billing/cadence_create_params.rb +253 -0
- data/lib/stripe/params/v2/billing/cadence_list_params.rb +43 -0
- data/lib/stripe/params/v2/billing/cadence_retrieve_params.rb +17 -0
- data/lib/stripe/params/v2/billing/cadence_update_params.rb +75 -0
- data/lib/stripe/params/v2/billing/collection_setting_create_params.rb +257 -0
- data/lib/stripe/params/v2/billing/collection_setting_list_params.rb +21 -0
- data/lib/stripe/params/v2/billing/collection_setting_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/collection_setting_update_params.rb +263 -0
- data/lib/stripe/params/v2/billing/collection_settings/version_list_params.rb +19 -0
- data/lib/stripe/params/v2/billing/collection_settings/version_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/billing/profile_create_params.rb +37 -0
- data/lib/stripe/params/v2/billing/profile_list_params.rb +40 -0
- data/lib/stripe/params/v2/billing/profile_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/profile_update_params.rb +35 -0
- data/lib/stripe/params/v2/core/account_create_params.rb +392 -5
- data/lib/stripe/params/v2/core/account_token_create_params.rb +29 -1
- data/lib/stripe/params/v2/core/account_update_params.rb +376 -4
- data/lib/stripe/params/v2/core/approval_request_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/core/approval_request_list_params.rb +47 -0
- data/lib/stripe/params/v2/core/approval_request_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/core/approval_request_update_params.rb +17 -0
- data/lib/stripe/params/v2/core/batch_job_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/core/batch_job_create_params.rb +53 -0
- data/lib/stripe/params/v2/core/batch_job_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/core/vault/gb_bank_account_create_params.rb +21 -0
- data/lib/stripe/params/v2/data/query_run_create_params.rb +50 -0
- data/lib/stripe/params/v2/data/query_run_retrieve_params.rb +23 -0
- data/lib/stripe/params/v2/data/report_list_params.rb +23 -0
- data/lib/stripe/params/v2/data/report_retrieve_params.rb +17 -0
- data/lib/stripe/params/v2/data/report_run_create_params.rb +48 -0
- data/lib/stripe/params/v2/data/report_run_retrieve_params.rb +23 -0
- data/lib/stripe/params/v2/data/reporting/query_run_create_params.rb +31 -0
- data/lib/stripe/params/v2/data/reporting/query_run_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/data/schema_list_params.rb +26 -0
- data/lib/stripe/params/v2/data/schema_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/extend/workflow_invoke_params.rb +17 -0
- data/lib/stripe/params/v2/extend/workflow_list_params.rb +21 -0
- data/lib/stripe/params/v2/extend/workflow_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/extend/workflow_run_list_params.rb +23 -0
- data/lib/stripe/params/v2/extend/workflow_run_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/iam/activity_log_list_params.rb +23 -0
- data/lib/stripe/params/v2/iam/activity_log_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/financial_account_close_params.rb +30 -0
- data/lib/stripe/params/v2/money_management/financial_account_create_params.rb +35 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +21 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb +113 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_quote_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb +40 -1
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_update_params.rb +22 -1
- data/lib/stripe/params/v2/money_management/outbound_transfer_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_transfer_create_params.rb +112 -0
- data/lib/stripe/params/v2/money_management/outbound_transfer_list_params.rb +48 -0
- data/lib/stripe/params/v2/money_management/outbound_transfer_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/payout_method_disable_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/received_debit_list_params.rb +17 -0
- data/lib/stripe/params/v2/money_management/received_debit_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/test_helpers/financial_address_generate_microdeposits_params.rb +12 -0
- data/lib/stripe/params/v2/network/business_profile_me_params.rb +10 -0
- data/lib/stripe/params/v2/network/business_profile_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_confirm_params.rb +10 -0
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_create_params.rb +17 -0
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_list_params.rb +20 -0
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/orchestrated_commerce/agreement_terminate_params.rb +10 -0
- data/lib/stripe/params/v2/signals/account_activity_create_params.rb +200 -0
- data/lib/stripe/params/v2/signals/account_activity_delete_params.rb +10 -0
- data/lib/stripe/params/v2/signals/account_activity_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/signals/account_evaluation_create_params.rb +192 -0
- data/lib/stripe/params/v2/signals/account_evaluation_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/signals/account_signal_list_params.rb +35 -0
- data/lib/stripe/params/v2/signals/account_signal_retrieve_params.rb +10 -0
- data/lib/stripe/params.rb +364 -0
- data/lib/stripe/resources/account.rb +176 -1
- data/lib/stripe/resources/account_notice.rb +94 -0
- data/lib/stripe/resources/account_session.rb +81 -0
- data/lib/stripe/resources/balance.rb +83 -0
- data/lib/stripe/resources/balance_settings.rb +4 -0
- data/lib/stripe/resources/billing/alert_triggered.rb +4 -0
- data/lib/stripe/resources/billing/analytics/meter_usage.rb +33 -0
- data/lib/stripe/resources/billing/analytics/meter_usage_row.rb +38 -0
- data/lib/stripe/resources/capital/financing_offer.rb +144 -0
- data/lib/stripe/resources/capital/financing_summary.rb +82 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +99 -0
- data/lib/stripe/resources/card.rb +18 -1
- data/lib/stripe/resources/charge.rb +227 -1
- data/lib/stripe/resources/checkout/session.rb +91 -3
- data/lib/stripe/resources/confirmation_token.rb +131 -0
- data/lib/stripe/resources/coupon.rb +26 -1
- data/lib/stripe/resources/credit_note_line_item.rb +18 -0
- data/lib/stripe/resources/customer.rb +16 -0
- data/lib/stripe/resources/customer_session.rb +36 -0
- data/lib/stripe/resources/dispute.rb +18 -0
- data/lib/stripe/resources/event.rb +64 -1
- data/lib/stripe/resources/financial_connections/account.rb +45 -1
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +35 -0
- data/lib/stripe/resources/financial_connections/authorization.rb +24 -1
- data/lib/stripe/resources/financial_connections/institution.rb +127 -0
- data/lib/stripe/resources/financial_connections/session.rb +92 -0
- data/lib/stripe/resources/fx_quote.rb +149 -0
- data/lib/stripe/resources/invoice.rb +106 -1
- data/lib/stripe/resources/invoice_item.rb +2 -0
- data/lib/stripe/resources/invoice_line_item.rb +40 -0
- data/lib/stripe/resources/issuing/authorization.rb +16 -0
- data/lib/stripe/resources/issuing/card.rb +16 -0
- data/lib/stripe/resources/issuing/cardholder.rb +16 -0
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +263 -0
- data/lib/stripe/resources/issuing/dispute.rb +16 -1
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +71 -0
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +51 -0
- data/lib/stripe/resources/issuing/settlement.rb +61 -0
- data/lib/stripe/resources/issuing/transaction.rb +18 -0
- data/lib/stripe/resources/line_item.rb +42 -0
- data/lib/stripe/resources/mandate.rb +12 -0
- data/lib/stripe/resources/margin.rb +64 -0
- data/lib/stripe/resources/order.rb +927 -0
- data/lib/stripe/resources/payment_attempt_record.rb +177 -1
- data/lib/stripe/resources/payment_intent.rb +1588 -10
- data/lib/stripe/resources/payment_method.rb +151 -0
- data/lib/stripe/resources/payment_method_configuration.rb +170 -0
- data/lib/stripe/resources/payment_plan.rb +213 -0
- data/lib/stripe/resources/payment_record.rb +177 -1
- data/lib/stripe/resources/price.rb +20 -0
- data/lib/stripe/resources/privacy/redaction_job.rb +189 -0
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +49 -0
- data/lib/stripe/resources/quote.rb +569 -2
- data/lib/stripe/resources/quote_line.rb +525 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +1241 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +968 -0
- data/lib/stripe/resources/radar/billing_evaluation.rb +281 -0
- data/lib/stripe/resources/radar/value_list_item.rb +15 -1
- data/lib/stripe/resources/refund.rb +18 -0
- data/lib/stripe/resources/reserve/hold.rb +7 -0
- data/lib/stripe/resources/reserve/plan.rb +7 -0
- data/lib/stripe/resources/reserve/release.rb +12 -0
- data/lib/stripe/resources/setup_attempt.rb +35 -0
- data/lib/stripe/resources/setup_intent.rb +38 -1
- data/lib/stripe/resources/shared_payment/granted_token.rb +681 -0
- data/lib/stripe/resources/shared_payment/issued_token.rb +310 -0
- data/lib/stripe/resources/source.rb +54 -0
- data/lib/stripe/resources/subscription.rb +73 -0
- data/lib/stripe/resources/subscription_item.rb +22 -1
- data/lib/stripe/resources/subscription_schedule.rb +198 -3
- data/lib/stripe/resources/tax/form.rb +264 -0
- data/lib/stripe/resources/tax/registration.rb +16 -1
- data/lib/stripe/resources/terminal/reader.rb +8 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +47 -0
- data/lib/stripe/resources/token.rb +15 -1
- data/lib/stripe/resources/transfer.rb +2 -0
- data/lib/stripe/resources/treasury/financial_account.rb +2 -0
- data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +2 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +30 -0
- data/lib/stripe/resources/treasury/received_credit.rb +30 -0
- data/lib/stripe/resources/treasury/received_debit.rb +32 -0
- data/lib/stripe/resources/v2/billing/bill_setting.rb +102 -0
- data/lib/stripe/resources/v2/billing/bill_setting_version.rb +91 -0
- data/lib/stripe/resources/v2/billing/cadence.rb +710 -0
- data/lib/stripe/resources/v2/billing/collection_setting.rb +327 -0
- data/lib/stripe/resources/v2/billing/collection_setting_version.rb +316 -0
- data/lib/stripe/resources/v2/billing/profile.rb +47 -0
- data/lib/stripe/resources/v2/core/account.rb +802 -2
- data/lib/stripe/resources/v2/core/approval_request.rb +395 -0
- data/lib/stripe/resources/v2/core/batch_job.rb +536 -0
- data/lib/stripe/resources/v2/core/event_notification.rb +1 -0
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +91 -1
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +26 -1
- data/lib/stripe/resources/v2/data/query_run.rb +255 -0
- data/lib/stripe/resources/v2/data/report.rb +104 -0
- data/lib/stripe/resources/v2/data/report_run.rb +246 -0
- data/lib/stripe/resources/v2/data/reporting/query_run.rb +142 -0
- data/lib/stripe/resources/v2/data/schema.rb +121 -0
- data/lib/stripe/resources/v2/extend/workflow.rb +80 -0
- data/lib/stripe/resources/v2/extend/workflow_run.rb +158 -0
- data/lib/stripe/resources/v2/iam/activity_log.rb +368 -0
- data/lib/stripe/resources/v2/money_management/adjustment.rb +4 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +50 -1
- data/lib/stripe/resources/v2/money_management/financial_address_generated_microdeposits.rb +33 -0
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +2 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +63 -1
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +255 -0
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +31 -1
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +260 -0
- data/lib/stripe/resources/v2/money_management/payout_method.rb +50 -1
- data/lib/stripe/resources/v2/money_management/received_credit.rb +2 -0
- data/lib/stripe/resources/v2/money_management/received_debit.rb +137 -0
- data/lib/stripe/resources/v2/money_management/recipient_verification.rb +2 -0
- data/lib/stripe/resources/v2/network/business_profile.rb +84 -0
- data/lib/stripe/resources/v2/orchestrated_commerce/agreement.rb +93 -0
- data/lib/stripe/resources/v2/signals/account_activity.rb +252 -0
- data/lib/stripe/resources/v2/signals/account_evaluation.rb +249 -0
- data/lib/stripe/resources/v2/signals/account_signal.rb +184 -0
- data/lib/stripe/resources.rb +341 -0
- data/lib/stripe/services/account_notice_service.rb +39 -0
- data/lib/stripe/services/account_service.rb +15 -0
- data/lib/stripe/services/billing/analytics/meter_usage_service.rb +21 -0
- data/lib/stripe/services/billing/analytics_service.rb +15 -0
- data/lib/stripe/services/billing_service.rb +2 -1
- data/lib/stripe/services/capital/financing_offer_service.rb +42 -0
- data/lib/stripe/services/capital/financing_summary_service.rb +19 -0
- data/lib/stripe/services/capital/financing_transaction_service.rb +31 -0
- data/lib/stripe/services/capital_service.rb +15 -0
- data/lib/stripe/services/coupon_service.rb +14 -0
- data/lib/stripe/services/customer_service.rb +15 -0
- data/lib/stripe/services/external_account_service.rb +68 -0
- data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +19 -0
- data/lib/stripe/services/financial_connections/account_service.rb +3 -1
- data/lib/stripe/services/financial_connections/authorization_service.rb +19 -0
- data/lib/stripe/services/financial_connections/institution_service.rb +30 -0
- data/lib/stripe/services/financial_connections_service.rb +3 -1
- data/lib/stripe/services/fx_quote_service.rb +27 -0
- data/lib/stripe/services/invoice_service.rb +11 -0
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +74 -0
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +30 -0
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +30 -0
- data/lib/stripe/services/issuing_service.rb +5 -1
- data/lib/stripe/services/mandate_service.rb +5 -0
- data/lib/stripe/services/margin_service.rb +50 -0
- data/lib/stripe/services/order_service.rb +53 -0
- data/lib/stripe/services/payment_intent_service.rb +37 -0
- data/lib/stripe/services/payment_plan_service.rb +50 -0
- data/lib/stripe/services/privacy/redaction_job_service.rb +104 -0
- data/lib/stripe/services/privacy/redaction_job_validation_error_service.rb +19 -0
- data/lib/stripe/services/privacy_service.rb +13 -0
- data/lib/stripe/services/promotion_code_service.rb +29 -0
- data/lib/stripe/services/quote_line_service.rb +17 -0
- data/lib/stripe/services/quote_preview_invoice_service.rb +17 -0
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +17 -0
- data/lib/stripe/services/quote_service.rb +49 -1
- data/lib/stripe/services/radar/billing_evaluation_service.rb +19 -0
- data/lib/stripe/services/radar_service.rb +2 -1
- data/lib/stripe/services/reserve/hold_service.rb +30 -0
- data/lib/stripe/services/reserve/plan_service.rb +30 -0
- data/lib/stripe/services/reserve/release_service.rb +30 -0
- data/lib/stripe/services/reserve_service.rb +15 -0
- data/lib/stripe/services/shared_payment/granted_token_service.rb +19 -0
- data/lib/stripe/services/shared_payment/issued_token_service.rb +41 -0
- data/lib/stripe/services/shared_payment_service.rb +14 -0
- data/lib/stripe/services/subscription_schedule_service.rb +11 -0
- data/lib/stripe/services/subscription_service.rb +45 -0
- data/lib/stripe/services/tax/form_service.rb +37 -0
- data/lib/stripe/services/tax_service.rb +2 -1
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +19 -0
- data/lib/stripe/services/terminal_service.rb +2 -1
- data/lib/stripe/services/test_helpers/shared_payment/granted_token_service.rb +32 -0
- data/lib/stripe/services/test_helpers/shared_payment_service.rb +15 -0
- data/lib/stripe/services/test_helpers_service.rb +2 -1
- data/lib/stripe/services/v1_services.rb +11 -1
- data/lib/stripe/services/v2/billing/bill_setting_service.rb +61 -0
- data/lib/stripe/services/v2/billing/bill_settings/version_service.rb +34 -0
- data/lib/stripe/services/v2/billing/cadence_service.rb +65 -0
- data/lib/stripe/services/v2/billing/collection_setting_service.rb +69 -0
- data/lib/stripe/services/v2/billing/collection_settings/version_service.rb +34 -0
- data/lib/stripe/services/v2/billing/profile_service.rb +54 -0
- data/lib/stripe/services/v2/billing_service.rb +5 -1
- data/lib/stripe/services/v2/core/approval_request_service.rb +58 -0
- data/lib/stripe/services/v2/core/batch_job_service.rb +43 -0
- data/lib/stripe/services/v2/core_service.rb +3 -1
- data/lib/stripe/services/v2/data/query_run_service.rb +34 -0
- data/lib/stripe/services/v2/data/report_run_service.rb +36 -0
- data/lib/stripe/services/v2/data/report_service.rb +34 -0
- data/lib/stripe/services/v2/data/reporting/query_run_service.rb +35 -0
- data/lib/stripe/services/v2/data/reporting_service.rb +17 -0
- data/lib/stripe/services/v2/data/schema_service.rb +32 -0
- data/lib/stripe/services/v2/data_service.rb +19 -0
- data/lib/stripe/services/v2/extend/workflow_run_service.rb +32 -0
- data/lib/stripe/services/v2/extend/workflow_service.rb +45 -0
- data/lib/stripe/services/v2/extend_service.rb +16 -0
- data/lib/stripe/services/v2/iam/activity_log_service.rb +32 -0
- data/lib/stripe/services/v2/iam_service.rb +15 -0
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +27 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +35 -0
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +61 -0
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +15 -0
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/test_helpers/financial_address_service.rb +13 -0
- data/lib/stripe/services/v2/money_management_service.rb +5 -1
- data/lib/stripe/services/v2/network/business_profile_service.rb +32 -0
- data/lib/stripe/services/v2/network_service.rb +15 -0
- data/lib/stripe/services/v2/orchestrated_commerce/agreement_service.rb +65 -0
- data/lib/stripe/services/v2/orchestrated_commerce_service.rb +15 -0
- data/lib/stripe/services/v2/signals/account_activity_service.rb +43 -0
- data/lib/stripe/services/v2/signals/account_evaluation_service.rb +32 -0
- data/lib/stripe/services/v2/signals/account_signal_service.rb +32 -0
- data/lib/stripe/services/v2/signals_service.rb +17 -0
- data/lib/stripe/services/v2_services.rb +7 -1
- data/lib/stripe/services.rb +181 -0
- data/lib/stripe/stripe_client.rb +4 -1
- data/lib/stripe/stripe_configuration.rb +3 -1
- data/lib/stripe/stripe_event_notification_handler.rb +216 -0
- 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/resources/v2/core/event_notification.rbi +2 -0
- data/rbi/stripe.rbi +133319 -66595
- metadata +331 -3
|
@@ -305,16 +305,44 @@ module Stripe
|
|
|
305
305
|
class Phase < ::Stripe::RequestParams
|
|
306
306
|
class AddInvoiceItem < ::Stripe::RequestParams
|
|
307
307
|
class Discount < ::Stripe::RequestParams
|
|
308
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
309
|
+
class Duration < ::Stripe::RequestParams
|
|
310
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
311
|
+
attr_accessor :interval
|
|
312
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
313
|
+
attr_accessor :interval_count
|
|
314
|
+
|
|
315
|
+
def initialize(interval: nil, interval_count: nil)
|
|
316
|
+
@interval = interval
|
|
317
|
+
@interval_count = interval_count
|
|
318
|
+
end
|
|
319
|
+
end
|
|
320
|
+
# Time span for the redeemed discount.
|
|
321
|
+
attr_accessor :duration
|
|
322
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
323
|
+
attr_accessor :timestamp
|
|
324
|
+
# The type of calculation made to determine when the discount ends.
|
|
325
|
+
attr_accessor :type
|
|
326
|
+
|
|
327
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
328
|
+
@duration = duration
|
|
329
|
+
@timestamp = timestamp
|
|
330
|
+
@type = type
|
|
331
|
+
end
|
|
332
|
+
end
|
|
308
333
|
# ID of the coupon to create a new discount for.
|
|
309
334
|
attr_accessor :coupon
|
|
310
335
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
311
336
|
attr_accessor :discount
|
|
337
|
+
# Details to determine how long the discount should be applied for.
|
|
338
|
+
attr_accessor :discount_end
|
|
312
339
|
# ID of the promotion code to create a new discount for.
|
|
313
340
|
attr_accessor :promotion_code
|
|
314
341
|
|
|
315
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
342
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
316
343
|
@coupon = coupon
|
|
317
344
|
@discount = discount
|
|
345
|
+
@discount_end = discount_end
|
|
318
346
|
@promotion_code = promotion_code
|
|
319
347
|
end
|
|
320
348
|
end
|
|
@@ -464,16 +492,44 @@ module Stripe
|
|
|
464
492
|
end
|
|
465
493
|
|
|
466
494
|
class Discount < ::Stripe::RequestParams
|
|
495
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
496
|
+
class Duration < ::Stripe::RequestParams
|
|
497
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
498
|
+
attr_accessor :interval
|
|
499
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
500
|
+
attr_accessor :interval_count
|
|
501
|
+
|
|
502
|
+
def initialize(interval: nil, interval_count: nil)
|
|
503
|
+
@interval = interval
|
|
504
|
+
@interval_count = interval_count
|
|
505
|
+
end
|
|
506
|
+
end
|
|
507
|
+
# Time span for the redeemed discount.
|
|
508
|
+
attr_accessor :duration
|
|
509
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
510
|
+
attr_accessor :timestamp
|
|
511
|
+
# The type of calculation made to determine when the discount ends.
|
|
512
|
+
attr_accessor :type
|
|
513
|
+
|
|
514
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
515
|
+
@duration = duration
|
|
516
|
+
@timestamp = timestamp
|
|
517
|
+
@type = type
|
|
518
|
+
end
|
|
519
|
+
end
|
|
467
520
|
# ID of the coupon to create a new discount for.
|
|
468
521
|
attr_accessor :coupon
|
|
469
522
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
470
523
|
attr_accessor :discount
|
|
524
|
+
# Details to determine how long the discount should be applied for.
|
|
525
|
+
attr_accessor :discount_end
|
|
471
526
|
# ID of the promotion code to create a new discount for.
|
|
472
527
|
attr_accessor :promotion_code
|
|
473
528
|
|
|
474
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
529
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
475
530
|
@coupon = coupon
|
|
476
531
|
@discount = discount
|
|
532
|
+
@discount_end = discount_end
|
|
477
533
|
@promotion_code = promotion_code
|
|
478
534
|
end
|
|
479
535
|
end
|
|
@@ -555,16 +611,44 @@ module Stripe
|
|
|
555
611
|
end
|
|
556
612
|
|
|
557
613
|
class Discount < ::Stripe::RequestParams
|
|
614
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
615
|
+
class Duration < ::Stripe::RequestParams
|
|
616
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
617
|
+
attr_accessor :interval
|
|
618
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
619
|
+
attr_accessor :interval_count
|
|
620
|
+
|
|
621
|
+
def initialize(interval: nil, interval_count: nil)
|
|
622
|
+
@interval = interval
|
|
623
|
+
@interval_count = interval_count
|
|
624
|
+
end
|
|
625
|
+
end
|
|
626
|
+
# Time span for the redeemed discount.
|
|
627
|
+
attr_accessor :duration
|
|
628
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
629
|
+
attr_accessor :timestamp
|
|
630
|
+
# The type of calculation made to determine when the discount ends.
|
|
631
|
+
attr_accessor :type
|
|
632
|
+
|
|
633
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
634
|
+
@duration = duration
|
|
635
|
+
@timestamp = timestamp
|
|
636
|
+
@type = type
|
|
637
|
+
end
|
|
638
|
+
end
|
|
558
639
|
# ID of the coupon to create a new discount for.
|
|
559
640
|
attr_accessor :coupon
|
|
560
641
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
561
642
|
attr_accessor :discount
|
|
643
|
+
# Details to determine how long the discount should be applied for.
|
|
644
|
+
attr_accessor :discount_end
|
|
562
645
|
# ID of the promotion code to create a new discount for.
|
|
563
646
|
attr_accessor :promotion_code
|
|
564
647
|
|
|
565
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
648
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
566
649
|
@coupon = coupon
|
|
567
650
|
@discount = discount
|
|
651
|
+
@discount_end = discount_end
|
|
568
652
|
@promotion_code = promotion_code
|
|
569
653
|
end
|
|
570
654
|
end
|
|
@@ -614,6 +698,18 @@ module Stripe
|
|
|
614
698
|
@field_encodings = { unit_amount_decimal: :decimal_string }
|
|
615
699
|
end
|
|
616
700
|
end
|
|
701
|
+
|
|
702
|
+
class Trial < ::Stripe::RequestParams
|
|
703
|
+
# 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.
|
|
704
|
+
attr_accessor :converts_to
|
|
705
|
+
# Determines the type of trial for this item.
|
|
706
|
+
attr_accessor :type
|
|
707
|
+
|
|
708
|
+
def initialize(converts_to: nil, type: nil)
|
|
709
|
+
@converts_to = converts_to
|
|
710
|
+
@type = type
|
|
711
|
+
end
|
|
712
|
+
end
|
|
617
713
|
# 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.
|
|
618
714
|
attr_accessor :billing_thresholds
|
|
619
715
|
# The coupons to redeem into discounts for the subscription item.
|
|
@@ -630,6 +726,10 @@ module Stripe
|
|
|
630
726
|
attr_accessor :quantity
|
|
631
727
|
# A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
632
728
|
attr_accessor :tax_rates
|
|
729
|
+
# Options that configure the trial on the subscription item.
|
|
730
|
+
attr_accessor :trial
|
|
731
|
+
# The ID of the trial offer to apply to the configuration item.
|
|
732
|
+
attr_accessor :trial_offer
|
|
633
733
|
|
|
634
734
|
def initialize(
|
|
635
735
|
billing_thresholds: nil,
|
|
@@ -639,7 +739,9 @@ module Stripe
|
|
|
639
739
|
price: nil,
|
|
640
740
|
price_data: nil,
|
|
641
741
|
quantity: nil,
|
|
642
|
-
tax_rates: nil
|
|
742
|
+
tax_rates: nil,
|
|
743
|
+
trial: nil,
|
|
744
|
+
trial_offer: nil
|
|
643
745
|
)
|
|
644
746
|
@billing_thresholds = billing_thresholds
|
|
645
747
|
@discounts = discounts
|
|
@@ -649,6 +751,8 @@ module Stripe
|
|
|
649
751
|
@price_data = price_data
|
|
650
752
|
@quantity = quantity
|
|
651
753
|
@tax_rates = tax_rates
|
|
754
|
+
@trial = trial
|
|
755
|
+
@trial_offer = trial_offer
|
|
652
756
|
end
|
|
653
757
|
|
|
654
758
|
def self.field_encodings
|
|
@@ -658,6 +762,15 @@ module Stripe
|
|
|
658
762
|
end
|
|
659
763
|
end
|
|
660
764
|
|
|
765
|
+
class PauseCollection < ::Stripe::RequestParams
|
|
766
|
+
# The payment collection behavior for this subscription while paused.
|
|
767
|
+
attr_accessor :behavior
|
|
768
|
+
|
|
769
|
+
def initialize(behavior: nil)
|
|
770
|
+
@behavior = behavior
|
|
771
|
+
end
|
|
772
|
+
end
|
|
773
|
+
|
|
661
774
|
class TransferData < ::Stripe::RequestParams
|
|
662
775
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
|
|
663
776
|
attr_accessor :amount_percent
|
|
@@ -669,6 +782,23 @@ module Stripe
|
|
|
669
782
|
@destination = destination
|
|
670
783
|
end
|
|
671
784
|
end
|
|
785
|
+
|
|
786
|
+
class TrialSettings < ::Stripe::RequestParams
|
|
787
|
+
class EndBehavior < ::Stripe::RequestParams
|
|
788
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
789
|
+
attr_accessor :prorate_up_front
|
|
790
|
+
|
|
791
|
+
def initialize(prorate_up_front: nil)
|
|
792
|
+
@prorate_up_front = prorate_up_front
|
|
793
|
+
end
|
|
794
|
+
end
|
|
795
|
+
# Defines how the subscription should behave when a trial ends.
|
|
796
|
+
attr_accessor :end_behavior
|
|
797
|
+
|
|
798
|
+
def initialize(end_behavior: nil)
|
|
799
|
+
@end_behavior = end_behavior
|
|
800
|
+
end
|
|
801
|
+
end
|
|
672
802
|
# 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.
|
|
673
803
|
attr_accessor :add_invoice_items
|
|
674
804
|
# 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).
|
|
@@ -703,14 +833,20 @@ module Stripe
|
|
|
703
833
|
attr_accessor :metadata
|
|
704
834
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
|
705
835
|
attr_accessor :on_behalf_of
|
|
836
|
+
# 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://docs.stripe.com/billing/subscriptions/pause-payment).
|
|
837
|
+
attr_accessor :pause_collection
|
|
706
838
|
# Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/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://docs.stripe.com/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.
|
|
707
839
|
attr_accessor :proration_behavior
|
|
708
840
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
|
709
841
|
attr_accessor :transfer_data
|
|
710
842
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
|
711
843
|
attr_accessor :trial
|
|
844
|
+
# Specify trial behavior when crossing phase boundaries
|
|
845
|
+
attr_accessor :trial_continuation
|
|
712
846
|
# 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`
|
|
713
847
|
attr_accessor :trial_end
|
|
848
|
+
# Settings related to subscription trials.
|
|
849
|
+
attr_accessor :trial_settings
|
|
714
850
|
|
|
715
851
|
def initialize(
|
|
716
852
|
add_invoice_items: nil,
|
|
@@ -730,10 +866,13 @@ module Stripe
|
|
|
730
866
|
items: nil,
|
|
731
867
|
metadata: nil,
|
|
732
868
|
on_behalf_of: nil,
|
|
869
|
+
pause_collection: nil,
|
|
733
870
|
proration_behavior: nil,
|
|
734
871
|
transfer_data: nil,
|
|
735
872
|
trial: nil,
|
|
736
|
-
|
|
873
|
+
trial_continuation: nil,
|
|
874
|
+
trial_end: nil,
|
|
875
|
+
trial_settings: nil
|
|
737
876
|
)
|
|
738
877
|
@add_invoice_items = add_invoice_items
|
|
739
878
|
@application_fee_percent = application_fee_percent
|
|
@@ -752,10 +891,13 @@ module Stripe
|
|
|
752
891
|
@items = items
|
|
753
892
|
@metadata = metadata
|
|
754
893
|
@on_behalf_of = on_behalf_of
|
|
894
|
+
@pause_collection = pause_collection
|
|
755
895
|
@proration_behavior = proration_behavior
|
|
756
896
|
@transfer_data = transfer_data
|
|
757
897
|
@trial = trial
|
|
898
|
+
@trial_continuation = trial_continuation
|
|
758
899
|
@trial_end = trial_end
|
|
900
|
+
@trial_settings = trial_settings
|
|
759
901
|
end
|
|
760
902
|
|
|
761
903
|
def self.field_encodings
|
|
@@ -777,6 +919,20 @@ module Stripe
|
|
|
777
919
|
}
|
|
778
920
|
end
|
|
779
921
|
end
|
|
922
|
+
|
|
923
|
+
class Prebilling < ::Stripe::RequestParams
|
|
924
|
+
# This is used to determine the number of billing cycles to prebill.
|
|
925
|
+
attr_accessor :iterations
|
|
926
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
927
|
+
attr_accessor :update_behavior
|
|
928
|
+
|
|
929
|
+
def initialize(iterations: nil, update_behavior: nil)
|
|
930
|
+
@iterations = iterations
|
|
931
|
+
@update_behavior = update_behavior
|
|
932
|
+
end
|
|
933
|
+
end
|
|
934
|
+
# 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.
|
|
935
|
+
attr_accessor :billing_behavior
|
|
780
936
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
781
937
|
attr_accessor :billing_mode
|
|
782
938
|
# The identifier of the customer to create the subscription schedule for.
|
|
@@ -797,10 +953,13 @@ module Stripe
|
|
|
797
953
|
attr_accessor :pause_schedules
|
|
798
954
|
# 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.
|
|
799
955
|
attr_accessor :phases
|
|
956
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
957
|
+
attr_accessor :prebilling
|
|
800
958
|
# When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately, and to avoid unexpected behavior due to request delays or clock skew resulting in a slightly backdated or postdated start. 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.
|
|
801
959
|
attr_accessor :start_date
|
|
802
960
|
|
|
803
961
|
def initialize(
|
|
962
|
+
billing_behavior: nil,
|
|
804
963
|
billing_mode: nil,
|
|
805
964
|
customer: nil,
|
|
806
965
|
customer_account: nil,
|
|
@@ -811,8 +970,10 @@ module Stripe
|
|
|
811
970
|
metadata: nil,
|
|
812
971
|
pause_schedules: nil,
|
|
813
972
|
phases: nil,
|
|
973
|
+
prebilling: nil,
|
|
814
974
|
start_date: nil
|
|
815
975
|
)
|
|
976
|
+
@billing_behavior = billing_behavior
|
|
816
977
|
@billing_mode = billing_mode
|
|
817
978
|
@customer = customer
|
|
818
979
|
@customer_account = customer_account
|
|
@@ -823,6 +984,7 @@ module Stripe
|
|
|
823
984
|
@metadata = metadata
|
|
824
985
|
@pause_schedules = pause_schedules
|
|
825
986
|
@phases = phases
|
|
987
|
+
@prebilling = prebilling
|
|
826
988
|
@start_date = start_date
|
|
827
989
|
end
|
|
828
990
|
|
|
@@ -285,16 +285,44 @@ module Stripe
|
|
|
285
285
|
class Phase < ::Stripe::RequestParams
|
|
286
286
|
class AddInvoiceItem < ::Stripe::RequestParams
|
|
287
287
|
class Discount < ::Stripe::RequestParams
|
|
288
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
289
|
+
class Duration < ::Stripe::RequestParams
|
|
290
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
291
|
+
attr_accessor :interval
|
|
292
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
293
|
+
attr_accessor :interval_count
|
|
294
|
+
|
|
295
|
+
def initialize(interval: nil, interval_count: nil)
|
|
296
|
+
@interval = interval
|
|
297
|
+
@interval_count = interval_count
|
|
298
|
+
end
|
|
299
|
+
end
|
|
300
|
+
# Time span for the redeemed discount.
|
|
301
|
+
attr_accessor :duration
|
|
302
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
303
|
+
attr_accessor :timestamp
|
|
304
|
+
# The type of calculation made to determine when the discount ends.
|
|
305
|
+
attr_accessor :type
|
|
306
|
+
|
|
307
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
308
|
+
@duration = duration
|
|
309
|
+
@timestamp = timestamp
|
|
310
|
+
@type = type
|
|
311
|
+
end
|
|
312
|
+
end
|
|
288
313
|
# ID of the coupon to create a new discount for.
|
|
289
314
|
attr_accessor :coupon
|
|
290
315
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
291
316
|
attr_accessor :discount
|
|
317
|
+
# Details to determine how long the discount should be applied for.
|
|
318
|
+
attr_accessor :discount_end
|
|
292
319
|
# ID of the promotion code to create a new discount for.
|
|
293
320
|
attr_accessor :promotion_code
|
|
294
321
|
|
|
295
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
322
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
296
323
|
@coupon = coupon
|
|
297
324
|
@discount = discount
|
|
325
|
+
@discount_end = discount_end
|
|
298
326
|
@promotion_code = promotion_code
|
|
299
327
|
end
|
|
300
328
|
end
|
|
@@ -444,16 +472,44 @@ module Stripe
|
|
|
444
472
|
end
|
|
445
473
|
|
|
446
474
|
class Discount < ::Stripe::RequestParams
|
|
475
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
476
|
+
class Duration < ::Stripe::RequestParams
|
|
477
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
478
|
+
attr_accessor :interval
|
|
479
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
480
|
+
attr_accessor :interval_count
|
|
481
|
+
|
|
482
|
+
def initialize(interval: nil, interval_count: nil)
|
|
483
|
+
@interval = interval
|
|
484
|
+
@interval_count = interval_count
|
|
485
|
+
end
|
|
486
|
+
end
|
|
487
|
+
# Time span for the redeemed discount.
|
|
488
|
+
attr_accessor :duration
|
|
489
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
490
|
+
attr_accessor :timestamp
|
|
491
|
+
# The type of calculation made to determine when the discount ends.
|
|
492
|
+
attr_accessor :type
|
|
493
|
+
|
|
494
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
495
|
+
@duration = duration
|
|
496
|
+
@timestamp = timestamp
|
|
497
|
+
@type = type
|
|
498
|
+
end
|
|
499
|
+
end
|
|
447
500
|
# ID of the coupon to create a new discount for.
|
|
448
501
|
attr_accessor :coupon
|
|
449
502
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
450
503
|
attr_accessor :discount
|
|
504
|
+
# Details to determine how long the discount should be applied for.
|
|
505
|
+
attr_accessor :discount_end
|
|
451
506
|
# ID of the promotion code to create a new discount for.
|
|
452
507
|
attr_accessor :promotion_code
|
|
453
508
|
|
|
454
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
509
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
455
510
|
@coupon = coupon
|
|
456
511
|
@discount = discount
|
|
512
|
+
@discount_end = discount_end
|
|
457
513
|
@promotion_code = promotion_code
|
|
458
514
|
end
|
|
459
515
|
end
|
|
@@ -535,16 +591,44 @@ module Stripe
|
|
|
535
591
|
end
|
|
536
592
|
|
|
537
593
|
class Discount < ::Stripe::RequestParams
|
|
594
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
595
|
+
class Duration < ::Stripe::RequestParams
|
|
596
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
597
|
+
attr_accessor :interval
|
|
598
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
599
|
+
attr_accessor :interval_count
|
|
600
|
+
|
|
601
|
+
def initialize(interval: nil, interval_count: nil)
|
|
602
|
+
@interval = interval
|
|
603
|
+
@interval_count = interval_count
|
|
604
|
+
end
|
|
605
|
+
end
|
|
606
|
+
# Time span for the redeemed discount.
|
|
607
|
+
attr_accessor :duration
|
|
608
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
609
|
+
attr_accessor :timestamp
|
|
610
|
+
# The type of calculation made to determine when the discount ends.
|
|
611
|
+
attr_accessor :type
|
|
612
|
+
|
|
613
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
614
|
+
@duration = duration
|
|
615
|
+
@timestamp = timestamp
|
|
616
|
+
@type = type
|
|
617
|
+
end
|
|
618
|
+
end
|
|
538
619
|
# ID of the coupon to create a new discount for.
|
|
539
620
|
attr_accessor :coupon
|
|
540
621
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
541
622
|
attr_accessor :discount
|
|
623
|
+
# Details to determine how long the discount should be applied for.
|
|
624
|
+
attr_accessor :discount_end
|
|
542
625
|
# ID of the promotion code to create a new discount for.
|
|
543
626
|
attr_accessor :promotion_code
|
|
544
627
|
|
|
545
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
628
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
546
629
|
@coupon = coupon
|
|
547
630
|
@discount = discount
|
|
631
|
+
@discount_end = discount_end
|
|
548
632
|
@promotion_code = promotion_code
|
|
549
633
|
end
|
|
550
634
|
end
|
|
@@ -594,6 +678,18 @@ module Stripe
|
|
|
594
678
|
@field_encodings = { unit_amount_decimal: :decimal_string }
|
|
595
679
|
end
|
|
596
680
|
end
|
|
681
|
+
|
|
682
|
+
class Trial < ::Stripe::RequestParams
|
|
683
|
+
# 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.
|
|
684
|
+
attr_accessor :converts_to
|
|
685
|
+
# Determines the type of trial for this item.
|
|
686
|
+
attr_accessor :type
|
|
687
|
+
|
|
688
|
+
def initialize(converts_to: nil, type: nil)
|
|
689
|
+
@converts_to = converts_to
|
|
690
|
+
@type = type
|
|
691
|
+
end
|
|
692
|
+
end
|
|
597
693
|
# 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.
|
|
598
694
|
attr_accessor :billing_thresholds
|
|
599
695
|
# The coupons to redeem into discounts for the subscription item.
|
|
@@ -610,6 +706,10 @@ module Stripe
|
|
|
610
706
|
attr_accessor :quantity
|
|
611
707
|
# A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
612
708
|
attr_accessor :tax_rates
|
|
709
|
+
# Options that configure the trial on the subscription item.
|
|
710
|
+
attr_accessor :trial
|
|
711
|
+
# The ID of the trial offer to apply to the configuration item.
|
|
712
|
+
attr_accessor :trial_offer
|
|
613
713
|
|
|
614
714
|
def initialize(
|
|
615
715
|
billing_thresholds: nil,
|
|
@@ -619,7 +719,9 @@ module Stripe
|
|
|
619
719
|
price: nil,
|
|
620
720
|
price_data: nil,
|
|
621
721
|
quantity: nil,
|
|
622
|
-
tax_rates: nil
|
|
722
|
+
tax_rates: nil,
|
|
723
|
+
trial: nil,
|
|
724
|
+
trial_offer: nil
|
|
623
725
|
)
|
|
624
726
|
@billing_thresholds = billing_thresholds
|
|
625
727
|
@discounts = discounts
|
|
@@ -629,6 +731,8 @@ module Stripe
|
|
|
629
731
|
@price_data = price_data
|
|
630
732
|
@quantity = quantity
|
|
631
733
|
@tax_rates = tax_rates
|
|
734
|
+
@trial = trial
|
|
735
|
+
@trial_offer = trial_offer
|
|
632
736
|
end
|
|
633
737
|
|
|
634
738
|
def self.field_encodings
|
|
@@ -638,6 +742,15 @@ module Stripe
|
|
|
638
742
|
end
|
|
639
743
|
end
|
|
640
744
|
|
|
745
|
+
class PauseCollection < ::Stripe::RequestParams
|
|
746
|
+
# The payment collection behavior for this subscription while paused.
|
|
747
|
+
attr_accessor :behavior
|
|
748
|
+
|
|
749
|
+
def initialize(behavior: nil)
|
|
750
|
+
@behavior = behavior
|
|
751
|
+
end
|
|
752
|
+
end
|
|
753
|
+
|
|
641
754
|
class TransferData < ::Stripe::RequestParams
|
|
642
755
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
|
|
643
756
|
attr_accessor :amount_percent
|
|
@@ -649,6 +762,23 @@ module Stripe
|
|
|
649
762
|
@destination = destination
|
|
650
763
|
end
|
|
651
764
|
end
|
|
765
|
+
|
|
766
|
+
class TrialSettings < ::Stripe::RequestParams
|
|
767
|
+
class EndBehavior < ::Stripe::RequestParams
|
|
768
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
769
|
+
attr_accessor :prorate_up_front
|
|
770
|
+
|
|
771
|
+
def initialize(prorate_up_front: nil)
|
|
772
|
+
@prorate_up_front = prorate_up_front
|
|
773
|
+
end
|
|
774
|
+
end
|
|
775
|
+
# Defines how the subscription should behave when a trial ends.
|
|
776
|
+
attr_accessor :end_behavior
|
|
777
|
+
|
|
778
|
+
def initialize(end_behavior: nil)
|
|
779
|
+
@end_behavior = end_behavior
|
|
780
|
+
end
|
|
781
|
+
end
|
|
652
782
|
# 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.
|
|
653
783
|
attr_accessor :add_invoice_items
|
|
654
784
|
# 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).
|
|
@@ -683,6 +813,8 @@ module Stripe
|
|
|
683
813
|
attr_accessor :metadata
|
|
684
814
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
|
685
815
|
attr_accessor :on_behalf_of
|
|
816
|
+
# 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://docs.stripe.com/billing/subscriptions/pause-payment).
|
|
817
|
+
attr_accessor :pause_collection
|
|
686
818
|
# Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/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://docs.stripe.com/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.
|
|
687
819
|
attr_accessor :proration_behavior
|
|
688
820
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. Prefer to specify `now` over an explicit timestamp when appropriate to avoid unexpected behavior due to request delays or clock skew resulting in the phase being slightly backdated or postdated.
|
|
@@ -691,8 +823,12 @@ module Stripe
|
|
|
691
823
|
attr_accessor :transfer_data
|
|
692
824
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
|
693
825
|
attr_accessor :trial
|
|
826
|
+
# Specify trial behavior when crossing phase boundaries
|
|
827
|
+
attr_accessor :trial_continuation
|
|
694
828
|
# Sets the phase to trialing from the start date to this date. Must be within the phase. When combined with `trial=true`, it must match the phase end date.
|
|
695
829
|
attr_accessor :trial_end
|
|
830
|
+
# Settings related to subscription trials.
|
|
831
|
+
attr_accessor :trial_settings
|
|
696
832
|
|
|
697
833
|
def initialize(
|
|
698
834
|
add_invoice_items: nil,
|
|
@@ -712,11 +848,14 @@ module Stripe
|
|
|
712
848
|
items: nil,
|
|
713
849
|
metadata: nil,
|
|
714
850
|
on_behalf_of: nil,
|
|
851
|
+
pause_collection: nil,
|
|
715
852
|
proration_behavior: nil,
|
|
716
853
|
start_date: nil,
|
|
717
854
|
transfer_data: nil,
|
|
718
855
|
trial: nil,
|
|
719
|
-
|
|
856
|
+
trial_continuation: nil,
|
|
857
|
+
trial_end: nil,
|
|
858
|
+
trial_settings: nil
|
|
720
859
|
)
|
|
721
860
|
@add_invoice_items = add_invoice_items
|
|
722
861
|
@application_fee_percent = application_fee_percent
|
|
@@ -735,11 +874,14 @@ module Stripe
|
|
|
735
874
|
@items = items
|
|
736
875
|
@metadata = metadata
|
|
737
876
|
@on_behalf_of = on_behalf_of
|
|
877
|
+
@pause_collection = pause_collection
|
|
738
878
|
@proration_behavior = proration_behavior
|
|
739
879
|
@start_date = start_date
|
|
740
880
|
@transfer_data = transfer_data
|
|
741
881
|
@trial = trial
|
|
882
|
+
@trial_continuation = trial_continuation
|
|
742
883
|
@trial_end = trial_end
|
|
884
|
+
@trial_settings = trial_settings
|
|
743
885
|
end
|
|
744
886
|
|
|
745
887
|
def self.field_encodings
|
|
@@ -761,6 +903,20 @@ module Stripe
|
|
|
761
903
|
}
|
|
762
904
|
end
|
|
763
905
|
end
|
|
906
|
+
|
|
907
|
+
class Prebilling < ::Stripe::RequestParams
|
|
908
|
+
# This is used to determine the number of billing cycles to prebill.
|
|
909
|
+
attr_accessor :iterations
|
|
910
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
911
|
+
attr_accessor :update_behavior
|
|
912
|
+
|
|
913
|
+
def initialize(iterations: nil, update_behavior: nil)
|
|
914
|
+
@iterations = iterations
|
|
915
|
+
@update_behavior = update_behavior
|
|
916
|
+
end
|
|
917
|
+
end
|
|
918
|
+
# 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.
|
|
919
|
+
attr_accessor :billing_behavior
|
|
764
920
|
# Object representing the subscription schedule's default settings.
|
|
765
921
|
attr_accessor :default_settings
|
|
766
922
|
# 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.
|
|
@@ -773,24 +929,30 @@ module Stripe
|
|
|
773
929
|
attr_accessor :pause_schedules
|
|
774
930
|
# 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.
|
|
775
931
|
attr_accessor :phases
|
|
932
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
933
|
+
attr_accessor :prebilling
|
|
776
934
|
# 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`.
|
|
777
935
|
attr_accessor :proration_behavior
|
|
778
936
|
|
|
779
937
|
def initialize(
|
|
938
|
+
billing_behavior: nil,
|
|
780
939
|
default_settings: nil,
|
|
781
940
|
end_behavior: nil,
|
|
782
941
|
expand: nil,
|
|
783
942
|
metadata: nil,
|
|
784
943
|
pause_schedules: nil,
|
|
785
944
|
phases: nil,
|
|
945
|
+
prebilling: nil,
|
|
786
946
|
proration_behavior: nil
|
|
787
947
|
)
|
|
948
|
+
@billing_behavior = billing_behavior
|
|
788
949
|
@default_settings = default_settings
|
|
789
950
|
@end_behavior = end_behavior
|
|
790
951
|
@expand = expand
|
|
791
952
|
@metadata = metadata
|
|
792
953
|
@pause_schedules = pause_schedules
|
|
793
954
|
@phases = phases
|
|
955
|
+
@prebilling = prebilling
|
|
794
956
|
@proration_behavior = proration_behavior
|
|
795
957
|
end
|
|
796
958
|
|