stripe 16.0.0 → 16.1.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 +35 -3
- data/lib/stripe/api_version.rb +1 -2
- data/lib/stripe/errors.rb +63 -0
- data/lib/stripe/event_types.rb +236 -0
- data/lib/stripe/events/v2_billing_bill_setting_updated_event.rb +61 -0
- data/lib/stripe/events/v2_core_account_closed_event.rb +44 -0
- data/lib/stripe/events/v2_core_account_created_event.rb +44 -0
- data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +63 -0
- data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +44 -0
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +63 -0
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +44 -0
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +63 -0
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +44 -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_account_including_defaults_updated_event.rb +44 -0
- data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +44 -0
- data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +44 -0
- data/lib/stripe/events/v2_core_account_link_returned_event.rb +42 -0
- data/lib/stripe/events/v2_core_account_person_created_event.rb +61 -0
- data/lib/stripe/events/v2_core_account_person_deleted_event.rb +61 -0
- data/lib/stripe/events/v2_core_account_person_updated_event.rb +61 -0
- data/lib/stripe/events/v2_core_account_updated_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_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 +44 -0
- data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +44 -0
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +44 -0
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +46 -0
- data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +44 -0
- data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +44 -0
- data/lib/stripe/events/v2_payments_off_session_payment_requires_capture_event.rb +44 -0
- data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +44 -0
- data/lib/stripe/object_types.rb +58 -0
- data/lib/stripe/params/account_create_params.rb +300 -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 +262 -0
- data/lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb +65 -0
- data/lib/stripe/params/billing/credit_balance_summary_retrieve_params.rb +4 -1
- data/lib/stripe/params/billing/credit_balance_transaction_list_params.rb +4 -0
- data/lib/stripe/params/billing/credit_grant_create_params.rb +4 -0
- data/lib/stripe/params/billing/credit_grant_list_params.rb +4 -0
- data/lib/stripe/params/billing_portal/session_create_params.rb +4 -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 +709 -0
- data/lib/stripe/params/charge_update_params.rb +709 -0
- data/lib/stripe/params/checkout/session_create_params.rb +193 -3
- data/lib/stripe/params/checkout/session_list_params.rb +4 -0
- data/lib/stripe/params/checkout/session_update_params.rb +288 -1
- data/lib/stripe/params/confirmation_token_create_params.rb +97 -0
- data/lib/stripe/params/coupon_create_params.rb +17 -1
- data/lib/stripe/params/credit_note_list_params.rb +4 -0
- data/lib/stripe/params/customer_session_create_params.rb +4 -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/account_list_params.rb +4 -1
- 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 +34 -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/identity/verification_session_create_params.rb +4 -0
- data/lib/stripe/params/identity/verification_session_list_params.rb +4 -0
- data/lib/stripe/params/invoice_add_lines_params.rb +33 -1
- data/lib/stripe/params/invoice_attach_payment_params.rb +46 -1
- data/lib/stripe/params/invoice_create_params.rb +112 -2
- data/lib/stripe/params/invoice_create_preview_params.rb +826 -9
- data/lib/stripe/params/invoice_item_create_params.rb +37 -1
- data/lib/stripe/params/invoice_item_list_params.rb +4 -0
- data/lib/stripe/params/invoice_item_update_params.rb +33 -1
- data/lib/stripe/params/invoice_line_item_update_params.rb +33 -1
- data/lib/stripe/params/invoice_list_params.rb +4 -0
- data/lib/stripe/params/invoice_payment_list_params.rb +4 -1
- data/lib/stripe/params/invoice_update_lines_params.rb +33 -1
- data/lib/stripe/params/invoice_update_params.rb +108 -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_cancel_params.rb +13 -0
- data/lib/stripe/params/order_create_params.rb +1124 -0
- data/lib/stripe/params/order_line_item_list_params.rb +22 -0
- data/lib/stripe/params/order_list_line_items_params.rb +22 -0
- data/lib/stripe/params/order_list_params.rb +25 -0
- data/lib/stripe/params/order_reopen_params.rb +13 -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 +1128 -0
- data/lib/stripe/params/payment_attempt_record_list_params.rb +19 -0
- data/lib/stripe/params/payment_attempt_record_retrieve_params.rb +13 -0
- data/lib/stripe/params/payment_intent_amount_details_line_item_list_params.rb +22 -0
- data/lib/stripe/params/payment_intent_capture_params.rb +895 -0
- data/lib/stripe/params/payment_intent_confirm_params.rb +1373 -7
- data/lib/stripe/params/payment_intent_create_params.rb +1387 -13
- data/lib/stripe/params/payment_intent_decrement_authorization_params.rb +73 -0
- data/lib/stripe/params/payment_intent_increment_authorization_params.rb +223 -0
- data/lib/stripe/params/payment_intent_list_params.rb +4 -0
- data/lib/stripe/params/payment_intent_trigger_action_params.rb +27 -0
- data/lib/stripe/params/payment_intent_update_params.rb +1409 -4
- data/lib/stripe/params/payment_method_attach_params.rb +4 -1
- data/lib/stripe/params/payment_method_configuration_create_params.rb +126 -0
- data/lib/stripe/params/payment_method_configuration_update_params.rb +126 -0
- data/lib/stripe/params/payment_method_create_params.rb +97 -0
- data/lib/stripe/params/payment_method_update_params.rb +19 -0
- data/lib/stripe/params/payment_record_report_payment_attempt_canceled_params.rb +19 -0
- data/lib/stripe/params/payment_record_report_payment_attempt_failed_params.rb +19 -0
- data/lib/stripe/params/payment_record_report_payment_attempt_guaranteed_params.rb +19 -0
- data/lib/stripe/params/payment_record_report_payment_attempt_informational_params.rb +93 -0
- data/lib/stripe/params/payment_record_report_payment_attempt_params.rb +186 -0
- data/lib/stripe/params/payment_record_report_payment_params.rb +252 -0
- data/lib/stripe/params/payment_record_retrieve_params.rb +13 -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/promotion_code_create_params.rb +4 -0
- data/lib/stripe/params/promotion_code_list_params.rb +4 -0
- data/lib/stripe/params/quote_create_params.rb +805 -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 +8 -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 +813 -4
- data/lib/stripe/params/setup_intent_confirm_params.rb +225 -3
- data/lib/stripe/params/setup_intent_create_params.rb +231 -3
- data/lib/stripe/params/setup_intent_list_params.rb +4 -0
- data/lib/stripe/params/setup_intent_update_params.rb +231 -3
- data/lib/stripe/params/subscription_attach_cadence_params.rb +16 -0
- data/lib/stripe/params/subscription_create_params.rb +259 -5
- data/lib/stripe/params/subscription_item_create_params.rb +46 -2
- data/lib/stripe/params/subscription_item_update_params.rb +29 -1
- data/lib/stripe/params/subscription_list_params.rb +4 -0
- data/lib/stripe/params/subscription_schedule_amend_params.rb +570 -0
- data/lib/stripe/params/subscription_schedule_create_params.rb +167 -5
- data/lib/stripe/params/subscription_schedule_list_params.rb +4 -0
- data/lib/stripe/params/subscription_schedule_update_params.rb +163 -5
- data/lib/stripe/params/subscription_update_params.rb +238 -4
- data/lib/stripe/params/tax/association_find_params.rb +18 -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_id_create_params.rb +4 -1
- data/lib/stripe/params/tax_id_list_params.rb +4 -1
- 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/onboarding_link_create_params.rb +43 -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 +97 -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_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 +223 -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 +229 -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_close_params.rb +17 -0
- data/lib/stripe/params/v2/core/account_create_params.rb +2217 -0
- data/lib/stripe/params/v2/core/account_link_create_params.rb +101 -0
- data/lib/stripe/params/v2/core/account_list_params.rb +20 -0
- data/lib/stripe/params/v2/core/account_retrieve_params.rb +17 -0
- data/lib/stripe/params/v2/core/account_update_params.rb +2245 -0
- data/lib/stripe/params/v2/core/accounts/person_create_params.rb +493 -0
- data/lib/stripe/params/v2/core/accounts/person_delete_params.rb +12 -0
- data/lib/stripe/params/v2/core/accounts/person_list_params.rb +19 -0
- data/lib/stripe/params/v2/core/accounts/person_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/core/accounts/person_update_params.rb +493 -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 +50 -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_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_create_params.rb +33 -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_update_params.rb +22 -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_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 +98 -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 +85 -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 +80 -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/payments/off_session_payment_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/payments/off_session_payment_capture_params.rb +61 -0
- data/lib/stripe/params/v2/payments/off_session_payment_create_params.rb +237 -0
- data/lib/stripe/params/v2/payments/off_session_payment_list_params.rb +17 -0
- data/lib/stripe/params/v2/payments/off_session_payment_retrieve_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 +169 -0
- data/lib/stripe/request_options.rb +3 -1
- data/lib/stripe/resources/account.rb +166 -1
- data/lib/stripe/resources/account_notice.rb +94 -0
- data/lib/stripe/resources/account_session.rb +81 -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/billing/credit_balance_summary.rb +2 -0
- data/lib/stripe/resources/billing/credit_grant.rb +2 -0
- data/lib/stripe/resources/billing_portal/session.rb +2 -0
- data/lib/stripe/resources/capital/financing_offer.rb +142 -0
- data/lib/stripe/resources/capital/financing_summary.rb +79 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +99 -0
- data/lib/stripe/resources/card.rb +2 -0
- data/lib/stripe/resources/cash_balance.rb +2 -0
- data/lib/stripe/resources/charge.rb +234 -1
- data/lib/stripe/resources/checkout/session.rb +154 -4
- data/lib/stripe/resources/confirmation_token.rb +155 -0
- data/lib/stripe/resources/coupon.rb +26 -1
- data/lib/stripe/resources/credit_note.rb +2 -0
- data/lib/stripe/resources/credit_note_line_item.rb +18 -0
- data/lib/stripe/resources/customer.rb +2 -0
- data/lib/stripe/resources/customer_balance_transaction.rb +2 -0
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +2 -0
- data/lib/stripe/resources/customer_session.rb +2 -0
- data/lib/stripe/resources/discount.rb +2 -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 +27 -0
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +35 -0
- data/lib/stripe/resources/financial_connections/institution.rb +127 -0
- data/lib/stripe/resources/financial_connections/session.rb +67 -1
- data/lib/stripe/resources/fx_quote.rb +147 -0
- data/lib/stripe/resources/identity/verification_session.rb +2 -0
- data/lib/stripe/resources/invoice.rb +152 -1
- data/lib/stripe/resources/invoice_item.rb +4 -0
- data/lib/stripe/resources/invoice_line_item.rb +40 -0
- data/lib/stripe/resources/invoice_payment.rb +2 -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 +68 -1
- data/lib/stripe/resources/mandate.rb +71 -0
- data/lib/stripe/resources/margin.rb +64 -0
- data/lib/stripe/resources/order.rb +987 -0
- data/lib/stripe/resources/payment_attempt_record.rb +2102 -0
- data/lib/stripe/resources/payment_intent.rb +848 -4
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +128 -0
- data/lib/stripe/resources/payment_method.rb +157 -0
- data/lib/stripe/resources/payment_method_configuration.rb +204 -0
- data/lib/stripe/resources/payment_record.rb +2208 -0
- data/lib/stripe/resources/price.rb +20 -0
- data/lib/stripe/resources/privacy/redaction_job.rb +187 -0
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +49 -0
- data/lib/stripe/resources/promotion_code.rb +2 -0
- data/lib/stripe/resources/quote.rb +571 -2
- data/lib/stripe/resources/quote_line.rb +521 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +1150 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +732 -0
- data/lib/stripe/resources/refund.rb +18 -0
- data/lib/stripe/resources/setup_attempt.rb +63 -0
- data/lib/stripe/resources/setup_intent.rb +132 -1
- data/lib/stripe/resources/source.rb +38 -0
- data/lib/stripe/resources/subscription.rb +232 -0
- data/lib/stripe/resources/subscription_item.rb +20 -1
- data/lib/stripe/resources/subscription_schedule.rb +198 -3
- data/lib/stripe/resources/tax/association.rb +86 -0
- data/lib/stripe/resources/tax/form.rb +264 -0
- data/lib/stripe/resources/tax_id.rb +4 -0
- data/lib/stripe/resources/terminal/configuration.rb +16 -0
- data/lib/stripe/resources/terminal/onboarding_link.rb +71 -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_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 +90 -0
- data/lib/stripe/resources/v2/billing/cadence.rb +609 -0
- data/lib/stripe/resources/v2/billing/collection_setting.rb +274 -0
- data/lib/stripe/resources/v2/billing/collection_setting_version.rb +262 -0
- data/lib/stripe/resources/v2/billing/profile.rb +46 -0
- data/lib/stripe/resources/v2/core/account.rb +3851 -0
- data/lib/stripe/resources/v2/core/account_link.rb +123 -0
- data/lib/stripe/resources/v2/core/account_person.rb +477 -0
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +114 -0
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +47 -0
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +28 -0
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +30 -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 +132 -0
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +148 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +217 -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 +109 -0
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +81 -0
- data/lib/stripe/resources/v2/money_management/received_credit.rb +228 -0
- data/lib/stripe/resources/v2/money_management/received_debit.rb +136 -0
- data/lib/stripe/resources/v2/money_management/transaction.rb +116 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +105 -0
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +242 -0
- data/lib/stripe/resources.rb +116 -0
- data/lib/stripe/services/account_notice_service.rb +39 -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/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/institution_service.rb +30 -0
- data/lib/stripe/services/financial_connections_service.rb +2 -1
- data/lib/stripe/services/fx_quote_service.rb +27 -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_line_item_service.rb +17 -0
- data/lib/stripe/services/order_service.rb +78 -0
- data/lib/stripe/services/payment_attempt_record_service.rb +28 -0
- data/lib/stripe/services/payment_intent_amount_details_line_item_service.rb +17 -0
- data/lib/stripe/services/payment_intent_service.rb +44 -0
- data/lib/stripe/services/payment_record_service.rb +89 -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/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/subscription_schedule_service.rb +11 -0
- data/lib/stripe/services/subscription_service.rb +11 -0
- data/lib/stripe/services/tax/association_service.rb +19 -0
- data/lib/stripe/services/tax/form_service.rb +37 -0
- data/lib/stripe/services/tax_service.rb +3 -1
- data/lib/stripe/services/terminal/onboarding_link_service.rb +19 -0
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +19 -0
- data/lib/stripe/services/terminal_service.rb +3 -1
- data/lib/stripe/services/v1_services.rb +10 -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 +61 -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/account_link_service.rb +21 -0
- data/lib/stripe/services/v2/core/account_service.rb +76 -0
- data/lib/stripe/services/v2/core/accounts/person_service.rb +67 -0
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +74 -0
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +68 -0
- data/lib/stripe/services/v2/core/vault_service.rb +18 -0
- data/lib/stripe/services/v2/core_service.rb +4 -1
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +59 -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 +73 -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 +63 -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/payment_service.rb +15 -0
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +65 -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 +4 -1
- data/lib/stripe/services.rb +61 -0
- data/lib/stripe/stripe_client.rb +1 -1
- data/lib/stripe/stripe_configuration.rb +9 -2
- data/lib/stripe/stripe_object.rb +9 -9
- data/lib/stripe/util.rb +9 -3
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +53 -0
- data/rbi/stripe.rbi +155102 -90522
- metadata +351 -5
@@ -144,32 +144,88 @@ module Stripe
|
|
144
144
|
end
|
145
145
|
|
146
146
|
class Discount < Stripe::RequestParams
|
147
|
+
class DiscountEnd < Stripe::RequestParams
|
148
|
+
class Duration < Stripe::RequestParams
|
149
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
150
|
+
attr_accessor :interval
|
151
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
152
|
+
attr_accessor :interval_count
|
153
|
+
|
154
|
+
def initialize(interval: nil, interval_count: nil)
|
155
|
+
@interval = interval
|
156
|
+
@interval_count = interval_count
|
157
|
+
end
|
158
|
+
end
|
159
|
+
# Time span for the redeemed discount.
|
160
|
+
attr_accessor :duration
|
161
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
162
|
+
attr_accessor :timestamp
|
163
|
+
# The type of calculation made to determine when the discount ends.
|
164
|
+
attr_accessor :type
|
165
|
+
|
166
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
167
|
+
@duration = duration
|
168
|
+
@timestamp = timestamp
|
169
|
+
@type = type
|
170
|
+
end
|
171
|
+
end
|
147
172
|
# ID of the coupon to create a new discount for.
|
148
173
|
attr_accessor :coupon
|
149
174
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
150
175
|
attr_accessor :discount
|
176
|
+
# Details to determine how long the discount should be applied for.
|
177
|
+
attr_accessor :discount_end
|
151
178
|
# ID of the promotion code to create a new discount for.
|
152
179
|
attr_accessor :promotion_code
|
153
180
|
|
154
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
181
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
155
182
|
@coupon = coupon
|
156
183
|
@discount = discount
|
184
|
+
@discount_end = discount_end
|
157
185
|
@promotion_code = promotion_code
|
158
186
|
end
|
159
187
|
end
|
160
188
|
|
161
189
|
class InvoiceItem < Stripe::RequestParams
|
162
190
|
class Discount < Stripe::RequestParams
|
191
|
+
class DiscountEnd < Stripe::RequestParams
|
192
|
+
class Duration < Stripe::RequestParams
|
193
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
194
|
+
attr_accessor :interval
|
195
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
196
|
+
attr_accessor :interval_count
|
197
|
+
|
198
|
+
def initialize(interval: nil, interval_count: nil)
|
199
|
+
@interval = interval
|
200
|
+
@interval_count = interval_count
|
201
|
+
end
|
202
|
+
end
|
203
|
+
# Time span for the redeemed discount.
|
204
|
+
attr_accessor :duration
|
205
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
206
|
+
attr_accessor :timestamp
|
207
|
+
# The type of calculation made to determine when the discount ends.
|
208
|
+
attr_accessor :type
|
209
|
+
|
210
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
211
|
+
@duration = duration
|
212
|
+
@timestamp = timestamp
|
213
|
+
@type = type
|
214
|
+
end
|
215
|
+
end
|
163
216
|
# ID of the coupon to create a new discount for.
|
164
217
|
attr_accessor :coupon
|
165
218
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
166
219
|
attr_accessor :discount
|
220
|
+
# Details to determine how long the discount should be applied for.
|
221
|
+
attr_accessor :discount_end
|
167
222
|
# ID of the promotion code to create a new discount for.
|
168
223
|
attr_accessor :promotion_code
|
169
224
|
|
170
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
225
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
171
226
|
@coupon = coupon
|
172
227
|
@discount = discount
|
228
|
+
@discount_end = discount_end
|
173
229
|
@promotion_code = promotion_code
|
174
230
|
end
|
175
231
|
end
|
@@ -295,6 +351,458 @@ module Stripe
|
|
295
351
|
end
|
296
352
|
|
297
353
|
class ScheduleDetails < Stripe::RequestParams
|
354
|
+
class Amendment < Stripe::RequestParams
|
355
|
+
class AmendmentEnd < Stripe::RequestParams
|
356
|
+
class DiscountEnd < Stripe::RequestParams
|
357
|
+
# The ID of a specific discount.
|
358
|
+
attr_accessor :discount
|
359
|
+
|
360
|
+
def initialize(discount: nil)
|
361
|
+
@discount = discount
|
362
|
+
end
|
363
|
+
end
|
364
|
+
|
365
|
+
class Duration < Stripe::RequestParams
|
366
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
367
|
+
attr_accessor :interval
|
368
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
369
|
+
attr_accessor :interval_count
|
370
|
+
|
371
|
+
def initialize(interval: nil, interval_count: nil)
|
372
|
+
@interval = interval
|
373
|
+
@interval_count = interval_count
|
374
|
+
end
|
375
|
+
end
|
376
|
+
# Use the `end` time of a given discount.
|
377
|
+
attr_accessor :discount_end
|
378
|
+
# Time span for the amendment starting from the `amendment_start`.
|
379
|
+
attr_accessor :duration
|
380
|
+
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
381
|
+
attr_accessor :timestamp
|
382
|
+
# Select one of three ways to pass the `amendment_end`.
|
383
|
+
attr_accessor :type
|
384
|
+
|
385
|
+
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
386
|
+
@discount_end = discount_end
|
387
|
+
@duration = duration
|
388
|
+
@timestamp = timestamp
|
389
|
+
@type = type
|
390
|
+
end
|
391
|
+
end
|
392
|
+
|
393
|
+
class AmendmentStart < Stripe::RequestParams
|
394
|
+
class AmendmentEnd < Stripe::RequestParams
|
395
|
+
# The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array.
|
396
|
+
attr_accessor :index
|
397
|
+
|
398
|
+
def initialize(index: nil)
|
399
|
+
@index = index
|
400
|
+
end
|
401
|
+
end
|
402
|
+
|
403
|
+
class DiscountEnd < Stripe::RequestParams
|
404
|
+
# The ID of a specific discount.
|
405
|
+
attr_accessor :discount
|
406
|
+
|
407
|
+
def initialize(discount: nil)
|
408
|
+
@discount = discount
|
409
|
+
end
|
410
|
+
end
|
411
|
+
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
412
|
+
attr_accessor :amendment_end
|
413
|
+
# Use the `end` time of a given discount.
|
414
|
+
attr_accessor :discount_end
|
415
|
+
# A precise Unix timestamp for the amendment to start.
|
416
|
+
attr_accessor :timestamp
|
417
|
+
# Select one of three ways to pass the `amendment_start`.
|
418
|
+
attr_accessor :type
|
419
|
+
|
420
|
+
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
421
|
+
@amendment_end = amendment_end
|
422
|
+
@discount_end = discount_end
|
423
|
+
@timestamp = timestamp
|
424
|
+
@type = type
|
425
|
+
end
|
426
|
+
end
|
427
|
+
|
428
|
+
class DiscountAction < Stripe::RequestParams
|
429
|
+
class Add < Stripe::RequestParams
|
430
|
+
class DiscountEnd < Stripe::RequestParams
|
431
|
+
# The type of calculation made to determine when the discount ends.
|
432
|
+
attr_accessor :type
|
433
|
+
|
434
|
+
def initialize(type: nil)
|
435
|
+
@type = type
|
436
|
+
end
|
437
|
+
end
|
438
|
+
# The coupon code to redeem.
|
439
|
+
attr_accessor :coupon
|
440
|
+
# An ID of an existing discount for a coupon that was already redeemed.
|
441
|
+
attr_accessor :discount
|
442
|
+
# Details to determine how long the discount should be applied for.
|
443
|
+
attr_accessor :discount_end
|
444
|
+
# The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
|
445
|
+
attr_accessor :index
|
446
|
+
# The promotion code to redeem.
|
447
|
+
attr_accessor :promotion_code
|
448
|
+
|
449
|
+
def initialize(
|
450
|
+
coupon: nil,
|
451
|
+
discount: nil,
|
452
|
+
discount_end: nil,
|
453
|
+
index: nil,
|
454
|
+
promotion_code: nil
|
455
|
+
)
|
456
|
+
@coupon = coupon
|
457
|
+
@discount = discount
|
458
|
+
@discount_end = discount_end
|
459
|
+
@index = index
|
460
|
+
@promotion_code = promotion_code
|
461
|
+
end
|
462
|
+
end
|
463
|
+
|
464
|
+
class Remove < Stripe::RequestParams
|
465
|
+
# The coupon code to remove from the `discounts` array.
|
466
|
+
attr_accessor :coupon
|
467
|
+
# The ID of a discount to remove from the `discounts` array.
|
468
|
+
attr_accessor :discount
|
469
|
+
# The ID of a promotion code to remove from the `discounts` array.
|
470
|
+
attr_accessor :promotion_code
|
471
|
+
|
472
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
473
|
+
@coupon = coupon
|
474
|
+
@discount = discount
|
475
|
+
@promotion_code = promotion_code
|
476
|
+
end
|
477
|
+
end
|
478
|
+
|
479
|
+
class Set < Stripe::RequestParams
|
480
|
+
# The coupon code to replace the `discounts` array with.
|
481
|
+
attr_accessor :coupon
|
482
|
+
# An ID of an existing discount to replace the `discounts` array with.
|
483
|
+
attr_accessor :discount
|
484
|
+
# An ID of an existing promotion code to replace the `discounts` array with.
|
485
|
+
attr_accessor :promotion_code
|
486
|
+
|
487
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
488
|
+
@coupon = coupon
|
489
|
+
@discount = discount
|
490
|
+
@promotion_code = promotion_code
|
491
|
+
end
|
492
|
+
end
|
493
|
+
# Details of the discount to add.
|
494
|
+
attr_accessor :add
|
495
|
+
# Details of the discount to remove.
|
496
|
+
attr_accessor :remove
|
497
|
+
# Details of the discount to replace the existing discounts with.
|
498
|
+
attr_accessor :set
|
499
|
+
# Determines the type of discount action.
|
500
|
+
attr_accessor :type
|
501
|
+
|
502
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
503
|
+
@add = add
|
504
|
+
@remove = remove
|
505
|
+
@set = set
|
506
|
+
@type = type
|
507
|
+
end
|
508
|
+
end
|
509
|
+
|
510
|
+
class ItemAction < Stripe::RequestParams
|
511
|
+
class Add < Stripe::RequestParams
|
512
|
+
class Discount < Stripe::RequestParams
|
513
|
+
class DiscountEnd < Stripe::RequestParams
|
514
|
+
class Duration < Stripe::RequestParams
|
515
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
516
|
+
attr_accessor :interval
|
517
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
518
|
+
attr_accessor :interval_count
|
519
|
+
|
520
|
+
def initialize(interval: nil, interval_count: nil)
|
521
|
+
@interval = interval
|
522
|
+
@interval_count = interval_count
|
523
|
+
end
|
524
|
+
end
|
525
|
+
# Time span for the redeemed discount.
|
526
|
+
attr_accessor :duration
|
527
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
528
|
+
attr_accessor :timestamp
|
529
|
+
# The type of calculation made to determine when the discount ends.
|
530
|
+
attr_accessor :type
|
531
|
+
|
532
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
533
|
+
@duration = duration
|
534
|
+
@timestamp = timestamp
|
535
|
+
@type = type
|
536
|
+
end
|
537
|
+
end
|
538
|
+
# ID of the coupon to create a new discount for.
|
539
|
+
attr_accessor :coupon
|
540
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
541
|
+
attr_accessor :discount
|
542
|
+
# Details to determine how long the discount should be applied for.
|
543
|
+
attr_accessor :discount_end
|
544
|
+
# ID of the promotion code to create a new discount for.
|
545
|
+
attr_accessor :promotion_code
|
546
|
+
|
547
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
548
|
+
@coupon = coupon
|
549
|
+
@discount = discount
|
550
|
+
@discount_end = discount_end
|
551
|
+
@promotion_code = promotion_code
|
552
|
+
end
|
553
|
+
end
|
554
|
+
|
555
|
+
class Trial < Stripe::RequestParams
|
556
|
+
# 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.
|
557
|
+
attr_accessor :converts_to
|
558
|
+
# Determines the type of trial for this item.
|
559
|
+
attr_accessor :type
|
560
|
+
|
561
|
+
def initialize(converts_to: nil, type: nil)
|
562
|
+
@converts_to = converts_to
|
563
|
+
@type = type
|
564
|
+
end
|
565
|
+
end
|
566
|
+
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
567
|
+
attr_accessor :discounts
|
568
|
+
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
569
|
+
attr_accessor :metadata
|
570
|
+
# The ID of the price object.
|
571
|
+
attr_accessor :price
|
572
|
+
# Quantity for this item.
|
573
|
+
attr_accessor :quantity
|
574
|
+
# The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
|
575
|
+
attr_accessor :tax_rates
|
576
|
+
# Options that configure the trial on the subscription item.
|
577
|
+
attr_accessor :trial
|
578
|
+
|
579
|
+
def initialize(
|
580
|
+
discounts: nil,
|
581
|
+
metadata: nil,
|
582
|
+
price: nil,
|
583
|
+
quantity: nil,
|
584
|
+
tax_rates: nil,
|
585
|
+
trial: nil
|
586
|
+
)
|
587
|
+
@discounts = discounts
|
588
|
+
@metadata = metadata
|
589
|
+
@price = price
|
590
|
+
@quantity = quantity
|
591
|
+
@tax_rates = tax_rates
|
592
|
+
@trial = trial
|
593
|
+
end
|
594
|
+
end
|
595
|
+
|
596
|
+
class Remove < Stripe::RequestParams
|
597
|
+
# ID of a price to remove.
|
598
|
+
attr_accessor :price
|
599
|
+
|
600
|
+
def initialize(price: nil)
|
601
|
+
@price = price
|
602
|
+
end
|
603
|
+
end
|
604
|
+
|
605
|
+
class Set < Stripe::RequestParams
|
606
|
+
class Discount < Stripe::RequestParams
|
607
|
+
class DiscountEnd < Stripe::RequestParams
|
608
|
+
class Duration < Stripe::RequestParams
|
609
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
610
|
+
attr_accessor :interval
|
611
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
612
|
+
attr_accessor :interval_count
|
613
|
+
|
614
|
+
def initialize(interval: nil, interval_count: nil)
|
615
|
+
@interval = interval
|
616
|
+
@interval_count = interval_count
|
617
|
+
end
|
618
|
+
end
|
619
|
+
# Time span for the redeemed discount.
|
620
|
+
attr_accessor :duration
|
621
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
622
|
+
attr_accessor :timestamp
|
623
|
+
# The type of calculation made to determine when the discount ends.
|
624
|
+
attr_accessor :type
|
625
|
+
|
626
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
627
|
+
@duration = duration
|
628
|
+
@timestamp = timestamp
|
629
|
+
@type = type
|
630
|
+
end
|
631
|
+
end
|
632
|
+
# ID of the coupon to create a new discount for.
|
633
|
+
attr_accessor :coupon
|
634
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
635
|
+
attr_accessor :discount
|
636
|
+
# Details to determine how long the discount should be applied for.
|
637
|
+
attr_accessor :discount_end
|
638
|
+
# ID of the promotion code to create a new discount for.
|
639
|
+
attr_accessor :promotion_code
|
640
|
+
|
641
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
642
|
+
@coupon = coupon
|
643
|
+
@discount = discount
|
644
|
+
@discount_end = discount_end
|
645
|
+
@promotion_code = promotion_code
|
646
|
+
end
|
647
|
+
end
|
648
|
+
|
649
|
+
class Trial < Stripe::RequestParams
|
650
|
+
# 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.
|
651
|
+
attr_accessor :converts_to
|
652
|
+
# Determines the type of trial for this item.
|
653
|
+
attr_accessor :type
|
654
|
+
|
655
|
+
def initialize(converts_to: nil, type: nil)
|
656
|
+
@converts_to = converts_to
|
657
|
+
@type = type
|
658
|
+
end
|
659
|
+
end
|
660
|
+
# If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
|
661
|
+
attr_accessor :discounts
|
662
|
+
# If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
|
663
|
+
attr_accessor :metadata
|
664
|
+
# The ID of the price object.
|
665
|
+
attr_accessor :price
|
666
|
+
# If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
|
667
|
+
attr_accessor :quantity
|
668
|
+
# If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
|
669
|
+
attr_accessor :tax_rates
|
670
|
+
# If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
|
671
|
+
attr_accessor :trial
|
672
|
+
|
673
|
+
def initialize(
|
674
|
+
discounts: nil,
|
675
|
+
metadata: nil,
|
676
|
+
price: nil,
|
677
|
+
quantity: nil,
|
678
|
+
tax_rates: nil,
|
679
|
+
trial: nil
|
680
|
+
)
|
681
|
+
@discounts = discounts
|
682
|
+
@metadata = metadata
|
683
|
+
@price = price
|
684
|
+
@quantity = quantity
|
685
|
+
@tax_rates = tax_rates
|
686
|
+
@trial = trial
|
687
|
+
end
|
688
|
+
end
|
689
|
+
# Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item.
|
690
|
+
attr_accessor :add
|
691
|
+
# Details of the subscription item to remove.
|
692
|
+
attr_accessor :remove
|
693
|
+
# Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item.
|
694
|
+
attr_accessor :set
|
695
|
+
# Determines the type of item action.
|
696
|
+
attr_accessor :type
|
697
|
+
|
698
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
699
|
+
@add = add
|
700
|
+
@remove = remove
|
701
|
+
@set = set
|
702
|
+
@type = type
|
703
|
+
end
|
704
|
+
end
|
705
|
+
|
706
|
+
class MetadataAction < Stripe::RequestParams
|
707
|
+
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
708
|
+
attr_accessor :add
|
709
|
+
# Keys to remove from schedule phase metadata.
|
710
|
+
attr_accessor :remove
|
711
|
+
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
712
|
+
attr_accessor :set
|
713
|
+
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
714
|
+
attr_accessor :type
|
715
|
+
|
716
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
717
|
+
@add = add
|
718
|
+
@remove = remove
|
719
|
+
@set = set
|
720
|
+
@type = type
|
721
|
+
end
|
722
|
+
end
|
723
|
+
|
724
|
+
class SetPauseCollection < Stripe::RequestParams
|
725
|
+
class Set < Stripe::RequestParams
|
726
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
727
|
+
attr_accessor :behavior
|
728
|
+
|
729
|
+
def initialize(behavior: nil)
|
730
|
+
@behavior = behavior
|
731
|
+
end
|
732
|
+
end
|
733
|
+
# Details of the pause_collection behavior to apply to the amendment.
|
734
|
+
attr_accessor :set
|
735
|
+
# Determines the type of the pause_collection amendment.
|
736
|
+
attr_accessor :type
|
737
|
+
|
738
|
+
def initialize(set: nil, type: nil)
|
739
|
+
@set = set
|
740
|
+
@type = type
|
741
|
+
end
|
742
|
+
end
|
743
|
+
|
744
|
+
class TrialSettings < Stripe::RequestParams
|
745
|
+
class EndBehavior < Stripe::RequestParams
|
746
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
747
|
+
attr_accessor :prorate_up_front
|
748
|
+
|
749
|
+
def initialize(prorate_up_front: nil)
|
750
|
+
@prorate_up_front = prorate_up_front
|
751
|
+
end
|
752
|
+
end
|
753
|
+
# Defines how the subscription should behave when a trial ends.
|
754
|
+
attr_accessor :end_behavior
|
755
|
+
|
756
|
+
def initialize(end_behavior: nil)
|
757
|
+
@end_behavior = end_behavior
|
758
|
+
end
|
759
|
+
end
|
760
|
+
# Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment.
|
761
|
+
attr_accessor :amendment_end
|
762
|
+
# Details to identify the earliest timestamp where the proposed change should take effect.
|
763
|
+
attr_accessor :amendment_start
|
764
|
+
# For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.
|
765
|
+
attr_accessor :billing_cycle_anchor
|
766
|
+
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
767
|
+
attr_accessor :discount_actions
|
768
|
+
# Changes to the subscription items during the amendment time span.
|
769
|
+
attr_accessor :item_actions
|
770
|
+
# Instructions for how to modify phase metadata
|
771
|
+
attr_accessor :metadata_actions
|
772
|
+
# Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`.
|
773
|
+
attr_accessor :proration_behavior
|
774
|
+
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
775
|
+
attr_accessor :set_pause_collection
|
776
|
+
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
777
|
+
attr_accessor :set_schedule_end
|
778
|
+
# Settings related to subscription trials.
|
779
|
+
attr_accessor :trial_settings
|
780
|
+
|
781
|
+
def initialize(
|
782
|
+
amendment_end: nil,
|
783
|
+
amendment_start: nil,
|
784
|
+
billing_cycle_anchor: nil,
|
785
|
+
discount_actions: nil,
|
786
|
+
item_actions: nil,
|
787
|
+
metadata_actions: nil,
|
788
|
+
proration_behavior: nil,
|
789
|
+
set_pause_collection: nil,
|
790
|
+
set_schedule_end: nil,
|
791
|
+
trial_settings: nil
|
792
|
+
)
|
793
|
+
@amendment_end = amendment_end
|
794
|
+
@amendment_start = amendment_start
|
795
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
796
|
+
@discount_actions = discount_actions
|
797
|
+
@item_actions = item_actions
|
798
|
+
@metadata_actions = metadata_actions
|
799
|
+
@proration_behavior = proration_behavior
|
800
|
+
@set_pause_collection = set_pause_collection
|
801
|
+
@set_schedule_end = set_schedule_end
|
802
|
+
@trial_settings = trial_settings
|
803
|
+
end
|
804
|
+
end
|
805
|
+
|
298
806
|
class BillingMode < Stripe::RequestParams
|
299
807
|
class Flexible < Stripe::RequestParams
|
300
808
|
# Controls how invoices and invoice items display proration amounts and discount amounts.
|
@@ -318,16 +826,44 @@ module Stripe
|
|
318
826
|
class Phase < Stripe::RequestParams
|
319
827
|
class AddInvoiceItem < Stripe::RequestParams
|
320
828
|
class Discount < Stripe::RequestParams
|
829
|
+
class DiscountEnd < Stripe::RequestParams
|
830
|
+
class Duration < Stripe::RequestParams
|
831
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
832
|
+
attr_accessor :interval
|
833
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
834
|
+
attr_accessor :interval_count
|
835
|
+
|
836
|
+
def initialize(interval: nil, interval_count: nil)
|
837
|
+
@interval = interval
|
838
|
+
@interval_count = interval_count
|
839
|
+
end
|
840
|
+
end
|
841
|
+
# Time span for the redeemed discount.
|
842
|
+
attr_accessor :duration
|
843
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
844
|
+
attr_accessor :timestamp
|
845
|
+
# The type of calculation made to determine when the discount ends.
|
846
|
+
attr_accessor :type
|
847
|
+
|
848
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
849
|
+
@duration = duration
|
850
|
+
@timestamp = timestamp
|
851
|
+
@type = type
|
852
|
+
end
|
853
|
+
end
|
321
854
|
# ID of the coupon to create a new discount for.
|
322
855
|
attr_accessor :coupon
|
323
856
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
324
857
|
attr_accessor :discount
|
858
|
+
# Details to determine how long the discount should be applied for.
|
859
|
+
attr_accessor :discount_end
|
325
860
|
# ID of the promotion code to create a new discount for.
|
326
861
|
attr_accessor :promotion_code
|
327
862
|
|
328
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
863
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
329
864
|
@coupon = coupon
|
330
865
|
@discount = discount
|
866
|
+
@discount_end = discount_end
|
331
867
|
@promotion_code = promotion_code
|
332
868
|
end
|
333
869
|
end
|
@@ -463,16 +999,44 @@ module Stripe
|
|
463
999
|
end
|
464
1000
|
|
465
1001
|
class Discount < Stripe::RequestParams
|
1002
|
+
class DiscountEnd < Stripe::RequestParams
|
1003
|
+
class Duration < Stripe::RequestParams
|
1004
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1005
|
+
attr_accessor :interval
|
1006
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1007
|
+
attr_accessor :interval_count
|
1008
|
+
|
1009
|
+
def initialize(interval: nil, interval_count: nil)
|
1010
|
+
@interval = interval
|
1011
|
+
@interval_count = interval_count
|
1012
|
+
end
|
1013
|
+
end
|
1014
|
+
# Time span for the redeemed discount.
|
1015
|
+
attr_accessor :duration
|
1016
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1017
|
+
attr_accessor :timestamp
|
1018
|
+
# The type of calculation made to determine when the discount ends.
|
1019
|
+
attr_accessor :type
|
1020
|
+
|
1021
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1022
|
+
@duration = duration
|
1023
|
+
@timestamp = timestamp
|
1024
|
+
@type = type
|
1025
|
+
end
|
1026
|
+
end
|
466
1027
|
# ID of the coupon to create a new discount for.
|
467
1028
|
attr_accessor :coupon
|
468
1029
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
469
1030
|
attr_accessor :discount
|
1031
|
+
# Details to determine how long the discount should be applied for.
|
1032
|
+
attr_accessor :discount_end
|
470
1033
|
# ID of the promotion code to create a new discount for.
|
471
1034
|
attr_accessor :promotion_code
|
472
1035
|
|
473
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1036
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
474
1037
|
@coupon = coupon
|
475
1038
|
@discount = discount
|
1039
|
+
@discount_end = discount_end
|
476
1040
|
@promotion_code = promotion_code
|
477
1041
|
end
|
478
1042
|
end
|
@@ -526,16 +1090,44 @@ module Stripe
|
|
526
1090
|
end
|
527
1091
|
|
528
1092
|
class Discount < Stripe::RequestParams
|
1093
|
+
class DiscountEnd < Stripe::RequestParams
|
1094
|
+
class Duration < Stripe::RequestParams
|
1095
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1096
|
+
attr_accessor :interval
|
1097
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1098
|
+
attr_accessor :interval_count
|
1099
|
+
|
1100
|
+
def initialize(interval: nil, interval_count: nil)
|
1101
|
+
@interval = interval
|
1102
|
+
@interval_count = interval_count
|
1103
|
+
end
|
1104
|
+
end
|
1105
|
+
# Time span for the redeemed discount.
|
1106
|
+
attr_accessor :duration
|
1107
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1108
|
+
attr_accessor :timestamp
|
1109
|
+
# The type of calculation made to determine when the discount ends.
|
1110
|
+
attr_accessor :type
|
1111
|
+
|
1112
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1113
|
+
@duration = duration
|
1114
|
+
@timestamp = timestamp
|
1115
|
+
@type = type
|
1116
|
+
end
|
1117
|
+
end
|
529
1118
|
# ID of the coupon to create a new discount for.
|
530
1119
|
attr_accessor :coupon
|
531
1120
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
532
1121
|
attr_accessor :discount
|
1122
|
+
# Details to determine how long the discount should be applied for.
|
1123
|
+
attr_accessor :discount_end
|
533
1124
|
# ID of the promotion code to create a new discount for.
|
534
1125
|
attr_accessor :promotion_code
|
535
1126
|
|
536
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1127
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
537
1128
|
@coupon = coupon
|
538
1129
|
@discount = discount
|
1130
|
+
@discount_end = discount_end
|
539
1131
|
@promotion_code = promotion_code
|
540
1132
|
end
|
541
1133
|
end
|
@@ -581,6 +1173,18 @@ module Stripe
|
|
581
1173
|
@unit_amount_decimal = unit_amount_decimal
|
582
1174
|
end
|
583
1175
|
end
|
1176
|
+
|
1177
|
+
class Trial < Stripe::RequestParams
|
1178
|
+
# 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.
|
1179
|
+
attr_accessor :converts_to
|
1180
|
+
# Determines the type of trial for this item.
|
1181
|
+
attr_accessor :type
|
1182
|
+
|
1183
|
+
def initialize(converts_to: nil, type: nil)
|
1184
|
+
@converts_to = converts_to
|
1185
|
+
@type = type
|
1186
|
+
end
|
1187
|
+
end
|
584
1188
|
# 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.
|
585
1189
|
attr_accessor :billing_thresholds
|
586
1190
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -597,6 +1201,8 @@ module Stripe
|
|
597
1201
|
attr_accessor :quantity
|
598
1202
|
# A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
599
1203
|
attr_accessor :tax_rates
|
1204
|
+
# Options that configure the trial on the subscription item.
|
1205
|
+
attr_accessor :trial
|
600
1206
|
|
601
1207
|
def initialize(
|
602
1208
|
billing_thresholds: nil,
|
@@ -606,7 +1212,8 @@ module Stripe
|
|
606
1212
|
price: nil,
|
607
1213
|
price_data: nil,
|
608
1214
|
quantity: nil,
|
609
|
-
tax_rates: nil
|
1215
|
+
tax_rates: nil,
|
1216
|
+
trial: nil
|
610
1217
|
)
|
611
1218
|
@billing_thresholds = billing_thresholds
|
612
1219
|
@discounts = discounts
|
@@ -616,6 +1223,16 @@ module Stripe
|
|
616
1223
|
@price_data = price_data
|
617
1224
|
@quantity = quantity
|
618
1225
|
@tax_rates = tax_rates
|
1226
|
+
@trial = trial
|
1227
|
+
end
|
1228
|
+
end
|
1229
|
+
|
1230
|
+
class PauseCollection < Stripe::RequestParams
|
1231
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1232
|
+
attr_accessor :behavior
|
1233
|
+
|
1234
|
+
def initialize(behavior: nil)
|
1235
|
+
@behavior = behavior
|
619
1236
|
end
|
620
1237
|
end
|
621
1238
|
|
@@ -630,6 +1247,23 @@ module Stripe
|
|
630
1247
|
@destination = destination
|
631
1248
|
end
|
632
1249
|
end
|
1250
|
+
|
1251
|
+
class TrialSettings < Stripe::RequestParams
|
1252
|
+
class EndBehavior < Stripe::RequestParams
|
1253
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1254
|
+
attr_accessor :prorate_up_front
|
1255
|
+
|
1256
|
+
def initialize(prorate_up_front: nil)
|
1257
|
+
@prorate_up_front = prorate_up_front
|
1258
|
+
end
|
1259
|
+
end
|
1260
|
+
# Defines how the subscription should behave when a trial ends.
|
1261
|
+
attr_accessor :end_behavior
|
1262
|
+
|
1263
|
+
def initialize(end_behavior: nil)
|
1264
|
+
@end_behavior = end_behavior
|
1265
|
+
end
|
1266
|
+
end
|
633
1267
|
# 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.
|
634
1268
|
attr_accessor :add_invoice_items
|
635
1269
|
# 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).
|
@@ -664,6 +1298,8 @@ module Stripe
|
|
664
1298
|
attr_accessor :metadata
|
665
1299
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
666
1300
|
attr_accessor :on_behalf_of
|
1301
|
+
# If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
1302
|
+
attr_accessor :pause_collection
|
667
1303
|
# Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
668
1304
|
attr_accessor :proration_behavior
|
669
1305
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -672,8 +1308,12 @@ module Stripe
|
|
672
1308
|
attr_accessor :transfer_data
|
673
1309
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
674
1310
|
attr_accessor :trial
|
1311
|
+
# Specify trial behavior when crossing phase boundaries
|
1312
|
+
attr_accessor :trial_continuation
|
675
1313
|
# 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`
|
676
1314
|
attr_accessor :trial_end
|
1315
|
+
# Settings related to subscription trials.
|
1316
|
+
attr_accessor :trial_settings
|
677
1317
|
|
678
1318
|
def initialize(
|
679
1319
|
add_invoice_items: nil,
|
@@ -693,11 +1333,14 @@ module Stripe
|
|
693
1333
|
items: nil,
|
694
1334
|
metadata: nil,
|
695
1335
|
on_behalf_of: nil,
|
1336
|
+
pause_collection: nil,
|
696
1337
|
proration_behavior: nil,
|
697
1338
|
start_date: nil,
|
698
1339
|
transfer_data: nil,
|
699
1340
|
trial: nil,
|
700
|
-
|
1341
|
+
trial_continuation: nil,
|
1342
|
+
trial_end: nil,
|
1343
|
+
trial_settings: nil
|
701
1344
|
)
|
702
1345
|
@add_invoice_items = add_invoice_items
|
703
1346
|
@application_fee_percent = application_fee_percent
|
@@ -716,26 +1359,95 @@ module Stripe
|
|
716
1359
|
@items = items
|
717
1360
|
@metadata = metadata
|
718
1361
|
@on_behalf_of = on_behalf_of
|
1362
|
+
@pause_collection = pause_collection
|
719
1363
|
@proration_behavior = proration_behavior
|
720
1364
|
@start_date = start_date
|
721
1365
|
@transfer_data = transfer_data
|
722
1366
|
@trial = trial
|
1367
|
+
@trial_continuation = trial_continuation
|
723
1368
|
@trial_end = trial_end
|
1369
|
+
@trial_settings = trial_settings
|
724
1370
|
end
|
725
1371
|
end
|
1372
|
+
|
1373
|
+
class Prebilling < Stripe::RequestParams
|
1374
|
+
class BillUntil < Stripe::RequestParams
|
1375
|
+
class AmendmentEnd < Stripe::RequestParams
|
1376
|
+
# The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments.
|
1377
|
+
attr_accessor :index
|
1378
|
+
|
1379
|
+
def initialize(index: nil)
|
1380
|
+
@index = index
|
1381
|
+
end
|
1382
|
+
end
|
1383
|
+
|
1384
|
+
class Duration < Stripe::RequestParams
|
1385
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1386
|
+
attr_accessor :interval
|
1387
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1388
|
+
attr_accessor :interval_count
|
1389
|
+
|
1390
|
+
def initialize(interval: nil, interval_count: nil)
|
1391
|
+
@interval = interval
|
1392
|
+
@interval_count = interval_count
|
1393
|
+
end
|
1394
|
+
end
|
1395
|
+
# End the prebilled period when a specified amendment ends.
|
1396
|
+
attr_accessor :amendment_end
|
1397
|
+
# Time span for prebilling, starting from `bill_from`.
|
1398
|
+
attr_accessor :duration
|
1399
|
+
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
1400
|
+
attr_accessor :timestamp
|
1401
|
+
# Select one of several ways to pass the `bill_until` value.
|
1402
|
+
attr_accessor :type
|
1403
|
+
|
1404
|
+
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
1405
|
+
@amendment_end = amendment_end
|
1406
|
+
@duration = duration
|
1407
|
+
@timestamp = timestamp
|
1408
|
+
@type = type
|
1409
|
+
end
|
1410
|
+
end
|
1411
|
+
# The end of the prebilled time period.
|
1412
|
+
attr_accessor :bill_until
|
1413
|
+
# This is used to determine the number of billing cycles to prebill.
|
1414
|
+
attr_accessor :iterations
|
1415
|
+
|
1416
|
+
def initialize(bill_until: nil, iterations: nil)
|
1417
|
+
@bill_until = bill_until
|
1418
|
+
@iterations = iterations
|
1419
|
+
end
|
1420
|
+
end
|
1421
|
+
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
1422
|
+
attr_accessor :amendments
|
1423
|
+
# 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.
|
1424
|
+
attr_accessor :billing_behavior
|
726
1425
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
727
1426
|
attr_accessor :billing_mode
|
728
1427
|
# 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.
|
729
1428
|
attr_accessor :end_behavior
|
730
1429
|
# 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.
|
731
1430
|
attr_accessor :phases
|
1431
|
+
# Provide any time periods to bill in advance.
|
1432
|
+
attr_accessor :prebilling
|
732
1433
|
# In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
733
1434
|
attr_accessor :proration_behavior
|
734
1435
|
|
735
|
-
def initialize(
|
1436
|
+
def initialize(
|
1437
|
+
amendments: nil,
|
1438
|
+
billing_behavior: nil,
|
1439
|
+
billing_mode: nil,
|
1440
|
+
end_behavior: nil,
|
1441
|
+
phases: nil,
|
1442
|
+
prebilling: nil,
|
1443
|
+
proration_behavior: nil
|
1444
|
+
)
|
1445
|
+
@amendments = amendments
|
1446
|
+
@billing_behavior = billing_behavior
|
736
1447
|
@billing_mode = billing_mode
|
737
1448
|
@end_behavior = end_behavior
|
738
1449
|
@phases = phases
|
1450
|
+
@prebilling = prebilling
|
739
1451
|
@proration_behavior = proration_behavior
|
740
1452
|
end
|
741
1453
|
end
|
@@ -761,6 +1473,58 @@ module Stripe
|
|
761
1473
|
end
|
762
1474
|
end
|
763
1475
|
|
1476
|
+
class BillingSchedule < Stripe::RequestParams
|
1477
|
+
class AppliesTo < Stripe::RequestParams
|
1478
|
+
# The ID of the price object.
|
1479
|
+
attr_accessor :price
|
1480
|
+
# Controls which subscription items the billing schedule applies to.
|
1481
|
+
attr_accessor :type
|
1482
|
+
|
1483
|
+
def initialize(price: nil, type: nil)
|
1484
|
+
@price = price
|
1485
|
+
@type = type
|
1486
|
+
end
|
1487
|
+
end
|
1488
|
+
|
1489
|
+
class BillUntil < Stripe::RequestParams
|
1490
|
+
class Duration < Stripe::RequestParams
|
1491
|
+
# Specifies billing duration. Either `day`, `week`, `month` or `year`.
|
1492
|
+
attr_accessor :interval
|
1493
|
+
# The multiplier applied to the interval.
|
1494
|
+
attr_accessor :interval_count
|
1495
|
+
|
1496
|
+
def initialize(interval: nil, interval_count: nil)
|
1497
|
+
@interval = interval
|
1498
|
+
@interval_count = interval_count
|
1499
|
+
end
|
1500
|
+
end
|
1501
|
+
# Specifies the billing period.
|
1502
|
+
attr_accessor :duration
|
1503
|
+
# The end date of the billing schedule.
|
1504
|
+
attr_accessor :timestamp
|
1505
|
+
# Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
|
1506
|
+
attr_accessor :type
|
1507
|
+
|
1508
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1509
|
+
@duration = duration
|
1510
|
+
@timestamp = timestamp
|
1511
|
+
@type = type
|
1512
|
+
end
|
1513
|
+
end
|
1514
|
+
# Configure billing schedule differently for individual subscription items.
|
1515
|
+
attr_accessor :applies_to
|
1516
|
+
# The end date for the billing schedule.
|
1517
|
+
attr_accessor :bill_until
|
1518
|
+
# Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
|
1519
|
+
attr_accessor :key
|
1520
|
+
|
1521
|
+
def initialize(applies_to: nil, bill_until: nil, key: nil)
|
1522
|
+
@applies_to = applies_to
|
1523
|
+
@bill_until = bill_until
|
1524
|
+
@key = key
|
1525
|
+
end
|
1526
|
+
end
|
1527
|
+
|
764
1528
|
class Item < Stripe::RequestParams
|
765
1529
|
class BillingThresholds < Stripe::RequestParams
|
766
1530
|
# Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
@@ -772,16 +1536,44 @@ module Stripe
|
|
772
1536
|
end
|
773
1537
|
|
774
1538
|
class Discount < Stripe::RequestParams
|
1539
|
+
class DiscountEnd < Stripe::RequestParams
|
1540
|
+
class Duration < Stripe::RequestParams
|
1541
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1542
|
+
attr_accessor :interval
|
1543
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1544
|
+
attr_accessor :interval_count
|
1545
|
+
|
1546
|
+
def initialize(interval: nil, interval_count: nil)
|
1547
|
+
@interval = interval
|
1548
|
+
@interval_count = interval_count
|
1549
|
+
end
|
1550
|
+
end
|
1551
|
+
# Time span for the redeemed discount.
|
1552
|
+
attr_accessor :duration
|
1553
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1554
|
+
attr_accessor :timestamp
|
1555
|
+
# The type of calculation made to determine when the discount ends.
|
1556
|
+
attr_accessor :type
|
1557
|
+
|
1558
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1559
|
+
@duration = duration
|
1560
|
+
@timestamp = timestamp
|
1561
|
+
@type = type
|
1562
|
+
end
|
1563
|
+
end
|
775
1564
|
# ID of the coupon to create a new discount for.
|
776
1565
|
attr_accessor :coupon
|
777
1566
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
778
1567
|
attr_accessor :discount
|
1568
|
+
# Details to determine how long the discount should be applied for.
|
1569
|
+
attr_accessor :discount_end
|
779
1570
|
# ID of the promotion code to create a new discount for.
|
780
1571
|
attr_accessor :promotion_code
|
781
1572
|
|
782
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1573
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
783
1574
|
@coupon = coupon
|
784
1575
|
@discount = discount
|
1576
|
+
@discount_end = discount_end
|
785
1577
|
@promotion_code = promotion_code
|
786
1578
|
end
|
787
1579
|
end
|
@@ -876,10 +1668,21 @@ module Stripe
|
|
876
1668
|
@tax_rates = tax_rates
|
877
1669
|
end
|
878
1670
|
end
|
1671
|
+
|
1672
|
+
class Prebilling < Stripe::RequestParams
|
1673
|
+
# This is used to determine the number of billing cycles to prebill.
|
1674
|
+
attr_accessor :iterations
|
1675
|
+
|
1676
|
+
def initialize(iterations: nil)
|
1677
|
+
@iterations = iterations
|
1678
|
+
end
|
1679
|
+
end
|
879
1680
|
# For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
|
880
1681
|
attr_accessor :billing_cycle_anchor
|
881
1682
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
882
1683
|
attr_accessor :billing_mode
|
1684
|
+
# Sets the billing schedules for the subscription.
|
1685
|
+
attr_accessor :billing_schedules
|
883
1686
|
# A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
|
884
1687
|
attr_accessor :cancel_at
|
885
1688
|
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
@@ -890,6 +1693,8 @@ module Stripe
|
|
890
1693
|
attr_accessor :default_tax_rates
|
891
1694
|
# A list of up to 20 subscription items, each with an attached price.
|
892
1695
|
attr_accessor :items
|
1696
|
+
# The pre-billing to apply to the subscription as a preview.
|
1697
|
+
attr_accessor :prebilling
|
893
1698
|
# Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
|
894
1699
|
attr_accessor :proration_behavior
|
895
1700
|
# If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
|
@@ -904,11 +1709,13 @@ module Stripe
|
|
904
1709
|
def initialize(
|
905
1710
|
billing_cycle_anchor: nil,
|
906
1711
|
billing_mode: nil,
|
1712
|
+
billing_schedules: nil,
|
907
1713
|
cancel_at: nil,
|
908
1714
|
cancel_at_period_end: nil,
|
909
1715
|
cancel_now: nil,
|
910
1716
|
default_tax_rates: nil,
|
911
1717
|
items: nil,
|
1718
|
+
prebilling: nil,
|
912
1719
|
proration_behavior: nil,
|
913
1720
|
proration_date: nil,
|
914
1721
|
resume_at: nil,
|
@@ -917,11 +1724,13 @@ module Stripe
|
|
917
1724
|
)
|
918
1725
|
@billing_cycle_anchor = billing_cycle_anchor
|
919
1726
|
@billing_mode = billing_mode
|
1727
|
+
@billing_schedules = billing_schedules
|
920
1728
|
@cancel_at = cancel_at
|
921
1729
|
@cancel_at_period_end = cancel_at_period_end
|
922
1730
|
@cancel_now = cancel_now
|
923
1731
|
@default_tax_rates = default_tax_rates
|
924
1732
|
@items = items
|
1733
|
+
@prebilling = prebilling
|
925
1734
|
@proration_behavior = proration_behavior
|
926
1735
|
@proration_date = proration_date
|
927
1736
|
@resume_at = resume_at
|
@@ -931,10 +1740,14 @@ module Stripe
|
|
931
1740
|
end
|
932
1741
|
# Settings for automatic tax lookup for this invoice preview.
|
933
1742
|
attr_accessor :automatic_tax
|
1743
|
+
# The identifier of the billing cadence for which you’d like to retrieve the upcoming invoice.Cannot be provided when `subscription`, `schedule`, `subscription_details` or `schedule_details` are provided.
|
1744
|
+
attr_accessor :billing_cadence
|
934
1745
|
# The currency to preview this invoice in. Defaults to that of `customer` if not specified.
|
935
1746
|
attr_accessor :currency
|
936
1747
|
# The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
937
1748
|
attr_accessor :customer
|
1749
|
+
# The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
|
1750
|
+
attr_accessor :customer_account
|
938
1751
|
# Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
939
1752
|
attr_accessor :customer_details
|
940
1753
|
# The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
|
@@ -960,8 +1773,10 @@ module Stripe
|
|
960
1773
|
|
961
1774
|
def initialize(
|
962
1775
|
automatic_tax: nil,
|
1776
|
+
billing_cadence: nil,
|
963
1777
|
currency: nil,
|
964
1778
|
customer: nil,
|
1779
|
+
customer_account: nil,
|
965
1780
|
customer_details: nil,
|
966
1781
|
discounts: nil,
|
967
1782
|
expand: nil,
|
@@ -975,8 +1790,10 @@ module Stripe
|
|
975
1790
|
subscription_details: nil
|
976
1791
|
)
|
977
1792
|
@automatic_tax = automatic_tax
|
1793
|
+
@billing_cadence = billing_cadence
|
978
1794
|
@currency = currency
|
979
1795
|
@customer = customer
|
1796
|
+
@customer_account = customer_account
|
980
1797
|
@customer_details = customer_details
|
981
1798
|
@discounts = discounts
|
982
1799
|
@expand = expand
|