stripe 15.5.0 → 15.6.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/CHANGELOG.md +1717 -642
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +34 -0
- data/lib/stripe/api_version.rb +1 -2
- data/lib/stripe/errors.rb +63 -0
- data/lib/stripe/event_types.rb +185 -0
- data/lib/stripe/events/v2_billing_cadence_billed_event.rb +21 -0
- data/lib/stripe/events/v2_billing_cadence_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_cadence_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_cadence_errored_event.rb +21 -0
- data/lib/stripe/events/v2_billing_license_fee_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_license_fee_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_license_fee_version_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_licensed_item_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_licensed_item_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_metered_item_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_metered_item_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_component_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_pricing_plan_component_updated_event.rb +23 -0
- data/lib/stripe/events/v2_billing_pricing_plan_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_awaiting_customer_action_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_current_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_past_due_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_unpaid_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_activated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_version_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_rate_card_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_rate_card_rate_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_activated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_awaiting_customer_action_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_current_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_past_due_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_unpaid_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_activated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_version_created_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_closed_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_created_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_account_link_returned_event.rb +13 -0
- data/lib/stripe/events/v2_core_account_person_created_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_person_deleted_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_person_updated_event.rb +23 -0
- data/lib/stripe/events/v2_core_account_updated_event.rb +21 -0
- data/lib/stripe/events/v2_core_health_api_error_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_api_error_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_api_latency_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_authorization_rate_drop_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_authorization_rate_drop_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_fraud_rate_increased_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_traffic_volume_drop_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_traffic_volume_drop_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_webhook_latency_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_webhook_latency_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +23 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +23 -0
- data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_transaction_created_event.rb +21 -0
- data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +22 -0
- data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +21 -0
- data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_reporting_report_run_created_event.rb +21 -0
- data/lib/stripe/events/v2_reporting_report_run_failed_event.rb +21 -0
- data/lib/stripe/events/v2_reporting_report_run_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_reporting_report_run_updated_event.rb +21 -0
- data/lib/stripe/object_types.rb +80 -0
- data/lib/stripe/resources/account.rb +653 -1
- data/lib/stripe/resources/account_notice.rb +123 -0
- data/lib/stripe/resources/account_session.rb +256 -1
- data/lib/stripe/resources/balance_settings.rb +112 -0
- data/lib/stripe/resources/billing/alert.rb +128 -1
- data/lib/stripe/resources/billing/alert_triggered.rb +6 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +52 -0
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +54 -0
- data/lib/stripe/resources/billing/credit_grant.rb +71 -2
- data/lib/stripe/resources/billing/meter_usage.rb +23 -0
- data/lib/stripe/resources/billing/meter_usage_row.rb +28 -0
- data/lib/stripe/resources/billing_portal/session.rb +6 -0
- data/lib/stripe/resources/capital/financing_offer.rb +179 -0
- data/lib/stripe/resources/capital/financing_summary.rb +55 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +114 -0
- data/lib/stripe/resources/card.rb +2 -0
- data/lib/stripe/resources/cash_balance.rb +2 -0
- data/lib/stripe/resources/charge.rb +1540 -4
- data/lib/stripe/resources/checkout/session.rb +623 -5
- data/lib/stripe/resources/confirmation_token.rb +170 -0
- data/lib/stripe/resources/coupon.rb +30 -1
- data/lib/stripe/resources/credit_note.rb +6 -0
- data/lib/stripe/resources/credit_note_line_item.rb +9 -0
- data/lib/stripe/resources/customer.rb +2 -0
- data/lib/stripe/resources/customer_balance_transaction.rb +2 -0
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +2 -0
- data/lib/stripe/resources/customer_session.rb +6 -1
- data/lib/stripe/resources/discount.rb +2 -0
- data/lib/stripe/resources/dispute.rb +11 -0
- data/lib/stripe/resources/event.rb +31 -0
- data/lib/stripe/resources/financial_connections/account.rb +22 -1
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
- data/lib/stripe/resources/financial_connections/institution.rb +92 -0
- data/lib/stripe/resources/financial_connections/session.rb +62 -2
- data/lib/stripe/resources/fx_quote.rb +186 -0
- data/lib/stripe/resources/identity/verification_session.rb +10 -0
- data/lib/stripe/resources/invoice.rb +1151 -16
- data/lib/stripe/resources/invoice_item.rb +126 -2
- data/lib/stripe/resources/invoice_line_item.rb +107 -1
- data/lib/stripe/resources/invoice_payment.rb +6 -1
- data/lib/stripe/resources/issuing/card.rb +0 -8
- data/lib/stripe/resources/issuing/cardholder.rb +2 -1
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +602 -0
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +82 -0
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +86 -0
- data/lib/stripe/resources/issuing/settlement.rb +53 -0
- data/lib/stripe/resources/issuing/transaction.rb +6 -0
- data/lib/stripe/resources/line_item.rb +37 -0
- data/lib/stripe/resources/mandate.rb +89 -1
- data/lib/stripe/resources/margin.rb +115 -0
- data/lib/stripe/resources/order.rb +2958 -0
- data/lib/stripe/resources/payment_attempt_record.rb +1177 -0
- data/lib/stripe/resources/payment_intent.rb +6448 -545
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +72 -0
- data/lib/stripe/resources/payment_method.rb +194 -1
- data/lib/stripe/resources/payment_method_configuration.rb +295 -0
- data/lib/stripe/resources/payment_record.rb +1723 -0
- data/lib/stripe/resources/price.rb +30 -0
- data/lib/stripe/resources/privacy/redaction_job.rb +298 -0
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +33 -0
- data/lib/stripe/resources/promotion_code.rb +10 -0
- data/lib/stripe/resources/quote.rb +2038 -7
- data/lib/stripe/resources/quote_line.rb +274 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +687 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +395 -0
- data/lib/stripe/resources/refund.rb +9 -0
- data/lib/stripe/resources/setup_attempt.rb +24 -0
- data/lib/stripe/resources/setup_intent.rb +771 -9
- data/lib/stripe/resources/source.rb +29 -0
- data/lib/stripe/resources/subscription.rb +403 -9
- data/lib/stripe/resources/subscription_item.rb +84 -3
- data/lib/stripe/resources/subscription_schedule.rb +1007 -10
- data/lib/stripe/resources/tax/association.rb +66 -0
- data/lib/stripe/resources/tax/form.rb +211 -0
- data/lib/stripe/resources/tax_id.rb +12 -2
- data/lib/stripe/resources/terminal/configuration.rb +33 -0
- data/lib/stripe/resources/terminal/onboarding_link.rb +84 -0
- data/lib/stripe/resources/terminal/reader.rb +8 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +31 -0
- data/lib/stripe/resources/transfer.rb +6 -0
- data/lib/stripe/resources/treasury/financial_account.rb +22 -3
- data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +37 -0
- data/lib/stripe/resources/treasury/received_credit.rb +38 -1
- data/lib/stripe/resources/treasury/received_debit.rb +40 -1
- data/lib/stripe/resources/v2/billing/bill_setting.rb +62 -0
- data/lib/stripe/resources/v2/billing/bill_setting_version.rb +50 -0
- data/lib/stripe/resources/v2/billing/cadence.rb +182 -0
- data/lib/stripe/resources/v2/billing/collection_setting.rb +148 -0
- data/lib/stripe/resources/v2/billing/collection_setting_version.rb +136 -0
- data/lib/stripe/resources/v2/billing/custom_pricing_unit.rb +35 -0
- data/lib/stripe/resources/v2/billing/intent.rb +59 -0
- data/lib/stripe/resources/v2/billing/intent_action.rb +200 -0
- data/lib/stripe/resources/v2/billing/license_fee.rb +79 -0
- data/lib/stripe/resources/v2/billing/license_fee_subscription.rb +36 -0
- data/lib/stripe/resources/v2/billing/license_fee_version.rb +56 -0
- data/lib/stripe/resources/v2/billing/licensed_item.rb +44 -0
- data/lib/stripe/resources/v2/billing/metered_item.rb +58 -0
- data/lib/stripe/resources/v2/billing/pricing_plan.rb +43 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_component.rb +58 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_subscription.rb +63 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_version.rb +30 -0
- data/lib/stripe/resources/v2/billing/profile.rb +38 -0
- data/lib/stripe/resources/v2/billing/rate_card.rb +53 -0
- data/lib/stripe/resources/v2/billing/rate_card_rate.rb +71 -0
- data/lib/stripe/resources/v2/billing/rate_card_subscription.rb +63 -0
- data/lib/stripe/resources/v2/billing/rate_card_version.rb +26 -0
- data/lib/stripe/resources/v2/billing/service_action.rb +117 -0
- data/lib/stripe/resources/v2/core/account.rb +1938 -0
- data/lib/stripe/resources/v2/core/account_link.rb +72 -0
- data/lib/stripe/resources/v2/core/claimable_sandbox.rb +57 -0
- data/lib/stripe/resources/v2/core/person.rb +276 -0
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +74 -0
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +39 -0
- data/lib/stripe/resources/v2/event.rb +2 -0
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +20 -0
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +22 -0
- data/lib/stripe/resources/v2/money_management/adjustment.rb +51 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +79 -0
- data/lib/stripe/resources/v2/money_management/financial_address.rb +68 -0
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +94 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +129 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +82 -0
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +45 -0
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +117 -0
- data/lib/stripe/resources/v2/money_management/payout_method.rb +77 -0
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +49 -0
- data/lib/stripe/resources/v2/money_management/received_credit.rb +122 -0
- data/lib/stripe/resources/v2/money_management/received_debit.rb +84 -0
- data/lib/stripe/resources/v2/money_management/transaction.rb +80 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +70 -0
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +89 -0
- data/lib/stripe/resources/v2/reporting/report.rb +64 -0
- data/lib/stripe/resources/v2/reporting/report_run.rb +89 -0
- data/lib/stripe/resources/v2/tax/automatic_rule.rb +31 -0
- data/lib/stripe/resources.rb +194 -0
- data/lib/stripe/services/account_notice_service.rb +101 -0
- data/lib/stripe/services/account_service.rb +562 -1
- data/lib/stripe/services/account_session_service.rb +226 -1
- data/lib/stripe/services/balance_settings_service.rb +99 -0
- data/lib/stripe/services/billing/alert_service.rb +75 -1
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +17 -2
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +4 -0
- data/lib/stripe/services/billing/credit_grant_service.rb +37 -2
- data/lib/stripe/services/billing/meter_usage_service.rb +76 -0
- data/lib/stripe/services/billing_portal/session_service.rb +4 -0
- data/lib/stripe/services/billing_service.rb +2 -1
- data/lib/stripe/services/capital/financing_offer_service.rb +112 -0
- data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
- data/lib/stripe/services/capital/financing_transaction_service.rb +79 -0
- data/lib/stripe/services/capital_service.rb +15 -0
- data/lib/stripe/services/charge_service.rb +1418 -0
- data/lib/stripe/services/checkout/session_service.rb +472 -5
- data/lib/stripe/services/coupon_service.rb +17 -1
- data/lib/stripe/services/credit_note_service.rb +4 -0
- data/lib/stripe/services/customer_session_service.rb +4 -1
- data/{rbi/stripe/services/account_external_account_service.rbi → lib/stripe/services/external_account_service.rb} +135 -122
- data/{rbi/stripe/services/tax/transaction_line_item_service.rbi → lib/stripe/services/financial_connections/account_inferred_balance_service.rb} +21 -17
- data/lib/stripe/services/financial_connections/account_service.rb +7 -2
- data/{rbi/stripe/services/climate/supplier_service.rbi → lib/stripe/services/financial_connections/institution_service.rb} +36 -25
- data/lib/stripe/services/financial_connections/session_service.rb +34 -2
- data/lib/stripe/services/financial_connections_service.rb +2 -1
- data/lib/stripe/services/fx_quote_service.rb +123 -0
- data/lib/stripe/services/identity/verification_session_service.rb +8 -0
- data/lib/stripe/services/invoice_item_service.rb +74 -2
- data/lib/stripe/services/invoice_line_item_service.rb +33 -1
- data/lib/stripe/services/invoice_payment_service.rb +4 -1
- data/lib/stripe/services/invoice_service.rb +1078 -16
- data/lib/stripe/services/issuing/card_service.rb +0 -8
- data/lib/stripe/services/issuing/cardholder_service.rb +2 -1
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +504 -0
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +66 -0
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +83 -0
- data/lib/stripe/services/issuing/transaction_service.rb +4 -0
- data/lib/stripe/services/issuing_service.rb +5 -1
- data/lib/stripe/services/mandate_service.rb +40 -0
- data/lib/stripe/services/margin_service.rb +119 -0
- data/{rbi/stripe/services/source_transaction_service.rbi → lib/stripe/services/order_line_item_service.rb} +20 -16
- data/lib/stripe/services/order_service.rb +2388 -0
- data/lib/stripe/services/payment_attempt_record_service.rb +52 -0
- data/{rbi/stripe/services/quote_line_item_service.rbi → lib/stripe/services/payment_intent_amount_details_line_item_service.rb} +20 -16
- data/lib/stripe/services/payment_intent_service.rb +7630 -2215
- data/lib/stripe/services/payment_method_configuration_service.rb +210 -0
- data/lib/stripe/services/payment_method_service.rb +120 -1
- data/lib/stripe/services/payment_record_service.rb +562 -0
- data/lib/stripe/services/price_service.rb +19 -0
- data/lib/stripe/services/privacy/redaction_job_service.rb +240 -0
- data/{rbi/stripe/services/tax/calculation_line_item_service.rbi → lib/stripe/services/privacy/redaction_job_validation_error_service.rb} +21 -17
- data/lib/stripe/services/privacy_service.rb +13 -0
- data/lib/stripe/services/promotion_code_service.rb +8 -0
- data/{rbi/stripe/services/credit_note_line_item_service.rbi → lib/stripe/services/quote_line_service.rb} +20 -16
- data/{rbi/stripe/services/payment_link_line_item_service.rbi → lib/stripe/services/quote_preview_invoice_service.rb} +20 -16
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +35 -0
- data/lib/stripe/services/quote_service.rb +1723 -8
- data/lib/stripe/services/setup_intent_service.rb +691 -9
- data/lib/stripe/services/subscription_item_service.rb +75 -3
- data/lib/stripe/services/subscription_schedule_service.rb +911 -10
- data/lib/stripe/services/subscription_service.rb +336 -9
- data/lib/stripe/services/tax/association_service.rb +31 -0
- data/lib/stripe/services/tax/form_service.rb +100 -0
- data/lib/stripe/services/tax_id_service.rb +8 -2
- data/lib/stripe/services/tax_service.rb +3 -1
- data/lib/stripe/services/terminal/configuration_service.rb +26 -0
- data/lib/stripe/services/terminal/onboarding_link_service.rb +56 -0
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
- data/lib/stripe/services/terminal_service.rb +3 -1
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +97 -0
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +25 -1
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +25 -1
- data/lib/stripe/services/transfer_service.rb +4 -0
- data/lib/stripe/services/treasury/financial_account_features_service.rb +4 -1
- data/lib/stripe/services/treasury/financial_account_service.rb +16 -2
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +24 -0
- data/lib/stripe/services/v1_services.rb +11 -1
- data/lib/stripe/services/v2/billing/bill_setting_service.rb +214 -0
- data/lib/stripe/services/v2/billing/bill_settings/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/cadence_service.rb +428 -0
- data/lib/stripe/services/v2/billing/collection_setting_service.rb +518 -0
- data/lib/stripe/services/v2/billing/collection_settings/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/custom_pricing_unit_service.rb +108 -0
- data/lib/stripe/services/v2/billing/intent_service.rb +465 -0
- data/lib/stripe/services/v2/billing/intents/action_service.rb +45 -0
- data/lib/stripe/services/v2/billing/license_fee_service.rb +250 -0
- data/lib/stripe/services/v2/billing/license_fee_subscription_service.rb +23 -0
- data/lib/stripe/services/v2/billing/license_fees/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/licensed_item_service.rb +149 -0
- data/lib/stripe/services/v2/billing/metered_item_service.rb +176 -0
- data/lib/stripe/services/v2/billing/pricing_plan_service.rb +142 -0
- data/lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb +76 -0
- data/lib/stripe/services/v2/billing/pricing_plans/component_service.rb +162 -0
- data/lib/stripe/services/v2/billing/pricing_plans/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/profile_service.rb +144 -0
- data/lib/stripe/services/v2/billing/rate_card_service.rb +151 -0
- data/lib/stripe/services/v2/billing/rate_card_subscription_service.rb +144 -0
- data/lib/stripe/services/v2/billing/rate_cards/rate_service.rb +161 -0
- data/lib/stripe/services/v2/billing/rate_cards/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/service_action_service.rb +259 -0
- data/lib/stripe/services/v2/billing_service.rb +18 -1
- data/lib/stripe/services/v2/core/account_link_service.rb +114 -0
- data/lib/stripe/services/v2/core/account_service.rb +4536 -0
- data/lib/stripe/services/v2/core/accounts/person_service.rb +1045 -0
- data/lib/stripe/services/v2/core/claimable_sandbox_service.rb +50 -0
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +130 -0
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +107 -0
- data/lib/stripe/services/v2/core/vault_service.rb +18 -0
- data/lib/stripe/services/v2/core_service.rb +5 -1
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +74 -0
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +119 -0
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +82 -0
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +125 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +95 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +199 -0
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +235 -0
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +172 -0
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +90 -0
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +32 -0
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +70 -0
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +43 -0
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +69 -0
- data/lib/stripe/services/v2/money_management/transaction_service.rb +73 -0
- data/lib/stripe/services/v2/money_management_service.rb +31 -0
- data/lib/stripe/services/v2/payment_service.rb +15 -0
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +152 -0
- data/lib/stripe/services/v2/reporting/report_run_service.rb +88 -0
- data/lib/stripe/services/v2/reporting/report_service.rb +25 -0
- data/lib/stripe/services/v2/reporting_service.rb +16 -0
- data/lib/stripe/services/v2/tax/automatic_rule_service.rb +99 -0
- data/lib/stripe/services/v2/tax_service.rb +15 -0
- data/lib/stripe/services/v2/test_helper_service.rb +15 -0
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +53 -0
- data/lib/stripe/services/v2_services.rb +6 -1
- data/lib/stripe/services.rb +84 -0
- data/lib/stripe/stripe_configuration.rb +3 -1
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/util.rb +7 -1
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +53 -0
- data/stripe.gemspec +4 -1
- metadata +281 -323
- data/rbi/stripe/resources/account.rbi +0 -4991
- data/rbi/stripe/resources/account_link.rbi +0 -76
- data/rbi/stripe/resources/account_session.rbi +0 -1173
- data/rbi/stripe/resources/apple_pay_domain.rbi +0 -88
- data/rbi/stripe/resources/application.rbi +0 -20
- data/rbi/stripe/resources/application_fee.rbi +0 -118
- data/rbi/stripe/resources/application_fee_refund.rbi +0 -37
- data/rbi/stripe/resources/apps/secret.rbi +0 -195
- data/rbi/stripe/resources/balance.rbi +0 -230
- data/rbi/stripe/resources/balance_transaction.rbi +0 -147
- data/rbi/stripe/resources/bank_account.rbi +0 -127
- data/rbi/stripe/resources/billing/alert.rbi +0 -201
- data/rbi/stripe/resources/billing/alert_triggered.rbi +0 -28
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -63
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +0 -147
- data/rbi/stripe/resources/billing/credit_grant.rbi +0 -291
- data/rbi/stripe/resources/billing/meter.rbi +0 -226
- data/rbi/stripe/resources/billing/meter_event.rbi +0 -64
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +0 -64
- data/rbi/stripe/resources/billing/meter_event_summary.rbi +0 -35
- data/rbi/stripe/resources/billing_portal/configuration.rbi +0 -712
- data/rbi/stripe/resources/billing_portal/session.rbi +0 -345
- data/rbi/stripe/resources/capability.rbi +0 -125
- data/rbi/stripe/resources/card.rbi +0 -125
- data/rbi/stripe/resources/cash_balance.rbi +0 -32
- data/rbi/stripe/resources/charge.rbi +0 -2136
- data/rbi/stripe/resources/checkout/session.rbi +0 -4105
- data/rbi/stripe/resources/climate/order.rbi +0 -245
- data/rbi/stripe/resources/climate/product.rbi +0 -75
- data/rbi/stripe/resources/climate/supplier.rbi +0 -72
- data/rbi/stripe/resources/confirmation_token.rbi +0 -1818
- data/rbi/stripe/resources/connect_collection_transfer.rbi +0 -26
- data/rbi/stripe/resources/country_spec.rbi +0 -85
- data/rbi/stripe/resources/coupon.rbi +0 -250
- data/rbi/stripe/resources/credit_note.rbi +0 -752
- data/rbi/stripe/resources/credit_note_line_item.rbi +0 -101
- data/rbi/stripe/resources/customer.rbi +0 -993
- data/rbi/stripe/resources/customer_balance_transaction.rbi +0 -56
- data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +0 -151
- data/rbi/stripe/resources/customer_session.rbi +0 -200
- data/rbi/stripe/resources/discount.rbi +0 -53
- data/rbi/stripe/resources/dispute.rbi +0 -761
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +0 -58
- data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +0 -23
- data/rbi/stripe/resources/entitlements/feature.rbi +0 -117
- data/rbi/stripe/resources/ephemeral_key.rbi +0 -44
- data/rbi/stripe/resources/event.rbi +0 -137
- data/rbi/stripe/resources/exchange_rate.rbi +0 -66
- data/rbi/stripe/resources/file.rbi +0 -143
- data/rbi/stripe/resources/file_link.rbi +0 -141
- data/rbi/stripe/resources/financial_connections/account.rbi +0 -339
- data/rbi/stripe/resources/financial_connections/account_owner.rbi +0 -35
- data/rbi/stripe/resources/financial_connections/account_ownership.rbi +0 -23
- data/rbi/stripe/resources/financial_connections/session.rbi +0 -123
- data/rbi/stripe/resources/financial_connections/transaction.rbi +0 -124
- data/rbi/stripe/resources/forwarding/request.rbi +0 -216
- data/rbi/stripe/resources/funding_instructions.rbi +0 -437
- data/rbi/stripe/resources/identity/verification_report.rbi +0 -360
- data/rbi/stripe/resources/identity/verification_session.rbi +0 -564
- data/rbi/stripe/resources/invoice.rbi +0 -3894
- data/rbi/stripe/resources/invoice_item.rbi +0 -470
- data/rbi/stripe/resources/invoice_line_item.rbi +0 -432
- data/rbi/stripe/resources/invoice_payment.rbi +0 -121
- data/rbi/stripe/resources/invoice_rendering_template.rbi +0 -104
- data/rbi/stripe/resources/issuing/authorization.rbi +0 -1283
- data/rbi/stripe/resources/issuing/card.rbi +0 -749
- data/rbi/stripe/resources/issuing/cardholder.rbi +0 -744
- data/rbi/stripe/resources/issuing/dispute.rbi +0 -913
- data/rbi/stripe/resources/issuing/personalization_design.rbi +0 -338
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +0 -79
- data/rbi/stripe/resources/issuing/token.rbi +0 -226
- data/rbi/stripe/resources/issuing/transaction.rbi +0 -1061
- data/rbi/stripe/resources/line_item.rbi +0 -72
- data/rbi/stripe/resources/login_link.rbi +0 -19
- data/rbi/stripe/resources/mandate.rbi +0 -191
- data/rbi/stripe/resources/payment_intent.rbi +0 -10011
- data/rbi/stripe/resources/payment_link.rbi +0 -1891
- data/rbi/stripe/resources/payment_method.rbi +0 -1770
- data/rbi/stripe/resources/payment_method_configuration.rbi +0 -3550
- data/rbi/stripe/resources/payment_method_domain.rbi +0 -228
- data/rbi/stripe/resources/payout.rbi +0 -307
- data/rbi/stripe/resources/person.rbi +0 -401
- data/rbi/stripe/resources/plan.rbi +0 -371
- data/rbi/stripe/resources/price.rbi +0 -694
- data/rbi/stripe/resources/product.rbi +0 -553
- data/rbi/stripe/resources/product_feature.rbi +0 -26
- data/rbi/stripe/resources/promotion_code.rbi +0 -264
- data/rbi/stripe/resources/quote.rbi +0 -1137
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +0 -98
- data/rbi/stripe/resources/radar/value_list.rbi +0 -168
- data/rbi/stripe/resources/radar/value_list_item.rbi +0 -129
- data/rbi/stripe/resources/refund.rbi +0 -523
- data/rbi/stripe/resources/reporting/report_run.rbi +0 -191
- data/rbi/stripe/resources/reporting/report_type.rbi +0 -57
- data/rbi/stripe/resources/reserve_transaction.rbi +0 -23
- data/rbi/stripe/resources/reversal.rbi +0 -51
- data/rbi/stripe/resources/review.rbi +0 -154
- data/rbi/stripe/resources/setup_attempt.rbi +0 -477
- data/rbi/stripe/resources/setup_intent.rbi +0 -3974
- data/rbi/stripe/resources/shipping_rate.rbi +0 -305
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +0 -75
- data/rbi/stripe/resources/source.rbi +0 -1496
- data/rbi/stripe/resources/source_mandate_notification.rbi +0 -77
- data/rbi/stripe/resources/source_transaction.rbi +0 -127
- data/rbi/stripe/resources/subscription.rbi +0 -2154
- data/rbi/stripe/resources/subscription_item.rbi +0 -404
- data/rbi/stripe/resources/subscription_schedule.rbi +0 -1795
- data/rbi/stripe/resources/tax/calculation.rbi +0 -478
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +0 -91
- data/rbi/stripe/resources/tax/registration.rbi +0 -3216
- data/rbi/stripe/resources/tax/settings.rbi +0 -141
- data/rbi/stripe/resources/tax/transaction.rbi +0 -351
- data/rbi/stripe/resources/tax/transaction_line_item.rbi +0 -54
- data/rbi/stripe/resources/tax_code.rbi +0 -44
- data/rbi/stripe/resources/tax_deducted_at_source.rbi +0 -23
- data/rbi/stripe/resources/tax_id.rbi +0 -165
- data/rbi/stripe/resources/tax_rate.rbi +0 -239
- data/rbi/stripe/resources/terminal/configuration.rbi +0 -1647
- data/rbi/stripe/resources/terminal/connection_token.rbi +0 -37
- data/rbi/stripe/resources/terminal/location.rbi +0 -222
- data/rbi/stripe/resources/terminal/reader.rbi +0 -1016
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +0 -132
- data/rbi/stripe/resources/token.rbi +0 -1281
- data/rbi/stripe/resources/topup.rbi +0 -222
- data/rbi/stripe/resources/transfer.rbi +0 -199
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +0 -119
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +0 -131
- data/rbi/stripe/resources/treasury/financial_account.rbi +0 -869
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -260
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +0 -295
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +0 -592
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +0 -431
- data/rbi/stripe/resources/treasury/received_credit.rbi +0 -302
- data/rbi/stripe/resources/treasury/received_debit.rbi +0 -256
- data/rbi/stripe/resources/treasury/transaction.rbi +0 -215
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +0 -192
- data/rbi/stripe/resources/v2/amount.rbi +0 -14
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +0 -37
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +0 -41
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +0 -31
- data/rbi/stripe/resources/v2/event.rbi +0 -48
- data/rbi/stripe/resources/v2/event_destination.rbi +0 -91
- data/rbi/stripe/resources/webhook_endpoint.rbi +0 -168
- data/rbi/stripe/services/account_capability_service.rbi +0 -51
- data/rbi/stripe/services/account_link_service.rbi +0 -60
- data/rbi/stripe/services/account_login_link_service.rbi +0 -22
- data/rbi/stripe/services/account_person_service.rbi +0 -1007
- data/rbi/stripe/services/account_service.rbi +0 -4281
- data/rbi/stripe/services/account_session_service.rbi +0 -748
- data/rbi/stripe/services/apple_pay_domain_service.rbi +0 -76
- data/rbi/stripe/services/application_fee_refund_service.rbi +0 -93
- data/rbi/stripe/services/application_fee_service.rbi +0 -78
- data/rbi/stripe/services/apps/secret_service.rbi +0 -151
- data/rbi/stripe/services/apps_service.rbi +0 -9
- data/rbi/stripe/services/balance_service.rbi +0 -21
- data/rbi/stripe/services/balance_transaction_service.rbi +0 -93
- data/rbi/stripe/services/billing/alert_service.rbi +0 -152
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +0 -68
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +0 -59
- data/rbi/stripe/services/billing/credit_grant_service.rbi +0 -211
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +0 -42
- data/rbi/stripe/services/billing/meter_event_service.rbi +0 -42
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +0 -54
- data/rbi/stripe/services/billing/meter_service.rbi +0 -163
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +0 -561
- data/rbi/stripe/services/billing_portal/session_service.rbi +0 -204
- data/rbi/stripe/services/billing_portal_service.rbi +0 -10
- data/rbi/stripe/services/billing_service.rbi +0 -15
- data/rbi/stripe/services/charge_service.rbi +0 -448
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +0 -33
- data/rbi/stripe/services/checkout/session_service.rbi +0 -2697
- data/rbi/stripe/services/checkout_service.rbi +0 -9
- data/rbi/stripe/services/climate/order_service.rbi +0 -142
- data/rbi/stripe/services/climate/product_service.rbi +0 -46
- data/rbi/stripe/services/climate_service.rbi +0 -11
- data/rbi/stripe/services/confirmation_token_service.rbi +0 -20
- data/rbi/stripe/services/country_spec_service.rbi +0 -44
- data/rbi/stripe/services/coupon_service.rbi +0 -194
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +0 -167
- data/rbi/stripe/services/credit_note_service.rbi +0 -415
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +0 -92
- data/rbi/stripe/services/customer_cash_balance_service.rbi +0 -45
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +0 -44
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +0 -59
- data/rbi/stripe/services/customer_payment_method_service.rbi +0 -57
- data/rbi/stripe/services/customer_payment_source_service.rbi +0 -232
- data/rbi/stripe/services/customer_service.rbi +0 -635
- data/rbi/stripe/services/customer_session_service.rbi +0 -116
- data/rbi/stripe/services/customer_tax_id_service.rbi +0 -70
- data/rbi/stripe/services/dispute_service.rbi +0 -424
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +0 -55
- data/rbi/stripe/services/entitlements/feature_service.rbi +0 -107
- data/rbi/stripe/services/entitlements_service.rbi +0 -10
- data/rbi/stripe/services/ephemeral_key_service.rbi +0 -53
- data/rbi/stripe/services/event_service.rbi +0 -83
- data/rbi/stripe/services/exchange_rate_service.rbi +0 -44
- data/rbi/stripe/services/file_link_service.rbi +0 -124
- data/rbi/stripe/services/file_service.rbi +0 -116
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +0 -42
- data/rbi/stripe/services/financial_connections/account_service.rbi +0 -133
- data/rbi/stripe/services/financial_connections/session_service.rbi +0 -88
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +0 -92
- data/rbi/stripe/services/financial_connections_service.rbi +0 -11
- data/rbi/stripe/services/forwarding/request_service.rbi +0 -134
- data/rbi/stripe/services/forwarding_service.rbi +0 -9
- data/rbi/stripe/services/identity/verification_report_service.rbi +0 -87
- data/rbi/stripe/services/identity/verification_session_service.rbi +0 -339
- data/rbi/stripe/services/identity_service.rbi +0 -10
- data/rbi/stripe/services/invoice_item_service.rbi +0 -366
- data/rbi/stripe/services/invoice_line_item_service.rbi +0 -259
- data/rbi/stripe/services/invoice_payment_service.rbi +0 -71
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +0 -82
- data/rbi/stripe/services/invoice_service.rbi +0 -3073
- data/rbi/stripe/services/issuing/authorization_service.rbi +0 -146
- data/rbi/stripe/services/issuing/card_service.rbi +0 -503
- data/rbi/stripe/services/issuing/cardholder_service.rbi +0 -587
- data/rbi/stripe/services/issuing/dispute_service.rbi +0 -707
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +0 -243
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +0 -59
- data/rbi/stripe/services/issuing/token_service.rbi +0 -99
- data/rbi/stripe/services/issuing/transaction_service.rbi +0 -105
- data/rbi/stripe/services/issuing_service.rbi +0 -16
- data/rbi/stripe/services/mandate_service.rbi +0 -20
- data/rbi/stripe/services/payment_intent_service.rbi +0 -8010
- data/rbi/stripe/services/payment_link_service.rbi +0 -1441
- data/rbi/stripe/services/payment_method_configuration_service.rbi +0 -2487
- data/rbi/stripe/services/payment_method_domain_service.rbi +0 -112
- data/rbi/stripe/services/payment_method_service.rbi +0 -781
- data/rbi/stripe/services/payout_service.rbi +0 -209
- data/rbi/stripe/services/plan_service.rbi +0 -282
- data/rbi/stripe/services/price_service.rbi +0 -546
- data/rbi/stripe/services/product_feature_service.rbi +0 -67
- data/rbi/stripe/services/product_service.rbi +0 -477
- data/rbi/stripe/services/promotion_code_service.rbi +0 -214
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +0 -31
- data/rbi/stripe/services/quote_service.rbi +0 -695
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +0 -85
- data/rbi/stripe/services/radar/value_list_item_service.rbi +0 -109
- data/rbi/stripe/services/radar/value_list_service.rbi +0 -141
- data/rbi/stripe/services/radar_service.rbi +0 -11
- data/rbi/stripe/services/refund_service.rbi +0 -185
- data/rbi/stripe/services/reporting/report_run_service.rbi +0 -135
- data/rbi/stripe/services/reporting/report_type_service.rbi +0 -35
- data/rbi/stripe/services/reporting_service.rbi +0 -10
- data/rbi/stripe/services/review_service.rbi +0 -84
- data/rbi/stripe/services/setup_attempt_service.rbi +0 -65
- data/rbi/stripe/services/setup_intent_service.rbi +0 -3709
- data/rbi/stripe/services/shipping_rate_service.rbi +0 -241
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +0 -46
- data/rbi/stripe/services/sigma_service.rbi +0 -9
- data/rbi/stripe/services/source_service.rbi +0 -663
- data/rbi/stripe/services/subscription_item_service.rbi +0 -350
- data/rbi/stripe/services/subscription_schedule_service.rbi +0 -1425
- data/rbi/stripe/services/subscription_service.rbi +0 -1768
- data/rbi/stripe/services/tax/calculation_service.rbi +0 -234
- data/rbi/stripe/services/tax/registration_service.rbi +0 -2278
- data/rbi/stripe/services/tax/settings_service.rbi +0 -93
- data/rbi/stripe/services/tax/transaction_service.rbi +0 -146
- data/rbi/stripe/services/tax_code_service.rbi +0 -44
- data/rbi/stripe/services/tax_id_service.rbi +0 -110
- data/rbi/stripe/services/tax_rate_service.rbi +0 -185
- data/rbi/stripe/services/tax_service.rbi +0 -12
- data/rbi/stripe/services/terminal/configuration_service.rbi +0 -1328
- data/rbi/stripe/services/terminal/connection_token_service.rbi +0 -25
- data/rbi/stripe/services/terminal/location_service.rbi +0 -182
- data/rbi/stripe/services/terminal/reader_service.rbi +0 -540
- data/rbi/stripe/services/terminal_service.rbi +0 -12
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +0 -746
- data/rbi/stripe/services/test_helpers/customer_service.rbi +0 -33
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +0 -848
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +0 -76
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +0 -69
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +0 -711
- data/rbi/stripe/services/test_helpers/issuing_service.rbi +0 -14
- data/rbi/stripe/services/test_helpers/refund_service.rbi +0 -22
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +0 -117
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +0 -11
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +0 -90
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +0 -64
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +0 -125
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +0 -125
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +0 -87
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +0 -87
- data/rbi/stripe/services/test_helpers/treasury_service.rbi +0 -15
- data/rbi/stripe/services/test_helpers_service.rbi +0 -15
- data/rbi/stripe/services/token_service.rbi +0 -1255
- data/rbi/stripe/services/topup_service.rbi +0 -176
- data/rbi/stripe/services/transfer_reversal_service.rbi +0 -101
- data/rbi/stripe/services/transfer_service.rbi +0 -152
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +0 -84
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +0 -88
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +0 -198
- data/rbi/stripe/services/treasury/financial_account_service.rbi +0 -566
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +0 -117
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +0 -304
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +0 -157
- data/rbi/stripe/services/treasury/received_credit_service.rbi +0 -72
- data/rbi/stripe/services/treasury/received_debit_service.rbi +0 -59
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +0 -111
- data/rbi/stripe/services/treasury/transaction_service.rbi +0 -122
- data/rbi/stripe/services/treasury_service.rbi +0 -18
- data/rbi/stripe/services/v1_services.rbi +0 -77
- data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +0 -39
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +0 -42
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +0 -18
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +0 -55
- data/rbi/stripe/services/v2/billing_service.rbi +0 -14
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +0 -192
- data/rbi/stripe/services/v2/core/event_service.rbi +0 -36
- data/rbi/stripe/services/v2/core_service.rbi +0 -12
- data/rbi/stripe/services/v2_services.rbi +0 -10
- data/rbi/stripe/services/webhook_endpoint_service.rbi +0 -129
@@ -95,13 +95,36 @@ module Stripe
|
|
95
95
|
attr_reader :transfer_data
|
96
96
|
end
|
97
97
|
|
98
|
+
class LastPriceMigrationError < Stripe::StripeObject
|
99
|
+
class FailedTransition < Stripe::StripeObject
|
100
|
+
# The original price to be migrated.
|
101
|
+
attr_reader :source_price
|
102
|
+
# The intended resulting price of the migration.
|
103
|
+
attr_reader :target_price
|
104
|
+
end
|
105
|
+
# The time at which the price migration encountered an error.
|
106
|
+
attr_reader :errored_at
|
107
|
+
# The involved price pairs in each failed transition.
|
108
|
+
attr_reader :failed_transitions
|
109
|
+
# The type of error encountered by the price migration.
|
110
|
+
attr_reader :type
|
111
|
+
end
|
112
|
+
|
98
113
|
class Phase < Stripe::StripeObject
|
99
114
|
class AddInvoiceItem < Stripe::StripeObject
|
100
115
|
class Discount < Stripe::StripeObject
|
116
|
+
class DiscountEnd < Stripe::StripeObject
|
117
|
+
# The discount end timestamp.
|
118
|
+
attr_reader :timestamp
|
119
|
+
# The discount end type.
|
120
|
+
attr_reader :type
|
121
|
+
end
|
101
122
|
# ID of the coupon to create a new discount for.
|
102
123
|
attr_reader :coupon
|
103
124
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
104
125
|
attr_reader :discount
|
126
|
+
# Details to determine how long the discount should be applied for.
|
127
|
+
attr_reader :discount_end
|
105
128
|
# ID of the promotion code to create a new discount for.
|
106
129
|
attr_reader :promotion_code
|
107
130
|
end
|
@@ -162,10 +185,18 @@ module Stripe
|
|
162
185
|
end
|
163
186
|
|
164
187
|
class Discount < Stripe::StripeObject
|
188
|
+
class DiscountEnd < Stripe::StripeObject
|
189
|
+
# The discount end timestamp.
|
190
|
+
attr_reader :timestamp
|
191
|
+
# The discount end type.
|
192
|
+
attr_reader :type
|
193
|
+
end
|
165
194
|
# ID of the coupon to create a new discount for.
|
166
195
|
attr_reader :coupon
|
167
196
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
168
197
|
attr_reader :discount
|
198
|
+
# Details to determine how long the discount should be applied for.
|
199
|
+
attr_reader :discount_end
|
169
200
|
# ID of the promotion code to create a new discount for.
|
170
201
|
attr_reader :promotion_code
|
171
202
|
end
|
@@ -192,13 +223,28 @@ module Stripe
|
|
192
223
|
end
|
193
224
|
|
194
225
|
class Discount < Stripe::StripeObject
|
226
|
+
class DiscountEnd < Stripe::StripeObject
|
227
|
+
# The discount end timestamp.
|
228
|
+
attr_reader :timestamp
|
229
|
+
# The discount end type.
|
230
|
+
attr_reader :type
|
231
|
+
end
|
195
232
|
# ID of the coupon to create a new discount for.
|
196
233
|
attr_reader :coupon
|
197
234
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
198
235
|
attr_reader :discount
|
236
|
+
# Details to determine how long the discount should be applied for.
|
237
|
+
attr_reader :discount_end
|
199
238
|
# ID of the promotion code to create a new discount for.
|
200
239
|
attr_reader :promotion_code
|
201
240
|
end
|
241
|
+
|
242
|
+
class Trial < Stripe::StripeObject
|
243
|
+
# List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
|
244
|
+
attr_reader :converts_to
|
245
|
+
# Determines the type of trial for this item.
|
246
|
+
attr_reader :type
|
247
|
+
end
|
202
248
|
# Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
203
249
|
attr_reader :billing_thresholds
|
204
250
|
# The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
|
@@ -213,6 +259,13 @@ module Stripe
|
|
213
259
|
attr_reader :quantity
|
214
260
|
# The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.
|
215
261
|
attr_reader :tax_rates
|
262
|
+
# Options that configure the trial on the subscription item.
|
263
|
+
attr_reader :trial
|
264
|
+
end
|
265
|
+
|
266
|
+
class PauseCollection < Stripe::StripeObject
|
267
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
268
|
+
attr_reader :behavior
|
216
269
|
end
|
217
270
|
|
218
271
|
class TransferData < Stripe::StripeObject
|
@@ -221,6 +274,15 @@ module Stripe
|
|
221
274
|
# The account where funds from the payment will be transferred to upon payment success.
|
222
275
|
attr_reader :destination
|
223
276
|
end
|
277
|
+
|
278
|
+
class TrialSettings < Stripe::StripeObject
|
279
|
+
class EndBehavior < Stripe::StripeObject
|
280
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
281
|
+
attr_reader :prorate_up_front
|
282
|
+
end
|
283
|
+
# Defines how the subscription should behave when a trial ends.
|
284
|
+
attr_reader :end_behavior
|
285
|
+
end
|
224
286
|
# A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
|
225
287
|
attr_reader :add_invoice_items
|
226
288
|
# 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 during this phase of the schedule.
|
@@ -253,14 +315,31 @@ module Stripe
|
|
253
315
|
attr_reader :metadata
|
254
316
|
# The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
|
255
317
|
attr_reader :on_behalf_of
|
318
|
+
# If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
319
|
+
attr_reader :pause_collection
|
256
320
|
# When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
|
257
321
|
attr_reader :proration_behavior
|
258
322
|
# The start of this phase of the subscription schedule.
|
259
323
|
attr_reader :start_date
|
260
324
|
# The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
|
261
325
|
attr_reader :transfer_data
|
326
|
+
# Specify behavior of the trial when crossing schedule phase boundaries
|
327
|
+
attr_reader :trial_continuation
|
262
328
|
# When the trial ends within the phase.
|
263
329
|
attr_reader :trial_end
|
330
|
+
# Settings related to any trials on the subscription during this phase.
|
331
|
+
attr_reader :trial_settings
|
332
|
+
end
|
333
|
+
|
334
|
+
class Prebilling < Stripe::StripeObject
|
335
|
+
# ID of the prebilling invoice.
|
336
|
+
attr_reader :invoice
|
337
|
+
# The end of the last period for which the invoice pre-bills.
|
338
|
+
attr_reader :period_end
|
339
|
+
# The start of the first period for which the invoice pre-bills.
|
340
|
+
attr_reader :period_start
|
341
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
|
342
|
+
attr_reader :update_behavior
|
264
343
|
end
|
265
344
|
|
266
345
|
class ListParams < Stripe::RequestParams
|
@@ -343,6 +422,8 @@ module Stripe
|
|
343
422
|
attr_accessor :created
|
344
423
|
# Only return subscription schedules for the given customer.
|
345
424
|
attr_accessor :customer
|
425
|
+
# Only return subscription schedules for the given account.
|
426
|
+
attr_accessor :customer_account
|
346
427
|
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
347
428
|
attr_accessor :ending_before
|
348
429
|
# Specifies which fields in the response should be expanded.
|
@@ -361,6 +442,7 @@ module Stripe
|
|
361
442
|
completed_at: nil,
|
362
443
|
created: nil,
|
363
444
|
customer: nil,
|
445
|
+
customer_account: nil,
|
364
446
|
ending_before: nil,
|
365
447
|
expand: nil,
|
366
448
|
limit: nil,
|
@@ -372,6 +454,7 @@ module Stripe
|
|
372
454
|
@completed_at = completed_at
|
373
455
|
@created = created
|
374
456
|
@customer = customer
|
457
|
+
@customer_account = customer_account
|
375
458
|
@ending_before = ending_before
|
376
459
|
@expand = expand
|
377
460
|
@limit = limit
|
@@ -513,16 +596,44 @@ module Stripe
|
|
513
596
|
class Phase < Stripe::RequestParams
|
514
597
|
class AddInvoiceItem < Stripe::RequestParams
|
515
598
|
class Discount < Stripe::RequestParams
|
599
|
+
class DiscountEnd < Stripe::RequestParams
|
600
|
+
class Duration < Stripe::RequestParams
|
601
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
602
|
+
attr_accessor :interval
|
603
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
604
|
+
attr_accessor :interval_count
|
605
|
+
|
606
|
+
def initialize(interval: nil, interval_count: nil)
|
607
|
+
@interval = interval
|
608
|
+
@interval_count = interval_count
|
609
|
+
end
|
610
|
+
end
|
611
|
+
# Time span for the redeemed discount.
|
612
|
+
attr_accessor :duration
|
613
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
614
|
+
attr_accessor :timestamp
|
615
|
+
# The type of calculation made to determine when the discount ends.
|
616
|
+
attr_accessor :type
|
617
|
+
|
618
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
619
|
+
@duration = duration
|
620
|
+
@timestamp = timestamp
|
621
|
+
@type = type
|
622
|
+
end
|
623
|
+
end
|
516
624
|
# ID of the coupon to create a new discount for.
|
517
625
|
attr_accessor :coupon
|
518
626
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
519
627
|
attr_accessor :discount
|
628
|
+
# Details to determine how long the discount should be applied for.
|
629
|
+
attr_accessor :discount_end
|
520
630
|
# ID of the promotion code to create a new discount for.
|
521
631
|
attr_accessor :promotion_code
|
522
632
|
|
523
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
633
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
524
634
|
@coupon = coupon
|
525
635
|
@discount = discount
|
636
|
+
@discount_end = discount_end
|
526
637
|
@promotion_code = promotion_code
|
527
638
|
end
|
528
639
|
end
|
@@ -658,16 +769,44 @@ module Stripe
|
|
658
769
|
end
|
659
770
|
|
660
771
|
class Discount < Stripe::RequestParams
|
772
|
+
class DiscountEnd < Stripe::RequestParams
|
773
|
+
class Duration < Stripe::RequestParams
|
774
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
775
|
+
attr_accessor :interval
|
776
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
777
|
+
attr_accessor :interval_count
|
778
|
+
|
779
|
+
def initialize(interval: nil, interval_count: nil)
|
780
|
+
@interval = interval
|
781
|
+
@interval_count = interval_count
|
782
|
+
end
|
783
|
+
end
|
784
|
+
# Time span for the redeemed discount.
|
785
|
+
attr_accessor :duration
|
786
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
787
|
+
attr_accessor :timestamp
|
788
|
+
# The type of calculation made to determine when the discount ends.
|
789
|
+
attr_accessor :type
|
790
|
+
|
791
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
792
|
+
@duration = duration
|
793
|
+
@timestamp = timestamp
|
794
|
+
@type = type
|
795
|
+
end
|
796
|
+
end
|
661
797
|
# ID of the coupon to create a new discount for.
|
662
798
|
attr_accessor :coupon
|
663
799
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
664
800
|
attr_accessor :discount
|
801
|
+
# Details to determine how long the discount should be applied for.
|
802
|
+
attr_accessor :discount_end
|
665
803
|
# ID of the promotion code to create a new discount for.
|
666
804
|
attr_accessor :promotion_code
|
667
805
|
|
668
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
806
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
669
807
|
@coupon = coupon
|
670
808
|
@discount = discount
|
809
|
+
@discount_end = discount_end
|
671
810
|
@promotion_code = promotion_code
|
672
811
|
end
|
673
812
|
end
|
@@ -721,16 +860,44 @@ module Stripe
|
|
721
860
|
end
|
722
861
|
|
723
862
|
class Discount < Stripe::RequestParams
|
863
|
+
class DiscountEnd < Stripe::RequestParams
|
864
|
+
class Duration < Stripe::RequestParams
|
865
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
866
|
+
attr_accessor :interval
|
867
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
868
|
+
attr_accessor :interval_count
|
869
|
+
|
870
|
+
def initialize(interval: nil, interval_count: nil)
|
871
|
+
@interval = interval
|
872
|
+
@interval_count = interval_count
|
873
|
+
end
|
874
|
+
end
|
875
|
+
# Time span for the redeemed discount.
|
876
|
+
attr_accessor :duration
|
877
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
878
|
+
attr_accessor :timestamp
|
879
|
+
# The type of calculation made to determine when the discount ends.
|
880
|
+
attr_accessor :type
|
881
|
+
|
882
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
883
|
+
@duration = duration
|
884
|
+
@timestamp = timestamp
|
885
|
+
@type = type
|
886
|
+
end
|
887
|
+
end
|
724
888
|
# ID of the coupon to create a new discount for.
|
725
889
|
attr_accessor :coupon
|
726
890
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
727
891
|
attr_accessor :discount
|
892
|
+
# Details to determine how long the discount should be applied for.
|
893
|
+
attr_accessor :discount_end
|
728
894
|
# ID of the promotion code to create a new discount for.
|
729
895
|
attr_accessor :promotion_code
|
730
896
|
|
731
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
897
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
732
898
|
@coupon = coupon
|
733
899
|
@discount = discount
|
900
|
+
@discount_end = discount_end
|
734
901
|
@promotion_code = promotion_code
|
735
902
|
end
|
736
903
|
end
|
@@ -776,6 +943,18 @@ module Stripe
|
|
776
943
|
@unit_amount_decimal = unit_amount_decimal
|
777
944
|
end
|
778
945
|
end
|
946
|
+
|
947
|
+
class Trial < Stripe::RequestParams
|
948
|
+
# 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.
|
949
|
+
attr_accessor :converts_to
|
950
|
+
# Determines the type of trial for this item.
|
951
|
+
attr_accessor :type
|
952
|
+
|
953
|
+
def initialize(converts_to: nil, type: nil)
|
954
|
+
@converts_to = converts_to
|
955
|
+
@type = type
|
956
|
+
end
|
957
|
+
end
|
779
958
|
# 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.
|
780
959
|
attr_accessor :billing_thresholds
|
781
960
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -792,6 +971,8 @@ module Stripe
|
|
792
971
|
attr_accessor :quantity
|
793
972
|
# A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
794
973
|
attr_accessor :tax_rates
|
974
|
+
# Options that configure the trial on the subscription item.
|
975
|
+
attr_accessor :trial
|
795
976
|
|
796
977
|
def initialize(
|
797
978
|
billing_thresholds: nil,
|
@@ -801,7 +982,8 @@ module Stripe
|
|
801
982
|
price: nil,
|
802
983
|
price_data: nil,
|
803
984
|
quantity: nil,
|
804
|
-
tax_rates: nil
|
985
|
+
tax_rates: nil,
|
986
|
+
trial: nil
|
805
987
|
)
|
806
988
|
@billing_thresholds = billing_thresholds
|
807
989
|
@discounts = discounts
|
@@ -811,6 +993,16 @@ module Stripe
|
|
811
993
|
@price_data = price_data
|
812
994
|
@quantity = quantity
|
813
995
|
@tax_rates = tax_rates
|
996
|
+
@trial = trial
|
997
|
+
end
|
998
|
+
end
|
999
|
+
|
1000
|
+
class PauseCollection < Stripe::RequestParams
|
1001
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1002
|
+
attr_accessor :behavior
|
1003
|
+
|
1004
|
+
def initialize(behavior: nil)
|
1005
|
+
@behavior = behavior
|
814
1006
|
end
|
815
1007
|
end
|
816
1008
|
|
@@ -825,6 +1017,23 @@ module Stripe
|
|
825
1017
|
@destination = destination
|
826
1018
|
end
|
827
1019
|
end
|
1020
|
+
|
1021
|
+
class TrialSettings < Stripe::RequestParams
|
1022
|
+
class EndBehavior < Stripe::RequestParams
|
1023
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1024
|
+
attr_accessor :prorate_up_front
|
1025
|
+
|
1026
|
+
def initialize(prorate_up_front: nil)
|
1027
|
+
@prorate_up_front = prorate_up_front
|
1028
|
+
end
|
1029
|
+
end
|
1030
|
+
# Defines how the subscription should behave when a trial ends.
|
1031
|
+
attr_accessor :end_behavior
|
1032
|
+
|
1033
|
+
def initialize(end_behavior: nil)
|
1034
|
+
@end_behavior = end_behavior
|
1035
|
+
end
|
1036
|
+
end
|
828
1037
|
# 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.
|
829
1038
|
attr_accessor :add_invoice_items
|
830
1039
|
# 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).
|
@@ -861,14 +1070,20 @@ module Stripe
|
|
861
1070
|
attr_accessor :metadata
|
862
1071
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
863
1072
|
attr_accessor :on_behalf_of
|
1073
|
+
# If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
1074
|
+
attr_accessor :pause_collection
|
864
1075
|
# Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
865
1076
|
attr_accessor :proration_behavior
|
866
1077
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
867
1078
|
attr_accessor :transfer_data
|
868
1079
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
869
1080
|
attr_accessor :trial
|
1081
|
+
# Specify trial behavior when crossing phase boundaries
|
1082
|
+
attr_accessor :trial_continuation
|
870
1083
|
# 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`
|
871
1084
|
attr_accessor :trial_end
|
1085
|
+
# Settings related to subscription trials.
|
1086
|
+
attr_accessor :trial_settings
|
872
1087
|
|
873
1088
|
def initialize(
|
874
1089
|
add_invoice_items: nil,
|
@@ -889,10 +1104,13 @@ module Stripe
|
|
889
1104
|
iterations: nil,
|
890
1105
|
metadata: nil,
|
891
1106
|
on_behalf_of: nil,
|
1107
|
+
pause_collection: nil,
|
892
1108
|
proration_behavior: nil,
|
893
1109
|
transfer_data: nil,
|
894
1110
|
trial: nil,
|
895
|
-
|
1111
|
+
trial_continuation: nil,
|
1112
|
+
trial_end: nil,
|
1113
|
+
trial_settings: nil
|
896
1114
|
)
|
897
1115
|
@add_invoice_items = add_invoice_items
|
898
1116
|
@application_fee_percent = application_fee_percent
|
@@ -912,16 +1130,35 @@ module Stripe
|
|
912
1130
|
@iterations = iterations
|
913
1131
|
@metadata = metadata
|
914
1132
|
@on_behalf_of = on_behalf_of
|
1133
|
+
@pause_collection = pause_collection
|
915
1134
|
@proration_behavior = proration_behavior
|
916
1135
|
@transfer_data = transfer_data
|
917
1136
|
@trial = trial
|
1137
|
+
@trial_continuation = trial_continuation
|
918
1138
|
@trial_end = trial_end
|
1139
|
+
@trial_settings = trial_settings
|
1140
|
+
end
|
1141
|
+
end
|
1142
|
+
|
1143
|
+
class Prebilling < Stripe::RequestParams
|
1144
|
+
# This is used to determine the number of billing cycles to prebill.
|
1145
|
+
attr_accessor :iterations
|
1146
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1147
|
+
attr_accessor :update_behavior
|
1148
|
+
|
1149
|
+
def initialize(iterations: nil, update_behavior: nil)
|
1150
|
+
@iterations = iterations
|
1151
|
+
@update_behavior = update_behavior
|
919
1152
|
end
|
920
1153
|
end
|
1154
|
+
# 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.
|
1155
|
+
attr_accessor :billing_behavior
|
921
1156
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
922
1157
|
attr_accessor :billing_mode
|
923
1158
|
# The identifier of the customer to create the subscription schedule for.
|
924
1159
|
attr_accessor :customer
|
1160
|
+
# The identifier of the account to create the subscription schedule for.
|
1161
|
+
attr_accessor :customer_account
|
925
1162
|
# Object representing the subscription schedule's default settings.
|
926
1163
|
attr_accessor :default_settings
|
927
1164
|
# 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.
|
@@ -934,28 +1171,36 @@ module Stripe
|
|
934
1171
|
attr_accessor :metadata
|
935
1172
|
# 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.
|
936
1173
|
attr_accessor :phases
|
1174
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1175
|
+
attr_accessor :prebilling
|
937
1176
|
# When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
|
938
1177
|
attr_accessor :start_date
|
939
1178
|
|
940
1179
|
def initialize(
|
1180
|
+
billing_behavior: nil,
|
941
1181
|
billing_mode: nil,
|
942
1182
|
customer: nil,
|
1183
|
+
customer_account: nil,
|
943
1184
|
default_settings: nil,
|
944
1185
|
end_behavior: nil,
|
945
1186
|
expand: nil,
|
946
1187
|
from_subscription: nil,
|
947
1188
|
metadata: nil,
|
948
1189
|
phases: nil,
|
1190
|
+
prebilling: nil,
|
949
1191
|
start_date: nil
|
950
1192
|
)
|
1193
|
+
@billing_behavior = billing_behavior
|
951
1194
|
@billing_mode = billing_mode
|
952
1195
|
@customer = customer
|
1196
|
+
@customer_account = customer_account
|
953
1197
|
@default_settings = default_settings
|
954
1198
|
@end_behavior = end_behavior
|
955
1199
|
@expand = expand
|
956
1200
|
@from_subscription = from_subscription
|
957
1201
|
@metadata = metadata
|
958
1202
|
@phases = phases
|
1203
|
+
@prebilling = prebilling
|
959
1204
|
@start_date = start_date
|
960
1205
|
end
|
961
1206
|
end
|
@@ -1083,16 +1328,44 @@ module Stripe
|
|
1083
1328
|
class Phase < Stripe::RequestParams
|
1084
1329
|
class AddInvoiceItem < Stripe::RequestParams
|
1085
1330
|
class Discount < Stripe::RequestParams
|
1331
|
+
class DiscountEnd < Stripe::RequestParams
|
1332
|
+
class Duration < Stripe::RequestParams
|
1333
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1334
|
+
attr_accessor :interval
|
1335
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1336
|
+
attr_accessor :interval_count
|
1337
|
+
|
1338
|
+
def initialize(interval: nil, interval_count: nil)
|
1339
|
+
@interval = interval
|
1340
|
+
@interval_count = interval_count
|
1341
|
+
end
|
1342
|
+
end
|
1343
|
+
# Time span for the redeemed discount.
|
1344
|
+
attr_accessor :duration
|
1345
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1346
|
+
attr_accessor :timestamp
|
1347
|
+
# The type of calculation made to determine when the discount ends.
|
1348
|
+
attr_accessor :type
|
1349
|
+
|
1350
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1351
|
+
@duration = duration
|
1352
|
+
@timestamp = timestamp
|
1353
|
+
@type = type
|
1354
|
+
end
|
1355
|
+
end
|
1086
1356
|
# ID of the coupon to create a new discount for.
|
1087
1357
|
attr_accessor :coupon
|
1088
1358
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1089
1359
|
attr_accessor :discount
|
1360
|
+
# Details to determine how long the discount should be applied for.
|
1361
|
+
attr_accessor :discount_end
|
1090
1362
|
# ID of the promotion code to create a new discount for.
|
1091
1363
|
attr_accessor :promotion_code
|
1092
1364
|
|
1093
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1365
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1094
1366
|
@coupon = coupon
|
1095
1367
|
@discount = discount
|
1368
|
+
@discount_end = discount_end
|
1096
1369
|
@promotion_code = promotion_code
|
1097
1370
|
end
|
1098
1371
|
end
|
@@ -1228,16 +1501,44 @@ module Stripe
|
|
1228
1501
|
end
|
1229
1502
|
|
1230
1503
|
class Discount < Stripe::RequestParams
|
1504
|
+
class DiscountEnd < Stripe::RequestParams
|
1505
|
+
class Duration < Stripe::RequestParams
|
1506
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1507
|
+
attr_accessor :interval
|
1508
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1509
|
+
attr_accessor :interval_count
|
1510
|
+
|
1511
|
+
def initialize(interval: nil, interval_count: nil)
|
1512
|
+
@interval = interval
|
1513
|
+
@interval_count = interval_count
|
1514
|
+
end
|
1515
|
+
end
|
1516
|
+
# Time span for the redeemed discount.
|
1517
|
+
attr_accessor :duration
|
1518
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1519
|
+
attr_accessor :timestamp
|
1520
|
+
# The type of calculation made to determine when the discount ends.
|
1521
|
+
attr_accessor :type
|
1522
|
+
|
1523
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1524
|
+
@duration = duration
|
1525
|
+
@timestamp = timestamp
|
1526
|
+
@type = type
|
1527
|
+
end
|
1528
|
+
end
|
1231
1529
|
# ID of the coupon to create a new discount for.
|
1232
1530
|
attr_accessor :coupon
|
1233
1531
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1234
1532
|
attr_accessor :discount
|
1533
|
+
# Details to determine how long the discount should be applied for.
|
1534
|
+
attr_accessor :discount_end
|
1235
1535
|
# ID of the promotion code to create a new discount for.
|
1236
1536
|
attr_accessor :promotion_code
|
1237
1537
|
|
1238
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1538
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1239
1539
|
@coupon = coupon
|
1240
1540
|
@discount = discount
|
1541
|
+
@discount_end = discount_end
|
1241
1542
|
@promotion_code = promotion_code
|
1242
1543
|
end
|
1243
1544
|
end
|
@@ -1291,16 +1592,44 @@ module Stripe
|
|
1291
1592
|
end
|
1292
1593
|
|
1293
1594
|
class Discount < Stripe::RequestParams
|
1595
|
+
class DiscountEnd < Stripe::RequestParams
|
1596
|
+
class Duration < Stripe::RequestParams
|
1597
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1598
|
+
attr_accessor :interval
|
1599
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1600
|
+
attr_accessor :interval_count
|
1601
|
+
|
1602
|
+
def initialize(interval: nil, interval_count: nil)
|
1603
|
+
@interval = interval
|
1604
|
+
@interval_count = interval_count
|
1605
|
+
end
|
1606
|
+
end
|
1607
|
+
# Time span for the redeemed discount.
|
1608
|
+
attr_accessor :duration
|
1609
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1610
|
+
attr_accessor :timestamp
|
1611
|
+
# The type of calculation made to determine when the discount ends.
|
1612
|
+
attr_accessor :type
|
1613
|
+
|
1614
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1615
|
+
@duration = duration
|
1616
|
+
@timestamp = timestamp
|
1617
|
+
@type = type
|
1618
|
+
end
|
1619
|
+
end
|
1294
1620
|
# ID of the coupon to create a new discount for.
|
1295
1621
|
attr_accessor :coupon
|
1296
1622
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1297
1623
|
attr_accessor :discount
|
1624
|
+
# Details to determine how long the discount should be applied for.
|
1625
|
+
attr_accessor :discount_end
|
1298
1626
|
# ID of the promotion code to create a new discount for.
|
1299
1627
|
attr_accessor :promotion_code
|
1300
1628
|
|
1301
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1629
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1302
1630
|
@coupon = coupon
|
1303
1631
|
@discount = discount
|
1632
|
+
@discount_end = discount_end
|
1304
1633
|
@promotion_code = promotion_code
|
1305
1634
|
end
|
1306
1635
|
end
|
@@ -1346,6 +1675,18 @@ module Stripe
|
|
1346
1675
|
@unit_amount_decimal = unit_amount_decimal
|
1347
1676
|
end
|
1348
1677
|
end
|
1678
|
+
|
1679
|
+
class Trial < Stripe::RequestParams
|
1680
|
+
# 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.
|
1681
|
+
attr_accessor :converts_to
|
1682
|
+
# Determines the type of trial for this item.
|
1683
|
+
attr_accessor :type
|
1684
|
+
|
1685
|
+
def initialize(converts_to: nil, type: nil)
|
1686
|
+
@converts_to = converts_to
|
1687
|
+
@type = type
|
1688
|
+
end
|
1689
|
+
end
|
1349
1690
|
# 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.
|
1350
1691
|
attr_accessor :billing_thresholds
|
1351
1692
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -1362,6 +1703,8 @@ module Stripe
|
|
1362
1703
|
attr_accessor :quantity
|
1363
1704
|
# A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
1364
1705
|
attr_accessor :tax_rates
|
1706
|
+
# Options that configure the trial on the subscription item.
|
1707
|
+
attr_accessor :trial
|
1365
1708
|
|
1366
1709
|
def initialize(
|
1367
1710
|
billing_thresholds: nil,
|
@@ -1371,7 +1714,8 @@ module Stripe
|
|
1371
1714
|
price: nil,
|
1372
1715
|
price_data: nil,
|
1373
1716
|
quantity: nil,
|
1374
|
-
tax_rates: nil
|
1717
|
+
tax_rates: nil,
|
1718
|
+
trial: nil
|
1375
1719
|
)
|
1376
1720
|
@billing_thresholds = billing_thresholds
|
1377
1721
|
@discounts = discounts
|
@@ -1381,6 +1725,16 @@ module Stripe
|
|
1381
1725
|
@price_data = price_data
|
1382
1726
|
@quantity = quantity
|
1383
1727
|
@tax_rates = tax_rates
|
1728
|
+
@trial = trial
|
1729
|
+
end
|
1730
|
+
end
|
1731
|
+
|
1732
|
+
class PauseCollection < Stripe::RequestParams
|
1733
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1734
|
+
attr_accessor :behavior
|
1735
|
+
|
1736
|
+
def initialize(behavior: nil)
|
1737
|
+
@behavior = behavior
|
1384
1738
|
end
|
1385
1739
|
end
|
1386
1740
|
|
@@ -1395,6 +1749,23 @@ module Stripe
|
|
1395
1749
|
@destination = destination
|
1396
1750
|
end
|
1397
1751
|
end
|
1752
|
+
|
1753
|
+
class TrialSettings < Stripe::RequestParams
|
1754
|
+
class EndBehavior < Stripe::RequestParams
|
1755
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1756
|
+
attr_accessor :prorate_up_front
|
1757
|
+
|
1758
|
+
def initialize(prorate_up_front: nil)
|
1759
|
+
@prorate_up_front = prorate_up_front
|
1760
|
+
end
|
1761
|
+
end
|
1762
|
+
# Defines how the subscription should behave when a trial ends.
|
1763
|
+
attr_accessor :end_behavior
|
1764
|
+
|
1765
|
+
def initialize(end_behavior: nil)
|
1766
|
+
@end_behavior = end_behavior
|
1767
|
+
end
|
1768
|
+
end
|
1398
1769
|
# 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.
|
1399
1770
|
attr_accessor :add_invoice_items
|
1400
1771
|
# 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).
|
@@ -1431,6 +1802,8 @@ module Stripe
|
|
1431
1802
|
attr_accessor :metadata
|
1432
1803
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
1433
1804
|
attr_accessor :on_behalf_of
|
1805
|
+
# If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
|
1806
|
+
attr_accessor :pause_collection
|
1434
1807
|
# Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
|
1435
1808
|
attr_accessor :proration_behavior
|
1436
1809
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -1439,8 +1812,12 @@ module Stripe
|
|
1439
1812
|
attr_accessor :transfer_data
|
1440
1813
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
1441
1814
|
attr_accessor :trial
|
1815
|
+
# Specify trial behavior when crossing phase boundaries
|
1816
|
+
attr_accessor :trial_continuation
|
1442
1817
|
# 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`
|
1443
1818
|
attr_accessor :trial_end
|
1819
|
+
# Settings related to subscription trials.
|
1820
|
+
attr_accessor :trial_settings
|
1444
1821
|
|
1445
1822
|
def initialize(
|
1446
1823
|
add_invoice_items: nil,
|
@@ -1461,11 +1838,14 @@ module Stripe
|
|
1461
1838
|
iterations: nil,
|
1462
1839
|
metadata: nil,
|
1463
1840
|
on_behalf_of: nil,
|
1841
|
+
pause_collection: nil,
|
1464
1842
|
proration_behavior: nil,
|
1465
1843
|
start_date: nil,
|
1466
1844
|
transfer_data: nil,
|
1467
1845
|
trial: nil,
|
1468
|
-
|
1846
|
+
trial_continuation: nil,
|
1847
|
+
trial_end: nil,
|
1848
|
+
trial_settings: nil
|
1469
1849
|
)
|
1470
1850
|
@add_invoice_items = add_invoice_items
|
1471
1851
|
@application_fee_percent = application_fee_percent
|
@@ -1485,13 +1865,30 @@ module Stripe
|
|
1485
1865
|
@iterations = iterations
|
1486
1866
|
@metadata = metadata
|
1487
1867
|
@on_behalf_of = on_behalf_of
|
1868
|
+
@pause_collection = pause_collection
|
1488
1869
|
@proration_behavior = proration_behavior
|
1489
1870
|
@start_date = start_date
|
1490
1871
|
@transfer_data = transfer_data
|
1491
1872
|
@trial = trial
|
1873
|
+
@trial_continuation = trial_continuation
|
1492
1874
|
@trial_end = trial_end
|
1875
|
+
@trial_settings = trial_settings
|
1493
1876
|
end
|
1494
1877
|
end
|
1878
|
+
|
1879
|
+
class Prebilling < Stripe::RequestParams
|
1880
|
+
# This is used to determine the number of billing cycles to prebill.
|
1881
|
+
attr_accessor :iterations
|
1882
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1883
|
+
attr_accessor :update_behavior
|
1884
|
+
|
1885
|
+
def initialize(iterations: nil, update_behavior: nil)
|
1886
|
+
@iterations = iterations
|
1887
|
+
@update_behavior = update_behavior
|
1888
|
+
end
|
1889
|
+
end
|
1890
|
+
# 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.
|
1891
|
+
attr_accessor :billing_behavior
|
1495
1892
|
# Object representing the subscription schedule's default settings.
|
1496
1893
|
attr_accessor :default_settings
|
1497
1894
|
# 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.
|
@@ -1502,26 +1899,598 @@ module Stripe
|
|
1502
1899
|
attr_accessor :metadata
|
1503
1900
|
# List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.
|
1504
1901
|
attr_accessor :phases
|
1902
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1903
|
+
attr_accessor :prebilling
|
1505
1904
|
# If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`.
|
1506
1905
|
attr_accessor :proration_behavior
|
1507
1906
|
|
1508
1907
|
def initialize(
|
1908
|
+
billing_behavior: nil,
|
1509
1909
|
default_settings: nil,
|
1510
1910
|
end_behavior: nil,
|
1511
1911
|
expand: nil,
|
1512
1912
|
metadata: nil,
|
1513
1913
|
phases: nil,
|
1914
|
+
prebilling: nil,
|
1514
1915
|
proration_behavior: nil
|
1515
1916
|
)
|
1917
|
+
@billing_behavior = billing_behavior
|
1516
1918
|
@default_settings = default_settings
|
1517
1919
|
@end_behavior = end_behavior
|
1518
1920
|
@expand = expand
|
1519
1921
|
@metadata = metadata
|
1520
1922
|
@phases = phases
|
1923
|
+
@prebilling = prebilling
|
1521
1924
|
@proration_behavior = proration_behavior
|
1522
1925
|
end
|
1523
1926
|
end
|
1524
1927
|
|
1928
|
+
class AmendParams < Stripe::RequestParams
|
1929
|
+
class Amendment < Stripe::RequestParams
|
1930
|
+
class AmendmentEnd < Stripe::RequestParams
|
1931
|
+
class DiscountEnd < Stripe::RequestParams
|
1932
|
+
# The ID of a specific discount.
|
1933
|
+
attr_accessor :discount
|
1934
|
+
|
1935
|
+
def initialize(discount: nil)
|
1936
|
+
@discount = discount
|
1937
|
+
end
|
1938
|
+
end
|
1939
|
+
|
1940
|
+
class Duration < Stripe::RequestParams
|
1941
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1942
|
+
attr_accessor :interval
|
1943
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1944
|
+
attr_accessor :interval_count
|
1945
|
+
|
1946
|
+
def initialize(interval: nil, interval_count: nil)
|
1947
|
+
@interval = interval
|
1948
|
+
@interval_count = interval_count
|
1949
|
+
end
|
1950
|
+
end
|
1951
|
+
# Use the `end` time of a given discount.
|
1952
|
+
attr_accessor :discount_end
|
1953
|
+
# Time span for the amendment starting from the `amendment_start`.
|
1954
|
+
attr_accessor :duration
|
1955
|
+
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
1956
|
+
attr_accessor :timestamp
|
1957
|
+
# Select one of three ways to pass the `amendment_end`.
|
1958
|
+
attr_accessor :type
|
1959
|
+
|
1960
|
+
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
1961
|
+
@discount_end = discount_end
|
1962
|
+
@duration = duration
|
1963
|
+
@timestamp = timestamp
|
1964
|
+
@type = type
|
1965
|
+
end
|
1966
|
+
end
|
1967
|
+
|
1968
|
+
class AmendmentStart < Stripe::RequestParams
|
1969
|
+
class AmendmentEnd < Stripe::RequestParams
|
1970
|
+
# 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.
|
1971
|
+
attr_accessor :index
|
1972
|
+
|
1973
|
+
def initialize(index: nil)
|
1974
|
+
@index = index
|
1975
|
+
end
|
1976
|
+
end
|
1977
|
+
|
1978
|
+
class DiscountEnd < Stripe::RequestParams
|
1979
|
+
# The ID of a specific discount.
|
1980
|
+
attr_accessor :discount
|
1981
|
+
|
1982
|
+
def initialize(discount: nil)
|
1983
|
+
@discount = discount
|
1984
|
+
end
|
1985
|
+
end
|
1986
|
+
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
1987
|
+
attr_accessor :amendment_end
|
1988
|
+
# Use the `end` time of a given discount.
|
1989
|
+
attr_accessor :discount_end
|
1990
|
+
# A precise Unix timestamp for the amendment to start.
|
1991
|
+
attr_accessor :timestamp
|
1992
|
+
# Select one of three ways to pass the `amendment_start`.
|
1993
|
+
attr_accessor :type
|
1994
|
+
|
1995
|
+
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
1996
|
+
@amendment_end = amendment_end
|
1997
|
+
@discount_end = discount_end
|
1998
|
+
@timestamp = timestamp
|
1999
|
+
@type = type
|
2000
|
+
end
|
2001
|
+
end
|
2002
|
+
|
2003
|
+
class DiscountAction < Stripe::RequestParams
|
2004
|
+
class Add < Stripe::RequestParams
|
2005
|
+
class DiscountEnd < Stripe::RequestParams
|
2006
|
+
# The type of calculation made to determine when the discount ends.
|
2007
|
+
attr_accessor :type
|
2008
|
+
|
2009
|
+
def initialize(type: nil)
|
2010
|
+
@type = type
|
2011
|
+
end
|
2012
|
+
end
|
2013
|
+
# The coupon code to redeem.
|
2014
|
+
attr_accessor :coupon
|
2015
|
+
# An ID of an existing discount for a coupon that was already redeemed.
|
2016
|
+
attr_accessor :discount
|
2017
|
+
# Details to determine how long the discount should be applied for.
|
2018
|
+
attr_accessor :discount_end
|
2019
|
+
# 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.
|
2020
|
+
attr_accessor :index
|
2021
|
+
# The promotion code to redeem.
|
2022
|
+
attr_accessor :promotion_code
|
2023
|
+
|
2024
|
+
def initialize(
|
2025
|
+
coupon: nil,
|
2026
|
+
discount: nil,
|
2027
|
+
discount_end: nil,
|
2028
|
+
index: nil,
|
2029
|
+
promotion_code: nil
|
2030
|
+
)
|
2031
|
+
@coupon = coupon
|
2032
|
+
@discount = discount
|
2033
|
+
@discount_end = discount_end
|
2034
|
+
@index = index
|
2035
|
+
@promotion_code = promotion_code
|
2036
|
+
end
|
2037
|
+
end
|
2038
|
+
|
2039
|
+
class Remove < Stripe::RequestParams
|
2040
|
+
# The coupon code to remove from the `discounts` array.
|
2041
|
+
attr_accessor :coupon
|
2042
|
+
# The ID of a discount to remove from the `discounts` array.
|
2043
|
+
attr_accessor :discount
|
2044
|
+
# The ID of a promotion code to remove from the `discounts` array.
|
2045
|
+
attr_accessor :promotion_code
|
2046
|
+
|
2047
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2048
|
+
@coupon = coupon
|
2049
|
+
@discount = discount
|
2050
|
+
@promotion_code = promotion_code
|
2051
|
+
end
|
2052
|
+
end
|
2053
|
+
|
2054
|
+
class Set < Stripe::RequestParams
|
2055
|
+
# The coupon code to replace the `discounts` array with.
|
2056
|
+
attr_accessor :coupon
|
2057
|
+
# An ID of an existing discount to replace the `discounts` array with.
|
2058
|
+
attr_accessor :discount
|
2059
|
+
# An ID of an existing promotion code to replace the `discounts` array with.
|
2060
|
+
attr_accessor :promotion_code
|
2061
|
+
|
2062
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2063
|
+
@coupon = coupon
|
2064
|
+
@discount = discount
|
2065
|
+
@promotion_code = promotion_code
|
2066
|
+
end
|
2067
|
+
end
|
2068
|
+
# Details of the discount to add.
|
2069
|
+
attr_accessor :add
|
2070
|
+
# Details of the discount to remove.
|
2071
|
+
attr_accessor :remove
|
2072
|
+
# Details of the discount to replace the existing discounts with.
|
2073
|
+
attr_accessor :set
|
2074
|
+
# Determines the type of discount action.
|
2075
|
+
attr_accessor :type
|
2076
|
+
|
2077
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2078
|
+
@add = add
|
2079
|
+
@remove = remove
|
2080
|
+
@set = set
|
2081
|
+
@type = type
|
2082
|
+
end
|
2083
|
+
end
|
2084
|
+
|
2085
|
+
class ItemAction < Stripe::RequestParams
|
2086
|
+
class Add < Stripe::RequestParams
|
2087
|
+
class Discount < Stripe::RequestParams
|
2088
|
+
class DiscountEnd < Stripe::RequestParams
|
2089
|
+
class Duration < Stripe::RequestParams
|
2090
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2091
|
+
attr_accessor :interval
|
2092
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2093
|
+
attr_accessor :interval_count
|
2094
|
+
|
2095
|
+
def initialize(interval: nil, interval_count: nil)
|
2096
|
+
@interval = interval
|
2097
|
+
@interval_count = interval_count
|
2098
|
+
end
|
2099
|
+
end
|
2100
|
+
# Time span for the redeemed discount.
|
2101
|
+
attr_accessor :duration
|
2102
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2103
|
+
attr_accessor :timestamp
|
2104
|
+
# The type of calculation made to determine when the discount ends.
|
2105
|
+
attr_accessor :type
|
2106
|
+
|
2107
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2108
|
+
@duration = duration
|
2109
|
+
@timestamp = timestamp
|
2110
|
+
@type = type
|
2111
|
+
end
|
2112
|
+
end
|
2113
|
+
# ID of the coupon to create a new discount for.
|
2114
|
+
attr_accessor :coupon
|
2115
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2116
|
+
attr_accessor :discount
|
2117
|
+
# Details to determine how long the discount should be applied for.
|
2118
|
+
attr_accessor :discount_end
|
2119
|
+
# ID of the promotion code to create a new discount for.
|
2120
|
+
attr_accessor :promotion_code
|
2121
|
+
|
2122
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2123
|
+
@coupon = coupon
|
2124
|
+
@discount = discount
|
2125
|
+
@discount_end = discount_end
|
2126
|
+
@promotion_code = promotion_code
|
2127
|
+
end
|
2128
|
+
end
|
2129
|
+
|
2130
|
+
class Trial < Stripe::RequestParams
|
2131
|
+
# 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.
|
2132
|
+
attr_accessor :converts_to
|
2133
|
+
# Determines the type of trial for this item.
|
2134
|
+
attr_accessor :type
|
2135
|
+
|
2136
|
+
def initialize(converts_to: nil, type: nil)
|
2137
|
+
@converts_to = converts_to
|
2138
|
+
@type = type
|
2139
|
+
end
|
2140
|
+
end
|
2141
|
+
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
2142
|
+
attr_accessor :discounts
|
2143
|
+
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2144
|
+
attr_accessor :metadata
|
2145
|
+
# The ID of the price object.
|
2146
|
+
attr_accessor :price
|
2147
|
+
# Quantity for this item.
|
2148
|
+
attr_accessor :quantity
|
2149
|
+
# 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`.
|
2150
|
+
attr_accessor :tax_rates
|
2151
|
+
# Options that configure the trial on the subscription item.
|
2152
|
+
attr_accessor :trial
|
2153
|
+
|
2154
|
+
def initialize(
|
2155
|
+
discounts: nil,
|
2156
|
+
metadata: nil,
|
2157
|
+
price: nil,
|
2158
|
+
quantity: nil,
|
2159
|
+
tax_rates: nil,
|
2160
|
+
trial: nil
|
2161
|
+
)
|
2162
|
+
@discounts = discounts
|
2163
|
+
@metadata = metadata
|
2164
|
+
@price = price
|
2165
|
+
@quantity = quantity
|
2166
|
+
@tax_rates = tax_rates
|
2167
|
+
@trial = trial
|
2168
|
+
end
|
2169
|
+
end
|
2170
|
+
|
2171
|
+
class Remove < Stripe::RequestParams
|
2172
|
+
# ID of a price to remove.
|
2173
|
+
attr_accessor :price
|
2174
|
+
|
2175
|
+
def initialize(price: nil)
|
2176
|
+
@price = price
|
2177
|
+
end
|
2178
|
+
end
|
2179
|
+
|
2180
|
+
class Set < Stripe::RequestParams
|
2181
|
+
class Discount < Stripe::RequestParams
|
2182
|
+
class DiscountEnd < Stripe::RequestParams
|
2183
|
+
class Duration < Stripe::RequestParams
|
2184
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2185
|
+
attr_accessor :interval
|
2186
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2187
|
+
attr_accessor :interval_count
|
2188
|
+
|
2189
|
+
def initialize(interval: nil, interval_count: nil)
|
2190
|
+
@interval = interval
|
2191
|
+
@interval_count = interval_count
|
2192
|
+
end
|
2193
|
+
end
|
2194
|
+
# Time span for the redeemed discount.
|
2195
|
+
attr_accessor :duration
|
2196
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2197
|
+
attr_accessor :timestamp
|
2198
|
+
# The type of calculation made to determine when the discount ends.
|
2199
|
+
attr_accessor :type
|
2200
|
+
|
2201
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2202
|
+
@duration = duration
|
2203
|
+
@timestamp = timestamp
|
2204
|
+
@type = type
|
2205
|
+
end
|
2206
|
+
end
|
2207
|
+
# ID of the coupon to create a new discount for.
|
2208
|
+
attr_accessor :coupon
|
2209
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2210
|
+
attr_accessor :discount
|
2211
|
+
# Details to determine how long the discount should be applied for.
|
2212
|
+
attr_accessor :discount_end
|
2213
|
+
# ID of the promotion code to create a new discount for.
|
2214
|
+
attr_accessor :promotion_code
|
2215
|
+
|
2216
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2217
|
+
@coupon = coupon
|
2218
|
+
@discount = discount
|
2219
|
+
@discount_end = discount_end
|
2220
|
+
@promotion_code = promotion_code
|
2221
|
+
end
|
2222
|
+
end
|
2223
|
+
|
2224
|
+
class Trial < Stripe::RequestParams
|
2225
|
+
# 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.
|
2226
|
+
attr_accessor :converts_to
|
2227
|
+
# Determines the type of trial for this item.
|
2228
|
+
attr_accessor :type
|
2229
|
+
|
2230
|
+
def initialize(converts_to: nil, type: nil)
|
2231
|
+
@converts_to = converts_to
|
2232
|
+
@type = type
|
2233
|
+
end
|
2234
|
+
end
|
2235
|
+
# 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`.
|
2236
|
+
attr_accessor :discounts
|
2237
|
+
# 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`.
|
2238
|
+
attr_accessor :metadata
|
2239
|
+
# The ID of the price object.
|
2240
|
+
attr_accessor :price
|
2241
|
+
# 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`.
|
2242
|
+
attr_accessor :quantity
|
2243
|
+
# 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`.
|
2244
|
+
attr_accessor :tax_rates
|
2245
|
+
# 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`.
|
2246
|
+
attr_accessor :trial
|
2247
|
+
|
2248
|
+
def initialize(
|
2249
|
+
discounts: nil,
|
2250
|
+
metadata: nil,
|
2251
|
+
price: nil,
|
2252
|
+
quantity: nil,
|
2253
|
+
tax_rates: nil,
|
2254
|
+
trial: nil
|
2255
|
+
)
|
2256
|
+
@discounts = discounts
|
2257
|
+
@metadata = metadata
|
2258
|
+
@price = price
|
2259
|
+
@quantity = quantity
|
2260
|
+
@tax_rates = tax_rates
|
2261
|
+
@trial = trial
|
2262
|
+
end
|
2263
|
+
end
|
2264
|
+
# 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.
|
2265
|
+
attr_accessor :add
|
2266
|
+
# Details of the subscription item to remove.
|
2267
|
+
attr_accessor :remove
|
2268
|
+
# 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.
|
2269
|
+
attr_accessor :set
|
2270
|
+
# Determines the type of item action.
|
2271
|
+
attr_accessor :type
|
2272
|
+
|
2273
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2274
|
+
@add = add
|
2275
|
+
@remove = remove
|
2276
|
+
@set = set
|
2277
|
+
@type = type
|
2278
|
+
end
|
2279
|
+
end
|
2280
|
+
|
2281
|
+
class MetadataAction < Stripe::RequestParams
|
2282
|
+
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
2283
|
+
attr_accessor :add
|
2284
|
+
# Keys to remove from schedule phase metadata.
|
2285
|
+
attr_accessor :remove
|
2286
|
+
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
2287
|
+
attr_accessor :set
|
2288
|
+
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
2289
|
+
attr_accessor :type
|
2290
|
+
|
2291
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2292
|
+
@add = add
|
2293
|
+
@remove = remove
|
2294
|
+
@set = set
|
2295
|
+
@type = type
|
2296
|
+
end
|
2297
|
+
end
|
2298
|
+
|
2299
|
+
class SetPauseCollection < Stripe::RequestParams
|
2300
|
+
class Set < Stripe::RequestParams
|
2301
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2302
|
+
attr_accessor :behavior
|
2303
|
+
|
2304
|
+
def initialize(behavior: nil)
|
2305
|
+
@behavior = behavior
|
2306
|
+
end
|
2307
|
+
end
|
2308
|
+
# Details of the pause_collection behavior to apply to the amendment.
|
2309
|
+
attr_accessor :set
|
2310
|
+
# Determines the type of the pause_collection amendment.
|
2311
|
+
attr_accessor :type
|
2312
|
+
|
2313
|
+
def initialize(set: nil, type: nil)
|
2314
|
+
@set = set
|
2315
|
+
@type = type
|
2316
|
+
end
|
2317
|
+
end
|
2318
|
+
|
2319
|
+
class TrialSettings < Stripe::RequestParams
|
2320
|
+
class EndBehavior < Stripe::RequestParams
|
2321
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2322
|
+
attr_accessor :prorate_up_front
|
2323
|
+
|
2324
|
+
def initialize(prorate_up_front: nil)
|
2325
|
+
@prorate_up_front = prorate_up_front
|
2326
|
+
end
|
2327
|
+
end
|
2328
|
+
# Defines how the subscription should behave when a trial ends.
|
2329
|
+
attr_accessor :end_behavior
|
2330
|
+
|
2331
|
+
def initialize(end_behavior: nil)
|
2332
|
+
@end_behavior = end_behavior
|
2333
|
+
end
|
2334
|
+
end
|
2335
|
+
# 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.
|
2336
|
+
attr_accessor :amendment_end
|
2337
|
+
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2338
|
+
attr_accessor :amendment_start
|
2339
|
+
# 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.
|
2340
|
+
attr_accessor :billing_cycle_anchor
|
2341
|
+
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
2342
|
+
attr_accessor :discount_actions
|
2343
|
+
# Changes to the subscription items during the amendment time span.
|
2344
|
+
attr_accessor :item_actions
|
2345
|
+
# Instructions for how to modify phase metadata
|
2346
|
+
attr_accessor :metadata_actions
|
2347
|
+
# 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`.
|
2348
|
+
attr_accessor :proration_behavior
|
2349
|
+
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2350
|
+
attr_accessor :set_pause_collection
|
2351
|
+
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
2352
|
+
attr_accessor :set_schedule_end
|
2353
|
+
# Settings related to subscription trials.
|
2354
|
+
attr_accessor :trial_settings
|
2355
|
+
|
2356
|
+
def initialize(
|
2357
|
+
amendment_end: nil,
|
2358
|
+
amendment_start: nil,
|
2359
|
+
billing_cycle_anchor: nil,
|
2360
|
+
discount_actions: nil,
|
2361
|
+
item_actions: nil,
|
2362
|
+
metadata_actions: nil,
|
2363
|
+
proration_behavior: nil,
|
2364
|
+
set_pause_collection: nil,
|
2365
|
+
set_schedule_end: nil,
|
2366
|
+
trial_settings: nil
|
2367
|
+
)
|
2368
|
+
@amendment_end = amendment_end
|
2369
|
+
@amendment_start = amendment_start
|
2370
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
2371
|
+
@discount_actions = discount_actions
|
2372
|
+
@item_actions = item_actions
|
2373
|
+
@metadata_actions = metadata_actions
|
2374
|
+
@proration_behavior = proration_behavior
|
2375
|
+
@set_pause_collection = set_pause_collection
|
2376
|
+
@set_schedule_end = set_schedule_end
|
2377
|
+
@trial_settings = trial_settings
|
2378
|
+
end
|
2379
|
+
end
|
2380
|
+
|
2381
|
+
class Prebilling < Stripe::RequestParams
|
2382
|
+
class BillFrom < Stripe::RequestParams
|
2383
|
+
class AmendmentStart < Stripe::RequestParams
|
2384
|
+
# The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments.
|
2385
|
+
attr_accessor :index
|
2386
|
+
|
2387
|
+
def initialize(index: nil)
|
2388
|
+
@index = index
|
2389
|
+
end
|
2390
|
+
end
|
2391
|
+
# Start the prebilled period when a specified amendment begins.
|
2392
|
+
attr_accessor :amendment_start
|
2393
|
+
# Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2394
|
+
attr_accessor :timestamp
|
2395
|
+
# Select one of several ways to pass the `bill_from` value.
|
2396
|
+
attr_accessor :type
|
2397
|
+
|
2398
|
+
def initialize(amendment_start: nil, timestamp: nil, type: nil)
|
2399
|
+
@amendment_start = amendment_start
|
2400
|
+
@timestamp = timestamp
|
2401
|
+
@type = type
|
2402
|
+
end
|
2403
|
+
end
|
2404
|
+
|
2405
|
+
class BillUntil < Stripe::RequestParams
|
2406
|
+
class AmendmentEnd < Stripe::RequestParams
|
2407
|
+
# 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.
|
2408
|
+
attr_accessor :index
|
2409
|
+
|
2410
|
+
def initialize(index: nil)
|
2411
|
+
@index = index
|
2412
|
+
end
|
2413
|
+
end
|
2414
|
+
|
2415
|
+
class Duration < Stripe::RequestParams
|
2416
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2417
|
+
attr_accessor :interval
|
2418
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2419
|
+
attr_accessor :interval_count
|
2420
|
+
|
2421
|
+
def initialize(interval: nil, interval_count: nil)
|
2422
|
+
@interval = interval
|
2423
|
+
@interval_count = interval_count
|
2424
|
+
end
|
2425
|
+
end
|
2426
|
+
# End the prebilled period when a specified amendment ends.
|
2427
|
+
attr_accessor :amendment_end
|
2428
|
+
# Time span for prebilling, starting from `bill_from`.
|
2429
|
+
attr_accessor :duration
|
2430
|
+
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2431
|
+
attr_accessor :timestamp
|
2432
|
+
# Select one of several ways to pass the `bill_until` value.
|
2433
|
+
attr_accessor :type
|
2434
|
+
|
2435
|
+
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
2436
|
+
@amendment_end = amendment_end
|
2437
|
+
@duration = duration
|
2438
|
+
@timestamp = timestamp
|
2439
|
+
@type = type
|
2440
|
+
end
|
2441
|
+
end
|
2442
|
+
# The beginning of the prebilled time period. The default value is `now`.
|
2443
|
+
attr_accessor :bill_from
|
2444
|
+
# The end of the prebilled time period.
|
2445
|
+
attr_accessor :bill_until
|
2446
|
+
# When the prebilling invoice should be created. The default value is `now`.
|
2447
|
+
attr_accessor :invoice_at
|
2448
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
2449
|
+
attr_accessor :update_behavior
|
2450
|
+
|
2451
|
+
def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
|
2452
|
+
@bill_from = bill_from
|
2453
|
+
@bill_until = bill_until
|
2454
|
+
@invoice_at = invoice_at
|
2455
|
+
@update_behavior = update_behavior
|
2456
|
+
end
|
2457
|
+
end
|
2458
|
+
|
2459
|
+
class ScheduleSettings < Stripe::RequestParams
|
2460
|
+
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2461
|
+
attr_accessor :end_behavior
|
2462
|
+
|
2463
|
+
def initialize(end_behavior: nil)
|
2464
|
+
@end_behavior = end_behavior
|
2465
|
+
end
|
2466
|
+
end
|
2467
|
+
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
2468
|
+
attr_accessor :amendments
|
2469
|
+
# Specifies which fields in the response should be expanded.
|
2470
|
+
attr_accessor :expand
|
2471
|
+
# Provide any time periods to bill in advance.
|
2472
|
+
attr_accessor :prebilling
|
2473
|
+
# In cases where the amendment changes the currently active phase,
|
2474
|
+
# specifies if and how to prorate at the time of the request.
|
2475
|
+
attr_accessor :proration_behavior
|
2476
|
+
# Changes to apply to the subscription schedule.
|
2477
|
+
attr_accessor :schedule_settings
|
2478
|
+
|
2479
|
+
def initialize(
|
2480
|
+
amendments: nil,
|
2481
|
+
expand: nil,
|
2482
|
+
prebilling: nil,
|
2483
|
+
proration_behavior: nil,
|
2484
|
+
schedule_settings: nil
|
2485
|
+
)
|
2486
|
+
@amendments = amendments
|
2487
|
+
@expand = expand
|
2488
|
+
@prebilling = prebilling
|
2489
|
+
@proration_behavior = proration_behavior
|
2490
|
+
@schedule_settings = schedule_settings
|
2491
|
+
end
|
2492
|
+
end
|
2493
|
+
|
1525
2494
|
class CancelParams < Stripe::RequestParams
|
1526
2495
|
# Specifies which fields in the response should be expanded.
|
1527
2496
|
attr_accessor :expand
|
@@ -1550,6 +2519,8 @@ module Stripe
|
|
1550
2519
|
end
|
1551
2520
|
# ID of the Connect Application that created the schedule.
|
1552
2521
|
attr_reader :application
|
2522
|
+
# 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.
|
2523
|
+
attr_reader :billing_behavior
|
1553
2524
|
# The billing mode of the subscription.
|
1554
2525
|
attr_reader :billing_mode
|
1555
2526
|
# Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
|
@@ -1562,12 +2533,16 @@ module Stripe
|
|
1562
2533
|
attr_reader :current_phase
|
1563
2534
|
# ID of the customer who owns the subscription schedule.
|
1564
2535
|
attr_reader :customer
|
2536
|
+
# ID of the account who owns the subscription schedule.
|
2537
|
+
attr_reader :customer_account
|
1565
2538
|
# Attribute for field default_settings
|
1566
2539
|
attr_reader :default_settings
|
1567
2540
|
# 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.
|
1568
2541
|
attr_reader :end_behavior
|
1569
2542
|
# Unique identifier for the object.
|
1570
2543
|
attr_reader :id
|
2544
|
+
# Details of the most recent price migration that failed for the subscription schedule.
|
2545
|
+
attr_reader :last_price_migration_error
|
1571
2546
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
1572
2547
|
attr_reader :livemode
|
1573
2548
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
@@ -1576,6 +2551,8 @@ module Stripe
|
|
1576
2551
|
attr_reader :object
|
1577
2552
|
# Configuration for the subscription schedule's phases.
|
1578
2553
|
attr_reader :phases
|
2554
|
+
# Time period and invoice for a Subscription billed in advance.
|
2555
|
+
attr_reader :prebilling
|
1579
2556
|
# Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
|
1580
2557
|
attr_reader :released_at
|
1581
2558
|
# ID of the subscription once managed by the subscription schedule (if it is released).
|
@@ -1587,6 +2564,26 @@ module Stripe
|
|
1587
2564
|
# ID of the test clock this subscription schedule belongs to.
|
1588
2565
|
attr_reader :test_clock
|
1589
2566
|
|
2567
|
+
# Amends an existing subscription schedule.
|
2568
|
+
def amend(params = {}, opts = {})
|
2569
|
+
request_stripe_object(
|
2570
|
+
method: :post,
|
2571
|
+
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
|
2572
|
+
params: params,
|
2573
|
+
opts: opts
|
2574
|
+
)
|
2575
|
+
end
|
2576
|
+
|
2577
|
+
# Amends an existing subscription schedule.
|
2578
|
+
def self.amend(schedule, params = {}, opts = {})
|
2579
|
+
request_stripe_object(
|
2580
|
+
method: :post,
|
2581
|
+
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
2582
|
+
params: params,
|
2583
|
+
opts: opts
|
2584
|
+
)
|
2585
|
+
end
|
2586
|
+
|
1590
2587
|
# Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
|
1591
2588
|
def cancel(params = {}, opts = {})
|
1592
2589
|
request_stripe_object(
|