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
|
@@ -5,16 +5,44 @@ module Stripe
|
|
|
5
5
|
class SubscriptionCreateParams < ::Stripe::RequestParams
|
|
6
6
|
class AddInvoiceItem < ::Stripe::RequestParams
|
|
7
7
|
class Discount < ::Stripe::RequestParams
|
|
8
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
9
|
+
class Duration < ::Stripe::RequestParams
|
|
10
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
11
|
+
attr_accessor :interval
|
|
12
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
13
|
+
attr_accessor :interval_count
|
|
14
|
+
|
|
15
|
+
def initialize(interval: nil, interval_count: nil)
|
|
16
|
+
@interval = interval
|
|
17
|
+
@interval_count = interval_count
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
# Time span for the redeemed discount.
|
|
21
|
+
attr_accessor :duration
|
|
22
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
23
|
+
attr_accessor :timestamp
|
|
24
|
+
# The type of calculation made to determine when the discount ends.
|
|
25
|
+
attr_accessor :type
|
|
26
|
+
|
|
27
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
28
|
+
@duration = duration
|
|
29
|
+
@timestamp = timestamp
|
|
30
|
+
@type = type
|
|
31
|
+
end
|
|
32
|
+
end
|
|
8
33
|
# ID of the coupon to create a new discount for.
|
|
9
34
|
attr_accessor :coupon
|
|
10
35
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
11
36
|
attr_accessor :discount
|
|
37
|
+
# Details to determine how long the discount should be applied for.
|
|
38
|
+
attr_accessor :discount_end
|
|
12
39
|
# ID of the promotion code to create a new discount for.
|
|
13
40
|
attr_accessor :promotion_code
|
|
14
41
|
|
|
15
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
42
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
16
43
|
@coupon = coupon
|
|
17
44
|
@discount = discount
|
|
45
|
+
@discount_end = discount_end
|
|
18
46
|
@promotion_code = promotion_code
|
|
19
47
|
end
|
|
20
48
|
end
|
|
@@ -257,16 +285,44 @@ module Stripe
|
|
|
257
285
|
end
|
|
258
286
|
|
|
259
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
|
|
260
313
|
# ID of the coupon to create a new discount for.
|
|
261
314
|
attr_accessor :coupon
|
|
262
315
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
263
316
|
attr_accessor :discount
|
|
317
|
+
# Details to determine how long the discount should be applied for.
|
|
318
|
+
attr_accessor :discount_end
|
|
264
319
|
# ID of the promotion code to create a new discount for.
|
|
265
320
|
attr_accessor :promotion_code
|
|
266
321
|
|
|
267
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
322
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
268
323
|
@coupon = coupon
|
|
269
324
|
@discount = discount
|
|
325
|
+
@discount_end = discount_end
|
|
270
326
|
@promotion_code = promotion_code
|
|
271
327
|
end
|
|
272
328
|
end
|
|
@@ -304,17 +360,57 @@ module Stripe
|
|
|
304
360
|
end
|
|
305
361
|
end
|
|
306
362
|
|
|
363
|
+
class CurrentTrial < ::Stripe::RequestParams
|
|
364
|
+
# Unix timestamp representing the end of the trial offer period. Required when the trial offer has `duration.type=timestamp`. Cannot be specified when `duration.type=relative`.
|
|
365
|
+
attr_accessor :trial_end
|
|
366
|
+
# The ID of the trial offer to apply to the subscription item.
|
|
367
|
+
attr_accessor :trial_offer
|
|
368
|
+
|
|
369
|
+
def initialize(trial_end: nil, trial_offer: nil)
|
|
370
|
+
@trial_end = trial_end
|
|
371
|
+
@trial_offer = trial_offer
|
|
372
|
+
end
|
|
373
|
+
end
|
|
374
|
+
|
|
307
375
|
class Discount < ::Stripe::RequestParams
|
|
376
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
377
|
+
class Duration < ::Stripe::RequestParams
|
|
378
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
379
|
+
attr_accessor :interval
|
|
380
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
381
|
+
attr_accessor :interval_count
|
|
382
|
+
|
|
383
|
+
def initialize(interval: nil, interval_count: nil)
|
|
384
|
+
@interval = interval
|
|
385
|
+
@interval_count = interval_count
|
|
386
|
+
end
|
|
387
|
+
end
|
|
388
|
+
# Time span for the redeemed discount.
|
|
389
|
+
attr_accessor :duration
|
|
390
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
391
|
+
attr_accessor :timestamp
|
|
392
|
+
# The type of calculation made to determine when the discount ends.
|
|
393
|
+
attr_accessor :type
|
|
394
|
+
|
|
395
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
396
|
+
@duration = duration
|
|
397
|
+
@timestamp = timestamp
|
|
398
|
+
@type = type
|
|
399
|
+
end
|
|
400
|
+
end
|
|
308
401
|
# ID of the coupon to create a new discount for.
|
|
309
402
|
attr_accessor :coupon
|
|
310
403
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
311
404
|
attr_accessor :discount
|
|
405
|
+
# Details to determine how long the discount should be applied for.
|
|
406
|
+
attr_accessor :discount_end
|
|
312
407
|
# ID of the promotion code to create a new discount for.
|
|
313
408
|
attr_accessor :promotion_code
|
|
314
409
|
|
|
315
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
410
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
316
411
|
@coupon = coupon
|
|
317
412
|
@discount = discount
|
|
413
|
+
@discount_end = discount_end
|
|
318
414
|
@promotion_code = promotion_code
|
|
319
415
|
end
|
|
320
416
|
end
|
|
@@ -364,8 +460,22 @@ module Stripe
|
|
|
364
460
|
@field_encodings = { unit_amount_decimal: :decimal_string }
|
|
365
461
|
end
|
|
366
462
|
end
|
|
463
|
+
|
|
464
|
+
class Trial < ::Stripe::RequestParams
|
|
465
|
+
# 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.
|
|
466
|
+
attr_accessor :converts_to
|
|
467
|
+
# Determines the type of trial for this item.
|
|
468
|
+
attr_accessor :type
|
|
469
|
+
|
|
470
|
+
def initialize(converts_to: nil, type: nil)
|
|
471
|
+
@converts_to = converts_to
|
|
472
|
+
@type = type
|
|
473
|
+
end
|
|
474
|
+
end
|
|
367
475
|
# 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.
|
|
368
476
|
attr_accessor :billing_thresholds
|
|
477
|
+
# The trial offer to apply to this subscription item.
|
|
478
|
+
attr_accessor :current_trial
|
|
369
479
|
# The coupons to redeem into discounts for the subscription item.
|
|
370
480
|
attr_accessor :discounts
|
|
371
481
|
# Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
@@ -380,18 +490,23 @@ module Stripe
|
|
|
380
490
|
attr_accessor :quantity
|
|
381
491
|
# 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.
|
|
382
492
|
attr_accessor :tax_rates
|
|
493
|
+
# Define options to configure the trial on the subscription item.
|
|
494
|
+
attr_accessor :trial
|
|
383
495
|
|
|
384
496
|
def initialize(
|
|
385
497
|
billing_thresholds: nil,
|
|
498
|
+
current_trial: nil,
|
|
386
499
|
discounts: nil,
|
|
387
500
|
metadata: nil,
|
|
388
501
|
plan: nil,
|
|
389
502
|
price: nil,
|
|
390
503
|
price_data: nil,
|
|
391
504
|
quantity: nil,
|
|
392
|
-
tax_rates: nil
|
|
505
|
+
tax_rates: nil,
|
|
506
|
+
trial: nil
|
|
393
507
|
)
|
|
394
508
|
@billing_thresholds = billing_thresholds
|
|
509
|
+
@current_trial = current_trial
|
|
395
510
|
@discounts = discounts
|
|
396
511
|
@metadata = metadata
|
|
397
512
|
@plan = plan
|
|
@@ -399,6 +514,7 @@ module Stripe
|
|
|
399
514
|
@price_data = price_data
|
|
400
515
|
@quantity = quantity
|
|
401
516
|
@tax_rates = tax_rates
|
|
517
|
+
@trial = trial
|
|
402
518
|
end
|
|
403
519
|
|
|
404
520
|
def self.field_encodings
|
|
@@ -439,6 +555,23 @@ module Stripe
|
|
|
439
555
|
end
|
|
440
556
|
end
|
|
441
557
|
|
|
558
|
+
class Blik < ::Stripe::RequestParams
|
|
559
|
+
class MandateOptions < ::Stripe::RequestParams
|
|
560
|
+
# Date when the mandate expires and no further payments will be charged. If not provided, the mandate will be set to be indefinite.
|
|
561
|
+
attr_accessor :expires_after
|
|
562
|
+
|
|
563
|
+
def initialize(expires_after: nil)
|
|
564
|
+
@expires_after = expires_after
|
|
565
|
+
end
|
|
566
|
+
end
|
|
567
|
+
# Configuration options for setting up a mandate
|
|
568
|
+
attr_accessor :mandate_options
|
|
569
|
+
|
|
570
|
+
def initialize(mandate_options: nil)
|
|
571
|
+
@mandate_options = mandate_options
|
|
572
|
+
end
|
|
573
|
+
end
|
|
574
|
+
|
|
442
575
|
class Card < ::Stripe::RequestParams
|
|
443
576
|
class MandateOptions < ::Stripe::RequestParams
|
|
444
577
|
# Amount to be charged for future payments, specified in the presentment currency.
|
|
@@ -499,6 +632,7 @@ module Stripe
|
|
|
499
632
|
end
|
|
500
633
|
end
|
|
501
634
|
|
|
635
|
+
class IdBankTransfer < ::Stripe::RequestParams; end
|
|
502
636
|
class Konbini < ::Stripe::RequestParams; end
|
|
503
637
|
|
|
504
638
|
class Payto < ::Stripe::RequestParams
|
|
@@ -588,9 +722,12 @@ module Stripe
|
|
|
588
722
|
class Filters < ::Stripe::RequestParams
|
|
589
723
|
# The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
|
|
590
724
|
attr_accessor :account_subcategories
|
|
725
|
+
# ID of the institution to use to filter for selectable accounts.
|
|
726
|
+
attr_accessor :institution
|
|
591
727
|
|
|
592
|
-
def initialize(account_subcategories: nil)
|
|
728
|
+
def initialize(account_subcategories: nil, institution: nil)
|
|
593
729
|
@account_subcategories = account_subcategories
|
|
730
|
+
@institution = institution
|
|
594
731
|
end
|
|
595
732
|
end
|
|
596
733
|
# Provide filters for the linked accounts that the customer can select for the payment method.
|
|
@@ -620,10 +757,14 @@ module Stripe
|
|
|
620
757
|
attr_accessor :acss_debit
|
|
621
758
|
# This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
|
|
622
759
|
attr_accessor :bancontact
|
|
760
|
+
# This sub-hash contains details about the Blik payment method options to pass to the invoice’s PaymentIntent.
|
|
761
|
+
attr_accessor :blik
|
|
623
762
|
# This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
|
|
624
763
|
attr_accessor :card
|
|
625
764
|
# This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
|
626
765
|
attr_accessor :customer_balance
|
|
766
|
+
# This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
|
|
767
|
+
attr_accessor :id_bank_transfer
|
|
627
768
|
# This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
|
|
628
769
|
attr_accessor :konbini
|
|
629
770
|
# This sub-hash contains details about the PayTo payment method options to pass to the invoice’s PaymentIntent.
|
|
@@ -640,8 +781,10 @@ module Stripe
|
|
|
640
781
|
def initialize(
|
|
641
782
|
acss_debit: nil,
|
|
642
783
|
bancontact: nil,
|
|
784
|
+
blik: nil,
|
|
643
785
|
card: nil,
|
|
644
786
|
customer_balance: nil,
|
|
787
|
+
id_bank_transfer: nil,
|
|
645
788
|
konbini: nil,
|
|
646
789
|
payto: nil,
|
|
647
790
|
pix: nil,
|
|
@@ -651,8 +794,10 @@ module Stripe
|
|
|
651
794
|
)
|
|
652
795
|
@acss_debit = acss_debit
|
|
653
796
|
@bancontact = bancontact
|
|
797
|
+
@blik = blik
|
|
654
798
|
@card = card
|
|
655
799
|
@customer_balance = customer_balance
|
|
800
|
+
@id_bank_transfer = id_bank_transfer
|
|
656
801
|
@konbini = konbini
|
|
657
802
|
@payto = payto
|
|
658
803
|
@pix = pix
|
|
@@ -691,6 +836,18 @@ module Stripe
|
|
|
691
836
|
end
|
|
692
837
|
end
|
|
693
838
|
|
|
839
|
+
class Prebilling < ::Stripe::RequestParams
|
|
840
|
+
# This is used to determine the number of billing cycles to prebill.
|
|
841
|
+
attr_accessor :iterations
|
|
842
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
|
843
|
+
attr_accessor :update_behavior
|
|
844
|
+
|
|
845
|
+
def initialize(iterations: nil, update_behavior: nil)
|
|
846
|
+
@iterations = iterations
|
|
847
|
+
@update_behavior = update_behavior
|
|
848
|
+
end
|
|
849
|
+
end
|
|
850
|
+
|
|
694
851
|
class TransferData < ::Stripe::RequestParams
|
|
695
852
|
# 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.
|
|
696
853
|
attr_accessor :amount_percent
|
|
@@ -705,10 +862,13 @@ module Stripe
|
|
|
705
862
|
|
|
706
863
|
class TrialSettings < ::Stripe::RequestParams
|
|
707
864
|
class EndBehavior < ::Stripe::RequestParams
|
|
865
|
+
# Indicates how the subscription's billing cycle anchor is reset when a trial ends. Defaults to `now`.
|
|
866
|
+
attr_accessor :billing_cycle_anchor
|
|
708
867
|
# Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
|
|
709
868
|
attr_accessor :missing_payment_method
|
|
710
869
|
|
|
711
|
-
def initialize(missing_payment_method: nil)
|
|
870
|
+
def initialize(billing_cycle_anchor: nil, missing_payment_method: nil)
|
|
871
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
|
712
872
|
@missing_payment_method = missing_payment_method
|
|
713
873
|
end
|
|
714
874
|
end
|
|
@@ -779,6 +939,8 @@ module Stripe
|
|
|
779
939
|
attr_accessor :payment_settings
|
|
780
940
|
# Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](/api/invoices/create) for the given subscription at the specified interval.
|
|
781
941
|
attr_accessor :pending_invoice_item_interval
|
|
942
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
|
943
|
+
attr_accessor :prebilling
|
|
782
944
|
# Determines how to handle [prorations](https://docs.stripe.com/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
|
|
783
945
|
attr_accessor :proration_behavior
|
|
784
946
|
# If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
|
|
@@ -823,6 +985,7 @@ module Stripe
|
|
|
823
985
|
payment_behavior: nil,
|
|
824
986
|
payment_settings: nil,
|
|
825
987
|
pending_invoice_item_interval: nil,
|
|
988
|
+
prebilling: nil,
|
|
826
989
|
proration_behavior: nil,
|
|
827
990
|
transfer_data: nil,
|
|
828
991
|
trial_end: nil,
|
|
@@ -860,6 +1023,7 @@ module Stripe
|
|
|
860
1023
|
@payment_behavior = payment_behavior
|
|
861
1024
|
@payment_settings = payment_settings
|
|
862
1025
|
@pending_invoice_item_interval = pending_invoice_item_interval
|
|
1026
|
+
@prebilling = prebilling
|
|
863
1027
|
@proration_behavior = proration_behavior
|
|
864
1028
|
@transfer_data = transfer_data
|
|
865
1029
|
@trial_end = trial_end
|
|
@@ -12,17 +12,57 @@ module Stripe
|
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
class CurrentTrial < ::Stripe::RequestParams
|
|
16
|
+
# Unix timestamp representing the end of the trial offer period. Required when the trial offer has `duration.type=timestamp`. Cannot be specified when `duration.type=relative`.
|
|
17
|
+
attr_accessor :trial_end
|
|
18
|
+
# The ID of the trial offer to apply to the subscription item.
|
|
19
|
+
attr_accessor :trial_offer
|
|
20
|
+
|
|
21
|
+
def initialize(trial_end: nil, trial_offer: nil)
|
|
22
|
+
@trial_end = trial_end
|
|
23
|
+
@trial_offer = trial_offer
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
15
27
|
class Discount < ::Stripe::RequestParams
|
|
28
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
29
|
+
class Duration < ::Stripe::RequestParams
|
|
30
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
31
|
+
attr_accessor :interval
|
|
32
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
33
|
+
attr_accessor :interval_count
|
|
34
|
+
|
|
35
|
+
def initialize(interval: nil, interval_count: nil)
|
|
36
|
+
@interval = interval
|
|
37
|
+
@interval_count = interval_count
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
# Time span for the redeemed discount.
|
|
41
|
+
attr_accessor :duration
|
|
42
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
43
|
+
attr_accessor :timestamp
|
|
44
|
+
# The type of calculation made to determine when the discount ends.
|
|
45
|
+
attr_accessor :type
|
|
46
|
+
|
|
47
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
48
|
+
@duration = duration
|
|
49
|
+
@timestamp = timestamp
|
|
50
|
+
@type = type
|
|
51
|
+
end
|
|
52
|
+
end
|
|
16
53
|
# ID of the coupon to create a new discount for.
|
|
17
54
|
attr_accessor :coupon
|
|
18
55
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
19
56
|
attr_accessor :discount
|
|
57
|
+
# Details to determine how long the discount should be applied for.
|
|
58
|
+
attr_accessor :discount_end
|
|
20
59
|
# ID of the promotion code to create a new discount for.
|
|
21
60
|
attr_accessor :promotion_code
|
|
22
61
|
|
|
23
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
62
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
24
63
|
@coupon = coupon
|
|
25
64
|
@discount = discount
|
|
65
|
+
@discount_end = discount_end
|
|
26
66
|
@promotion_code = promotion_code
|
|
27
67
|
end
|
|
28
68
|
end
|
|
@@ -72,8 +112,22 @@ module Stripe
|
|
|
72
112
|
@field_encodings = { unit_amount_decimal: :decimal_string }
|
|
73
113
|
end
|
|
74
114
|
end
|
|
115
|
+
|
|
116
|
+
class Trial < ::Stripe::RequestParams
|
|
117
|
+
# 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.
|
|
118
|
+
attr_accessor :converts_to
|
|
119
|
+
# Determines the type of trial for this item.
|
|
120
|
+
attr_accessor :type
|
|
121
|
+
|
|
122
|
+
def initialize(converts_to: nil, type: nil)
|
|
123
|
+
@converts_to = converts_to
|
|
124
|
+
@type = type
|
|
125
|
+
end
|
|
126
|
+
end
|
|
75
127
|
# 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.
|
|
76
128
|
attr_accessor :billing_thresholds
|
|
129
|
+
# The trial offer to apply to this subscription item.
|
|
130
|
+
attr_accessor :current_trial
|
|
77
131
|
# The coupons to redeem into discounts for the subscription item.
|
|
78
132
|
attr_accessor :discounts
|
|
79
133
|
# Specifies which fields in the response should be expanded.
|
|
@@ -98,9 +152,12 @@ module Stripe
|
|
|
98
152
|
attr_accessor :subscription
|
|
99
153
|
# 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.
|
|
100
154
|
attr_accessor :tax_rates
|
|
155
|
+
# Options that configure the trial on the subscription item.
|
|
156
|
+
attr_accessor :trial
|
|
101
157
|
|
|
102
158
|
def initialize(
|
|
103
159
|
billing_thresholds: nil,
|
|
160
|
+
current_trial: nil,
|
|
104
161
|
discounts: nil,
|
|
105
162
|
expand: nil,
|
|
106
163
|
metadata: nil,
|
|
@@ -112,9 +169,11 @@ module Stripe
|
|
|
112
169
|
proration_date: nil,
|
|
113
170
|
quantity: nil,
|
|
114
171
|
subscription: nil,
|
|
115
|
-
tax_rates: nil
|
|
172
|
+
tax_rates: nil,
|
|
173
|
+
trial: nil
|
|
116
174
|
)
|
|
117
175
|
@billing_thresholds = billing_thresholds
|
|
176
|
+
@current_trial = current_trial
|
|
118
177
|
@discounts = discounts
|
|
119
178
|
@expand = expand
|
|
120
179
|
@metadata = metadata
|
|
@@ -127,6 +186,7 @@ module Stripe
|
|
|
127
186
|
@quantity = quantity
|
|
128
187
|
@subscription = subscription
|
|
129
188
|
@tax_rates = tax_rates
|
|
189
|
+
@trial = trial
|
|
130
190
|
end
|
|
131
191
|
|
|
132
192
|
def self.field_encodings
|
|
@@ -12,17 +12,57 @@ module Stripe
|
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
class CurrentTrial < ::Stripe::RequestParams
|
|
16
|
+
# Unix timestamp representing the end of the trial offer period. Required when the trial offer has `duration.type=timestamp`. Cannot be specified when `duration.type=relative`.
|
|
17
|
+
attr_accessor :trial_end
|
|
18
|
+
# The ID of the trial offer to apply to the subscription item.
|
|
19
|
+
attr_accessor :trial_offer
|
|
20
|
+
|
|
21
|
+
def initialize(trial_end: nil, trial_offer: nil)
|
|
22
|
+
@trial_end = trial_end
|
|
23
|
+
@trial_offer = trial_offer
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
15
27
|
class Discount < ::Stripe::RequestParams
|
|
28
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
29
|
+
class Duration < ::Stripe::RequestParams
|
|
30
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
31
|
+
attr_accessor :interval
|
|
32
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
33
|
+
attr_accessor :interval_count
|
|
34
|
+
|
|
35
|
+
def initialize(interval: nil, interval_count: nil)
|
|
36
|
+
@interval = interval
|
|
37
|
+
@interval_count = interval_count
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
# Time span for the redeemed discount.
|
|
41
|
+
attr_accessor :duration
|
|
42
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
43
|
+
attr_accessor :timestamp
|
|
44
|
+
# The type of calculation made to determine when the discount ends.
|
|
45
|
+
attr_accessor :type
|
|
46
|
+
|
|
47
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
48
|
+
@duration = duration
|
|
49
|
+
@timestamp = timestamp
|
|
50
|
+
@type = type
|
|
51
|
+
end
|
|
52
|
+
end
|
|
16
53
|
# ID of the coupon to create a new discount for.
|
|
17
54
|
attr_accessor :coupon
|
|
18
55
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
19
56
|
attr_accessor :discount
|
|
57
|
+
# Details to determine how long the discount should be applied for.
|
|
58
|
+
attr_accessor :discount_end
|
|
20
59
|
# ID of the promotion code to create a new discount for.
|
|
21
60
|
attr_accessor :promotion_code
|
|
22
61
|
|
|
23
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
62
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
24
63
|
@coupon = coupon
|
|
25
64
|
@discount = discount
|
|
65
|
+
@discount_end = discount_end
|
|
26
66
|
@promotion_code = promotion_code
|
|
27
67
|
end
|
|
28
68
|
end
|
|
@@ -74,6 +114,8 @@ module Stripe
|
|
|
74
114
|
end
|
|
75
115
|
# 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.
|
|
76
116
|
attr_accessor :billing_thresholds
|
|
117
|
+
# The trial offer to apply to this subscription item.
|
|
118
|
+
attr_accessor :current_trial
|
|
77
119
|
# The coupons to redeem into discounts for the subscription item.
|
|
78
120
|
attr_accessor :discounts
|
|
79
121
|
# Specifies which fields in the response should be expanded.
|
|
@@ -101,6 +143,7 @@ module Stripe
|
|
|
101
143
|
|
|
102
144
|
def initialize(
|
|
103
145
|
billing_thresholds: nil,
|
|
146
|
+
current_trial: nil,
|
|
104
147
|
discounts: nil,
|
|
105
148
|
expand: nil,
|
|
106
149
|
metadata: nil,
|
|
@@ -115,6 +158,7 @@ module Stripe
|
|
|
115
158
|
tax_rates: nil
|
|
116
159
|
)
|
|
117
160
|
@billing_thresholds = billing_thresholds
|
|
161
|
+
@current_trial = current_trial
|
|
118
162
|
@discounts = discounts
|
|
119
163
|
@expand = expand
|
|
120
164
|
@metadata = metadata
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
class SubscriptionPauseParams < ::Stripe::RequestParams
|
|
6
|
+
class BillFor < ::Stripe::RequestParams
|
|
7
|
+
class OutstandingUsageThrough < ::Stripe::RequestParams
|
|
8
|
+
# When to bill metered usage in the current period.
|
|
9
|
+
attr_accessor :type
|
|
10
|
+
|
|
11
|
+
def initialize(type: nil)
|
|
12
|
+
@type = type
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
class UnusedTimeFrom < ::Stripe::RequestParams
|
|
17
|
+
# When to credit for unused time.
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
def initialize(type: nil)
|
|
21
|
+
@type = type
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
# Controls when to bill for metered usage in the current period. Defaults to `{ type: "now" }`.
|
|
25
|
+
attr_accessor :outstanding_usage_through
|
|
26
|
+
# Controls when to credit for unused time on licensed items. Defaults to `{ type: "now" }`.
|
|
27
|
+
attr_accessor :unused_time_from
|
|
28
|
+
|
|
29
|
+
def initialize(outstanding_usage_through: nil, unused_time_from: nil)
|
|
30
|
+
@outstanding_usage_through = outstanding_usage_through
|
|
31
|
+
@unused_time_from = unused_time_from
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
# Controls what to bill for when pausing the subscription.
|
|
35
|
+
attr_accessor :bill_for
|
|
36
|
+
# Specifies which fields in the response should be expanded.
|
|
37
|
+
attr_accessor :expand
|
|
38
|
+
# Determines how to handle debits and credits when pausing. The default is `pending_invoice_item`.
|
|
39
|
+
attr_accessor :invoicing_behavior
|
|
40
|
+
# The type of pause to apply. Defaults to `subscription`.
|
|
41
|
+
attr_accessor :type
|
|
42
|
+
|
|
43
|
+
def initialize(bill_for: nil, expand: nil, invoicing_behavior: nil, type: nil)
|
|
44
|
+
@bill_for = bill_for
|
|
45
|
+
@expand = expand
|
|
46
|
+
@invoicing_behavior = invoicing_behavior
|
|
47
|
+
@type = type
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -7,6 +7,8 @@ module Stripe
|
|
|
7
7
|
attr_accessor :billing_cycle_anchor
|
|
8
8
|
# Specifies which fields in the response should be expanded.
|
|
9
9
|
attr_accessor :expand
|
|
10
|
+
# Controls whether Stripe attempts payment on the resumption invoice in the resume request, and how payment on that invoice affects the subscription's status. The default is `resume_on_payment_attempt`.
|
|
11
|
+
attr_accessor :payment_behavior
|
|
10
12
|
# Determines how to handle [prorations](https://docs.stripe.com/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor` being `unchanged`. When the `billing_cycle_anchor` is set to `now` (default value), no prorations are generated. If no value is passed, the default is `create_prorations`.
|
|
11
13
|
attr_accessor :proration_behavior
|
|
12
14
|
# If set, prorations will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint.
|
|
@@ -15,11 +17,13 @@ module Stripe
|
|
|
15
17
|
def initialize(
|
|
16
18
|
billing_cycle_anchor: nil,
|
|
17
19
|
expand: nil,
|
|
20
|
+
payment_behavior: nil,
|
|
18
21
|
proration_behavior: nil,
|
|
19
22
|
proration_date: nil
|
|
20
23
|
)
|
|
21
24
|
@billing_cycle_anchor = billing_cycle_anchor
|
|
22
25
|
@expand = expand
|
|
26
|
+
@payment_behavior = payment_behavior
|
|
23
27
|
@proration_behavior = proration_behavior
|
|
24
28
|
@proration_date = proration_date
|
|
25
29
|
end
|