stripe 18.3.0 → 18.4.0.pre.alpha.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 +37 -1
- data/lib/stripe/api_version.rb +1 -2
- data/lib/stripe/errors.rb +66 -0
- data/lib/stripe/event_types.rb +512 -0
- data/lib/stripe/events/v2_billing_cadence_billed_event.rb +61 -0
- data/lib/stripe/events/v2_billing_cadence_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_billing_cadence_created_event.rb +61 -0
- data/lib/stripe/events/v2_billing_license_fee_created_event.rb +44 -0
- data/lib/stripe/events/v2_billing_license_fee_updated_event.rb +44 -0
- data/lib/stripe/events/v2_billing_license_fee_version_created_event.rb +61 -0
- data/lib/stripe/events/v2_billing_licensed_item_created_event.rb +44 -0
- data/lib/stripe/events/v2_billing_licensed_item_updated_event.rb +44 -0
- data/lib/stripe/events/v2_billing_metered_item_created_event.rb +44 -0
- data/lib/stripe/events/v2_billing_metered_item_updated_event.rb +44 -0
- data/lib/stripe/events/v2_billing_pricing_plan_component_created_event.rb +61 -0
- data/lib/stripe/events/v2_billing_pricing_plan_component_updated_event.rb +61 -0
- data/lib/stripe/events/v2_billing_pricing_plan_created_event.rb +44 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_awaiting_customer_action_event.rb +44 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_current_event.rb +44 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_past_due_event.rb +44 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_paused_event.rb +44 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_unpaid_event.rb +44 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_activated_event.rb +44 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_paused_event.rb +44 -0
- data/lib/stripe/events/v2_billing_pricing_plan_updated_event.rb +44 -0
- data/lib/stripe/events/v2_billing_pricing_plan_version_created_event.rb +61 -0
- data/lib/stripe/events/v2_billing_rate_card_created_event.rb +61 -0
- data/lib/stripe/events/v2_billing_rate_card_rate_created_event.rb +67 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_activated_event.rb +44 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_awaiting_customer_action_event.rb +44 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_current_event.rb +44 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_past_due_event.rb +44 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_paused_event.rb +44 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_unpaid_event.rb +44 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_activated_event.rb +44 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_paused_event.rb +44 -0
- data/lib/stripe/events/v2_billing_rate_card_updated_event.rb +44 -0
- data/lib/stripe/events/v2_billing_rate_card_version_created_event.rb +61 -0
- data/lib/stripe/events/v2_core_account_including_configuration_card_creator_capability_status_updated_event.rb +63 -0
- data/lib/stripe/events/v2_core_account_including_configuration_card_creator_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_claimable_sandbox_claimed_event.rb +44 -0
- data/lib/stripe/events/v2_core_claimable_sandbox_created_event.rb +44 -0
- data/lib/stripe/events/v2_core_claimable_sandbox_expired_event.rb +44 -0
- data/lib/stripe/events/v2_core_claimable_sandbox_expiring_event.rb +44 -0
- data/lib/stripe/events/v2_core_claimable_sandbox_sandbox_details_owner_account_updated_event.rb +44 -0
- data/lib/stripe/events/v2_core_health_api_error_firing_event.rb +86 -0
- data/lib/stripe/events/v2_core_health_api_error_resolved_event.rb +86 -0
- data/lib/stripe/events/v2_core_health_api_latency_firing_event.rb +84 -0
- data/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb +84 -0
- data/lib/stripe/events/v2_core_health_authorization_rate_drop_firing_event.rb +80 -0
- data/lib/stripe/events/v2_core_health_authorization_rate_drop_resolved_event.rb +80 -0
- data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +78 -0
- data/lib/stripe/events/v2_core_health_fraud_rate_increased_event.rb +78 -0
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_errors_firing_event.rb +91 -0
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_errors_resolved_event.rb +93 -0
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_firing_event.rb +93 -0
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_resolved_event.rb +93 -0
- data/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb +82 -0
- data/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb +82 -0
- data/lib/stripe/events/v2_core_health_sepa_debit_delayed_firing_event.rb +58 -0
- data/lib/stripe/events/v2_core_health_sepa_debit_delayed_resolved_event.rb +60 -0
- data/lib/stripe/events/v2_core_health_traffic_volume_drop_firing_event.rb +62 -0
- data/lib/stripe/events/v2_core_health_traffic_volume_drop_resolved_event.rb +62 -0
- data/lib/stripe/events/v2_core_health_webhook_latency_firing_event.rb +58 -0
- data/lib/stripe/events/v2_core_health_webhook_latency_resolved_event.rb +58 -0
- data/lib/stripe/events/v2_iam_api_key_created_event.rb +20 -0
- data/lib/stripe/events/v2_iam_api_key_default_secret_revealed_event.rb +20 -0
- data/lib/stripe/events/v2_iam_api_key_expired_event.rb +20 -0
- data/lib/stripe/events/v2_iam_api_key_permissions_updated_event.rb +20 -0
- data/lib/stripe/events/v2_iam_api_key_rotated_event.rb +38 -0
- data/lib/stripe/events/v2_iam_api_key_updated_event.rb +20 -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_recipient_verification_created_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_recipient_verification_updated_event.rb +44 -0
- data/lib/stripe/events/v2_money_management_transaction_created_event.rb +61 -0
- data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +44 -0
- data/lib/stripe/events/v2_payments_off_session_payment_attempt_failed_event.rb +44 -0
- data/lib/stripe/events/v2_payments_off_session_payment_attempt_started_event.rb +46 -0
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +46 -0
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +48 -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/events/v2_payments_settlement_allocation_intent_canceled_event.rb +44 -0
- data/lib/stripe/events/v2_payments_settlement_allocation_intent_created_event.rb +44 -0
- data/lib/stripe/events/v2_payments_settlement_allocation_intent_errored_event.rb +65 -0
- data/lib/stripe/events/v2_payments_settlement_allocation_intent_funds_not_received_event.rb +44 -0
- data/lib/stripe/events/v2_payments_settlement_allocation_intent_matched_event.rb +44 -0
- data/lib/stripe/events/v2_payments_settlement_allocation_intent_not_found_event.rb +38 -0
- data/lib/stripe/events/v2_payments_settlement_allocation_intent_settled_event.rb +44 -0
- data/lib/stripe/events/v2_payments_settlement_allocation_intent_split_canceled_event.rb +61 -0
- data/lib/stripe/events/v2_payments_settlement_allocation_intent_split_created_event.rb +61 -0
- data/lib/stripe/events/v2_payments_settlement_allocation_intent_split_settled_event.rb +61 -0
- data/lib/stripe/events/v2_payments_settlement_allocation_intent_submitted_event.rb +44 -0
- data/lib/stripe/events/v2_reporting_report_run_created_event.rb +44 -0
- data/lib/stripe/events/v2_reporting_report_run_failed_event.rb +44 -0
- data/lib/stripe/events/v2_reporting_report_run_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_reporting_report_run_updated_event.rb +44 -0
- data/lib/stripe/object_types.rb +95 -0
- data/lib/stripe/params/account_create_params.rb +381 -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_person_create_params.rb +32 -0
- data/lib/stripe/params/account_person_update_params.rb +32 -0
- data/lib/stripe/params/account_session_create_params.rb +243 -1
- data/lib/stripe/params/account_update_params.rb +343 -0
- data/lib/stripe/params/balance_transfer_create_params.rb +66 -0
- data/lib/stripe/params/billing/alert_create_params.rb +121 -1
- data/lib/stripe/params/billing/alert_list_params.rb +4 -0
- data/lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb +69 -0
- data/lib/stripe/params/billing/credit_balance_summary_retrieve_params.rb +13 -1
- data/lib/stripe/params/billing/credit_grant_create_params.rb +29 -2
- data/lib/stripe/params/billing/meter_create_params.rb +4 -0
- data/lib/stripe/params/billing/meter_event_summary_list_params.rb +8 -0
- data/lib/stripe/params/capital/financing_offer_create_params.rb +37 -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_refill_params.rb +37 -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 +1648 -0
- data/lib/stripe/params/charge_update_params.rb +1648 -0
- data/lib/stripe/params/checkout/session_create_params.rb +224 -4
- data/lib/stripe/params/checkout/session_update_params.rb +156 -1
- data/lib/stripe/params/confirmation_token_create_params.rb +77 -0
- data/lib/stripe/params/coupon_create_params.rb +47 -1
- data/lib/stripe/params/customer_session_create_params.rb +32 -1
- data/lib/stripe/params/delegated_checkout/requested_session_confirm_params.rb +138 -0
- data/lib/stripe/params/delegated_checkout/requested_session_create_params.rb +205 -0
- data/lib/stripe/params/delegated_checkout/requested_session_expire_params.rb +15 -0
- data/lib/stripe/params/delegated_checkout/requested_session_retrieve_params.rb +15 -0
- data/lib/stripe/params/delegated_checkout/requested_session_update_params.rb +209 -0
- 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 +46 -1
- data/lib/stripe/params/fr_meal_vouchers_onboarding_create_params.rb +25 -0
- data/lib/stripe/params/fr_meal_vouchers_onboarding_list_params.rb +22 -0
- data/lib/stripe/params/fr_meal_vouchers_onboarding_retrieve_params.rb +13 -0
- data/lib/stripe/params/fr_meal_vouchers_onboarding_update_params.rb +16 -0
- 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/blocklist_entry_create_params.rb +29 -0
- data/lib/stripe/params/identity/blocklist_entry_disable_params.rb +15 -0
- data/lib/stripe/params/identity/blocklist_entry_list_params.rb +62 -0
- data/lib/stripe/params/identity/blocklist_entry_retrieve_params.rb +15 -0
- data/lib/stripe/params/identity/verification_report_list_params.rb +4 -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 +107 -2
- data/lib/stripe/params/invoice_create_preview_params.rb +1357 -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_list_params.rb +4 -0
- data/lib/stripe/params/invoice_update_lines_params.rb +48 -1
- data/lib/stripe/params/invoice_update_params.rb +107 -2
- data/lib/stripe/params/issuing/card_list_params.rb +34 -1
- 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/program_create_params.rb +21 -0
- data/lib/stripe/params/issuing/program_list_params.rb +24 -0
- data/lib/stripe/params/issuing/program_retrieve_params.rb +15 -0
- data/lib/stripe/params/issuing/program_update_params.rb +21 -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 +2061 -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 +2065 -0
- data/lib/stripe/params/payment_intent_capture_params.rb +1627 -1
- data/lib/stripe/params/payment_intent_confirm_params.rb +3124 -126
- data/lib/stripe/params/payment_intent_create_params.rb +3141 -130
- data/lib/stripe/params/payment_intent_decrement_authorization_params.rb +73 -0
- data/lib/stripe/params/payment_intent_increment_authorization_params.rb +21 -0
- data/lib/stripe/params/payment_intent_trigger_action_params.rb +27 -0
- data/lib/stripe/params/payment_intent_update_params.rb +3187 -162
- data/lib/stripe/params/payment_link_create_params.rb +15 -0
- data/lib/stripe/params/payment_method_check_balance_params.rb +13 -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 +77 -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 +1217 -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 +1225 -4
- data/lib/stripe/params/radar/account_evaluation_create_params.rb +81 -0
- data/lib/stripe/params/radar/account_evaluation_retrieve_params.rb +15 -0
- data/lib/stripe/params/radar/account_evaluation_update_params.rb +41 -0
- data/lib/stripe/params/reserve/hold_list_params.rb +53 -0
- data/lib/stripe/params/reserve/hold_retrieve_params.rb +15 -0
- data/lib/stripe/params/reserve/plan_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 +187 -3
- data/lib/stripe/params/setup_intent_create_params.rb +187 -3
- data/lib/stripe/params/setup_intent_update_params.rb +188 -4
- 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/subscription_attach_cadence_params.rb +16 -0
- data/lib/stripe/params/subscription_create_params.rb +374 -5
- data/lib/stripe/params/subscription_item_create_params.rb +114 -2
- data/lib/stripe/params/subscription_item_update_params.rb +97 -1
- data/lib/stripe/params/subscription_list_params.rb +4 -0
- data/lib/stripe/params/subscription_pause_params.rb +33 -0
- data/lib/stripe/params/subscription_schedule_amend_params.rb +805 -0
- data/lib/stripe/params/subscription_schedule_create_params.rb +335 -5
- data/lib/stripe/params/subscription_schedule_update_params.rb +335 -5
- data/lib/stripe/params/subscription_update_params.rb +357 -4
- 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/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/capital/financing_offer_create_params.rb +39 -0
- data/lib/stripe/params/test_helpers/capital/financing_offer_refill_params.rb +39 -0
- data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +77 -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/token_create_params.rb +64 -0
- data/lib/stripe/params/transfer_create_params.rb +8 -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 +17 -0
- data/lib/stripe/params/v2/billing/cadence_create_params.rb +257 -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 +78 -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/custom_pricing_unit_create_params.rb +26 -0
- data/lib/stripe/params/v2/billing/custom_pricing_unit_list_params.rb +24 -0
- data/lib/stripe/params/v2/billing/custom_pricing_unit_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/custom_pricing_unit_update_params.rb +26 -0
- data/lib/stripe/params/v2/billing/intent_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/billing/intent_commit_params.rb +17 -0
- data/lib/stripe/params/v2/billing/intent_create_params.rb +425 -0
- data/lib/stripe/params/v2/billing/intent_list_params.rb +17 -0
- data/lib/stripe/params/v2/billing/intent_release_reservation_params.rb +10 -0
- data/lib/stripe/params/v2/billing/intent_reserve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/intent_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/intents/action_list_params.rb +19 -0
- data/lib/stripe/params/v2/billing/intents/action_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/billing/license_fee_create_params.rb +103 -0
- data/lib/stripe/params/v2/billing/license_fee_list_params.rb +24 -0
- data/lib/stripe/params/v2/billing/license_fee_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/license_fee_subscription_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/license_fee_update_params.rb +84 -0
- data/lib/stripe/params/v2/billing/license_fees/version_list_params.rb +19 -0
- data/lib/stripe/params/v2/billing/license_fees/version_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/billing/licensed_item_create_params.rb +48 -0
- data/lib/stripe/params/v2/billing/licensed_item_list_params.rb +21 -0
- data/lib/stripe/params/v2/billing/licensed_item_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/licensed_item_update_params.rb +48 -0
- data/lib/stripe/params/v2/billing/metered_item_create_params.rb +73 -0
- data/lib/stripe/params/v2/billing/metered_item_list_params.rb +21 -0
- data/lib/stripe/params/v2/billing/metered_item_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/metered_item_update_params.rb +50 -0
- data/lib/stripe/params/v2/billing/pricing_plan_create_params.rb +39 -0
- data/lib/stripe/params/v2/billing/pricing_plan_list_params.rb +24 -0
- data/lib/stripe/params/v2/billing/pricing_plan_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/pricing_plan_subscription_list_params.rb +50 -0
- data/lib/stripe/params/v2/billing/pricing_plan_subscription_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/pricing_plan_subscription_update_params.rb +20 -0
- data/lib/stripe/params/v2/billing/pricing_plan_subscriptions/component_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/billing/pricing_plan_update_params.rb +39 -0
- data/lib/stripe/params/v2/billing/pricing_plans/component_create_params.rb +73 -0
- data/lib/stripe/params/v2/billing/pricing_plans/component_delete_params.rb +12 -0
- data/lib/stripe/params/v2/billing/pricing_plans/component_list_params.rb +27 -0
- data/lib/stripe/params/v2/billing/pricing_plans/component_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/billing/pricing_plans/component_update_params.rb +22 -0
- data/lib/stripe/params/v2/billing/pricing_plans/version_list_params.rb +19 -0
- data/lib/stripe/params/v2/billing/pricing_plans/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/billing/rate_card_create_params.rb +49 -0
- data/lib/stripe/params/v2/billing/rate_card_list_params.rb +24 -0
- data/lib/stripe/params/v2/billing/rate_card_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/rate_card_subscription_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/billing/rate_card_subscription_create_params.rb +26 -0
- data/lib/stripe/params/v2/billing/rate_card_subscription_list_params.rb +51 -0
- data/lib/stripe/params/v2/billing/rate_card_subscription_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/rate_card_subscription_update_params.rb +17 -0
- data/lib/stripe/params/v2/billing/rate_card_update_params.rb +38 -0
- data/lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb +91 -0
- data/lib/stripe/params/v2/billing/rate_cards/rate_delete_params.rb +12 -0
- data/lib/stripe/params/v2/billing/rate_cards/rate_list_params.rb +25 -0
- data/lib/stripe/params/v2/billing/rate_cards/rate_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/billing/rate_cards/version_list_params.rb +19 -0
- data/lib/stripe/params/v2/billing/rate_cards/version_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/billing/service_action_create_params.rb +278 -0
- data/lib/stripe/params/v2/billing/service_action_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/billing/service_action_update_params.rb +40 -0
- data/lib/stripe/params/v2/core/account_create_params.rb +959 -28
- data/lib/stripe/params/v2/core/account_token_create_params.rb +251 -25
- data/lib/stripe/params/v2/core/account_update_params.rb +938 -28
- data/lib/stripe/params/v2/core/claimable_sandbox_create_params.rb +36 -0
- data/lib/stripe/params/v2/core/claimable_sandbox_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/core/event_list_params.rb +4 -1
- data/lib/stripe/params/v2/core/event_retrieve_params.rb +8 -1
- 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_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 +33 -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/iam/api_key_create_params.rb +51 -0
- data/lib/stripe/params/v2/iam/api_key_expire_params.rb +10 -0
- data/lib/stripe/params/v2/iam/api_key_list_params.rb +20 -0
- data/lib/stripe/params/v2/iam/api_key_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/iam/api_key_rotate_params.rb +46 -0
- data/lib/stripe/params/v2/iam/api_key_update_params.rb +20 -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/currency_conversion_create_params.rb +68 -0
- data/lib/stripe/params/v2/money_management/currency_conversion_list_params.rb +20 -0
- data/lib/stripe/params/v2/money_management/currency_conversion_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 +23 -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 +31 -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 +62 -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 +134 -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 +82 -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 +103 -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 +93 -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/recipient_verification_acknowledge_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/recipient_verification_create_params.rb +20 -0
- data/lib/stripe/params/v2/money_management/recipient_verification_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 +57 -0
- data/lib/stripe/params/v2/payments/off_session_payment_create_params.rb +161 -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/payments/settlement_allocation_intent_cancel_params.rb +10 -0
- data/lib/stripe/params/v2/payments/settlement_allocation_intent_create_params.rb +46 -0
- data/lib/stripe/params/v2/payments/settlement_allocation_intent_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/payments/settlement_allocation_intent_submit_params.rb +10 -0
- data/lib/stripe/params/v2/payments/settlement_allocation_intent_update_params.rb +31 -0
- data/lib/stripe/params/v2/payments/settlement_allocation_intents/split_cancel_params.rb +12 -0
- data/lib/stripe/params/v2/payments/settlement_allocation_intents/split_create_params.rb +39 -0
- data/lib/stripe/params/v2/payments/settlement_allocation_intents/split_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/reporting/report_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/reporting/report_run_create_params.rb +33 -0
- data/lib/stripe/params/v2/reporting/report_run_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/tax/manual_rule_create_params.rb +94 -0
- data/lib/stripe/params/v2/tax/manual_rule_deactivate_params.rb +10 -0
- data/lib/stripe/params/v2/tax/manual_rule_list_params.rb +17 -0
- data/lib/stripe/params/v2/tax/manual_rule_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/tax/manual_rule_update_params.rb +94 -0
- data/lib/stripe/params/v2/test_helpers/financial_address_credit_params.rb +34 -0
- data/lib/stripe/params/v2/test_helpers/financial_address_generate_microdeposits_params.rb +10 -0
- data/lib/stripe/params/v2/test_helpers/money_management_recipient_verifications_params.rb +24 -0
- data/lib/stripe/params.rb +282 -0
- data/lib/stripe/resources/account.rb +227 -1
- data/lib/stripe/resources/account_notice.rb +94 -0
- data/lib/stripe/resources/account_session.rb +135 -0
- data/lib/stripe/resources/application_fee.rb +2 -0
- data/lib/stripe/resources/balance.rb +83 -0
- data/lib/stripe/resources/balance_transfer.rb +139 -0
- data/lib/stripe/resources/billing/alert.rb +105 -1
- data/lib/stripe/resources/billing/alert_triggered.rb +6 -0
- data/lib/stripe/resources/billing/analytics/meter_usage.rb +33 -0
- data/lib/stripe/resources/billing/analytics/meter_usage_row.rb +40 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +84 -2
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +84 -2
- data/lib/stripe/resources/billing/credit_grant.rb +58 -2
- data/lib/stripe/resources/billing/meter.rb +2 -0
- data/lib/stripe/resources/billing/meter_event_summary.rb +2 -0
- data/lib/stripe/resources/capital/financing_offer.rb +183 -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 +20 -1
- data/lib/stripe/resources/charge.rb +233 -1
- data/lib/stripe/resources/checkout/session.rb +196 -4
- data/lib/stripe/resources/confirmation_token.rb +151 -0
- data/lib/stripe/resources/coupon.rb +60 -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/delegated_checkout/requested_session.rb +509 -0
- data/lib/stripe/resources/discount.rb +20 -1
- 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 +103 -1
- data/lib/stripe/resources/fr_meal_vouchers_onboarding.rb +143 -0
- data/lib/stripe/resources/fx_quote.rb +147 -0
- data/lib/stripe/resources/identity/blocklist_entry.rb +116 -0
- data/lib/stripe/resources/identity/verification_report.rb +4 -0
- data/lib/stripe/resources/invoice.rb +188 -1
- data/lib/stripe/resources/invoice_item.rb +108 -2
- data/lib/stripe/resources/invoice_line_item.rb +147 -1
- data/lib/stripe/resources/issuing/card.rb +4 -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/program.rb +69 -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 +43 -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 +181 -1
- data/lib/stripe/resources/payment_intent.rb +1625 -9
- data/lib/stripe/resources/payment_method.rb +173 -0
- data/lib/stripe/resources/payment_method_balance.rb +68 -0
- data/lib/stripe/resources/payment_method_configuration.rb +170 -0
- data/lib/stripe/resources/payment_record.rb +181 -1
- data/lib/stripe/resources/person.rb +36 -0
- data/lib/stripe/resources/plan.rb +2 -0
- data/lib/stripe/resources/price.rb +22 -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/product_catalog/trial_offer.rb +103 -0
- data/lib/stripe/resources/quote.rb +806 -2
- data/lib/stripe/resources/quote_line.rb +527 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +1200 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +826 -0
- data/lib/stripe/resources/radar/account_evaluation.rb +145 -0
- data/lib/stripe/resources/refund.rb +18 -0
- data/lib/stripe/resources/reserve/hold.rb +74 -0
- data/lib/stripe/resources/reserve/plan.rb +78 -0
- data/lib/stripe/resources/reserve/release.rb +77 -0
- data/lib/stripe/resources/setup_attempt.rb +48 -0
- data/lib/stripe/resources/setup_intent.rb +128 -1
- data/lib/stripe/resources/shared_payment/granted_token.rb +126 -0
- data/lib/stripe/resources/source.rb +38 -0
- data/lib/stripe/resources/subscription.rb +269 -0
- data/lib/stripe/resources/subscription_item.rb +43 -1
- data/lib/stripe/resources/subscription_schedule.rb +290 -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 +6 -0
- data/lib/stripe/resources/transit_balance.rb +45 -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 +655 -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/custom_pricing_unit.rb +43 -0
- data/lib/stripe/resources/v2/billing/intent.rb +86 -0
- data/lib/stripe/resources/v2/billing/intent_action.rb +483 -0
- data/lib/stripe/resources/v2/billing/license_fee.rb +104 -0
- data/lib/stripe/resources/v2/billing/license_fee_subscription.rb +44 -0
- data/lib/stripe/resources/v2/billing/license_fee_version.rb +80 -0
- data/lib/stripe/resources/v2/billing/licensed_item.rb +60 -0
- data/lib/stripe/resources/v2/billing/metered_item.rb +85 -0
- data/lib/stripe/resources/v2/billing/pricing_plan.rb +51 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_component.rb +94 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_subscription.rb +94 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_subscription_components.rb +49 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_version.rb +38 -0
- data/lib/stripe/resources/v2/billing/profile.rb +46 -0
- data/lib/stripe/resources/v2/billing/rate_card.rb +61 -0
- data/lib/stripe/resources/v2/billing/rate_card_rate.rb +110 -0
- data/lib/stripe/resources/v2/billing/rate_card_subscription.rb +94 -0
- data/lib/stripe/resources/v2/billing/rate_card_version.rb +34 -0
- data/lib/stripe/resources/v2/billing/service_action.rb +274 -0
- data/lib/stripe/resources/v2/core/account.rb +1688 -80
- data/lib/stripe/resources/v2/core/claimable_sandbox.rb +105 -0
- data/lib/stripe/resources/v2/core/event.rb +50 -1
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +134 -0
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +103 -0
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +28 -0
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +44 -0
- data/lib/stripe/resources/v2/iam/api_key.rb +129 -0
- data/lib/stripe/resources/v2/money_management/adjustment.rb +82 -0
- data/lib/stripe/resources/v2/money_management/currency_conversion.rb +94 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +223 -0
- data/lib/stripe/resources/v2/money_management/financial_address.rb +132 -0
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +197 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +347 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +204 -0
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +69 -0
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +242 -0
- data/lib/stripe/resources/v2/money_management/payout_method.rb +157 -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 +280 -0
- data/lib/stripe/resources/v2/money_management/received_debit.rb +208 -0
- data/lib/stripe/resources/v2/money_management/recipient_verification.rb +83 -0
- data/lib/stripe/resources/v2/money_management/transaction.rb +180 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +153 -0
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +186 -0
- data/lib/stripe/resources/v2/payments/settlement_allocation_intent.rb +92 -0
- data/lib/stripe/resources/v2/payments/settlement_allocation_intent_split.rb +78 -0
- data/lib/stripe/resources/v2/reporting/report.rb +116 -0
- data/lib/stripe/resources/v2/reporting/report_run.rb +128 -0
- data/lib/stripe/resources/v2/tax/manual_rule.rb +115 -0
- data/lib/stripe/resources.rb +223 -0
- data/lib/stripe/services/account_notice_service.rb +39 -0
- data/lib/stripe/services/balance_transfer_service.rb +17 -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/delegated_checkout/requested_session_service.rb +63 -0
- data/lib/stripe/services/delegated_checkout_service.rb +13 -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/fr_meal_vouchers_onboarding_service.rb +50 -0
- data/lib/stripe/services/fx_quote_service.rb +27 -0
- data/lib/stripe/services/identity/blocklist_entry_service.rb +71 -0
- data/lib/stripe/services/identity_service.rb +2 -1
- 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/program_service.rb +52 -0
- data/lib/stripe/services/issuing_service.rb +6 -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 +49 -0
- data/lib/stripe/services/payment_intent_service.rb +37 -0
- data/lib/stripe/services/payment_method_service.rb +11 -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/quote_line_service.rb +17 -0
- data/lib/stripe/services/quote_preview_invoice_service.rb +17 -0
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +17 -0
- data/lib/stripe/services/quote_service.rb +49 -1
- data/lib/stripe/services/radar/account_evaluation_service.rb +41 -0
- data/lib/stripe/services/radar_service.rb +2 -1
- data/lib/stripe/services/reserve/hold_service.rb +30 -0
- data/lib/stripe/services/reserve/plan_service.rb +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_service.rb +13 -0
- data/lib/stripe/services/subscription_schedule_service.rb +11 -0
- data/lib/stripe/services/subscription_service.rb +22 -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/capital/financing_offer_service.rb +32 -0
- data/lib/stripe/services/test_helpers/capital_service.rb +15 -0
- 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 +3 -1
- data/lib/stripe/services/v1_services.rb +14 -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/custom_pricing_unit_service.rb +54 -0
- data/lib/stripe/services/v2/billing/intent_service.rb +94 -0
- data/lib/stripe/services/v2/billing/intents/action_service.rb +34 -0
- data/lib/stripe/services/v2/billing/license_fee_service.rb +61 -0
- data/lib/stripe/services/v2/billing/license_fee_subscription_service.rb +21 -0
- data/lib/stripe/services/v2/billing/license_fees/version_service.rb +34 -0
- data/lib/stripe/services/v2/billing/licensed_item_service.rb +54 -0
- data/lib/stripe/services/v2/billing/metered_item_service.rb +54 -0
- data/lib/stripe/services/v2/billing/pricing_plan_service.rb +62 -0
- data/lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb +51 -0
- data/lib/stripe/services/v2/billing/pricing_plan_subscriptions/component_service.rb +23 -0
- data/lib/stripe/services/v2/billing/pricing_plans/component_service.rb +67 -0
- data/lib/stripe/services/v2/billing/pricing_plans/version_service.rb +34 -0
- data/lib/stripe/services/v2/billing/profile_service.rb +54 -0
- data/lib/stripe/services/v2/billing/rate_card_service.rb +62 -0
- data/lib/stripe/services/v2/billing/rate_card_subscription_service.rb +65 -0
- data/lib/stripe/services/v2/billing/rate_cards/rate_service.rb +57 -0
- data/lib/stripe/services/v2/billing/rate_cards/version_service.rb +34 -0
- data/lib/stripe/services/v2/billing/service_action_service.rb +43 -0
- data/lib/stripe/services/v2/billing_service.rb +18 -1
- data/lib/stripe/services/v2/core/account_link_service.rb +2 -0
- data/lib/stripe/services/v2/core/account_service.rb +10 -0
- data/lib/stripe/services/v2/core/account_token_service.rb +4 -0
- data/lib/stripe/services/v2/core/accounts/person_service.rb +10 -0
- data/lib/stripe/services/v2/core/accounts/person_token_service.rb +4 -0
- data/lib/stripe/services/v2/core/claimable_sandbox_service.rb +35 -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/iam/api_key_service.rb +76 -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/currency_conversion_service.rb +45 -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 +65 -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/recipient_verification_service.rb +43 -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 +35 -0
- data/lib/stripe/services/v2/payment_service.rb +17 -0
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +65 -0
- data/lib/stripe/services/v2/payments/settlement_allocation_intent_service.rb +72 -0
- data/lib/stripe/services/v2/payments/settlement_allocation_intents/split_service.rb +45 -0
- data/lib/stripe/services/v2/reporting/report_run_service.rb +38 -0
- data/lib/stripe/services/v2/reporting/report_service.rb +23 -0
- data/lib/stripe/services/v2/reporting_service.rb +16 -0
- data/lib/stripe/services/v2/tax/manual_rule_service.rb +65 -0
- data/lib/stripe/services/v2/tax_service.rb +15 -0
- data/lib/stripe/services/v2/test_helper_service.rb +16 -0
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +36 -0
- data/lib/stripe/services/v2/test_helpers/money_management_service.rb +21 -0
- data/lib/stripe/services/v2_services.rb +7 -1
- data/lib/stripe/services.rb +104 -0
- data/lib/stripe/stripe_configuration.rb +3 -1
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/util.rb +16 -4
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +53 -0
- data/rbi/stripe.rbi +147289 -62508
- metadata +612 -3
|
@@ -144,32 +144,140 @@ 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
|
|
172
|
+
|
|
173
|
+
class Settings < ::Stripe::RequestParams
|
|
174
|
+
class ServicePeriodAnchorConfig < ::Stripe::RequestParams
|
|
175
|
+
class Custom < ::Stripe::RequestParams
|
|
176
|
+
# The day of the month the anchor should be. Ranges from 1 to 31.
|
|
177
|
+
attr_accessor :day_of_month
|
|
178
|
+
# The hour of the day the anchor should be. Ranges from 0 to 23.
|
|
179
|
+
attr_accessor :hour
|
|
180
|
+
# The minute of the hour the anchor should be. Ranges from 0 to 59.
|
|
181
|
+
attr_accessor :minute
|
|
182
|
+
# The month to start full cycle periods. Ranges from 1 to 12.
|
|
183
|
+
attr_accessor :month
|
|
184
|
+
# The second of the minute the anchor should be. Ranges from 0 to 59.
|
|
185
|
+
attr_accessor :second
|
|
186
|
+
|
|
187
|
+
def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil)
|
|
188
|
+
@day_of_month = day_of_month
|
|
189
|
+
@hour = hour
|
|
190
|
+
@minute = minute
|
|
191
|
+
@month = month
|
|
192
|
+
@second = second
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
# Anchor the service period to a custom date. Type must be `custom` to specify.
|
|
196
|
+
attr_accessor :custom
|
|
197
|
+
# The type of service period anchor config. Defaults to `subscription_service_cycle_anchor` if omitted.
|
|
198
|
+
attr_accessor :type
|
|
199
|
+
|
|
200
|
+
def initialize(custom: nil, type: nil)
|
|
201
|
+
@custom = custom
|
|
202
|
+
@type = type
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
# Configures service period cycle anchoring.
|
|
206
|
+
attr_accessor :service_period_anchor_config
|
|
207
|
+
# The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `now` if omitted.
|
|
208
|
+
attr_accessor :start_date
|
|
209
|
+
|
|
210
|
+
def initialize(service_period_anchor_config: nil, start_date: nil)
|
|
211
|
+
@service_period_anchor_config = service_period_anchor_config
|
|
212
|
+
@start_date = start_date
|
|
213
|
+
end
|
|
214
|
+
end
|
|
147
215
|
# ID of the coupon to create a new discount for.
|
|
148
216
|
attr_accessor :coupon
|
|
149
217
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
150
218
|
attr_accessor :discount
|
|
219
|
+
# Details to determine how long the discount should be applied for.
|
|
220
|
+
attr_accessor :discount_end
|
|
151
221
|
# ID of the promotion code to create a new discount for.
|
|
152
222
|
attr_accessor :promotion_code
|
|
223
|
+
# Settings for discount application including service period anchoring.
|
|
224
|
+
attr_accessor :settings
|
|
153
225
|
|
|
154
|
-
def initialize(
|
|
226
|
+
def initialize(
|
|
227
|
+
coupon: nil,
|
|
228
|
+
discount: nil,
|
|
229
|
+
discount_end: nil,
|
|
230
|
+
promotion_code: nil,
|
|
231
|
+
settings: nil
|
|
232
|
+
)
|
|
155
233
|
@coupon = coupon
|
|
156
234
|
@discount = discount
|
|
235
|
+
@discount_end = discount_end
|
|
157
236
|
@promotion_code = promotion_code
|
|
237
|
+
@settings = settings
|
|
158
238
|
end
|
|
159
239
|
end
|
|
160
240
|
|
|
161
241
|
class InvoiceItem < ::Stripe::RequestParams
|
|
162
242
|
class Discount < ::Stripe::RequestParams
|
|
243
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
244
|
+
class Duration < ::Stripe::RequestParams
|
|
245
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
246
|
+
attr_accessor :interval
|
|
247
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
248
|
+
attr_accessor :interval_count
|
|
249
|
+
|
|
250
|
+
def initialize(interval: nil, interval_count: nil)
|
|
251
|
+
@interval = interval
|
|
252
|
+
@interval_count = interval_count
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
# Time span for the redeemed discount.
|
|
256
|
+
attr_accessor :duration
|
|
257
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
258
|
+
attr_accessor :timestamp
|
|
259
|
+
# The type of calculation made to determine when the discount ends.
|
|
260
|
+
attr_accessor :type
|
|
261
|
+
|
|
262
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
263
|
+
@duration = duration
|
|
264
|
+
@timestamp = timestamp
|
|
265
|
+
@type = type
|
|
266
|
+
end
|
|
267
|
+
end
|
|
163
268
|
# ID of the coupon to create a new discount for.
|
|
164
269
|
attr_accessor :coupon
|
|
165
270
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
166
271
|
attr_accessor :discount
|
|
272
|
+
# Details to determine how long the discount should be applied for.
|
|
273
|
+
attr_accessor :discount_end
|
|
167
274
|
# ID of the promotion code to create a new discount for.
|
|
168
275
|
attr_accessor :promotion_code
|
|
169
276
|
|
|
170
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
277
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
171
278
|
@coupon = coupon
|
|
172
279
|
@discount = discount
|
|
280
|
+
@discount_end = discount_end
|
|
173
281
|
@promotion_code = promotion_code
|
|
174
282
|
end
|
|
175
283
|
end
|
|
@@ -295,6 +403,705 @@ module Stripe
|
|
|
295
403
|
end
|
|
296
404
|
|
|
297
405
|
class ScheduleDetails < ::Stripe::RequestParams
|
|
406
|
+
class Amendment < ::Stripe::RequestParams
|
|
407
|
+
class AmendmentEnd < ::Stripe::RequestParams
|
|
408
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
409
|
+
# The ID of a specific discount.
|
|
410
|
+
attr_accessor :discount
|
|
411
|
+
|
|
412
|
+
def initialize(discount: nil)
|
|
413
|
+
@discount = discount
|
|
414
|
+
end
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
class Duration < ::Stripe::RequestParams
|
|
418
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
419
|
+
attr_accessor :interval
|
|
420
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
421
|
+
attr_accessor :interval_count
|
|
422
|
+
|
|
423
|
+
def initialize(interval: nil, interval_count: nil)
|
|
424
|
+
@interval = interval
|
|
425
|
+
@interval_count = interval_count
|
|
426
|
+
end
|
|
427
|
+
end
|
|
428
|
+
# Use the `end` time of a given discount.
|
|
429
|
+
attr_accessor :discount_end
|
|
430
|
+
# Time span for the amendment starting from the `amendment_start`.
|
|
431
|
+
attr_accessor :duration
|
|
432
|
+
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
|
433
|
+
attr_accessor :timestamp
|
|
434
|
+
# Select one of three ways to pass the `amendment_end`.
|
|
435
|
+
attr_accessor :type
|
|
436
|
+
|
|
437
|
+
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
|
438
|
+
@discount_end = discount_end
|
|
439
|
+
@duration = duration
|
|
440
|
+
@timestamp = timestamp
|
|
441
|
+
@type = type
|
|
442
|
+
end
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
class AmendmentStart < ::Stripe::RequestParams
|
|
446
|
+
class AmendmentEnd < ::Stripe::RequestParams
|
|
447
|
+
# 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.
|
|
448
|
+
attr_accessor :index
|
|
449
|
+
|
|
450
|
+
def initialize(index: nil)
|
|
451
|
+
@index = index
|
|
452
|
+
end
|
|
453
|
+
end
|
|
454
|
+
|
|
455
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
456
|
+
# The ID of a specific discount.
|
|
457
|
+
attr_accessor :discount
|
|
458
|
+
|
|
459
|
+
def initialize(discount: nil)
|
|
460
|
+
@discount = discount
|
|
461
|
+
end
|
|
462
|
+
end
|
|
463
|
+
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
|
464
|
+
attr_accessor :amendment_end
|
|
465
|
+
# Use the `end` time of a given discount.
|
|
466
|
+
attr_accessor :discount_end
|
|
467
|
+
# A precise Unix timestamp for the amendment to start.
|
|
468
|
+
attr_accessor :timestamp
|
|
469
|
+
# Select one of three ways to pass the `amendment_start`.
|
|
470
|
+
attr_accessor :type
|
|
471
|
+
|
|
472
|
+
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
|
473
|
+
@amendment_end = amendment_end
|
|
474
|
+
@discount_end = discount_end
|
|
475
|
+
@timestamp = timestamp
|
|
476
|
+
@type = type
|
|
477
|
+
end
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
class BillingSchedulesAction < ::Stripe::RequestParams
|
|
481
|
+
class AppliesTo < ::Stripe::RequestParams
|
|
482
|
+
# The ID of the price object.
|
|
483
|
+
attr_accessor :price
|
|
484
|
+
# Controls which subscription items the billing schedule applies to.
|
|
485
|
+
attr_accessor :type
|
|
486
|
+
|
|
487
|
+
def initialize(price: nil, type: nil)
|
|
488
|
+
@price = price
|
|
489
|
+
@type = type
|
|
490
|
+
end
|
|
491
|
+
end
|
|
492
|
+
# Specify which subscription items the billing schedule applies to.
|
|
493
|
+
attr_accessor :applies_to
|
|
494
|
+
# Select the action.
|
|
495
|
+
attr_accessor :type
|
|
496
|
+
|
|
497
|
+
def initialize(applies_to: nil, type: nil)
|
|
498
|
+
@applies_to = applies_to
|
|
499
|
+
@type = type
|
|
500
|
+
end
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
class DiscountAction < ::Stripe::RequestParams
|
|
504
|
+
class Add < ::Stripe::RequestParams
|
|
505
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
506
|
+
# The type of calculation made to determine when the discount ends.
|
|
507
|
+
attr_accessor :type
|
|
508
|
+
|
|
509
|
+
def initialize(type: nil)
|
|
510
|
+
@type = type
|
|
511
|
+
end
|
|
512
|
+
end
|
|
513
|
+
|
|
514
|
+
class Settings < ::Stripe::RequestParams
|
|
515
|
+
class ServicePeriodAnchorConfig < ::Stripe::RequestParams
|
|
516
|
+
class Custom < ::Stripe::RequestParams
|
|
517
|
+
# The day of the month the anchor should be. Ranges from 1 to 31.
|
|
518
|
+
attr_accessor :day_of_month
|
|
519
|
+
# The hour of the day the anchor should be. Ranges from 0 to 23.
|
|
520
|
+
attr_accessor :hour
|
|
521
|
+
# The minute of the hour the anchor should be. Ranges from 0 to 59.
|
|
522
|
+
attr_accessor :minute
|
|
523
|
+
# The month to start full cycle periods. Ranges from 1 to 12.
|
|
524
|
+
attr_accessor :month
|
|
525
|
+
# The second of the minute the anchor should be. Ranges from 0 to 59.
|
|
526
|
+
attr_accessor :second
|
|
527
|
+
|
|
528
|
+
def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil)
|
|
529
|
+
@day_of_month = day_of_month
|
|
530
|
+
@hour = hour
|
|
531
|
+
@minute = minute
|
|
532
|
+
@month = month
|
|
533
|
+
@second = second
|
|
534
|
+
end
|
|
535
|
+
end
|
|
536
|
+
# Anchor the service period to a custom date. Type must be `custom` to specify.
|
|
537
|
+
attr_accessor :custom
|
|
538
|
+
# The type of service period anchor config. Defaults to `inherit` if omitted.
|
|
539
|
+
attr_accessor :type
|
|
540
|
+
|
|
541
|
+
def initialize(custom: nil, type: nil)
|
|
542
|
+
@custom = custom
|
|
543
|
+
@type = type
|
|
544
|
+
end
|
|
545
|
+
end
|
|
546
|
+
# Configures service period cycle anchoring.
|
|
547
|
+
attr_accessor :service_period_anchor_config
|
|
548
|
+
# The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `amendment_start` if omitted.
|
|
549
|
+
attr_accessor :start_date
|
|
550
|
+
|
|
551
|
+
def initialize(service_period_anchor_config: nil, start_date: nil)
|
|
552
|
+
@service_period_anchor_config = service_period_anchor_config
|
|
553
|
+
@start_date = start_date
|
|
554
|
+
end
|
|
555
|
+
end
|
|
556
|
+
# The coupon code to redeem.
|
|
557
|
+
attr_accessor :coupon
|
|
558
|
+
# An ID of an existing discount for a coupon that was already redeemed.
|
|
559
|
+
attr_accessor :discount
|
|
560
|
+
# Details to determine how long the discount should be applied for.
|
|
561
|
+
attr_accessor :discount_end
|
|
562
|
+
# 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.
|
|
563
|
+
attr_accessor :index
|
|
564
|
+
# The promotion code to redeem.
|
|
565
|
+
attr_accessor :promotion_code
|
|
566
|
+
# Settings for discount application including service period anchoring.
|
|
567
|
+
attr_accessor :settings
|
|
568
|
+
|
|
569
|
+
def initialize(
|
|
570
|
+
coupon: nil,
|
|
571
|
+
discount: nil,
|
|
572
|
+
discount_end: nil,
|
|
573
|
+
index: nil,
|
|
574
|
+
promotion_code: nil,
|
|
575
|
+
settings: nil
|
|
576
|
+
)
|
|
577
|
+
@coupon = coupon
|
|
578
|
+
@discount = discount
|
|
579
|
+
@discount_end = discount_end
|
|
580
|
+
@index = index
|
|
581
|
+
@promotion_code = promotion_code
|
|
582
|
+
@settings = settings
|
|
583
|
+
end
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
class Remove < ::Stripe::RequestParams
|
|
587
|
+
# The coupon code to remove from the `discounts` array.
|
|
588
|
+
attr_accessor :coupon
|
|
589
|
+
# The ID of a discount to remove from the `discounts` array.
|
|
590
|
+
attr_accessor :discount
|
|
591
|
+
# The ID of a promotion code to remove from the `discounts` array.
|
|
592
|
+
attr_accessor :promotion_code
|
|
593
|
+
|
|
594
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
595
|
+
@coupon = coupon
|
|
596
|
+
@discount = discount
|
|
597
|
+
@promotion_code = promotion_code
|
|
598
|
+
end
|
|
599
|
+
end
|
|
600
|
+
|
|
601
|
+
class Set < ::Stripe::RequestParams
|
|
602
|
+
class Settings < ::Stripe::RequestParams
|
|
603
|
+
class ServicePeriodAnchorConfig < ::Stripe::RequestParams
|
|
604
|
+
class Custom < ::Stripe::RequestParams
|
|
605
|
+
# The day of the month the anchor should be. Ranges from 1 to 31.
|
|
606
|
+
attr_accessor :day_of_month
|
|
607
|
+
# The hour of the day the anchor should be. Ranges from 0 to 23.
|
|
608
|
+
attr_accessor :hour
|
|
609
|
+
# The minute of the hour the anchor should be. Ranges from 0 to 59.
|
|
610
|
+
attr_accessor :minute
|
|
611
|
+
# The month to start full cycle periods. Ranges from 1 to 12.
|
|
612
|
+
attr_accessor :month
|
|
613
|
+
# The second of the minute the anchor should be. Ranges from 0 to 59.
|
|
614
|
+
attr_accessor :second
|
|
615
|
+
|
|
616
|
+
def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil)
|
|
617
|
+
@day_of_month = day_of_month
|
|
618
|
+
@hour = hour
|
|
619
|
+
@minute = minute
|
|
620
|
+
@month = month
|
|
621
|
+
@second = second
|
|
622
|
+
end
|
|
623
|
+
end
|
|
624
|
+
# Anchor the service period to a custom date. Type must be `custom` to specify.
|
|
625
|
+
attr_accessor :custom
|
|
626
|
+
# The type of service period anchor config. Defaults to `inherit` if omitted.
|
|
627
|
+
attr_accessor :type
|
|
628
|
+
|
|
629
|
+
def initialize(custom: nil, type: nil)
|
|
630
|
+
@custom = custom
|
|
631
|
+
@type = type
|
|
632
|
+
end
|
|
633
|
+
end
|
|
634
|
+
# Configures service period cycle anchoring.
|
|
635
|
+
attr_accessor :service_period_anchor_config
|
|
636
|
+
# The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `amendment_start` if omitted.
|
|
637
|
+
attr_accessor :start_date
|
|
638
|
+
|
|
639
|
+
def initialize(service_period_anchor_config: nil, start_date: nil)
|
|
640
|
+
@service_period_anchor_config = service_period_anchor_config
|
|
641
|
+
@start_date = start_date
|
|
642
|
+
end
|
|
643
|
+
end
|
|
644
|
+
# The coupon code to replace the `discounts` array with.
|
|
645
|
+
attr_accessor :coupon
|
|
646
|
+
# An ID of an existing discount to replace the `discounts` array with.
|
|
647
|
+
attr_accessor :discount
|
|
648
|
+
# An ID of an existing promotion code to replace the `discounts` array with.
|
|
649
|
+
attr_accessor :promotion_code
|
|
650
|
+
# Settings for discount application including service period anchoring.
|
|
651
|
+
attr_accessor :settings
|
|
652
|
+
|
|
653
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil, settings: nil)
|
|
654
|
+
@coupon = coupon
|
|
655
|
+
@discount = discount
|
|
656
|
+
@promotion_code = promotion_code
|
|
657
|
+
@settings = settings
|
|
658
|
+
end
|
|
659
|
+
end
|
|
660
|
+
# Details of the discount to add.
|
|
661
|
+
attr_accessor :add
|
|
662
|
+
# Details of the discount to remove.
|
|
663
|
+
attr_accessor :remove
|
|
664
|
+
# Details of the discount to replace the existing discounts with.
|
|
665
|
+
attr_accessor :set
|
|
666
|
+
# Determines the type of discount action.
|
|
667
|
+
attr_accessor :type
|
|
668
|
+
|
|
669
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
|
670
|
+
@add = add
|
|
671
|
+
@remove = remove
|
|
672
|
+
@set = set
|
|
673
|
+
@type = type
|
|
674
|
+
end
|
|
675
|
+
end
|
|
676
|
+
|
|
677
|
+
class ItemAction < ::Stripe::RequestParams
|
|
678
|
+
class Add < ::Stripe::RequestParams
|
|
679
|
+
class Discount < ::Stripe::RequestParams
|
|
680
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
681
|
+
class Duration < ::Stripe::RequestParams
|
|
682
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
683
|
+
attr_accessor :interval
|
|
684
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
685
|
+
attr_accessor :interval_count
|
|
686
|
+
|
|
687
|
+
def initialize(interval: nil, interval_count: nil)
|
|
688
|
+
@interval = interval
|
|
689
|
+
@interval_count = interval_count
|
|
690
|
+
end
|
|
691
|
+
end
|
|
692
|
+
# Time span for the redeemed discount.
|
|
693
|
+
attr_accessor :duration
|
|
694
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
695
|
+
attr_accessor :timestamp
|
|
696
|
+
# The type of calculation made to determine when the discount ends.
|
|
697
|
+
attr_accessor :type
|
|
698
|
+
|
|
699
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
700
|
+
@duration = duration
|
|
701
|
+
@timestamp = timestamp
|
|
702
|
+
@type = type
|
|
703
|
+
end
|
|
704
|
+
end
|
|
705
|
+
|
|
706
|
+
class Settings < ::Stripe::RequestParams
|
|
707
|
+
class ServicePeriodAnchorConfig < ::Stripe::RequestParams
|
|
708
|
+
class Custom < ::Stripe::RequestParams
|
|
709
|
+
# The day of the month the anchor should be. Ranges from 1 to 31.
|
|
710
|
+
attr_accessor :day_of_month
|
|
711
|
+
# The hour of the day the anchor should be. Ranges from 0 to 23.
|
|
712
|
+
attr_accessor :hour
|
|
713
|
+
# The minute of the hour the anchor should be. Ranges from 0 to 59.
|
|
714
|
+
attr_accessor :minute
|
|
715
|
+
# The month to start full cycle periods. Ranges from 1 to 12.
|
|
716
|
+
attr_accessor :month
|
|
717
|
+
# The second of the minute the anchor should be. Ranges from 0 to 59.
|
|
718
|
+
attr_accessor :second
|
|
719
|
+
|
|
720
|
+
def initialize(
|
|
721
|
+
day_of_month: nil,
|
|
722
|
+
hour: nil,
|
|
723
|
+
minute: nil,
|
|
724
|
+
month: nil,
|
|
725
|
+
second: nil
|
|
726
|
+
)
|
|
727
|
+
@day_of_month = day_of_month
|
|
728
|
+
@hour = hour
|
|
729
|
+
@minute = minute
|
|
730
|
+
@month = month
|
|
731
|
+
@second = second
|
|
732
|
+
end
|
|
733
|
+
end
|
|
734
|
+
# Anchor the service period to a custom date. Type must be `custom` to specify.
|
|
735
|
+
attr_accessor :custom
|
|
736
|
+
# The type of service period anchor config. Defaults to `inherit` if omitted.
|
|
737
|
+
attr_accessor :type
|
|
738
|
+
|
|
739
|
+
def initialize(custom: nil, type: nil)
|
|
740
|
+
@custom = custom
|
|
741
|
+
@type = type
|
|
742
|
+
end
|
|
743
|
+
end
|
|
744
|
+
# Configures service period cycle anchoring.
|
|
745
|
+
attr_accessor :service_period_anchor_config
|
|
746
|
+
# The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `amendment_start` if omitted.
|
|
747
|
+
attr_accessor :start_date
|
|
748
|
+
|
|
749
|
+
def initialize(service_period_anchor_config: nil, start_date: nil)
|
|
750
|
+
@service_period_anchor_config = service_period_anchor_config
|
|
751
|
+
@start_date = start_date
|
|
752
|
+
end
|
|
753
|
+
end
|
|
754
|
+
# ID of the coupon to create a new discount for.
|
|
755
|
+
attr_accessor :coupon
|
|
756
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
757
|
+
attr_accessor :discount
|
|
758
|
+
# Details to determine how long the discount should be applied for.
|
|
759
|
+
attr_accessor :discount_end
|
|
760
|
+
# ID of the promotion code to create a new discount for.
|
|
761
|
+
attr_accessor :promotion_code
|
|
762
|
+
# Settings for discount application including service period anchoring.
|
|
763
|
+
attr_accessor :settings
|
|
764
|
+
|
|
765
|
+
def initialize(
|
|
766
|
+
coupon: nil,
|
|
767
|
+
discount: nil,
|
|
768
|
+
discount_end: nil,
|
|
769
|
+
promotion_code: nil,
|
|
770
|
+
settings: nil
|
|
771
|
+
)
|
|
772
|
+
@coupon = coupon
|
|
773
|
+
@discount = discount
|
|
774
|
+
@discount_end = discount_end
|
|
775
|
+
@promotion_code = promotion_code
|
|
776
|
+
@settings = settings
|
|
777
|
+
end
|
|
778
|
+
end
|
|
779
|
+
|
|
780
|
+
class Trial < ::Stripe::RequestParams
|
|
781
|
+
# 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.
|
|
782
|
+
attr_accessor :converts_to
|
|
783
|
+
# Determines the type of trial for this item.
|
|
784
|
+
attr_accessor :type
|
|
785
|
+
|
|
786
|
+
def initialize(converts_to: nil, type: nil)
|
|
787
|
+
@converts_to = converts_to
|
|
788
|
+
@type = type
|
|
789
|
+
end
|
|
790
|
+
end
|
|
791
|
+
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
792
|
+
attr_accessor :discounts
|
|
793
|
+
# 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`.
|
|
794
|
+
attr_accessor :metadata
|
|
795
|
+
# The ID of the price object.
|
|
796
|
+
attr_accessor :price
|
|
797
|
+
# Quantity for this item.
|
|
798
|
+
attr_accessor :quantity
|
|
799
|
+
# 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`.
|
|
800
|
+
attr_accessor :tax_rates
|
|
801
|
+
# Options that configure the trial on the subscription item.
|
|
802
|
+
attr_accessor :trial
|
|
803
|
+
# The ID of the trial offer to apply to the configuration item.
|
|
804
|
+
attr_accessor :trial_offer
|
|
805
|
+
|
|
806
|
+
def initialize(
|
|
807
|
+
discounts: nil,
|
|
808
|
+
metadata: nil,
|
|
809
|
+
price: nil,
|
|
810
|
+
quantity: nil,
|
|
811
|
+
tax_rates: nil,
|
|
812
|
+
trial: nil,
|
|
813
|
+
trial_offer: nil
|
|
814
|
+
)
|
|
815
|
+
@discounts = discounts
|
|
816
|
+
@metadata = metadata
|
|
817
|
+
@price = price
|
|
818
|
+
@quantity = quantity
|
|
819
|
+
@tax_rates = tax_rates
|
|
820
|
+
@trial = trial
|
|
821
|
+
@trial_offer = trial_offer
|
|
822
|
+
end
|
|
823
|
+
end
|
|
824
|
+
|
|
825
|
+
class Remove < ::Stripe::RequestParams
|
|
826
|
+
# ID of a price to remove.
|
|
827
|
+
attr_accessor :price
|
|
828
|
+
|
|
829
|
+
def initialize(price: nil)
|
|
830
|
+
@price = price
|
|
831
|
+
end
|
|
832
|
+
end
|
|
833
|
+
|
|
834
|
+
class Set < ::Stripe::RequestParams
|
|
835
|
+
class Discount < ::Stripe::RequestParams
|
|
836
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
837
|
+
class Duration < ::Stripe::RequestParams
|
|
838
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
839
|
+
attr_accessor :interval
|
|
840
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
841
|
+
attr_accessor :interval_count
|
|
842
|
+
|
|
843
|
+
def initialize(interval: nil, interval_count: nil)
|
|
844
|
+
@interval = interval
|
|
845
|
+
@interval_count = interval_count
|
|
846
|
+
end
|
|
847
|
+
end
|
|
848
|
+
# Time span for the redeemed discount.
|
|
849
|
+
attr_accessor :duration
|
|
850
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
851
|
+
attr_accessor :timestamp
|
|
852
|
+
# The type of calculation made to determine when the discount ends.
|
|
853
|
+
attr_accessor :type
|
|
854
|
+
|
|
855
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
856
|
+
@duration = duration
|
|
857
|
+
@timestamp = timestamp
|
|
858
|
+
@type = type
|
|
859
|
+
end
|
|
860
|
+
end
|
|
861
|
+
|
|
862
|
+
class Settings < ::Stripe::RequestParams
|
|
863
|
+
class ServicePeriodAnchorConfig < ::Stripe::RequestParams
|
|
864
|
+
class Custom < ::Stripe::RequestParams
|
|
865
|
+
# The day of the month the anchor should be. Ranges from 1 to 31.
|
|
866
|
+
attr_accessor :day_of_month
|
|
867
|
+
# The hour of the day the anchor should be. Ranges from 0 to 23.
|
|
868
|
+
attr_accessor :hour
|
|
869
|
+
# The minute of the hour the anchor should be. Ranges from 0 to 59.
|
|
870
|
+
attr_accessor :minute
|
|
871
|
+
# The month to start full cycle periods. Ranges from 1 to 12.
|
|
872
|
+
attr_accessor :month
|
|
873
|
+
# The second of the minute the anchor should be. Ranges from 0 to 59.
|
|
874
|
+
attr_accessor :second
|
|
875
|
+
|
|
876
|
+
def initialize(
|
|
877
|
+
day_of_month: nil,
|
|
878
|
+
hour: nil,
|
|
879
|
+
minute: nil,
|
|
880
|
+
month: nil,
|
|
881
|
+
second: nil
|
|
882
|
+
)
|
|
883
|
+
@day_of_month = day_of_month
|
|
884
|
+
@hour = hour
|
|
885
|
+
@minute = minute
|
|
886
|
+
@month = month
|
|
887
|
+
@second = second
|
|
888
|
+
end
|
|
889
|
+
end
|
|
890
|
+
# Anchor the service period to a custom date. Type must be `custom` to specify.
|
|
891
|
+
attr_accessor :custom
|
|
892
|
+
# The type of service period anchor config. Defaults to `inherit` if omitted.
|
|
893
|
+
attr_accessor :type
|
|
894
|
+
|
|
895
|
+
def initialize(custom: nil, type: nil)
|
|
896
|
+
@custom = custom
|
|
897
|
+
@type = type
|
|
898
|
+
end
|
|
899
|
+
end
|
|
900
|
+
# Configures service period cycle anchoring.
|
|
901
|
+
attr_accessor :service_period_anchor_config
|
|
902
|
+
# The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `amendment_start` if omitted.
|
|
903
|
+
attr_accessor :start_date
|
|
904
|
+
|
|
905
|
+
def initialize(service_period_anchor_config: nil, start_date: nil)
|
|
906
|
+
@service_period_anchor_config = service_period_anchor_config
|
|
907
|
+
@start_date = start_date
|
|
908
|
+
end
|
|
909
|
+
end
|
|
910
|
+
# ID of the coupon to create a new discount for.
|
|
911
|
+
attr_accessor :coupon
|
|
912
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
913
|
+
attr_accessor :discount
|
|
914
|
+
# Details to determine how long the discount should be applied for.
|
|
915
|
+
attr_accessor :discount_end
|
|
916
|
+
# ID of the promotion code to create a new discount for.
|
|
917
|
+
attr_accessor :promotion_code
|
|
918
|
+
# Settings for discount application including service period anchoring.
|
|
919
|
+
attr_accessor :settings
|
|
920
|
+
|
|
921
|
+
def initialize(
|
|
922
|
+
coupon: nil,
|
|
923
|
+
discount: nil,
|
|
924
|
+
discount_end: nil,
|
|
925
|
+
promotion_code: nil,
|
|
926
|
+
settings: nil
|
|
927
|
+
)
|
|
928
|
+
@coupon = coupon
|
|
929
|
+
@discount = discount
|
|
930
|
+
@discount_end = discount_end
|
|
931
|
+
@promotion_code = promotion_code
|
|
932
|
+
@settings = settings
|
|
933
|
+
end
|
|
934
|
+
end
|
|
935
|
+
|
|
936
|
+
class Trial < ::Stripe::RequestParams
|
|
937
|
+
# 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.
|
|
938
|
+
attr_accessor :converts_to
|
|
939
|
+
# Determines the type of trial for this item.
|
|
940
|
+
attr_accessor :type
|
|
941
|
+
|
|
942
|
+
def initialize(converts_to: nil, type: nil)
|
|
943
|
+
@converts_to = converts_to
|
|
944
|
+
@type = type
|
|
945
|
+
end
|
|
946
|
+
end
|
|
947
|
+
# 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`.
|
|
948
|
+
attr_accessor :discounts
|
|
949
|
+
# 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`.
|
|
950
|
+
attr_accessor :metadata
|
|
951
|
+
# The ID of the price object.
|
|
952
|
+
attr_accessor :price
|
|
953
|
+
# 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`.
|
|
954
|
+
attr_accessor :quantity
|
|
955
|
+
# 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`.
|
|
956
|
+
attr_accessor :tax_rates
|
|
957
|
+
# 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`.
|
|
958
|
+
attr_accessor :trial
|
|
959
|
+
# The ID of the trial offer to apply to the configuration item.
|
|
960
|
+
attr_accessor :trial_offer
|
|
961
|
+
|
|
962
|
+
def initialize(
|
|
963
|
+
discounts: nil,
|
|
964
|
+
metadata: nil,
|
|
965
|
+
price: nil,
|
|
966
|
+
quantity: nil,
|
|
967
|
+
tax_rates: nil,
|
|
968
|
+
trial: nil,
|
|
969
|
+
trial_offer: nil
|
|
970
|
+
)
|
|
971
|
+
@discounts = discounts
|
|
972
|
+
@metadata = metadata
|
|
973
|
+
@price = price
|
|
974
|
+
@quantity = quantity
|
|
975
|
+
@tax_rates = tax_rates
|
|
976
|
+
@trial = trial
|
|
977
|
+
@trial_offer = trial_offer
|
|
978
|
+
end
|
|
979
|
+
end
|
|
980
|
+
# 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.
|
|
981
|
+
attr_accessor :add
|
|
982
|
+
# Details of the subscription item to remove.
|
|
983
|
+
attr_accessor :remove
|
|
984
|
+
# 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.
|
|
985
|
+
attr_accessor :set
|
|
986
|
+
# Determines the type of item action.
|
|
987
|
+
attr_accessor :type
|
|
988
|
+
|
|
989
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
|
990
|
+
@add = add
|
|
991
|
+
@remove = remove
|
|
992
|
+
@set = set
|
|
993
|
+
@type = type
|
|
994
|
+
end
|
|
995
|
+
end
|
|
996
|
+
|
|
997
|
+
class MetadataAction < ::Stripe::RequestParams
|
|
998
|
+
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
|
999
|
+
attr_accessor :add
|
|
1000
|
+
# Keys to remove from schedule phase metadata.
|
|
1001
|
+
attr_accessor :remove
|
|
1002
|
+
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
|
1003
|
+
attr_accessor :set
|
|
1004
|
+
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
|
1005
|
+
attr_accessor :type
|
|
1006
|
+
|
|
1007
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
|
1008
|
+
@add = add
|
|
1009
|
+
@remove = remove
|
|
1010
|
+
@set = set
|
|
1011
|
+
@type = type
|
|
1012
|
+
end
|
|
1013
|
+
end
|
|
1014
|
+
|
|
1015
|
+
class SetPauseCollection < ::Stripe::RequestParams
|
|
1016
|
+
class Set < ::Stripe::RequestParams
|
|
1017
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
1018
|
+
attr_accessor :behavior
|
|
1019
|
+
|
|
1020
|
+
def initialize(behavior: nil)
|
|
1021
|
+
@behavior = behavior
|
|
1022
|
+
end
|
|
1023
|
+
end
|
|
1024
|
+
# Details of the pause_collection behavior to apply to the amendment.
|
|
1025
|
+
attr_accessor :set
|
|
1026
|
+
# Determines the type of the pause_collection amendment.
|
|
1027
|
+
attr_accessor :type
|
|
1028
|
+
|
|
1029
|
+
def initialize(set: nil, type: nil)
|
|
1030
|
+
@set = set
|
|
1031
|
+
@type = type
|
|
1032
|
+
end
|
|
1033
|
+
end
|
|
1034
|
+
|
|
1035
|
+
class TrialSettings < ::Stripe::RequestParams
|
|
1036
|
+
class EndBehavior < ::Stripe::RequestParams
|
|
1037
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
1038
|
+
attr_accessor :prorate_up_front
|
|
1039
|
+
|
|
1040
|
+
def initialize(prorate_up_front: nil)
|
|
1041
|
+
@prorate_up_front = prorate_up_front
|
|
1042
|
+
end
|
|
1043
|
+
end
|
|
1044
|
+
# Defines how the subscription should behave when a trial ends.
|
|
1045
|
+
attr_accessor :end_behavior
|
|
1046
|
+
|
|
1047
|
+
def initialize(end_behavior: nil)
|
|
1048
|
+
@end_behavior = end_behavior
|
|
1049
|
+
end
|
|
1050
|
+
end
|
|
1051
|
+
# 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.
|
|
1052
|
+
attr_accessor :amendment_end
|
|
1053
|
+
# Details to identify the earliest timestamp where the proposed change should take effect.
|
|
1054
|
+
attr_accessor :amendment_start
|
|
1055
|
+
# 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.
|
|
1056
|
+
attr_accessor :billing_cycle_anchor
|
|
1057
|
+
# Actions to apply to the billing schedules.
|
|
1058
|
+
attr_accessor :billing_schedules_actions
|
|
1059
|
+
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
|
1060
|
+
attr_accessor :discount_actions
|
|
1061
|
+
# Configures how the subscription schedule handles billing for phase transitions.
|
|
1062
|
+
attr_accessor :effective_at
|
|
1063
|
+
# Changes to the subscription items during the amendment time span.
|
|
1064
|
+
attr_accessor :item_actions
|
|
1065
|
+
# Instructions for how to modify phase metadata
|
|
1066
|
+
attr_accessor :metadata_actions
|
|
1067
|
+
# 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`.
|
|
1068
|
+
attr_accessor :proration_behavior
|
|
1069
|
+
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
1070
|
+
attr_accessor :set_pause_collection
|
|
1071
|
+
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
|
1072
|
+
attr_accessor :set_schedule_end
|
|
1073
|
+
# Settings related to subscription trials.
|
|
1074
|
+
attr_accessor :trial_settings
|
|
1075
|
+
|
|
1076
|
+
def initialize(
|
|
1077
|
+
amendment_end: nil,
|
|
1078
|
+
amendment_start: nil,
|
|
1079
|
+
billing_cycle_anchor: nil,
|
|
1080
|
+
billing_schedules_actions: nil,
|
|
1081
|
+
discount_actions: nil,
|
|
1082
|
+
effective_at: nil,
|
|
1083
|
+
item_actions: nil,
|
|
1084
|
+
metadata_actions: nil,
|
|
1085
|
+
proration_behavior: nil,
|
|
1086
|
+
set_pause_collection: nil,
|
|
1087
|
+
set_schedule_end: nil,
|
|
1088
|
+
trial_settings: nil
|
|
1089
|
+
)
|
|
1090
|
+
@amendment_end = amendment_end
|
|
1091
|
+
@amendment_start = amendment_start
|
|
1092
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
|
1093
|
+
@billing_schedules_actions = billing_schedules_actions
|
|
1094
|
+
@discount_actions = discount_actions
|
|
1095
|
+
@effective_at = effective_at
|
|
1096
|
+
@item_actions = item_actions
|
|
1097
|
+
@metadata_actions = metadata_actions
|
|
1098
|
+
@proration_behavior = proration_behavior
|
|
1099
|
+
@set_pause_collection = set_pause_collection
|
|
1100
|
+
@set_schedule_end = set_schedule_end
|
|
1101
|
+
@trial_settings = trial_settings
|
|
1102
|
+
end
|
|
1103
|
+
end
|
|
1104
|
+
|
|
298
1105
|
class BillingMode < ::Stripe::RequestParams
|
|
299
1106
|
class Flexible < ::Stripe::RequestParams
|
|
300
1107
|
# Controls how invoices and invoice items display proration amounts and discount amounts.
|
|
@@ -315,19 +1122,99 @@ module Stripe
|
|
|
315
1122
|
end
|
|
316
1123
|
end
|
|
317
1124
|
|
|
1125
|
+
class BillingSchedule < ::Stripe::RequestParams
|
|
1126
|
+
class AppliesTo < ::Stripe::RequestParams
|
|
1127
|
+
# The ID of the price object.
|
|
1128
|
+
attr_accessor :price
|
|
1129
|
+
# Controls which subscription items the billing schedule applies to.
|
|
1130
|
+
attr_accessor :type
|
|
1131
|
+
|
|
1132
|
+
def initialize(price: nil, type: nil)
|
|
1133
|
+
@price = price
|
|
1134
|
+
@type = type
|
|
1135
|
+
end
|
|
1136
|
+
end
|
|
1137
|
+
|
|
1138
|
+
class BillUntil < ::Stripe::RequestParams
|
|
1139
|
+
class Duration < ::Stripe::RequestParams
|
|
1140
|
+
# Specifies billing duration. Either `day`, `week`, `month` or `year`.
|
|
1141
|
+
attr_accessor :interval
|
|
1142
|
+
# The multiplier applied to the interval.
|
|
1143
|
+
attr_accessor :interval_count
|
|
1144
|
+
|
|
1145
|
+
def initialize(interval: nil, interval_count: nil)
|
|
1146
|
+
@interval = interval
|
|
1147
|
+
@interval_count = interval_count
|
|
1148
|
+
end
|
|
1149
|
+
end
|
|
1150
|
+
# Specifies the billing period.
|
|
1151
|
+
attr_accessor :duration
|
|
1152
|
+
# The end date of the billing schedule.
|
|
1153
|
+
attr_accessor :timestamp
|
|
1154
|
+
# Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
|
|
1155
|
+
attr_accessor :type
|
|
1156
|
+
|
|
1157
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
1158
|
+
@duration = duration
|
|
1159
|
+
@timestamp = timestamp
|
|
1160
|
+
@type = type
|
|
1161
|
+
end
|
|
1162
|
+
end
|
|
1163
|
+
# Configure billing schedule differently for individual subscription items.
|
|
1164
|
+
attr_accessor :applies_to
|
|
1165
|
+
# The end date for the billing schedule.
|
|
1166
|
+
attr_accessor :bill_until
|
|
1167
|
+
# 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.
|
|
1168
|
+
attr_accessor :key
|
|
1169
|
+
|
|
1170
|
+
def initialize(applies_to: nil, bill_until: nil, key: nil)
|
|
1171
|
+
@applies_to = applies_to
|
|
1172
|
+
@bill_until = bill_until
|
|
1173
|
+
@key = key
|
|
1174
|
+
end
|
|
1175
|
+
end
|
|
1176
|
+
|
|
318
1177
|
class Phase < ::Stripe::RequestParams
|
|
319
1178
|
class AddInvoiceItem < ::Stripe::RequestParams
|
|
320
1179
|
class Discount < ::Stripe::RequestParams
|
|
1180
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
1181
|
+
class Duration < ::Stripe::RequestParams
|
|
1182
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1183
|
+
attr_accessor :interval
|
|
1184
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1185
|
+
attr_accessor :interval_count
|
|
1186
|
+
|
|
1187
|
+
def initialize(interval: nil, interval_count: nil)
|
|
1188
|
+
@interval = interval
|
|
1189
|
+
@interval_count = interval_count
|
|
1190
|
+
end
|
|
1191
|
+
end
|
|
1192
|
+
# Time span for the redeemed discount.
|
|
1193
|
+
attr_accessor :duration
|
|
1194
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1195
|
+
attr_accessor :timestamp
|
|
1196
|
+
# The type of calculation made to determine when the discount ends.
|
|
1197
|
+
attr_accessor :type
|
|
1198
|
+
|
|
1199
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
1200
|
+
@duration = duration
|
|
1201
|
+
@timestamp = timestamp
|
|
1202
|
+
@type = type
|
|
1203
|
+
end
|
|
1204
|
+
end
|
|
321
1205
|
# ID of the coupon to create a new discount for.
|
|
322
1206
|
attr_accessor :coupon
|
|
323
1207
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
324
1208
|
attr_accessor :discount
|
|
1209
|
+
# Details to determine how long the discount should be applied for.
|
|
1210
|
+
attr_accessor :discount_end
|
|
325
1211
|
# ID of the promotion code to create a new discount for.
|
|
326
1212
|
attr_accessor :promotion_code
|
|
327
1213
|
|
|
328
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
|
1214
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
|
329
1215
|
@coupon = coupon
|
|
330
1216
|
@discount = discount
|
|
1217
|
+
@discount_end = discount_end
|
|
331
1218
|
@promotion_code = promotion_code
|
|
332
1219
|
end
|
|
333
1220
|
end
|
|
@@ -463,17 +1350,97 @@ module Stripe
|
|
|
463
1350
|
end
|
|
464
1351
|
|
|
465
1352
|
class Discount < ::Stripe::RequestParams
|
|
1353
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
1354
|
+
class Duration < ::Stripe::RequestParams
|
|
1355
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1356
|
+
attr_accessor :interval
|
|
1357
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1358
|
+
attr_accessor :interval_count
|
|
1359
|
+
|
|
1360
|
+
def initialize(interval: nil, interval_count: nil)
|
|
1361
|
+
@interval = interval
|
|
1362
|
+
@interval_count = interval_count
|
|
1363
|
+
end
|
|
1364
|
+
end
|
|
1365
|
+
# Time span for the redeemed discount.
|
|
1366
|
+
attr_accessor :duration
|
|
1367
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1368
|
+
attr_accessor :timestamp
|
|
1369
|
+
# The type of calculation made to determine when the discount ends.
|
|
1370
|
+
attr_accessor :type
|
|
1371
|
+
|
|
1372
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
1373
|
+
@duration = duration
|
|
1374
|
+
@timestamp = timestamp
|
|
1375
|
+
@type = type
|
|
1376
|
+
end
|
|
1377
|
+
end
|
|
1378
|
+
|
|
1379
|
+
class Settings < ::Stripe::RequestParams
|
|
1380
|
+
class ServicePeriodAnchorConfig < ::Stripe::RequestParams
|
|
1381
|
+
class Custom < ::Stripe::RequestParams
|
|
1382
|
+
# The day of the month the anchor should be. Ranges from 1 to 31.
|
|
1383
|
+
attr_accessor :day_of_month
|
|
1384
|
+
# The hour of the day the anchor should be. Ranges from 0 to 23.
|
|
1385
|
+
attr_accessor :hour
|
|
1386
|
+
# The minute of the hour the anchor should be. Ranges from 0 to 59.
|
|
1387
|
+
attr_accessor :minute
|
|
1388
|
+
# The month to start full cycle periods. Ranges from 1 to 12.
|
|
1389
|
+
attr_accessor :month
|
|
1390
|
+
# The second of the minute the anchor should be. Ranges from 0 to 59.
|
|
1391
|
+
attr_accessor :second
|
|
1392
|
+
|
|
1393
|
+
def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil)
|
|
1394
|
+
@day_of_month = day_of_month
|
|
1395
|
+
@hour = hour
|
|
1396
|
+
@minute = minute
|
|
1397
|
+
@month = month
|
|
1398
|
+
@second = second
|
|
1399
|
+
end
|
|
1400
|
+
end
|
|
1401
|
+
# Anchor the service period to a custom date. Type must be `custom` to specify.
|
|
1402
|
+
attr_accessor :custom
|
|
1403
|
+
# The type of service period anchor config. Defaults to `inherit` if omitted.
|
|
1404
|
+
attr_accessor :type
|
|
1405
|
+
|
|
1406
|
+
def initialize(custom: nil, type: nil)
|
|
1407
|
+
@custom = custom
|
|
1408
|
+
@type = type
|
|
1409
|
+
end
|
|
1410
|
+
end
|
|
1411
|
+
# Configures service period cycle anchoring.
|
|
1412
|
+
attr_accessor :service_period_anchor_config
|
|
1413
|
+
# The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `phase_start` if omitted.
|
|
1414
|
+
attr_accessor :start_date
|
|
1415
|
+
|
|
1416
|
+
def initialize(service_period_anchor_config: nil, start_date: nil)
|
|
1417
|
+
@service_period_anchor_config = service_period_anchor_config
|
|
1418
|
+
@start_date = start_date
|
|
1419
|
+
end
|
|
1420
|
+
end
|
|
466
1421
|
# ID of the coupon to create a new discount for.
|
|
467
1422
|
attr_accessor :coupon
|
|
468
1423
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
469
1424
|
attr_accessor :discount
|
|
1425
|
+
# Details to determine how long the discount should be applied for.
|
|
1426
|
+
attr_accessor :discount_end
|
|
470
1427
|
# ID of the promotion code to create a new discount for.
|
|
471
1428
|
attr_accessor :promotion_code
|
|
1429
|
+
# Settings for discount application including service period anchoring.
|
|
1430
|
+
attr_accessor :settings
|
|
472
1431
|
|
|
473
|
-
def initialize(
|
|
1432
|
+
def initialize(
|
|
1433
|
+
coupon: nil,
|
|
1434
|
+
discount: nil,
|
|
1435
|
+
discount_end: nil,
|
|
1436
|
+
promotion_code: nil,
|
|
1437
|
+
settings: nil
|
|
1438
|
+
)
|
|
474
1439
|
@coupon = coupon
|
|
475
1440
|
@discount = discount
|
|
1441
|
+
@discount_end = discount_end
|
|
476
1442
|
@promotion_code = promotion_code
|
|
1443
|
+
@settings = settings
|
|
477
1444
|
end
|
|
478
1445
|
end
|
|
479
1446
|
|
|
@@ -526,17 +1493,97 @@ module Stripe
|
|
|
526
1493
|
end
|
|
527
1494
|
|
|
528
1495
|
class Discount < ::Stripe::RequestParams
|
|
1496
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
1497
|
+
class Duration < ::Stripe::RequestParams
|
|
1498
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1499
|
+
attr_accessor :interval
|
|
1500
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1501
|
+
attr_accessor :interval_count
|
|
1502
|
+
|
|
1503
|
+
def initialize(interval: nil, interval_count: nil)
|
|
1504
|
+
@interval = interval
|
|
1505
|
+
@interval_count = interval_count
|
|
1506
|
+
end
|
|
1507
|
+
end
|
|
1508
|
+
# Time span for the redeemed discount.
|
|
1509
|
+
attr_accessor :duration
|
|
1510
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1511
|
+
attr_accessor :timestamp
|
|
1512
|
+
# The type of calculation made to determine when the discount ends.
|
|
1513
|
+
attr_accessor :type
|
|
1514
|
+
|
|
1515
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
1516
|
+
@duration = duration
|
|
1517
|
+
@timestamp = timestamp
|
|
1518
|
+
@type = type
|
|
1519
|
+
end
|
|
1520
|
+
end
|
|
1521
|
+
|
|
1522
|
+
class Settings < ::Stripe::RequestParams
|
|
1523
|
+
class ServicePeriodAnchorConfig < ::Stripe::RequestParams
|
|
1524
|
+
class Custom < ::Stripe::RequestParams
|
|
1525
|
+
# The day of the month the anchor should be. Ranges from 1 to 31.
|
|
1526
|
+
attr_accessor :day_of_month
|
|
1527
|
+
# The hour of the day the anchor should be. Ranges from 0 to 23.
|
|
1528
|
+
attr_accessor :hour
|
|
1529
|
+
# The minute of the hour the anchor should be. Ranges from 0 to 59.
|
|
1530
|
+
attr_accessor :minute
|
|
1531
|
+
# The month to start full cycle periods. Ranges from 1 to 12.
|
|
1532
|
+
attr_accessor :month
|
|
1533
|
+
# The second of the minute the anchor should be. Ranges from 0 to 59.
|
|
1534
|
+
attr_accessor :second
|
|
1535
|
+
|
|
1536
|
+
def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil)
|
|
1537
|
+
@day_of_month = day_of_month
|
|
1538
|
+
@hour = hour
|
|
1539
|
+
@minute = minute
|
|
1540
|
+
@month = month
|
|
1541
|
+
@second = second
|
|
1542
|
+
end
|
|
1543
|
+
end
|
|
1544
|
+
# Anchor the service period to a custom date. Type must be `custom` to specify.
|
|
1545
|
+
attr_accessor :custom
|
|
1546
|
+
# The type of service period anchor config. Defaults to `inherit` if omitted.
|
|
1547
|
+
attr_accessor :type
|
|
1548
|
+
|
|
1549
|
+
def initialize(custom: nil, type: nil)
|
|
1550
|
+
@custom = custom
|
|
1551
|
+
@type = type
|
|
1552
|
+
end
|
|
1553
|
+
end
|
|
1554
|
+
# Configures service period cycle anchoring.
|
|
1555
|
+
attr_accessor :service_period_anchor_config
|
|
1556
|
+
# The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `phase_start` if omitted.
|
|
1557
|
+
attr_accessor :start_date
|
|
1558
|
+
|
|
1559
|
+
def initialize(service_period_anchor_config: nil, start_date: nil)
|
|
1560
|
+
@service_period_anchor_config = service_period_anchor_config
|
|
1561
|
+
@start_date = start_date
|
|
1562
|
+
end
|
|
1563
|
+
end
|
|
529
1564
|
# ID of the coupon to create a new discount for.
|
|
530
1565
|
attr_accessor :coupon
|
|
531
1566
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
532
1567
|
attr_accessor :discount
|
|
1568
|
+
# Details to determine how long the discount should be applied for.
|
|
1569
|
+
attr_accessor :discount_end
|
|
533
1570
|
# ID of the promotion code to create a new discount for.
|
|
534
1571
|
attr_accessor :promotion_code
|
|
1572
|
+
# Settings for discount application including service period anchoring.
|
|
1573
|
+
attr_accessor :settings
|
|
535
1574
|
|
|
536
|
-
def initialize(
|
|
1575
|
+
def initialize(
|
|
1576
|
+
coupon: nil,
|
|
1577
|
+
discount: nil,
|
|
1578
|
+
discount_end: nil,
|
|
1579
|
+
promotion_code: nil,
|
|
1580
|
+
settings: nil
|
|
1581
|
+
)
|
|
537
1582
|
@coupon = coupon
|
|
538
1583
|
@discount = discount
|
|
1584
|
+
@discount_end = discount_end
|
|
539
1585
|
@promotion_code = promotion_code
|
|
1586
|
+
@settings = settings
|
|
540
1587
|
end
|
|
541
1588
|
end
|
|
542
1589
|
|
|
@@ -581,6 +1628,18 @@ module Stripe
|
|
|
581
1628
|
@unit_amount_decimal = unit_amount_decimal
|
|
582
1629
|
end
|
|
583
1630
|
end
|
|
1631
|
+
|
|
1632
|
+
class Trial < ::Stripe::RequestParams
|
|
1633
|
+
# 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.
|
|
1634
|
+
attr_accessor :converts_to
|
|
1635
|
+
# Determines the type of trial for this item.
|
|
1636
|
+
attr_accessor :type
|
|
1637
|
+
|
|
1638
|
+
def initialize(converts_to: nil, type: nil)
|
|
1639
|
+
@converts_to = converts_to
|
|
1640
|
+
@type = type
|
|
1641
|
+
end
|
|
1642
|
+
end
|
|
584
1643
|
# 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
1644
|
attr_accessor :billing_thresholds
|
|
586
1645
|
# The coupons to redeem into discounts for the subscription item.
|
|
@@ -597,6 +1656,10 @@ module Stripe
|
|
|
597
1656
|
attr_accessor :quantity
|
|
598
1657
|
# 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.
|
|
599
1658
|
attr_accessor :tax_rates
|
|
1659
|
+
# Options that configure the trial on the subscription item.
|
|
1660
|
+
attr_accessor :trial
|
|
1661
|
+
# The ID of the trial offer to apply to the configuration item.
|
|
1662
|
+
attr_accessor :trial_offer
|
|
600
1663
|
|
|
601
1664
|
def initialize(
|
|
602
1665
|
billing_thresholds: nil,
|
|
@@ -606,7 +1669,9 @@ module Stripe
|
|
|
606
1669
|
price: nil,
|
|
607
1670
|
price_data: nil,
|
|
608
1671
|
quantity: nil,
|
|
609
|
-
tax_rates: nil
|
|
1672
|
+
tax_rates: nil,
|
|
1673
|
+
trial: nil,
|
|
1674
|
+
trial_offer: nil
|
|
610
1675
|
)
|
|
611
1676
|
@billing_thresholds = billing_thresholds
|
|
612
1677
|
@discounts = discounts
|
|
@@ -616,6 +1681,17 @@ module Stripe
|
|
|
616
1681
|
@price_data = price_data
|
|
617
1682
|
@quantity = quantity
|
|
618
1683
|
@tax_rates = tax_rates
|
|
1684
|
+
@trial = trial
|
|
1685
|
+
@trial_offer = trial_offer
|
|
1686
|
+
end
|
|
1687
|
+
end
|
|
1688
|
+
|
|
1689
|
+
class PauseCollection < ::Stripe::RequestParams
|
|
1690
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
1691
|
+
attr_accessor :behavior
|
|
1692
|
+
|
|
1693
|
+
def initialize(behavior: nil)
|
|
1694
|
+
@behavior = behavior
|
|
619
1695
|
end
|
|
620
1696
|
end
|
|
621
1697
|
|
|
@@ -630,6 +1706,23 @@ module Stripe
|
|
|
630
1706
|
@destination = destination
|
|
631
1707
|
end
|
|
632
1708
|
end
|
|
1709
|
+
|
|
1710
|
+
class TrialSettings < ::Stripe::RequestParams
|
|
1711
|
+
class EndBehavior < ::Stripe::RequestParams
|
|
1712
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
1713
|
+
attr_accessor :prorate_up_front
|
|
1714
|
+
|
|
1715
|
+
def initialize(prorate_up_front: nil)
|
|
1716
|
+
@prorate_up_front = prorate_up_front
|
|
1717
|
+
end
|
|
1718
|
+
end
|
|
1719
|
+
# Defines how the subscription should behave when a trial ends.
|
|
1720
|
+
attr_accessor :end_behavior
|
|
1721
|
+
|
|
1722
|
+
def initialize(end_behavior: nil)
|
|
1723
|
+
@end_behavior = end_behavior
|
|
1724
|
+
end
|
|
1725
|
+
end
|
|
633
1726
|
# 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
1727
|
attr_accessor :add_invoice_items
|
|
635
1728
|
# 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).
|
|
@@ -654,6 +1747,8 @@ module Stripe
|
|
|
654
1747
|
attr_accessor :discounts
|
|
655
1748
|
# The number of intervals the phase should last. If set, `end_date` must not be set.
|
|
656
1749
|
attr_accessor :duration
|
|
1750
|
+
# Configures how the subscription schedule handles billing for phase transitions.
|
|
1751
|
+
attr_accessor :effective_at
|
|
657
1752
|
# The date at which this phase of the subscription schedule ends. If set, `duration` must not be set.
|
|
658
1753
|
attr_accessor :end_date
|
|
659
1754
|
# All invoices will be billed using the specified settings.
|
|
@@ -664,6 +1759,8 @@ module Stripe
|
|
|
664
1759
|
attr_accessor :metadata
|
|
665
1760
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
|
666
1761
|
attr_accessor :on_behalf_of
|
|
1762
|
+
# If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment).
|
|
1763
|
+
attr_accessor :pause_collection
|
|
667
1764
|
# Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
|
668
1765
|
attr_accessor :proration_behavior
|
|
669
1766
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
|
@@ -672,8 +1769,12 @@ module Stripe
|
|
|
672
1769
|
attr_accessor :transfer_data
|
|
673
1770
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
|
674
1771
|
attr_accessor :trial
|
|
1772
|
+
# Specify trial behavior when crossing phase boundaries
|
|
1773
|
+
attr_accessor :trial_continuation
|
|
675
1774
|
# 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
1775
|
attr_accessor :trial_end
|
|
1776
|
+
# Settings related to subscription trials.
|
|
1777
|
+
attr_accessor :trial_settings
|
|
677
1778
|
|
|
678
1779
|
def initialize(
|
|
679
1780
|
add_invoice_items: nil,
|
|
@@ -688,16 +1789,20 @@ module Stripe
|
|
|
688
1789
|
description: nil,
|
|
689
1790
|
discounts: nil,
|
|
690
1791
|
duration: nil,
|
|
1792
|
+
effective_at: nil,
|
|
691
1793
|
end_date: nil,
|
|
692
1794
|
invoice_settings: nil,
|
|
693
1795
|
items: nil,
|
|
694
1796
|
metadata: nil,
|
|
695
1797
|
on_behalf_of: nil,
|
|
1798
|
+
pause_collection: nil,
|
|
696
1799
|
proration_behavior: nil,
|
|
697
1800
|
start_date: nil,
|
|
698
1801
|
transfer_data: nil,
|
|
699
1802
|
trial: nil,
|
|
700
|
-
|
|
1803
|
+
trial_continuation: nil,
|
|
1804
|
+
trial_end: nil,
|
|
1805
|
+
trial_settings: nil
|
|
701
1806
|
)
|
|
702
1807
|
@add_invoice_items = add_invoice_items
|
|
703
1808
|
@application_fee_percent = application_fee_percent
|
|
@@ -711,31 +1816,105 @@ module Stripe
|
|
|
711
1816
|
@description = description
|
|
712
1817
|
@discounts = discounts
|
|
713
1818
|
@duration = duration
|
|
1819
|
+
@effective_at = effective_at
|
|
714
1820
|
@end_date = end_date
|
|
715
1821
|
@invoice_settings = invoice_settings
|
|
716
1822
|
@items = items
|
|
717
1823
|
@metadata = metadata
|
|
718
1824
|
@on_behalf_of = on_behalf_of
|
|
1825
|
+
@pause_collection = pause_collection
|
|
719
1826
|
@proration_behavior = proration_behavior
|
|
720
1827
|
@start_date = start_date
|
|
721
1828
|
@transfer_data = transfer_data
|
|
722
1829
|
@trial = trial
|
|
1830
|
+
@trial_continuation = trial_continuation
|
|
723
1831
|
@trial_end = trial_end
|
|
1832
|
+
@trial_settings = trial_settings
|
|
724
1833
|
end
|
|
725
1834
|
end
|
|
1835
|
+
|
|
1836
|
+
class Prebilling < ::Stripe::RequestParams
|
|
1837
|
+
class BillUntil < ::Stripe::RequestParams
|
|
1838
|
+
class AmendmentEnd < ::Stripe::RequestParams
|
|
1839
|
+
# 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.
|
|
1840
|
+
attr_accessor :index
|
|
1841
|
+
|
|
1842
|
+
def initialize(index: nil)
|
|
1843
|
+
@index = index
|
|
1844
|
+
end
|
|
1845
|
+
end
|
|
1846
|
+
|
|
1847
|
+
class Duration < ::Stripe::RequestParams
|
|
1848
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1849
|
+
attr_accessor :interval
|
|
1850
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1851
|
+
attr_accessor :interval_count
|
|
1852
|
+
|
|
1853
|
+
def initialize(interval: nil, interval_count: nil)
|
|
1854
|
+
@interval = interval
|
|
1855
|
+
@interval_count = interval_count
|
|
1856
|
+
end
|
|
1857
|
+
end
|
|
1858
|
+
# End the prebilled period when a specified amendment ends.
|
|
1859
|
+
attr_accessor :amendment_end
|
|
1860
|
+
# Time span for prebilling, starting from `bill_from`.
|
|
1861
|
+
attr_accessor :duration
|
|
1862
|
+
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
|
1863
|
+
attr_accessor :timestamp
|
|
1864
|
+
# Select one of several ways to pass the `bill_until` value.
|
|
1865
|
+
attr_accessor :type
|
|
1866
|
+
|
|
1867
|
+
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
|
1868
|
+
@amendment_end = amendment_end
|
|
1869
|
+
@duration = duration
|
|
1870
|
+
@timestamp = timestamp
|
|
1871
|
+
@type = type
|
|
1872
|
+
end
|
|
1873
|
+
end
|
|
1874
|
+
# The end of the prebilled time period.
|
|
1875
|
+
attr_accessor :bill_until
|
|
1876
|
+
# This is used to determine the number of billing cycles to prebill.
|
|
1877
|
+
attr_accessor :iterations
|
|
1878
|
+
|
|
1879
|
+
def initialize(bill_until: nil, iterations: nil)
|
|
1880
|
+
@bill_until = bill_until
|
|
1881
|
+
@iterations = iterations
|
|
1882
|
+
end
|
|
1883
|
+
end
|
|
1884
|
+
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
|
1885
|
+
attr_accessor :amendments
|
|
1886
|
+
# 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.
|
|
1887
|
+
attr_accessor :billing_behavior
|
|
726
1888
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
727
1889
|
attr_accessor :billing_mode
|
|
1890
|
+
# Sets the billing schedules for the subscription schedule.
|
|
1891
|
+
attr_accessor :billing_schedules
|
|
728
1892
|
# 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
1893
|
attr_accessor :end_behavior
|
|
730
1894
|
# 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
1895
|
attr_accessor :phases
|
|
1896
|
+
# Provide any time periods to bill in advance.
|
|
1897
|
+
attr_accessor :prebilling
|
|
732
1898
|
# 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
1899
|
attr_accessor :proration_behavior
|
|
734
1900
|
|
|
735
|
-
def initialize(
|
|
1901
|
+
def initialize(
|
|
1902
|
+
amendments: nil,
|
|
1903
|
+
billing_behavior: nil,
|
|
1904
|
+
billing_mode: nil,
|
|
1905
|
+
billing_schedules: nil,
|
|
1906
|
+
end_behavior: nil,
|
|
1907
|
+
phases: nil,
|
|
1908
|
+
prebilling: nil,
|
|
1909
|
+
proration_behavior: nil
|
|
1910
|
+
)
|
|
1911
|
+
@amendments = amendments
|
|
1912
|
+
@billing_behavior = billing_behavior
|
|
736
1913
|
@billing_mode = billing_mode
|
|
1914
|
+
@billing_schedules = billing_schedules
|
|
737
1915
|
@end_behavior = end_behavior
|
|
738
1916
|
@phases = phases
|
|
1917
|
+
@prebilling = prebilling
|
|
739
1918
|
@proration_behavior = proration_behavior
|
|
740
1919
|
end
|
|
741
1920
|
end
|
|
@@ -761,6 +1940,58 @@ module Stripe
|
|
|
761
1940
|
end
|
|
762
1941
|
end
|
|
763
1942
|
|
|
1943
|
+
class BillingSchedule < ::Stripe::RequestParams
|
|
1944
|
+
class AppliesTo < ::Stripe::RequestParams
|
|
1945
|
+
# The ID of the price object.
|
|
1946
|
+
attr_accessor :price
|
|
1947
|
+
# Controls which subscription items the billing schedule applies to.
|
|
1948
|
+
attr_accessor :type
|
|
1949
|
+
|
|
1950
|
+
def initialize(price: nil, type: nil)
|
|
1951
|
+
@price = price
|
|
1952
|
+
@type = type
|
|
1953
|
+
end
|
|
1954
|
+
end
|
|
1955
|
+
|
|
1956
|
+
class BillUntil < ::Stripe::RequestParams
|
|
1957
|
+
class Duration < ::Stripe::RequestParams
|
|
1958
|
+
# Specifies billing duration. Either `day`, `week`, `month` or `year`.
|
|
1959
|
+
attr_accessor :interval
|
|
1960
|
+
# The multiplier applied to the interval.
|
|
1961
|
+
attr_accessor :interval_count
|
|
1962
|
+
|
|
1963
|
+
def initialize(interval: nil, interval_count: nil)
|
|
1964
|
+
@interval = interval
|
|
1965
|
+
@interval_count = interval_count
|
|
1966
|
+
end
|
|
1967
|
+
end
|
|
1968
|
+
# Specifies the billing period.
|
|
1969
|
+
attr_accessor :duration
|
|
1970
|
+
# The end date of the billing schedule.
|
|
1971
|
+
attr_accessor :timestamp
|
|
1972
|
+
# Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
|
|
1973
|
+
attr_accessor :type
|
|
1974
|
+
|
|
1975
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
1976
|
+
@duration = duration
|
|
1977
|
+
@timestamp = timestamp
|
|
1978
|
+
@type = type
|
|
1979
|
+
end
|
|
1980
|
+
end
|
|
1981
|
+
# Configure billing schedule differently for individual subscription items.
|
|
1982
|
+
attr_accessor :applies_to
|
|
1983
|
+
# The end date for the billing schedule.
|
|
1984
|
+
attr_accessor :bill_until
|
|
1985
|
+
# 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.
|
|
1986
|
+
attr_accessor :key
|
|
1987
|
+
|
|
1988
|
+
def initialize(applies_to: nil, bill_until: nil, key: nil)
|
|
1989
|
+
@applies_to = applies_to
|
|
1990
|
+
@bill_until = bill_until
|
|
1991
|
+
@key = key
|
|
1992
|
+
end
|
|
1993
|
+
end
|
|
1994
|
+
|
|
764
1995
|
class Item < ::Stripe::RequestParams
|
|
765
1996
|
class BillingThresholds < ::Stripe::RequestParams
|
|
766
1997
|
# 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://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
|
@@ -771,18 +2002,110 @@ module Stripe
|
|
|
771
2002
|
end
|
|
772
2003
|
end
|
|
773
2004
|
|
|
2005
|
+
class CurrentTrial < ::Stripe::RequestParams
|
|
2006
|
+
# 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`.
|
|
2007
|
+
attr_accessor :trial_end
|
|
2008
|
+
# The ID of the trial offer to apply to the subscription item.
|
|
2009
|
+
attr_accessor :trial_offer
|
|
2010
|
+
|
|
2011
|
+
def initialize(trial_end: nil, trial_offer: nil)
|
|
2012
|
+
@trial_end = trial_end
|
|
2013
|
+
@trial_offer = trial_offer
|
|
2014
|
+
end
|
|
2015
|
+
end
|
|
2016
|
+
|
|
774
2017
|
class Discount < ::Stripe::RequestParams
|
|
2018
|
+
class DiscountEnd < ::Stripe::RequestParams
|
|
2019
|
+
class Duration < ::Stripe::RequestParams
|
|
2020
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2021
|
+
attr_accessor :interval
|
|
2022
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2023
|
+
attr_accessor :interval_count
|
|
2024
|
+
|
|
2025
|
+
def initialize(interval: nil, interval_count: nil)
|
|
2026
|
+
@interval = interval
|
|
2027
|
+
@interval_count = interval_count
|
|
2028
|
+
end
|
|
2029
|
+
end
|
|
2030
|
+
# Time span for the redeemed discount.
|
|
2031
|
+
attr_accessor :duration
|
|
2032
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2033
|
+
attr_accessor :timestamp
|
|
2034
|
+
# The type of calculation made to determine when the discount ends.
|
|
2035
|
+
attr_accessor :type
|
|
2036
|
+
|
|
2037
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
|
2038
|
+
@duration = duration
|
|
2039
|
+
@timestamp = timestamp
|
|
2040
|
+
@type = type
|
|
2041
|
+
end
|
|
2042
|
+
end
|
|
2043
|
+
|
|
2044
|
+
class Settings < ::Stripe::RequestParams
|
|
2045
|
+
class ServicePeriodAnchorConfig < ::Stripe::RequestParams
|
|
2046
|
+
class Custom < ::Stripe::RequestParams
|
|
2047
|
+
# The day of the month the anchor should be. Ranges from 1 to 31.
|
|
2048
|
+
attr_accessor :day_of_month
|
|
2049
|
+
# The hour of the day the anchor should be. Ranges from 0 to 23.
|
|
2050
|
+
attr_accessor :hour
|
|
2051
|
+
# The minute of the hour the anchor should be. Ranges from 0 to 59.
|
|
2052
|
+
attr_accessor :minute
|
|
2053
|
+
# The month to start full cycle periods. Ranges from 1 to 12.
|
|
2054
|
+
attr_accessor :month
|
|
2055
|
+
# The second of the minute the anchor should be. Ranges from 0 to 59.
|
|
2056
|
+
attr_accessor :second
|
|
2057
|
+
|
|
2058
|
+
def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil)
|
|
2059
|
+
@day_of_month = day_of_month
|
|
2060
|
+
@hour = hour
|
|
2061
|
+
@minute = minute
|
|
2062
|
+
@month = month
|
|
2063
|
+
@second = second
|
|
2064
|
+
end
|
|
2065
|
+
end
|
|
2066
|
+
# Anchor the service period to a custom date. Type must be `custom` to specify.
|
|
2067
|
+
attr_accessor :custom
|
|
2068
|
+
# The type of service period anchor config. Defaults to `subscription_service_cycle_anchor` if omitted.
|
|
2069
|
+
attr_accessor :type
|
|
2070
|
+
|
|
2071
|
+
def initialize(custom: nil, type: nil)
|
|
2072
|
+
@custom = custom
|
|
2073
|
+
@type = type
|
|
2074
|
+
end
|
|
2075
|
+
end
|
|
2076
|
+
# Configures service period cycle anchoring.
|
|
2077
|
+
attr_accessor :service_period_anchor_config
|
|
2078
|
+
# The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `now` if omitted.
|
|
2079
|
+
attr_accessor :start_date
|
|
2080
|
+
|
|
2081
|
+
def initialize(service_period_anchor_config: nil, start_date: nil)
|
|
2082
|
+
@service_period_anchor_config = service_period_anchor_config
|
|
2083
|
+
@start_date = start_date
|
|
2084
|
+
end
|
|
2085
|
+
end
|
|
775
2086
|
# ID of the coupon to create a new discount for.
|
|
776
2087
|
attr_accessor :coupon
|
|
777
2088
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
778
2089
|
attr_accessor :discount
|
|
2090
|
+
# Details to determine how long the discount should be applied for.
|
|
2091
|
+
attr_accessor :discount_end
|
|
779
2092
|
# ID of the promotion code to create a new discount for.
|
|
780
2093
|
attr_accessor :promotion_code
|
|
2094
|
+
# Settings for discount application including service period anchoring.
|
|
2095
|
+
attr_accessor :settings
|
|
781
2096
|
|
|
782
|
-
def initialize(
|
|
2097
|
+
def initialize(
|
|
2098
|
+
coupon: nil,
|
|
2099
|
+
discount: nil,
|
|
2100
|
+
discount_end: nil,
|
|
2101
|
+
promotion_code: nil,
|
|
2102
|
+
settings: nil
|
|
2103
|
+
)
|
|
783
2104
|
@coupon = coupon
|
|
784
2105
|
@discount = discount
|
|
2106
|
+
@discount_end = discount_end
|
|
785
2107
|
@promotion_code = promotion_code
|
|
2108
|
+
@settings = settings
|
|
786
2109
|
end
|
|
787
2110
|
end
|
|
788
2111
|
|
|
@@ -831,6 +2154,8 @@ module Stripe
|
|
|
831
2154
|
attr_accessor :billing_thresholds
|
|
832
2155
|
# Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
|
|
833
2156
|
attr_accessor :clear_usage
|
|
2157
|
+
# The trial offer to apply to this subscription item.
|
|
2158
|
+
attr_accessor :current_trial
|
|
834
2159
|
# A flag that, if set to `true`, will delete the specified item.
|
|
835
2160
|
attr_accessor :deleted
|
|
836
2161
|
# The coupons to redeem into discounts for the subscription item.
|
|
@@ -853,6 +2178,7 @@ module Stripe
|
|
|
853
2178
|
def initialize(
|
|
854
2179
|
billing_thresholds: nil,
|
|
855
2180
|
clear_usage: nil,
|
|
2181
|
+
current_trial: nil,
|
|
856
2182
|
deleted: nil,
|
|
857
2183
|
discounts: nil,
|
|
858
2184
|
id: nil,
|
|
@@ -865,6 +2191,7 @@ module Stripe
|
|
|
865
2191
|
)
|
|
866
2192
|
@billing_thresholds = billing_thresholds
|
|
867
2193
|
@clear_usage = clear_usage
|
|
2194
|
+
@current_trial = current_trial
|
|
868
2195
|
@deleted = deleted
|
|
869
2196
|
@discounts = discounts
|
|
870
2197
|
@id = id
|
|
@@ -876,10 +2203,21 @@ module Stripe
|
|
|
876
2203
|
@tax_rates = tax_rates
|
|
877
2204
|
end
|
|
878
2205
|
end
|
|
2206
|
+
|
|
2207
|
+
class Prebilling < ::Stripe::RequestParams
|
|
2208
|
+
# This is used to determine the number of billing cycles to prebill.
|
|
2209
|
+
attr_accessor :iterations
|
|
2210
|
+
|
|
2211
|
+
def initialize(iterations: nil)
|
|
2212
|
+
@iterations = iterations
|
|
2213
|
+
end
|
|
2214
|
+
end
|
|
879
2215
|
# For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://docs.stripe.com/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
2216
|
attr_accessor :billing_cycle_anchor
|
|
881
2217
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
882
2218
|
attr_accessor :billing_mode
|
|
2219
|
+
# Sets the billing schedules for the subscription.
|
|
2220
|
+
attr_accessor :billing_schedules
|
|
883
2221
|
# 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
2222
|
attr_accessor :cancel_at
|
|
885
2223
|
# Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
|
@@ -890,6 +2228,8 @@ module Stripe
|
|
|
890
2228
|
attr_accessor :default_tax_rates
|
|
891
2229
|
# A list of up to 20 subscription items, each with an attached price.
|
|
892
2230
|
attr_accessor :items
|
|
2231
|
+
# The pre-billing to apply to the subscription as a preview.
|
|
2232
|
+
attr_accessor :prebilling
|
|
893
2233
|
# Determines how to handle [prorations](https://docs.stripe.com/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
2234
|
attr_accessor :proration_behavior
|
|
895
2235
|
# 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 +2244,13 @@ module Stripe
|
|
|
904
2244
|
def initialize(
|
|
905
2245
|
billing_cycle_anchor: nil,
|
|
906
2246
|
billing_mode: nil,
|
|
2247
|
+
billing_schedules: nil,
|
|
907
2248
|
cancel_at: nil,
|
|
908
2249
|
cancel_at_period_end: nil,
|
|
909
2250
|
cancel_now: nil,
|
|
910
2251
|
default_tax_rates: nil,
|
|
911
2252
|
items: nil,
|
|
2253
|
+
prebilling: nil,
|
|
912
2254
|
proration_behavior: nil,
|
|
913
2255
|
proration_date: nil,
|
|
914
2256
|
resume_at: nil,
|
|
@@ -917,11 +2259,13 @@ module Stripe
|
|
|
917
2259
|
)
|
|
918
2260
|
@billing_cycle_anchor = billing_cycle_anchor
|
|
919
2261
|
@billing_mode = billing_mode
|
|
2262
|
+
@billing_schedules = billing_schedules
|
|
920
2263
|
@cancel_at = cancel_at
|
|
921
2264
|
@cancel_at_period_end = cancel_at_period_end
|
|
922
2265
|
@cancel_now = cancel_now
|
|
923
2266
|
@default_tax_rates = default_tax_rates
|
|
924
2267
|
@items = items
|
|
2268
|
+
@prebilling = prebilling
|
|
925
2269
|
@proration_behavior = proration_behavior
|
|
926
2270
|
@proration_date = proration_date
|
|
927
2271
|
@resume_at = resume_at
|
|
@@ -931,6 +2275,8 @@ module Stripe
|
|
|
931
2275
|
end
|
|
932
2276
|
# Settings for automatic tax lookup for this invoice preview.
|
|
933
2277
|
attr_accessor :automatic_tax
|
|
2278
|
+
# 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.
|
|
2279
|
+
attr_accessor :billing_cadence
|
|
934
2280
|
# The currency to preview this invoice in. Defaults to that of `customer` if not specified.
|
|
935
2281
|
attr_accessor :currency
|
|
936
2282
|
# The identifier of the customer whose upcoming invoice you're retrieving. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
|
@@ -962,6 +2308,7 @@ module Stripe
|
|
|
962
2308
|
|
|
963
2309
|
def initialize(
|
|
964
2310
|
automatic_tax: nil,
|
|
2311
|
+
billing_cadence: nil,
|
|
965
2312
|
currency: nil,
|
|
966
2313
|
customer: nil,
|
|
967
2314
|
customer_account: nil,
|
|
@@ -978,6 +2325,7 @@ module Stripe
|
|
|
978
2325
|
subscription_details: nil
|
|
979
2326
|
)
|
|
980
2327
|
@automatic_tax = automatic_tax
|
|
2328
|
+
@billing_cadence = billing_cadence
|
|
981
2329
|
@currency = currency
|
|
982
2330
|
@customer = customer
|
|
983
2331
|
@customer_account = customer_account
|