stripe 19.2.0 → 19.3.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 +36 -3
- data/lib/stripe/api_version.rb +1 -2
- data/lib/stripe/errors.rb +87 -0
- data/lib/stripe/event_types.rb +228 -0
- data/lib/stripe/events/unknown_event_notification.rb +1 -0
- data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +63 -0
- data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_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_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_adjustment_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +61 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_updated_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_updated_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_payout_method_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +61 -0
- data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_received_credit_succeeded_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_money_management_transaction_created_event.rb +63 -0
- data/lib/stripe/events/v2_money_management_transaction_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/object_types.rb +61 -0
- data/lib/stripe/params/account_create_params.rb +374 -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 +226 -1
- data/lib/stripe/params/account_update_params.rb +336 -0
- 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 +126 -3
- data/lib/stripe/params/checkout/session_update_params.rb +176 -1
- data/lib/stripe/params/confirmation_token_create_params.rb +78 -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/dispute_update_params.rb +10 -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 +64 -2
- 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 +48 -1
- data/lib/stripe/params/invoice_attach_payment_params.rb +43 -1
- data/lib/stripe/params/invoice_create_params.rb +70 -2
- data/lib/stripe/params/invoice_create_preview_params.rb +790 -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 +48 -1
- data/lib/stripe/params/invoice_update_lines_params.rb +48 -1
- data/lib/stripe/params/invoice_update_params.rb +70 -2
- data/lib/stripe/params/issuing/cardholder_create_params.rb +2 -1
- 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 +3022 -87
- data/lib/stripe/params/payment_intent_create_params.rb +3034 -99
- 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 +3023 -57
- data/lib/stripe/params/payment_link_create_params.rb +15 -0
- 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 +74 -0
- data/lib/stripe/params/plan_create_params.rb +15 -0
- data/lib/stripe/params/price_create_params.rb +15 -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/product_catalog/trial_offer_create_params.rb +63 -0
- data/lib/stripe/params/product_create_params.rb +16 -0
- data/lib/stripe/params/product_update_params.rb +16 -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/reserve/hold_list_params.rb +53 -0
- data/lib/stripe/params/reserve/hold_retrieve_params.rb +15 -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 +108 -3
- data/lib/stripe/params/setup_intent_create_params.rb +108 -3
- data/lib/stripe/params/setup_intent_update_params.rb +108 -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 +67 -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 +170 -6
- data/lib/stripe/params/subscription_item_create_params.rb +62 -2
- data/lib/stripe/params/subscription_item_update_params.rb +45 -1
- data/lib/stripe/params/subscription_pause_params.rb +50 -0
- data/lib/stripe/params/subscription_resume_params.rb +4 -0
- 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 +153 -5
- data/lib/stripe/params/tax/calculation_create_params.rb +4 -0
- 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/location_create_params.rb +54 -0
- data/lib/stripe/params/tax/location_list_params.rb +27 -0
- data/lib/stripe/params/tax/location_retrieve_params.rb +15 -0
- data/lib/stripe/params/tax/registration_create_params.rb +104 -0
- data/lib/stripe/params/terminal/configuration_create_params.rb +13 -0
- data/lib/stripe/params/terminal/configuration_update_params.rb +13 -0
- data/lib/stripe/params/terminal/reader_collected_data_retrieve_params.rb +15 -0
- data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +78 -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 +4 -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 +282 -5
- data/lib/stripe/params/v2/core/account_token_create_params.rb +13 -1
- data/lib/stripe/params/v2/core/account_update_params.rb +274 -4
- data/lib/stripe/params/v2/core/batch_job_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/core/batch_job_create_params.rb +58 -0
- data/lib/stripe/params/v2/core/batch_job_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/core/vault/gb_bank_account_acknowledge_confirmation_of_payee_params.rb +12 -0
- data/lib/stripe/params/v2/core/vault/gb_bank_account_archive_params.rb +12 -0
- data/lib/stripe/params/v2/core/vault/gb_bank_account_create_params.rb +58 -0
- data/lib/stripe/params/v2/core/vault/gb_bank_account_initiate_confirmation_of_payee_params.rb +22 -0
- data/lib/stripe/params/v2/core/vault/gb_bank_account_list_params.rb +19 -0
- data/lib/stripe/params/v2/core/vault/gb_bank_account_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_archive_params.rb +12 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_confirm_microdeposits_params.rb +22 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_create_params.rb +37 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_list_params.rb +22 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_send_microdeposits_params.rb +12 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_update_params.rb +22 -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/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/adjustment_list_params.rb +48 -0
- data/lib/stripe/params/v2/money_management/adjustment_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/financial_account_close_params.rb +28 -0
- data/lib/stripe/params/v2/money_management/financial_account_create_params.rb +34 -0
- data/lib/stripe/params/v2/money_management/financial_account_list_params.rb +20 -0
- data/lib/stripe/params/v2/money_management/financial_account_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/financial_account_update_params.rb +20 -0
- data/lib/stripe/params/v2/money_management/financial_address_create_params.rb +20 -0
- data/lib/stripe/params/v2/money_management/financial_address_list_params.rb +23 -0
- data/lib/stripe/params/v2/money_management/financial_address_retrieve_params.rb +17 -0
- data/lib/stripe/params/v2/money_management/inbound_transfer_create_params.rb +50 -0
- data/lib/stripe/params/v2/money_management/inbound_transfer_list_params.rb +44 -0
- data/lib/stripe/params/v2/money_management/inbound_transfer_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +102 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_list_params.rb +52 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb +67 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_quote_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb +92 -0
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_list_params.rb +17 -0
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/outbound_setup_intent_update_params.rb +88 -0
- 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 +77 -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_archive_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/payout_method_list_params.rb +31 -0
- data/lib/stripe/params/v2/money_management/payout_method_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/payout_method_unarchive_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/payout_methods_bank_account_spec_retrieve_params.rb +17 -0
- data/lib/stripe/params/v2/money_management/received_credit_list_params.rb +44 -0
- data/lib/stripe/params/v2/money_management/received_credit_retrieve_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/transaction_entry_list_params.rb +43 -0
- data/lib/stripe/params/v2/money_management/transaction_entry_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/transaction_list_params.rb +47 -0
- data/lib/stripe/params/v2/money_management/transaction_retrieve_params.rb +10 -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/test_helpers/financial_address_credit_params.rb +23 -0
- data/lib/stripe/params/v2/test_helpers/financial_address_generate_microdeposits_params.rb +10 -0
- data/lib/stripe/params.rb +426 -0
- data/lib/stripe/resources/account.rb +259 -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/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 +142 -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 +2 -0
- data/lib/stripe/resources/charge.rb +211 -1
- data/lib/stripe/resources/checkout/session.rb +75 -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_session.rb +36 -0
- data/lib/stripe/resources/dispute.rb +22 -0
- data/lib/stripe/resources/event.rb +64 -1
- data/lib/stripe/resources/financial_connections/account.rb +57 -0
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +35 -0
- data/lib/stripe/resources/financial_connections/authorization.rb +82 -0
- data/lib/stripe/resources/financial_connections/institution.rb +127 -0
- data/lib/stripe/resources/financial_connections/session.rb +125 -1
- data/lib/stripe/resources/fx_quote.rb +147 -0
- data/lib/stripe/resources/invoice.rb +117 -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/credit_underwriting_record.rb +263 -0
- 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 +2 -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 +1561 -8
- data/lib/stripe/resources/payment_method.rb +135 -0
- data/lib/stripe/resources/payment_method_configuration.rb +170 -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/product.rb +18 -0
- data/lib/stripe/resources/product_catalog/trial_offer.rb +106 -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 +1183 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +736 -0
- data/lib/stripe/resources/refund.rb +18 -0
- data/lib/stripe/resources/reserve/hold.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 +22 -1
- data/lib/stripe/resources/shared_payment/granted_token.rb +1792 -0
- data/lib/stripe/resources/shared_payment/issued_token.rb +291 -0
- data/lib/stripe/resources/source.rb +38 -0
- data/lib/stripe/resources/subscription.rb +167 -0
- data/lib/stripe/resources/subscription_item.rb +41 -1
- data/lib/stripe/resources/subscription_schedule.rb +198 -3
- data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
- data/lib/stripe/resources/tax/form.rb +264 -0
- data/lib/stripe/resources/tax/location.rb +72 -0
- data/lib/stripe/resources/tax/registration.rb +128 -0
- data/lib/stripe/resources/tax_code.rb +15 -1
- data/lib/stripe/resources/terminal/configuration.rb +16 -0
- data/lib/stripe/resources/terminal/reader.rb +8 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +47 -0
- 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 +597 -3
- data/lib/stripe/resources/v2/core/batch_job.rb +488 -0
- data/lib/stripe/resources/v2/core/event_notification.rb +1 -0
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +136 -0
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +105 -0
- data/lib/stripe/resources/v2/data/reporting/query_run.rb +142 -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/financial_address_credit_simulation.rb +29 -0
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +31 -0
- data/lib/stripe/resources/v2/iam/activity_log.rb +187 -0
- data/lib/stripe/resources/v2/money_management/adjustment.rb +67 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +140 -0
- data/lib/stripe/resources/v2/money_management/financial_address.rb +160 -0
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +181 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +219 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +144 -0
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +69 -0
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +196 -0
- data/lib/stripe/resources/v2/money_management/payout_method.rb +145 -0
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +83 -0
- data/lib/stripe/resources/v2/money_management/received_credit.rb +230 -0
- data/lib/stripe/resources/v2/money_management/received_debit.rb +136 -0
- data/lib/stripe/resources/v2/money_management/transaction.rb +135 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +105 -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.rb +417 -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/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/product_catalog/trial_offer_service.rb +19 -0
- data/lib/stripe/services/product_catalog_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/reserve/hold_service.rb +30 -0
- data/lib/stripe/services/reserve/plan_service.rb +19 -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 +56 -0
- data/lib/stripe/services/tax/form_service.rb +37 -0
- data/lib/stripe/services/tax/location_service.rb +45 -0
- data/lib/stripe/services/tax_service.rb +3 -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/batch_job_service.rb +43 -0
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +85 -0
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +101 -0
- data/lib/stripe/services/v2/core/vault_service.rb +18 -0
- data/lib/stripe/services/v2/core_service.rb +3 -1
- 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_service.rb +15 -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/adjustment_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +70 -0
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +46 -0
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +45 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +34 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +62 -0
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +75 -0
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +60 -0
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +66 -0
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +23 -0
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/transaction_service.rb +32 -0
- data/lib/stripe/services/v2/money_management_service.rb +31 -0
- 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/test_helper_service.rb +15 -0
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +36 -0
- data/lib/stripe/services/v2_services.rb +8 -1
- data/lib/stripe/services.rb +209 -0
- data/lib/stripe/stripe_client.rb +8 -1
- data/lib/stripe/stripe_configuration.rb +3 -1
- data/lib/stripe/stripe_event_notification_handler.rb +582 -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 +54 -0
- data/rbi/stripe/resources/v2/core/event_notification.rbi +3 -0
- data/rbi/stripe/stripe_client.rbi +13 -0
- data/rbi/stripe.rbi +124159 -57389
- metadata +378 -3
|
@@ -145,16 +145,44 @@ module Stripe
|
|
|
145
145
|
class Phase < ::Stripe::RequestParams
|
|
146
146
|
class AddInvoiceItem < ::Stripe::RequestParams
|
|
147
147
|
class Discount < ::Stripe::RequestParams
|
|
148
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
149
|
+
class Duration < ::Stripe::RequestParams
|
|
150
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
151
|
+
attr_accessor :interval
|
|
152
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
153
|
+
attr_accessor :interval_count
|
|
154
|
+
|
|
155
|
+
def initialize(interval: nil, interval_count: nil)
|
|
156
|
+
@interval = interval
|
|
157
|
+
@interval_count = interval_count
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
# Time span for the redeemed discount.
|
|
161
|
+
attr_accessor :duration
|
|
162
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
163
|
+
attr_accessor :timestamp
|
|
164
|
+
# The type of calculation made to determine when the discount ends.
|
|
165
|
+
attr_accessor :type
|
|
166
|
+
|
|
167
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
168
|
+
@duration = duration
|
|
169
|
+
@timestamp = timestamp
|
|
170
|
+
@type = type
|
|
171
|
+
end
|
|
172
|
+
end
|
|
148
173
|
# ID of the coupon to create a new discount for.
|
|
149
174
|
attr_accessor :coupon
|
|
150
175
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
151
176
|
attr_accessor :discount
|
|
177
|
+
# Details to determine how long the discount should be applied for.
|
|
178
|
+
attr_accessor :discount_end
|
|
152
179
|
# ID of the promotion code to create a new discount for.
|
|
153
180
|
attr_accessor :promotion_code
|
|
154
181
|
|
|
155
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
182
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
156
183
|
@coupon = coupon
|
|
157
184
|
@discount = discount
|
|
185
|
+
@discount_end = discount_end
|
|
158
186
|
@promotion_code = promotion_code
|
|
159
187
|
end
|
|
160
188
|
end
|
|
@@ -304,16 +332,44 @@ module Stripe
|
|
|
304
332
|
end
|
|
305
333
|
|
|
306
334
|
class Discount < ::Stripe::RequestParams
|
|
335
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
336
|
+
class Duration < ::Stripe::RequestParams
|
|
337
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
338
|
+
attr_accessor :interval
|
|
339
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
340
|
+
attr_accessor :interval_count
|
|
341
|
+
|
|
342
|
+
def initialize(interval: nil, interval_count: nil)
|
|
343
|
+
@interval = interval
|
|
344
|
+
@interval_count = interval_count
|
|
345
|
+
end
|
|
346
|
+
end
|
|
347
|
+
# Time span for the redeemed discount.
|
|
348
|
+
attr_accessor :duration
|
|
349
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
350
|
+
attr_accessor :timestamp
|
|
351
|
+
# The type of calculation made to determine when the discount ends.
|
|
352
|
+
attr_accessor :type
|
|
353
|
+
|
|
354
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
355
|
+
@duration = duration
|
|
356
|
+
@timestamp = timestamp
|
|
357
|
+
@type = type
|
|
358
|
+
end
|
|
359
|
+
end
|
|
307
360
|
# ID of the coupon to create a new discount for.
|
|
308
361
|
attr_accessor :coupon
|
|
309
362
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
310
363
|
attr_accessor :discount
|
|
364
|
+
# Details to determine how long the discount should be applied for.
|
|
365
|
+
attr_accessor :discount_end
|
|
311
366
|
# ID of the promotion code to create a new discount for.
|
|
312
367
|
attr_accessor :promotion_code
|
|
313
368
|
|
|
314
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
369
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
315
370
|
@coupon = coupon
|
|
316
371
|
@discount = discount
|
|
372
|
+
@discount_end = discount_end
|
|
317
373
|
@promotion_code = promotion_code
|
|
318
374
|
end
|
|
319
375
|
end
|
|
@@ -367,16 +423,44 @@ module Stripe
|
|
|
367
423
|
end
|
|
368
424
|
|
|
369
425
|
class Discount < ::Stripe::RequestParams
|
|
426
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
427
|
+
class Duration < ::Stripe::RequestParams
|
|
428
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
429
|
+
attr_accessor :interval
|
|
430
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
431
|
+
attr_accessor :interval_count
|
|
432
|
+
|
|
433
|
+
def initialize(interval: nil, interval_count: nil)
|
|
434
|
+
@interval = interval
|
|
435
|
+
@interval_count = interval_count
|
|
436
|
+
end
|
|
437
|
+
end
|
|
438
|
+
# Time span for the redeemed discount.
|
|
439
|
+
attr_accessor :duration
|
|
440
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
441
|
+
attr_accessor :timestamp
|
|
442
|
+
# The type of calculation made to determine when the discount ends.
|
|
443
|
+
attr_accessor :type
|
|
444
|
+
|
|
445
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
446
|
+
@duration = duration
|
|
447
|
+
@timestamp = timestamp
|
|
448
|
+
@type = type
|
|
449
|
+
end
|
|
450
|
+
end
|
|
370
451
|
# ID of the coupon to create a new discount for.
|
|
371
452
|
attr_accessor :coupon
|
|
372
453
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
373
454
|
attr_accessor :discount
|
|
455
|
+
# Details to determine how long the discount should be applied for.
|
|
456
|
+
attr_accessor :discount_end
|
|
374
457
|
# ID of the promotion code to create a new discount for.
|
|
375
458
|
attr_accessor :promotion_code
|
|
376
459
|
|
|
377
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
460
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
378
461
|
@coupon = coupon
|
|
379
462
|
@discount = discount
|
|
463
|
+
@discount_end = discount_end
|
|
380
464
|
@promotion_code = promotion_code
|
|
381
465
|
end
|
|
382
466
|
end
|
|
@@ -426,6 +510,18 @@ module Stripe
|
|
|
426
510
|
@field_encodings = { unit_amount_decimal: :decimal_string }
|
|
427
511
|
end
|
|
428
512
|
end
|
|
513
|
+
|
|
514
|
+
class Trial < ::Stripe::RequestParams
|
|
515
|
+
# 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.
|
|
516
|
+
attr_accessor :converts_to
|
|
517
|
+
# Determines the type of trial for this item.
|
|
518
|
+
attr_accessor :type
|
|
519
|
+
|
|
520
|
+
def initialize(converts_to: nil, type: nil)
|
|
521
|
+
@converts_to = converts_to
|
|
522
|
+
@type = type
|
|
523
|
+
end
|
|
524
|
+
end
|
|
429
525
|
# 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.
|
|
430
526
|
attr_accessor :billing_thresholds
|
|
431
527
|
# The coupons to redeem into discounts for the subscription item.
|
|
@@ -442,6 +538,10 @@ module Stripe
|
|
|
442
538
|
attr_accessor :quantity
|
|
443
539
|
# 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.
|
|
444
540
|
attr_accessor :tax_rates
|
|
541
|
+
# Options that configure the trial on the subscription item.
|
|
542
|
+
attr_accessor :trial
|
|
543
|
+
# The ID of the trial offer to apply to the configuration item.
|
|
544
|
+
attr_accessor :trial_offer
|
|
445
545
|
|
|
446
546
|
def initialize(
|
|
447
547
|
billing_thresholds: nil,
|
|
@@ -451,7 +551,9 @@ module Stripe
|
|
|
451
551
|
price: nil,
|
|
452
552
|
price_data: nil,
|
|
453
553
|
quantity: nil,
|
|
454
|
-
tax_rates: nil
|
|
554
|
+
tax_rates: nil,
|
|
555
|
+
trial: nil,
|
|
556
|
+
trial_offer: nil
|
|
455
557
|
)
|
|
456
558
|
@billing_thresholds = billing_thresholds
|
|
457
559
|
@discounts = discounts
|
|
@@ -461,6 +563,8 @@ module Stripe
|
|
|
461
563
|
@price_data = price_data
|
|
462
564
|
@quantity = quantity
|
|
463
565
|
@tax_rates = tax_rates
|
|
566
|
+
@trial = trial
|
|
567
|
+
@trial_offer = trial_offer
|
|
464
568
|
end
|
|
465
569
|
|
|
466
570
|
def self.field_encodings
|
|
@@ -470,6 +574,15 @@ module Stripe
|
|
|
470
574
|
end
|
|
471
575
|
end
|
|
472
576
|
|
|
577
|
+
class PauseCollection < ::Stripe::RequestParams
|
|
578
|
+
# The payment collection behavior for this subscription while paused.
|
|
579
|
+
attr_accessor :behavior
|
|
580
|
+
|
|
581
|
+
def initialize(behavior: nil)
|
|
582
|
+
@behavior = behavior
|
|
583
|
+
end
|
|
584
|
+
end
|
|
585
|
+
|
|
473
586
|
class TransferData < ::Stripe::RequestParams
|
|
474
587
|
# 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.
|
|
475
588
|
attr_accessor :amount_percent
|
|
@@ -481,6 +594,23 @@ module Stripe
|
|
|
481
594
|
@destination = destination
|
|
482
595
|
end
|
|
483
596
|
end
|
|
597
|
+
|
|
598
|
+
class TrialSettings < ::Stripe::RequestParams
|
|
599
|
+
class EndBehavior < ::Stripe::RequestParams
|
|
600
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
601
|
+
attr_accessor :prorate_up_front
|
|
602
|
+
|
|
603
|
+
def initialize(prorate_up_front: nil)
|
|
604
|
+
@prorate_up_front = prorate_up_front
|
|
605
|
+
end
|
|
606
|
+
end
|
|
607
|
+
# Defines how the subscription should behave when a trial ends.
|
|
608
|
+
attr_accessor :end_behavior
|
|
609
|
+
|
|
610
|
+
def initialize(end_behavior: nil)
|
|
611
|
+
@end_behavior = end_behavior
|
|
612
|
+
end
|
|
613
|
+
end
|
|
484
614
|
# 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.
|
|
485
615
|
attr_accessor :add_invoice_items
|
|
486
616
|
# 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).
|
|
@@ -515,14 +645,20 @@ module Stripe
|
|
|
515
645
|
attr_accessor :metadata
|
|
516
646
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
|
517
647
|
attr_accessor :on_behalf_of
|
|
648
|
+
# 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).
|
|
649
|
+
attr_accessor :pause_collection
|
|
518
650
|
# 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.
|
|
519
651
|
attr_accessor :proration_behavior
|
|
520
652
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
|
521
653
|
attr_accessor :transfer_data
|
|
522
654
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
|
523
655
|
attr_accessor :trial
|
|
656
|
+
# Specify trial behavior when crossing phase boundaries
|
|
657
|
+
attr_accessor :trial_continuation
|
|
524
658
|
# 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`
|
|
525
659
|
attr_accessor :trial_end
|
|
660
|
+
# Settings related to subscription trials.
|
|
661
|
+
attr_accessor :trial_settings
|
|
526
662
|
|
|
527
663
|
def initialize(
|
|
528
664
|
add_invoice_items: nil,
|
|
@@ -542,10 +678,13 @@ module Stripe
|
|
|
542
678
|
items: nil,
|
|
543
679
|
metadata: nil,
|
|
544
680
|
on_behalf_of: nil,
|
|
681
|
+
pause_collection: nil,
|
|
545
682
|
proration_behavior: nil,
|
|
546
683
|
transfer_data: nil,
|
|
547
684
|
trial: nil,
|
|
548
|
-
|
|
685
|
+
trial_continuation: nil,
|
|
686
|
+
trial_end: nil,
|
|
687
|
+
trial_settings: nil
|
|
549
688
|
)
|
|
550
689
|
@add_invoice_items = add_invoice_items
|
|
551
690
|
@application_fee_percent = application_fee_percent
|
|
@@ -564,10 +703,13 @@ module Stripe
|
|
|
564
703
|
@items = items
|
|
565
704
|
@metadata = metadata
|
|
566
705
|
@on_behalf_of = on_behalf_of
|
|
706
|
+
@pause_collection = pause_collection
|
|
567
707
|
@proration_behavior = proration_behavior
|
|
568
708
|
@transfer_data = transfer_data
|
|
569
709
|
@trial = trial
|
|
710
|
+
@trial_continuation = trial_continuation
|
|
570
711
|
@trial_end = trial_end
|
|
712
|
+
@trial_settings = trial_settings
|
|
571
713
|
end
|
|
572
714
|
|
|
573
715
|
def self.field_encodings
|
|
@@ -589,6 +731,20 @@ module Stripe
|
|
|
589
731
|
}
|
|
590
732
|
end
|
|
591
733
|
end
|
|
734
|
+
|
|
735
|
+
class Prebilling < ::Stripe::RequestParams
|
|
736
|
+
# This is used to determine the number of billing cycles to prebill.
|
|
737
|
+
attr_accessor :iterations
|
|
738
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
739
|
+
attr_accessor :update_behavior
|
|
740
|
+
|
|
741
|
+
def initialize(iterations: nil, update_behavior: nil)
|
|
742
|
+
@iterations = iterations
|
|
743
|
+
@update_behavior = update_behavior
|
|
744
|
+
end
|
|
745
|
+
end
|
|
746
|
+
# 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.
|
|
747
|
+
attr_accessor :billing_behavior
|
|
592
748
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
593
749
|
attr_accessor :billing_mode
|
|
594
750
|
# The identifier of the customer to create the subscription schedule for.
|
|
@@ -607,10 +763,13 @@ module Stripe
|
|
|
607
763
|
attr_accessor :metadata
|
|
608
764
|
# 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.
|
|
609
765
|
attr_accessor :phases
|
|
766
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
767
|
+
attr_accessor :prebilling
|
|
610
768
|
# 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.
|
|
611
769
|
attr_accessor :start_date
|
|
612
770
|
|
|
613
771
|
def initialize(
|
|
772
|
+
billing_behavior: nil,
|
|
614
773
|
billing_mode: nil,
|
|
615
774
|
customer: nil,
|
|
616
775
|
customer_account: nil,
|
|
@@ -620,8 +779,10 @@ module Stripe
|
|
|
620
779
|
from_subscription: nil,
|
|
621
780
|
metadata: nil,
|
|
622
781
|
phases: nil,
|
|
782
|
+
prebilling: nil,
|
|
623
783
|
start_date: nil
|
|
624
784
|
)
|
|
785
|
+
@billing_behavior = billing_behavior
|
|
625
786
|
@billing_mode = billing_mode
|
|
626
787
|
@customer = customer
|
|
627
788
|
@customer_account = customer_account
|
|
@@ -631,6 +792,7 @@ module Stripe
|
|
|
631
792
|
@from_subscription = from_subscription
|
|
632
793
|
@metadata = metadata
|
|
633
794
|
@phases = phases
|
|
795
|
+
@prebilling = prebilling
|
|
634
796
|
@start_date = start_date
|
|
635
797
|
end
|
|
636
798
|
|
|
@@ -125,16 +125,44 @@ module Stripe
|
|
|
125
125
|
class Phase < ::Stripe::RequestParams
|
|
126
126
|
class AddInvoiceItem < ::Stripe::RequestParams
|
|
127
127
|
class Discount < ::Stripe::RequestParams
|
|
128
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
129
|
+
class Duration < ::Stripe::RequestParams
|
|
130
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
131
|
+
attr_accessor :interval
|
|
132
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
133
|
+
attr_accessor :interval_count
|
|
134
|
+
|
|
135
|
+
def initialize(interval: nil, interval_count: nil)
|
|
136
|
+
@interval = interval
|
|
137
|
+
@interval_count = interval_count
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
# Time span for the redeemed discount.
|
|
141
|
+
attr_accessor :duration
|
|
142
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
143
|
+
attr_accessor :timestamp
|
|
144
|
+
# The type of calculation made to determine when the discount ends.
|
|
145
|
+
attr_accessor :type
|
|
146
|
+
|
|
147
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
148
|
+
@duration = duration
|
|
149
|
+
@timestamp = timestamp
|
|
150
|
+
@type = type
|
|
151
|
+
end
|
|
152
|
+
end
|
|
128
153
|
# ID of the coupon to create a new discount for.
|
|
129
154
|
attr_accessor :coupon
|
|
130
155
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
131
156
|
attr_accessor :discount
|
|
157
|
+
# Details to determine how long the discount should be applied for.
|
|
158
|
+
attr_accessor :discount_end
|
|
132
159
|
# ID of the promotion code to create a new discount for.
|
|
133
160
|
attr_accessor :promotion_code
|
|
134
161
|
|
|
135
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
162
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
136
163
|
@coupon = coupon
|
|
137
164
|
@discount = discount
|
|
165
|
+
@discount_end = discount_end
|
|
138
166
|
@promotion_code = promotion_code
|
|
139
167
|
end
|
|
140
168
|
end
|
|
@@ -284,16 +312,44 @@ module Stripe
|
|
|
284
312
|
end
|
|
285
313
|
|
|
286
314
|
class Discount < ::Stripe::RequestParams
|
|
315
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
316
|
+
class Duration < ::Stripe::RequestParams
|
|
317
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
318
|
+
attr_accessor :interval
|
|
319
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
320
|
+
attr_accessor :interval_count
|
|
321
|
+
|
|
322
|
+
def initialize(interval: nil, interval_count: nil)
|
|
323
|
+
@interval = interval
|
|
324
|
+
@interval_count = interval_count
|
|
325
|
+
end
|
|
326
|
+
end
|
|
327
|
+
# Time span for the redeemed discount.
|
|
328
|
+
attr_accessor :duration
|
|
329
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
330
|
+
attr_accessor :timestamp
|
|
331
|
+
# The type of calculation made to determine when the discount ends.
|
|
332
|
+
attr_accessor :type
|
|
333
|
+
|
|
334
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
335
|
+
@duration = duration
|
|
336
|
+
@timestamp = timestamp
|
|
337
|
+
@type = type
|
|
338
|
+
end
|
|
339
|
+
end
|
|
287
340
|
# ID of the coupon to create a new discount for.
|
|
288
341
|
attr_accessor :coupon
|
|
289
342
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
290
343
|
attr_accessor :discount
|
|
344
|
+
# Details to determine how long the discount should be applied for.
|
|
345
|
+
attr_accessor :discount_end
|
|
291
346
|
# ID of the promotion code to create a new discount for.
|
|
292
347
|
attr_accessor :promotion_code
|
|
293
348
|
|
|
294
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
349
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
295
350
|
@coupon = coupon
|
|
296
351
|
@discount = discount
|
|
352
|
+
@discount_end = discount_end
|
|
297
353
|
@promotion_code = promotion_code
|
|
298
354
|
end
|
|
299
355
|
end
|
|
@@ -347,16 +403,44 @@ module Stripe
|
|
|
347
403
|
end
|
|
348
404
|
|
|
349
405
|
class Discount < ::Stripe::RequestParams
|
|
406
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
407
|
+
class Duration < ::Stripe::RequestParams
|
|
408
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
409
|
+
attr_accessor :interval
|
|
410
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
411
|
+
attr_accessor :interval_count
|
|
412
|
+
|
|
413
|
+
def initialize(interval: nil, interval_count: nil)
|
|
414
|
+
@interval = interval
|
|
415
|
+
@interval_count = interval_count
|
|
416
|
+
end
|
|
417
|
+
end
|
|
418
|
+
# Time span for the redeemed discount.
|
|
419
|
+
attr_accessor :duration
|
|
420
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
421
|
+
attr_accessor :timestamp
|
|
422
|
+
# The type of calculation made to determine when the discount ends.
|
|
423
|
+
attr_accessor :type
|
|
424
|
+
|
|
425
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
426
|
+
@duration = duration
|
|
427
|
+
@timestamp = timestamp
|
|
428
|
+
@type = type
|
|
429
|
+
end
|
|
430
|
+
end
|
|
350
431
|
# ID of the coupon to create a new discount for.
|
|
351
432
|
attr_accessor :coupon
|
|
352
433
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
353
434
|
attr_accessor :discount
|
|
435
|
+
# Details to determine how long the discount should be applied for.
|
|
436
|
+
attr_accessor :discount_end
|
|
354
437
|
# ID of the promotion code to create a new discount for.
|
|
355
438
|
attr_accessor :promotion_code
|
|
356
439
|
|
|
357
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
440
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
358
441
|
@coupon = coupon
|
|
359
442
|
@discount = discount
|
|
443
|
+
@discount_end = discount_end
|
|
360
444
|
@promotion_code = promotion_code
|
|
361
445
|
end
|
|
362
446
|
end
|
|
@@ -406,6 +490,18 @@ module Stripe
|
|
|
406
490
|
@field_encodings = { unit_amount_decimal: :decimal_string }
|
|
407
491
|
end
|
|
408
492
|
end
|
|
493
|
+
|
|
494
|
+
class Trial < ::Stripe::RequestParams
|
|
495
|
+
# 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.
|
|
496
|
+
attr_accessor :converts_to
|
|
497
|
+
# Determines the type of trial for this item.
|
|
498
|
+
attr_accessor :type
|
|
499
|
+
|
|
500
|
+
def initialize(converts_to: nil, type: nil)
|
|
501
|
+
@converts_to = converts_to
|
|
502
|
+
@type = type
|
|
503
|
+
end
|
|
504
|
+
end
|
|
409
505
|
# 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.
|
|
410
506
|
attr_accessor :billing_thresholds
|
|
411
507
|
# The coupons to redeem into discounts for the subscription item.
|
|
@@ -422,6 +518,10 @@ module Stripe
|
|
|
422
518
|
attr_accessor :quantity
|
|
423
519
|
# 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.
|
|
424
520
|
attr_accessor :tax_rates
|
|
521
|
+
# Options that configure the trial on the subscription item.
|
|
522
|
+
attr_accessor :trial
|
|
523
|
+
# The ID of the trial offer to apply to the configuration item.
|
|
524
|
+
attr_accessor :trial_offer
|
|
425
525
|
|
|
426
526
|
def initialize(
|
|
427
527
|
billing_thresholds: nil,
|
|
@@ -431,7 +531,9 @@ module Stripe
|
|
|
431
531
|
price: nil,
|
|
432
532
|
price_data: nil,
|
|
433
533
|
quantity: nil,
|
|
434
|
-
tax_rates: nil
|
|
534
|
+
tax_rates: nil,
|
|
535
|
+
trial: nil,
|
|
536
|
+
trial_offer: nil
|
|
435
537
|
)
|
|
436
538
|
@billing_thresholds = billing_thresholds
|
|
437
539
|
@discounts = discounts
|
|
@@ -441,6 +543,8 @@ module Stripe
|
|
|
441
543
|
@price_data = price_data
|
|
442
544
|
@quantity = quantity
|
|
443
545
|
@tax_rates = tax_rates
|
|
546
|
+
@trial = trial
|
|
547
|
+
@trial_offer = trial_offer
|
|
444
548
|
end
|
|
445
549
|
|
|
446
550
|
def self.field_encodings
|
|
@@ -450,6 +554,15 @@ module Stripe
|
|
|
450
554
|
end
|
|
451
555
|
end
|
|
452
556
|
|
|
557
|
+
class PauseCollection < ::Stripe::RequestParams
|
|
558
|
+
# The payment collection behavior for this subscription while paused.
|
|
559
|
+
attr_accessor :behavior
|
|
560
|
+
|
|
561
|
+
def initialize(behavior: nil)
|
|
562
|
+
@behavior = behavior
|
|
563
|
+
end
|
|
564
|
+
end
|
|
565
|
+
|
|
453
566
|
class TransferData < ::Stripe::RequestParams
|
|
454
567
|
# 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.
|
|
455
568
|
attr_accessor :amount_percent
|
|
@@ -461,6 +574,23 @@ module Stripe
|
|
|
461
574
|
@destination = destination
|
|
462
575
|
end
|
|
463
576
|
end
|
|
577
|
+
|
|
578
|
+
class TrialSettings < ::Stripe::RequestParams
|
|
579
|
+
class EndBehavior < ::Stripe::RequestParams
|
|
580
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
581
|
+
attr_accessor :prorate_up_front
|
|
582
|
+
|
|
583
|
+
def initialize(prorate_up_front: nil)
|
|
584
|
+
@prorate_up_front = prorate_up_front
|
|
585
|
+
end
|
|
586
|
+
end
|
|
587
|
+
# Defines how the subscription should behave when a trial ends.
|
|
588
|
+
attr_accessor :end_behavior
|
|
589
|
+
|
|
590
|
+
def initialize(end_behavior: nil)
|
|
591
|
+
@end_behavior = end_behavior
|
|
592
|
+
end
|
|
593
|
+
end
|
|
464
594
|
# 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.
|
|
465
595
|
attr_accessor :add_invoice_items
|
|
466
596
|
# 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).
|
|
@@ -495,6 +625,8 @@ module Stripe
|
|
|
495
625
|
attr_accessor :metadata
|
|
496
626
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
|
497
627
|
attr_accessor :on_behalf_of
|
|
628
|
+
# 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).
|
|
629
|
+
attr_accessor :pause_collection
|
|
498
630
|
# 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.
|
|
499
631
|
attr_accessor :proration_behavior
|
|
500
632
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
|
@@ -503,8 +635,12 @@ module Stripe
|
|
|
503
635
|
attr_accessor :transfer_data
|
|
504
636
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
|
505
637
|
attr_accessor :trial
|
|
638
|
+
# Specify trial behavior when crossing phase boundaries
|
|
639
|
+
attr_accessor :trial_continuation
|
|
506
640
|
# 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`
|
|
507
641
|
attr_accessor :trial_end
|
|
642
|
+
# Settings related to subscription trials.
|
|
643
|
+
attr_accessor :trial_settings
|
|
508
644
|
|
|
509
645
|
def initialize(
|
|
510
646
|
add_invoice_items: nil,
|
|
@@ -524,11 +660,14 @@ module Stripe
|
|
|
524
660
|
items: nil,
|
|
525
661
|
metadata: nil,
|
|
526
662
|
on_behalf_of: nil,
|
|
663
|
+
pause_collection: nil,
|
|
527
664
|
proration_behavior: nil,
|
|
528
665
|
start_date: nil,
|
|
529
666
|
transfer_data: nil,
|
|
530
667
|
trial: nil,
|
|
531
|
-
|
|
668
|
+
trial_continuation: nil,
|
|
669
|
+
trial_end: nil,
|
|
670
|
+
trial_settings: nil
|
|
532
671
|
)
|
|
533
672
|
@add_invoice_items = add_invoice_items
|
|
534
673
|
@application_fee_percent = application_fee_percent
|
|
@@ -547,11 +686,14 @@ module Stripe
|
|
|
547
686
|
@items = items
|
|
548
687
|
@metadata = metadata
|
|
549
688
|
@on_behalf_of = on_behalf_of
|
|
689
|
+
@pause_collection = pause_collection
|
|
550
690
|
@proration_behavior = proration_behavior
|
|
551
691
|
@start_date = start_date
|
|
552
692
|
@transfer_data = transfer_data
|
|
553
693
|
@trial = trial
|
|
694
|
+
@trial_continuation = trial_continuation
|
|
554
695
|
@trial_end = trial_end
|
|
696
|
+
@trial_settings = trial_settings
|
|
555
697
|
end
|
|
556
698
|
|
|
557
699
|
def self.field_encodings
|
|
@@ -573,6 +715,20 @@ module Stripe
|
|
|
573
715
|
}
|
|
574
716
|
end
|
|
575
717
|
end
|
|
718
|
+
|
|
719
|
+
class Prebilling < ::Stripe::RequestParams
|
|
720
|
+
# This is used to determine the number of billing cycles to prebill.
|
|
721
|
+
attr_accessor :iterations
|
|
722
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
723
|
+
attr_accessor :update_behavior
|
|
724
|
+
|
|
725
|
+
def initialize(iterations: nil, update_behavior: nil)
|
|
726
|
+
@iterations = iterations
|
|
727
|
+
@update_behavior = update_behavior
|
|
728
|
+
end
|
|
729
|
+
end
|
|
730
|
+
# 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.
|
|
731
|
+
attr_accessor :billing_behavior
|
|
576
732
|
# Object representing the subscription schedule's default settings.
|
|
577
733
|
attr_accessor :default_settings
|
|
578
734
|
# 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.
|
|
@@ -583,22 +739,28 @@ module Stripe
|
|
|
583
739
|
attr_accessor :metadata
|
|
584
740
|
# 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.
|
|
585
741
|
attr_accessor :phases
|
|
742
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
743
|
+
attr_accessor :prebilling
|
|
586
744
|
# 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`.
|
|
587
745
|
attr_accessor :proration_behavior
|
|
588
746
|
|
|
589
747
|
def initialize(
|
|
748
|
+
billing_behavior: nil,
|
|
590
749
|
default_settings: nil,
|
|
591
750
|
end_behavior: nil,
|
|
592
751
|
expand: nil,
|
|
593
752
|
metadata: nil,
|
|
594
753
|
phases: nil,
|
|
754
|
+
prebilling: nil,
|
|
595
755
|
proration_behavior: nil
|
|
596
756
|
)
|
|
757
|
+
@billing_behavior = billing_behavior
|
|
597
758
|
@default_settings = default_settings
|
|
598
759
|
@end_behavior = end_behavior
|
|
599
760
|
@expand = expand
|
|
600
761
|
@metadata = metadata
|
|
601
762
|
@phases = phases
|
|
763
|
+
@prebilling = prebilling
|
|
602
764
|
@proration_behavior = proration_behavior
|
|
603
765
|
end
|
|
604
766
|
|