stripe 15.5.0 → 15.6.0.pre.alpha.2
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/API_VERSION +1 -1
- data/CHANGELOG.md +1723 -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 +1137 -42
- data/lib/stripe/resources/account_link.rb +8 -0
- data/lib/stripe/resources/account_notice.rb +147 -0
- data/lib/stripe/resources/account_session.rb +688 -8
- data/lib/stripe/resources/apple_pay_domain.rb +8 -0
- data/lib/stripe/resources/application.rb +8 -0
- data/lib/stripe/resources/application_fee.rb +16 -0
- data/lib/stripe/resources/application_fee_refund.rb +8 -0
- data/lib/stripe/resources/apps/secret.rb +16 -0
- data/lib/stripe/resources/balance.rb +159 -0
- data/lib/stripe/resources/balance_settings.rb +152 -0
- data/lib/stripe/resources/balance_transaction.rb +16 -0
- data/lib/stripe/resources/bank_account.rb +40 -0
- data/lib/stripe/resources/billing/alert.rb +203 -1
- data/lib/stripe/resources/billing/alert_triggered.rb +14 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +132 -0
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +161 -0
- data/lib/stripe/resources/billing/credit_grant.rb +143 -2
- data/lib/stripe/resources/billing/meter.rb +45 -0
- data/lib/stripe/resources/billing/meter_event.rb +8 -0
- data/lib/stripe/resources/billing/meter_event_adjustment.rb +16 -0
- data/lib/stripe/resources/billing/meter_event_summary.rb +8 -0
- data/lib/stripe/resources/billing/meter_usage.rb +31 -0
- data/lib/stripe/resources/billing/meter_usage_row.rb +36 -0
- data/lib/stripe/resources/billing_portal/configuration.rb +122 -0
- data/lib/stripe/resources/billing_portal/session.rb +107 -0
- data/lib/stripe/resources/capability.rb +56 -0
- data/lib/stripe/resources/capital/financing_offer.rb +203 -0
- data/lib/stripe/resources/capital/financing_summary.rb +79 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +138 -0
- data/lib/stripe/resources/card.rb +18 -0
- data/lib/stripe/resources/cash_balance.rb +18 -0
- data/lib/stripe/resources/charge.rb +2587 -15
- data/lib/stripe/resources/checkout/session.rb +1583 -15
- data/lib/stripe/resources/climate/order.rb +32 -0
- data/lib/stripe/resources/climate/product.rb +16 -0
- data/lib/stripe/resources/climate/supplier.rb +16 -0
- data/lib/stripe/resources/confirmation_token.rb +1126 -34
- data/lib/stripe/resources/connect_collection_transfer.rb +8 -0
- data/lib/stripe/resources/country_spec.rb +32 -0
- data/lib/stripe/resources/coupon.rb +66 -1
- data/lib/stripe/resources/credit_note.rb +76 -0
- data/lib/stripe/resources/credit_note_line_item.rb +62 -0
- data/lib/stripe/resources/customer.rb +79 -0
- data/lib/stripe/resources/customer_balance_transaction.rb +10 -0
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +110 -0
- data/lib/stripe/resources/customer_session.rb +58 -1
- data/lib/stripe/resources/discount.rb +10 -0
- data/lib/stripe/resources/dispute.rb +177 -0
- data/lib/stripe/resources/entitlements/active_entitlement.rb +8 -0
- data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +8 -0
- data/lib/stripe/resources/entitlements/feature.rb +8 -0
- data/lib/stripe/resources/ephemeral_key.rb +8 -0
- data/lib/stripe/resources/event.rb +87 -0
- data/lib/stripe/resources/exchange_rate.rb +8 -0
- data/lib/stripe/resources/file.rb +8 -0
- data/lib/stripe/resources/file_link.rb +8 -0
- data/lib/stripe/resources/financial_connections/account.rb +101 -1
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +35 -0
- data/lib/stripe/resources/financial_connections/account_owner.rb +8 -0
- data/lib/stripe/resources/financial_connections/account_ownership.rb +8 -0
- data/lib/stripe/resources/financial_connections/institution.rb +145 -0
- data/lib/stripe/resources/financial_connections/session.rb +124 -2
- data/lib/stripe/resources/financial_connections/transaction.rb +16 -0
- data/lib/stripe/resources/forwarding/request.rb +52 -0
- data/lib/stripe/resources/funding_instructions.rb +193 -0
- data/lib/stripe/resources/fx_quote.rb +234 -0
- data/lib/stripe/resources/identity/verification_report.rb +166 -1
- data/lib/stripe/resources/identity/verification_session.rb +136 -1
- data/lib/stripe/resources/invoice.rb +1591 -18
- data/lib/stripe/resources/invoice_item.rb +214 -2
- data/lib/stripe/resources/invoice_line_item.rb +293 -1
- data/lib/stripe/resources/invoice_payment.rb +30 -1
- data/lib/stripe/resources/invoice_rendering_template.rb +8 -0
- data/lib/stripe/resources/issuing/authorization.rb +177 -0
- data/lib/stripe/resources/issuing/card.rb +96 -8
- data/lib/stripe/resources/issuing/cardholder.rb +112 -1
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +684 -0
- data/lib/stripe/resources/issuing/dispute.rb +97 -0
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +98 -0
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +94 -0
- data/lib/stripe/resources/issuing/personalization_design.rb +36 -0
- data/lib/stripe/resources/issuing/physical_bundle.rb +16 -0
- data/lib/stripe/resources/issuing/settlement.rb +61 -0
- data/lib/stripe/resources/issuing/token.rb +61 -0
- data/lib/stripe/resources/issuing/transaction.rb +157 -0
- data/lib/stripe/resources/line_item.rb +91 -0
- data/lib/stripe/resources/login_link.rb +8 -0
- data/lib/stripe/resources/mandate.rb +331 -12
- data/lib/stripe/resources/margin.rb +123 -0
- data/lib/stripe/resources/order.rb +3306 -0
- data/lib/stripe/resources/payment_attempt_record.rb +2056 -0
- data/lib/stripe/resources/payment_intent.rb +11019 -3714
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +128 -0
- data/lib/stripe/resources/payment_link.rb +337 -0
- data/lib/stripe/resources/payment_method.rb +1074 -35
- data/lib/stripe/resources/payment_method_configuration.rb +1260 -4
- data/lib/stripe/resources/payment_method_domain.rb +111 -0
- data/lib/stripe/resources/payment_record.rb +2602 -0
- data/lib/stripe/resources/payout.rb +16 -0
- data/lib/stripe/resources/person.rb +180 -0
- data/lib/stripe/resources/plan.rb +24 -0
- data/lib/stripe/resources/price.rb +109 -0
- data/lib/stripe/resources/privacy/redaction_job.rb +314 -0
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +49 -0
- data/lib/stripe/resources/product.rb +27 -0
- data/lib/stripe/resources/product_feature.rb +8 -0
- data/lib/stripe/resources/promotion_code.rb +34 -0
- data/lib/stripe/resources/quote.rb +2512 -49
- data/lib/stripe/resources/quote_line.rb +521 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +1134 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +718 -0
- data/lib/stripe/resources/radar/early_fraud_warning.rb +8 -0
- data/lib/stripe/resources/radar/value_list.rb +8 -0
- data/lib/stripe/resources/radar/value_list_item.rb +8 -0
- data/lib/stripe/resources/refund.rb +389 -19
- data/lib/stripe/resources/reporting/report_run.rb +16 -0
- data/lib/stripe/resources/reporting/report_type.rb +8 -0
- data/lib/stripe/resources/reserve_transaction.rb +8 -0
- data/lib/stripe/resources/reversal.rb +8 -0
- data/lib/stripe/resources/review.rb +24 -0
- data/lib/stripe/resources/setup_attempt.rb +352 -17
- data/lib/stripe/resources/setup_intent.rb +1065 -12
- data/lib/stripe/resources/shipping_rate.rb +48 -0
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +16 -0
- data/lib/stripe/resources/source.rb +303 -0
- data/lib/stripe/resources/source_mandate_notification.rb +32 -0
- data/lib/stripe/resources/source_transaction.rb +54 -0
- data/lib/stripe/resources/subscription.rb +720 -11
- data/lib/stripe/resources/subscription_item.rb +108 -3
- data/lib/stripe/resources/subscription_schedule.rb +1321 -10
- data/lib/stripe/resources/tax/association.rb +98 -0
- data/lib/stripe/resources/tax/calculation.rb +109 -0
- data/lib/stripe/resources/tax/calculation_line_item.rb +32 -0
- data/lib/stripe/resources/tax/form.rb +318 -0
- data/lib/stripe/resources/tax/registration.rb +1232 -0
- data/lib/stripe/resources/tax/settings.rb +61 -1
- data/lib/stripe/resources/tax/transaction.rb +93 -0
- data/lib/stripe/resources/tax/transaction_line_item.rb +16 -0
- data/lib/stripe/resources/tax_code.rb +8 -0
- data/lib/stripe/resources/tax_deducted_at_source.rb +8 -0
- data/lib/stripe/resources/tax_id.rb +36 -2
- data/lib/stripe/resources/tax_rate.rb +16 -0
- data/lib/stripe/resources/terminal/configuration.rb +332 -0
- data/lib/stripe/resources/terminal/connection_token.rb +8 -0
- data/lib/stripe/resources/terminal/location.rb +16 -0
- data/lib/stripe/resources/terminal/onboarding_link.rb +108 -0
- data/lib/stripe/resources/terminal/reader.rb +249 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +47 -0
- data/lib/stripe/resources/test_helpers/test_clock.rb +24 -0
- data/lib/stripe/resources/token.rb +8 -0
- data/lib/stripe/resources/topup.rb +8 -0
- data/lib/stripe/resources/transfer.rb +14 -0
- data/lib/stripe/resources/treasury/credit_reversal.rb +16 -0
- data/lib/stripe/resources/treasury/debit_reversal.rb +24 -0
- data/lib/stripe/resources/treasury/financial_account.rb +83 -3
- data/lib/stripe/resources/treasury/financial_account_features.rb +194 -0
- data/lib/stripe/resources/treasury/inbound_transfer.rb +69 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +106 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +151 -0
- data/lib/stripe/resources/treasury/received_credit.rb +135 -1
- data/lib/stripe/resources/treasury/received_debit.rb +129 -1
- data/lib/stripe/resources/treasury/transaction.rb +36 -0
- data/lib/stripe/resources/treasury/transaction_entry.rb +24 -0
- data/lib/stripe/resources/v2/billing/bill_setting.rb +102 -0
- data/lib/stripe/resources/v2/billing/bill_setting_version.rb +90 -0
- data/lib/stripe/resources/v2/billing/cadence.rb +323 -0
- data/lib/stripe/resources/v2/billing/collection_setting.rb +296 -0
- data/lib/stripe/resources/v2/billing/collection_setting_version.rb +284 -0
- data/lib/stripe/resources/v2/billing/custom_pricing_unit.rb +43 -0
- data/lib/stripe/resources/v2/billing/intent.rb +86 -0
- data/lib/stripe/resources/v2/billing/intent_action.rb +395 -0
- data/lib/stripe/resources/v2/billing/license_fee.rb +103 -0
- data/lib/stripe/resources/v2/billing/license_fee_subscription.rb +44 -0
- data/lib/stripe/resources/v2/billing/license_fee_version.rb +80 -0
- data/lib/stripe/resources/v2/billing/licensed_item.rb +60 -0
- data/lib/stripe/resources/v2/billing/meter_event.rb +8 -0
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +16 -0
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +8 -0
- data/lib/stripe/resources/v2/billing/metered_item.rb +85 -0
- data/lib/stripe/resources/v2/billing/pricing_plan.rb +51 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_component.rb +94 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_subscription.rb +90 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_version.rb +38 -0
- data/lib/stripe/resources/v2/billing/profile.rb +46 -0
- data/lib/stripe/resources/v2/billing/rate_card.rb +61 -0
- data/lib/stripe/resources/v2/billing/rate_card_rate.rb +107 -0
- data/lib/stripe/resources/v2/billing/rate_card_subscription.rb +90 -0
- data/lib/stripe/resources/v2/billing/rate_card_version.rb +34 -0
- data/lib/stripe/resources/v2/billing/service_action.rb +232 -0
- data/lib/stripe/resources/v2/core/account.rb +3838 -0
- data/lib/stripe/resources/v2/core/account_link.rb +123 -0
- data/lib/stripe/resources/v2/core/claimable_sandbox.rb +81 -0
- data/lib/stripe/resources/v2/core/person.rb +477 -0
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +114 -0
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +47 -0
- data/lib/stripe/resources/v2/event.rb +26 -0
- data/lib/stripe/resources/v2/event_destination.rb +44 -0
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +28 -0
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +30 -0
- data/lib/stripe/resources/v2/money_management/adjustment.rb +67 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +140 -0
- data/lib/stripe/resources/v2/money_management/financial_address.rb +100 -0
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +181 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +217 -0
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +144 -0
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +69 -0
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +196 -0
- data/lib/stripe/resources/v2/money_management/payout_method.rb +109 -0
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +81 -0
- data/lib/stripe/resources/v2/money_management/received_credit.rb +199 -0
- data/lib/stripe/resources/v2/money_management/received_debit.rb +136 -0
- data/lib/stripe/resources/v2/money_management/transaction.rb +116 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +105 -0
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +113 -0
- data/lib/stripe/resources/v2/reporting/report.rb +116 -0
- data/lib/stripe/resources/v2/reporting/report_run.rb +158 -0
- data/lib/stripe/resources/v2/tax/automatic_rule.rb +39 -0
- data/lib/stripe/resources/webhook_endpoint.rb +8 -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 +26 -2
- data/lib/stripe/util.rb +16 -6
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +53 -0
- data/rbi/stripe.rbi +280174 -0
- data/stripe.gemspec +4 -1
- metadata +283 -324
- 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
@@ -20,6 +20,14 @@ module Stripe
|
|
20
20
|
attr_reader :type
|
21
21
|
# Details on when the current billing_mode was adopted.
|
22
22
|
attr_reader :updated_at
|
23
|
+
|
24
|
+
def self.inner_class_types
|
25
|
+
@inner_class_types = {}
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.field_remappings
|
29
|
+
@field_remappings = {}
|
30
|
+
end
|
23
31
|
end
|
24
32
|
|
25
33
|
class CurrentPhase < Stripe::StripeObject
|
@@ -27,6 +35,14 @@ module Stripe
|
|
27
35
|
attr_reader :end_date
|
28
36
|
# The start of this phase of the subscription schedule.
|
29
37
|
attr_reader :start_date
|
38
|
+
|
39
|
+
def self.inner_class_types
|
40
|
+
@inner_class_types = {}
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.field_remappings
|
44
|
+
@field_remappings = {}
|
45
|
+
end
|
30
46
|
end
|
31
47
|
|
32
48
|
class DefaultSettings < Stripe::StripeObject
|
@@ -36,6 +52,14 @@ module Stripe
|
|
36
52
|
attr_reader :account
|
37
53
|
# Type of the account referenced.
|
38
54
|
attr_reader :type
|
55
|
+
|
56
|
+
def self.inner_class_types
|
57
|
+
@inner_class_types = {}
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.field_remappings
|
61
|
+
@field_remappings = {}
|
62
|
+
end
|
39
63
|
end
|
40
64
|
# If Stripe disabled automatic tax, this enum describes why.
|
41
65
|
attr_reader :disabled_reason
|
@@ -43,6 +67,14 @@ module Stripe
|
|
43
67
|
attr_reader :enabled
|
44
68
|
# The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
45
69
|
attr_reader :liability
|
70
|
+
|
71
|
+
def self.inner_class_types
|
72
|
+
@inner_class_types = { liability: Liability }
|
73
|
+
end
|
74
|
+
|
75
|
+
def self.field_remappings
|
76
|
+
@field_remappings = {}
|
77
|
+
end
|
46
78
|
end
|
47
79
|
|
48
80
|
class BillingThresholds < Stripe::StripeObject
|
@@ -50,6 +82,14 @@ module Stripe
|
|
50
82
|
attr_reader :amount_gte
|
51
83
|
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
|
52
84
|
attr_reader :reset_billing_cycle_anchor
|
85
|
+
|
86
|
+
def self.inner_class_types
|
87
|
+
@inner_class_types = {}
|
88
|
+
end
|
89
|
+
|
90
|
+
def self.field_remappings
|
91
|
+
@field_remappings = {}
|
92
|
+
end
|
53
93
|
end
|
54
94
|
|
55
95
|
class InvoiceSettings < Stripe::StripeObject
|
@@ -58,6 +98,14 @@ module Stripe
|
|
58
98
|
attr_reader :account
|
59
99
|
# Type of the account referenced.
|
60
100
|
attr_reader :type
|
101
|
+
|
102
|
+
def self.inner_class_types
|
103
|
+
@inner_class_types = {}
|
104
|
+
end
|
105
|
+
|
106
|
+
def self.field_remappings
|
107
|
+
@field_remappings = {}
|
108
|
+
end
|
61
109
|
end
|
62
110
|
# The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
|
63
111
|
attr_reader :account_tax_ids
|
@@ -65,6 +113,14 @@ module Stripe
|
|
65
113
|
attr_reader :days_until_due
|
66
114
|
# Attribute for field issuer
|
67
115
|
attr_reader :issuer
|
116
|
+
|
117
|
+
def self.inner_class_types
|
118
|
+
@inner_class_types = { issuer: Issuer }
|
119
|
+
end
|
120
|
+
|
121
|
+
def self.field_remappings
|
122
|
+
@field_remappings = {}
|
123
|
+
end
|
68
124
|
end
|
69
125
|
|
70
126
|
class TransferData < Stripe::StripeObject
|
@@ -72,6 +128,14 @@ module Stripe
|
|
72
128
|
attr_reader :amount_percent
|
73
129
|
# The account where funds from the payment will be transferred to upon payment success.
|
74
130
|
attr_reader :destination
|
131
|
+
|
132
|
+
def self.inner_class_types
|
133
|
+
@inner_class_types = {}
|
134
|
+
end
|
135
|
+
|
136
|
+
def self.field_remappings
|
137
|
+
@field_remappings = {}
|
138
|
+
end
|
75
139
|
end
|
76
140
|
# 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.
|
77
141
|
attr_reader :application_fee_percent
|
@@ -93,17 +157,85 @@ module Stripe
|
|
93
157
|
attr_reader :on_behalf_of
|
94
158
|
# 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.
|
95
159
|
attr_reader :transfer_data
|
160
|
+
|
161
|
+
def self.inner_class_types
|
162
|
+
@inner_class_types = {
|
163
|
+
automatic_tax: AutomaticTax,
|
164
|
+
billing_thresholds: BillingThresholds,
|
165
|
+
invoice_settings: InvoiceSettings,
|
166
|
+
transfer_data: TransferData,
|
167
|
+
}
|
168
|
+
end
|
169
|
+
|
170
|
+
def self.field_remappings
|
171
|
+
@field_remappings = {}
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
class LastPriceMigrationError < Stripe::StripeObject
|
176
|
+
class FailedTransition < Stripe::StripeObject
|
177
|
+
# The original price to be migrated.
|
178
|
+
attr_reader :source_price
|
179
|
+
# The intended resulting price of the migration.
|
180
|
+
attr_reader :target_price
|
181
|
+
|
182
|
+
def self.inner_class_types
|
183
|
+
@inner_class_types = {}
|
184
|
+
end
|
185
|
+
|
186
|
+
def self.field_remappings
|
187
|
+
@field_remappings = {}
|
188
|
+
end
|
189
|
+
end
|
190
|
+
# The time at which the price migration encountered an error.
|
191
|
+
attr_reader :errored_at
|
192
|
+
# The involved price pairs in each failed transition.
|
193
|
+
attr_reader :failed_transitions
|
194
|
+
# The type of error encountered by the price migration.
|
195
|
+
attr_reader :type
|
196
|
+
|
197
|
+
def self.inner_class_types
|
198
|
+
@inner_class_types = { failed_transitions: FailedTransition }
|
199
|
+
end
|
200
|
+
|
201
|
+
def self.field_remappings
|
202
|
+
@field_remappings = {}
|
203
|
+
end
|
96
204
|
end
|
97
205
|
|
98
206
|
class Phase < Stripe::StripeObject
|
99
207
|
class AddInvoiceItem < Stripe::StripeObject
|
100
208
|
class Discount < Stripe::StripeObject
|
209
|
+
class DiscountEnd < Stripe::StripeObject
|
210
|
+
# The discount end timestamp.
|
211
|
+
attr_reader :timestamp
|
212
|
+
# The discount end type.
|
213
|
+
attr_reader :type
|
214
|
+
|
215
|
+
def self.inner_class_types
|
216
|
+
@inner_class_types = {}
|
217
|
+
end
|
218
|
+
|
219
|
+
def self.field_remappings
|
220
|
+
@field_remappings = {}
|
221
|
+
end
|
222
|
+
end
|
101
223
|
# ID of the coupon to create a new discount for.
|
102
224
|
attr_reader :coupon
|
103
225
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
104
226
|
attr_reader :discount
|
227
|
+
# Details to determine how long the discount should be applied for.
|
228
|
+
attr_reader :discount_end
|
105
229
|
# ID of the promotion code to create a new discount for.
|
106
230
|
attr_reader :promotion_code
|
231
|
+
|
232
|
+
def self.inner_class_types
|
233
|
+
@inner_class_types = { discount_end: DiscountEnd }
|
234
|
+
end
|
235
|
+
|
236
|
+
def self.field_remappings
|
237
|
+
@field_remappings = {}
|
238
|
+
end
|
107
239
|
end
|
108
240
|
|
109
241
|
class Period < Stripe::StripeObject
|
@@ -112,6 +244,14 @@ module Stripe
|
|
112
244
|
attr_reader :timestamp
|
113
245
|
# Select how to calculate the end of the invoice item period.
|
114
246
|
attr_reader :type
|
247
|
+
|
248
|
+
def self.inner_class_types
|
249
|
+
@inner_class_types = {}
|
250
|
+
end
|
251
|
+
|
252
|
+
def self.field_remappings
|
253
|
+
@field_remappings = {}
|
254
|
+
end
|
115
255
|
end
|
116
256
|
|
117
257
|
class Start < Stripe::StripeObject
|
@@ -119,11 +259,27 @@ module Stripe
|
|
119
259
|
attr_reader :timestamp
|
120
260
|
# Select how to calculate the start of the invoice item period.
|
121
261
|
attr_reader :type
|
262
|
+
|
263
|
+
def self.inner_class_types
|
264
|
+
@inner_class_types = {}
|
265
|
+
end
|
266
|
+
|
267
|
+
def self.field_remappings
|
268
|
+
@field_remappings = {}
|
269
|
+
end
|
122
270
|
end
|
123
271
|
# Attribute for field end
|
124
272
|
attr_reader :end
|
125
273
|
# Attribute for field start
|
126
274
|
attr_reader :start
|
275
|
+
|
276
|
+
def self.inner_class_types
|
277
|
+
@inner_class_types = { end: End, start: Start }
|
278
|
+
end
|
279
|
+
|
280
|
+
def self.field_remappings
|
281
|
+
@field_remappings = {}
|
282
|
+
end
|
127
283
|
end
|
128
284
|
# The stackable discounts that will be applied to the item.
|
129
285
|
attr_reader :discounts
|
@@ -137,6 +293,14 @@ module Stripe
|
|
137
293
|
attr_reader :quantity
|
138
294
|
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
139
295
|
attr_reader :tax_rates
|
296
|
+
|
297
|
+
def self.inner_class_types
|
298
|
+
@inner_class_types = { discounts: Discount, period: Period }
|
299
|
+
end
|
300
|
+
|
301
|
+
def self.field_remappings
|
302
|
+
@field_remappings = {}
|
303
|
+
end
|
140
304
|
end
|
141
305
|
|
142
306
|
class AutomaticTax < Stripe::StripeObject
|
@@ -145,6 +309,14 @@ module Stripe
|
|
145
309
|
attr_reader :account
|
146
310
|
# Type of the account referenced.
|
147
311
|
attr_reader :type
|
312
|
+
|
313
|
+
def self.inner_class_types
|
314
|
+
@inner_class_types = {}
|
315
|
+
end
|
316
|
+
|
317
|
+
def self.field_remappings
|
318
|
+
@field_remappings = {}
|
319
|
+
end
|
148
320
|
end
|
149
321
|
# If Stripe disabled automatic tax, this enum describes why.
|
150
322
|
attr_reader :disabled_reason
|
@@ -152,6 +324,14 @@ module Stripe
|
|
152
324
|
attr_reader :enabled
|
153
325
|
# The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
154
326
|
attr_reader :liability
|
327
|
+
|
328
|
+
def self.inner_class_types
|
329
|
+
@inner_class_types = { liability: Liability }
|
330
|
+
end
|
331
|
+
|
332
|
+
def self.field_remappings
|
333
|
+
@field_remappings = {}
|
334
|
+
end
|
155
335
|
end
|
156
336
|
|
157
337
|
class BillingThresholds < Stripe::StripeObject
|
@@ -159,15 +339,47 @@ module Stripe
|
|
159
339
|
attr_reader :amount_gte
|
160
340
|
# Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
|
161
341
|
attr_reader :reset_billing_cycle_anchor
|
342
|
+
|
343
|
+
def self.inner_class_types
|
344
|
+
@inner_class_types = {}
|
345
|
+
end
|
346
|
+
|
347
|
+
def self.field_remappings
|
348
|
+
@field_remappings = {}
|
349
|
+
end
|
162
350
|
end
|
163
351
|
|
164
352
|
class Discount < Stripe::StripeObject
|
353
|
+
class DiscountEnd < Stripe::StripeObject
|
354
|
+
# The discount end timestamp.
|
355
|
+
attr_reader :timestamp
|
356
|
+
# The discount end type.
|
357
|
+
attr_reader :type
|
358
|
+
|
359
|
+
def self.inner_class_types
|
360
|
+
@inner_class_types = {}
|
361
|
+
end
|
362
|
+
|
363
|
+
def self.field_remappings
|
364
|
+
@field_remappings = {}
|
365
|
+
end
|
366
|
+
end
|
165
367
|
# ID of the coupon to create a new discount for.
|
166
368
|
attr_reader :coupon
|
167
369
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
168
370
|
attr_reader :discount
|
371
|
+
# Details to determine how long the discount should be applied for.
|
372
|
+
attr_reader :discount_end
|
169
373
|
# ID of the promotion code to create a new discount for.
|
170
374
|
attr_reader :promotion_code
|
375
|
+
|
376
|
+
def self.inner_class_types
|
377
|
+
@inner_class_types = { discount_end: DiscountEnd }
|
378
|
+
end
|
379
|
+
|
380
|
+
def self.field_remappings
|
381
|
+
@field_remappings = {}
|
382
|
+
end
|
171
383
|
end
|
172
384
|
|
173
385
|
class InvoiceSettings < Stripe::StripeObject
|
@@ -176,6 +388,14 @@ module Stripe
|
|
176
388
|
attr_reader :account
|
177
389
|
# Type of the account referenced.
|
178
390
|
attr_reader :type
|
391
|
+
|
392
|
+
def self.inner_class_types
|
393
|
+
@inner_class_types = {}
|
394
|
+
end
|
395
|
+
|
396
|
+
def self.field_remappings
|
397
|
+
@field_remappings = {}
|
398
|
+
end
|
179
399
|
end
|
180
400
|
# The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
|
181
401
|
attr_reader :account_tax_ids
|
@@ -183,21 +403,76 @@ module Stripe
|
|
183
403
|
attr_reader :days_until_due
|
184
404
|
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
185
405
|
attr_reader :issuer
|
406
|
+
|
407
|
+
def self.inner_class_types
|
408
|
+
@inner_class_types = { issuer: Issuer }
|
409
|
+
end
|
410
|
+
|
411
|
+
def self.field_remappings
|
412
|
+
@field_remappings = {}
|
413
|
+
end
|
186
414
|
end
|
187
415
|
|
188
416
|
class Item < Stripe::StripeObject
|
189
417
|
class BillingThresholds < Stripe::StripeObject
|
190
418
|
# Usage threshold that triggers the subscription to create an invoice
|
191
419
|
attr_reader :usage_gte
|
420
|
+
|
421
|
+
def self.inner_class_types
|
422
|
+
@inner_class_types = {}
|
423
|
+
end
|
424
|
+
|
425
|
+
def self.field_remappings
|
426
|
+
@field_remappings = {}
|
427
|
+
end
|
192
428
|
end
|
193
429
|
|
194
430
|
class Discount < Stripe::StripeObject
|
431
|
+
class DiscountEnd < Stripe::StripeObject
|
432
|
+
# The discount end timestamp.
|
433
|
+
attr_reader :timestamp
|
434
|
+
# The discount end type.
|
435
|
+
attr_reader :type
|
436
|
+
|
437
|
+
def self.inner_class_types
|
438
|
+
@inner_class_types = {}
|
439
|
+
end
|
440
|
+
|
441
|
+
def self.field_remappings
|
442
|
+
@field_remappings = {}
|
443
|
+
end
|
444
|
+
end
|
195
445
|
# ID of the coupon to create a new discount for.
|
196
446
|
attr_reader :coupon
|
197
447
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
198
448
|
attr_reader :discount
|
449
|
+
# Details to determine how long the discount should be applied for.
|
450
|
+
attr_reader :discount_end
|
199
451
|
# ID of the promotion code to create a new discount for.
|
200
452
|
attr_reader :promotion_code
|
453
|
+
|
454
|
+
def self.inner_class_types
|
455
|
+
@inner_class_types = { discount_end: DiscountEnd }
|
456
|
+
end
|
457
|
+
|
458
|
+
def self.field_remappings
|
459
|
+
@field_remappings = {}
|
460
|
+
end
|
461
|
+
end
|
462
|
+
|
463
|
+
class Trial < Stripe::StripeObject
|
464
|
+
# List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
|
465
|
+
attr_reader :converts_to
|
466
|
+
# Determines the type of trial for this item.
|
467
|
+
attr_reader :type
|
468
|
+
|
469
|
+
def self.inner_class_types
|
470
|
+
@inner_class_types = {}
|
471
|
+
end
|
472
|
+
|
473
|
+
def self.field_remappings
|
474
|
+
@field_remappings = {}
|
475
|
+
end
|
201
476
|
end
|
202
477
|
# Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
203
478
|
attr_reader :billing_thresholds
|
@@ -213,6 +488,33 @@ module Stripe
|
|
213
488
|
attr_reader :quantity
|
214
489
|
# 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
490
|
attr_reader :tax_rates
|
491
|
+
# Options that configure the trial on the subscription item.
|
492
|
+
attr_reader :trial
|
493
|
+
|
494
|
+
def self.inner_class_types
|
495
|
+
@inner_class_types = {
|
496
|
+
billing_thresholds: BillingThresholds,
|
497
|
+
discounts: Discount,
|
498
|
+
trial: Trial,
|
499
|
+
}
|
500
|
+
end
|
501
|
+
|
502
|
+
def self.field_remappings
|
503
|
+
@field_remappings = {}
|
504
|
+
end
|
505
|
+
end
|
506
|
+
|
507
|
+
class PauseCollection < Stripe::StripeObject
|
508
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
509
|
+
attr_reader :behavior
|
510
|
+
|
511
|
+
def self.inner_class_types
|
512
|
+
@inner_class_types = {}
|
513
|
+
end
|
514
|
+
|
515
|
+
def self.field_remappings
|
516
|
+
@field_remappings = {}
|
517
|
+
end
|
216
518
|
end
|
217
519
|
|
218
520
|
class TransferData < Stripe::StripeObject
|
@@ -220,6 +522,39 @@ module Stripe
|
|
220
522
|
attr_reader :amount_percent
|
221
523
|
# The account where funds from the payment will be transferred to upon payment success.
|
222
524
|
attr_reader :destination
|
525
|
+
|
526
|
+
def self.inner_class_types
|
527
|
+
@inner_class_types = {}
|
528
|
+
end
|
529
|
+
|
530
|
+
def self.field_remappings
|
531
|
+
@field_remappings = {}
|
532
|
+
end
|
533
|
+
end
|
534
|
+
|
535
|
+
class TrialSettings < Stripe::StripeObject
|
536
|
+
class EndBehavior < Stripe::StripeObject
|
537
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
538
|
+
attr_reader :prorate_up_front
|
539
|
+
|
540
|
+
def self.inner_class_types
|
541
|
+
@inner_class_types = {}
|
542
|
+
end
|
543
|
+
|
544
|
+
def self.field_remappings
|
545
|
+
@field_remappings = {}
|
546
|
+
end
|
547
|
+
end
|
548
|
+
# Defines how the subscription should behave when a trial ends.
|
549
|
+
attr_reader :end_behavior
|
550
|
+
|
551
|
+
def self.inner_class_types
|
552
|
+
@inner_class_types = { end_behavior: EndBehavior }
|
553
|
+
end
|
554
|
+
|
555
|
+
def self.field_remappings
|
556
|
+
@field_remappings = {}
|
557
|
+
end
|
223
558
|
end
|
224
559
|
# A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
|
225
560
|
attr_reader :add_invoice_items
|
@@ -253,14 +588,57 @@ module Stripe
|
|
253
588
|
attr_reader :metadata
|
254
589
|
# 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
590
|
attr_reader :on_behalf_of
|
591
|
+
# 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).
|
592
|
+
attr_reader :pause_collection
|
256
593
|
# When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
|
257
594
|
attr_reader :proration_behavior
|
258
595
|
# The start of this phase of the subscription schedule.
|
259
596
|
attr_reader :start_date
|
260
597
|
# 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
598
|
attr_reader :transfer_data
|
599
|
+
# Specify behavior of the trial when crossing schedule phase boundaries
|
600
|
+
attr_reader :trial_continuation
|
262
601
|
# When the trial ends within the phase.
|
263
602
|
attr_reader :trial_end
|
603
|
+
# Settings related to any trials on the subscription during this phase.
|
604
|
+
attr_reader :trial_settings
|
605
|
+
|
606
|
+
def self.inner_class_types
|
607
|
+
@inner_class_types = {
|
608
|
+
add_invoice_items: AddInvoiceItem,
|
609
|
+
automatic_tax: AutomaticTax,
|
610
|
+
billing_thresholds: BillingThresholds,
|
611
|
+
discounts: Discount,
|
612
|
+
invoice_settings: InvoiceSettings,
|
613
|
+
items: Item,
|
614
|
+
pause_collection: PauseCollection,
|
615
|
+
transfer_data: TransferData,
|
616
|
+
trial_settings: TrialSettings,
|
617
|
+
}
|
618
|
+
end
|
619
|
+
|
620
|
+
def self.field_remappings
|
621
|
+
@field_remappings = {}
|
622
|
+
end
|
623
|
+
end
|
624
|
+
|
625
|
+
class Prebilling < Stripe::StripeObject
|
626
|
+
# ID of the prebilling invoice.
|
627
|
+
attr_reader :invoice
|
628
|
+
# The end of the last period for which the invoice pre-bills.
|
629
|
+
attr_reader :period_end
|
630
|
+
# The start of the first period for which the invoice pre-bills.
|
631
|
+
attr_reader :period_start
|
632
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
|
633
|
+
attr_reader :update_behavior
|
634
|
+
|
635
|
+
def self.inner_class_types
|
636
|
+
@inner_class_types = {}
|
637
|
+
end
|
638
|
+
|
639
|
+
def self.field_remappings
|
640
|
+
@field_remappings = {}
|
641
|
+
end
|
264
642
|
end
|
265
643
|
|
266
644
|
class ListParams < Stripe::RequestParams
|
@@ -343,6 +721,8 @@ module Stripe
|
|
343
721
|
attr_accessor :created
|
344
722
|
# Only return subscription schedules for the given customer.
|
345
723
|
attr_accessor :customer
|
724
|
+
# Only return subscription schedules for the given account.
|
725
|
+
attr_accessor :customer_account
|
346
726
|
# 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
727
|
attr_accessor :ending_before
|
348
728
|
# Specifies which fields in the response should be expanded.
|
@@ -361,6 +741,7 @@ module Stripe
|
|
361
741
|
completed_at: nil,
|
362
742
|
created: nil,
|
363
743
|
customer: nil,
|
744
|
+
customer_account: nil,
|
364
745
|
ending_before: nil,
|
365
746
|
expand: nil,
|
366
747
|
limit: nil,
|
@@ -372,6 +753,7 @@ module Stripe
|
|
372
753
|
@completed_at = completed_at
|
373
754
|
@created = created
|
374
755
|
@customer = customer
|
756
|
+
@customer_account = customer_account
|
375
757
|
@ending_before = ending_before
|
376
758
|
@expand = expand
|
377
759
|
@limit = limit
|
@@ -513,16 +895,44 @@ module Stripe
|
|
513
895
|
class Phase < Stripe::RequestParams
|
514
896
|
class AddInvoiceItem < Stripe::RequestParams
|
515
897
|
class Discount < Stripe::RequestParams
|
898
|
+
class DiscountEnd < Stripe::RequestParams
|
899
|
+
class Duration < Stripe::RequestParams
|
900
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
901
|
+
attr_accessor :interval
|
902
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
903
|
+
attr_accessor :interval_count
|
904
|
+
|
905
|
+
def initialize(interval: nil, interval_count: nil)
|
906
|
+
@interval = interval
|
907
|
+
@interval_count = interval_count
|
908
|
+
end
|
909
|
+
end
|
910
|
+
# Time span for the redeemed discount.
|
911
|
+
attr_accessor :duration
|
912
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
913
|
+
attr_accessor :timestamp
|
914
|
+
# The type of calculation made to determine when the discount ends.
|
915
|
+
attr_accessor :type
|
916
|
+
|
917
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
918
|
+
@duration = duration
|
919
|
+
@timestamp = timestamp
|
920
|
+
@type = type
|
921
|
+
end
|
922
|
+
end
|
516
923
|
# ID of the coupon to create a new discount for.
|
517
924
|
attr_accessor :coupon
|
518
925
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
519
926
|
attr_accessor :discount
|
927
|
+
# Details to determine how long the discount should be applied for.
|
928
|
+
attr_accessor :discount_end
|
520
929
|
# ID of the promotion code to create a new discount for.
|
521
930
|
attr_accessor :promotion_code
|
522
931
|
|
523
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
932
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
524
933
|
@coupon = coupon
|
525
934
|
@discount = discount
|
935
|
+
@discount_end = discount_end
|
526
936
|
@promotion_code = promotion_code
|
527
937
|
end
|
528
938
|
end
|
@@ -658,16 +1068,44 @@ module Stripe
|
|
658
1068
|
end
|
659
1069
|
|
660
1070
|
class Discount < Stripe::RequestParams
|
1071
|
+
class DiscountEnd < Stripe::RequestParams
|
1072
|
+
class Duration < Stripe::RequestParams
|
1073
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1074
|
+
attr_accessor :interval
|
1075
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1076
|
+
attr_accessor :interval_count
|
1077
|
+
|
1078
|
+
def initialize(interval: nil, interval_count: nil)
|
1079
|
+
@interval = interval
|
1080
|
+
@interval_count = interval_count
|
1081
|
+
end
|
1082
|
+
end
|
1083
|
+
# Time span for the redeemed discount.
|
1084
|
+
attr_accessor :duration
|
1085
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1086
|
+
attr_accessor :timestamp
|
1087
|
+
# The type of calculation made to determine when the discount ends.
|
1088
|
+
attr_accessor :type
|
1089
|
+
|
1090
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1091
|
+
@duration = duration
|
1092
|
+
@timestamp = timestamp
|
1093
|
+
@type = type
|
1094
|
+
end
|
1095
|
+
end
|
661
1096
|
# ID of the coupon to create a new discount for.
|
662
1097
|
attr_accessor :coupon
|
663
1098
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
664
1099
|
attr_accessor :discount
|
1100
|
+
# Details to determine how long the discount should be applied for.
|
1101
|
+
attr_accessor :discount_end
|
665
1102
|
# ID of the promotion code to create a new discount for.
|
666
1103
|
attr_accessor :promotion_code
|
667
1104
|
|
668
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1105
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
669
1106
|
@coupon = coupon
|
670
1107
|
@discount = discount
|
1108
|
+
@discount_end = discount_end
|
671
1109
|
@promotion_code = promotion_code
|
672
1110
|
end
|
673
1111
|
end
|
@@ -721,16 +1159,44 @@ module Stripe
|
|
721
1159
|
end
|
722
1160
|
|
723
1161
|
class Discount < Stripe::RequestParams
|
1162
|
+
class DiscountEnd < Stripe::RequestParams
|
1163
|
+
class Duration < Stripe::RequestParams
|
1164
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1165
|
+
attr_accessor :interval
|
1166
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1167
|
+
attr_accessor :interval_count
|
1168
|
+
|
1169
|
+
def initialize(interval: nil, interval_count: nil)
|
1170
|
+
@interval = interval
|
1171
|
+
@interval_count = interval_count
|
1172
|
+
end
|
1173
|
+
end
|
1174
|
+
# Time span for the redeemed discount.
|
1175
|
+
attr_accessor :duration
|
1176
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1177
|
+
attr_accessor :timestamp
|
1178
|
+
# The type of calculation made to determine when the discount ends.
|
1179
|
+
attr_accessor :type
|
1180
|
+
|
1181
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1182
|
+
@duration = duration
|
1183
|
+
@timestamp = timestamp
|
1184
|
+
@type = type
|
1185
|
+
end
|
1186
|
+
end
|
724
1187
|
# ID of the coupon to create a new discount for.
|
725
1188
|
attr_accessor :coupon
|
726
1189
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
727
1190
|
attr_accessor :discount
|
1191
|
+
# Details to determine how long the discount should be applied for.
|
1192
|
+
attr_accessor :discount_end
|
728
1193
|
# ID of the promotion code to create a new discount for.
|
729
1194
|
attr_accessor :promotion_code
|
730
1195
|
|
731
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1196
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
732
1197
|
@coupon = coupon
|
733
1198
|
@discount = discount
|
1199
|
+
@discount_end = discount_end
|
734
1200
|
@promotion_code = promotion_code
|
735
1201
|
end
|
736
1202
|
end
|
@@ -776,6 +1242,18 @@ module Stripe
|
|
776
1242
|
@unit_amount_decimal = unit_amount_decimal
|
777
1243
|
end
|
778
1244
|
end
|
1245
|
+
|
1246
|
+
class Trial < Stripe::RequestParams
|
1247
|
+
# 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.
|
1248
|
+
attr_accessor :converts_to
|
1249
|
+
# Determines the type of trial for this item.
|
1250
|
+
attr_accessor :type
|
1251
|
+
|
1252
|
+
def initialize(converts_to: nil, type: nil)
|
1253
|
+
@converts_to = converts_to
|
1254
|
+
@type = type
|
1255
|
+
end
|
1256
|
+
end
|
779
1257
|
# 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
1258
|
attr_accessor :billing_thresholds
|
781
1259
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -792,6 +1270,8 @@ module Stripe
|
|
792
1270
|
attr_accessor :quantity
|
793
1271
|
# 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
1272
|
attr_accessor :tax_rates
|
1273
|
+
# Options that configure the trial on the subscription item.
|
1274
|
+
attr_accessor :trial
|
795
1275
|
|
796
1276
|
def initialize(
|
797
1277
|
billing_thresholds: nil,
|
@@ -801,7 +1281,8 @@ module Stripe
|
|
801
1281
|
price: nil,
|
802
1282
|
price_data: nil,
|
803
1283
|
quantity: nil,
|
804
|
-
tax_rates: nil
|
1284
|
+
tax_rates: nil,
|
1285
|
+
trial: nil
|
805
1286
|
)
|
806
1287
|
@billing_thresholds = billing_thresholds
|
807
1288
|
@discounts = discounts
|
@@ -811,6 +1292,16 @@ module Stripe
|
|
811
1292
|
@price_data = price_data
|
812
1293
|
@quantity = quantity
|
813
1294
|
@tax_rates = tax_rates
|
1295
|
+
@trial = trial
|
1296
|
+
end
|
1297
|
+
end
|
1298
|
+
|
1299
|
+
class PauseCollection < Stripe::RequestParams
|
1300
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1301
|
+
attr_accessor :behavior
|
1302
|
+
|
1303
|
+
def initialize(behavior: nil)
|
1304
|
+
@behavior = behavior
|
814
1305
|
end
|
815
1306
|
end
|
816
1307
|
|
@@ -825,6 +1316,23 @@ module Stripe
|
|
825
1316
|
@destination = destination
|
826
1317
|
end
|
827
1318
|
end
|
1319
|
+
|
1320
|
+
class TrialSettings < Stripe::RequestParams
|
1321
|
+
class EndBehavior < Stripe::RequestParams
|
1322
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1323
|
+
attr_accessor :prorate_up_front
|
1324
|
+
|
1325
|
+
def initialize(prorate_up_front: nil)
|
1326
|
+
@prorate_up_front = prorate_up_front
|
1327
|
+
end
|
1328
|
+
end
|
1329
|
+
# Defines how the subscription should behave when a trial ends.
|
1330
|
+
attr_accessor :end_behavior
|
1331
|
+
|
1332
|
+
def initialize(end_behavior: nil)
|
1333
|
+
@end_behavior = end_behavior
|
1334
|
+
end
|
1335
|
+
end
|
828
1336
|
# 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
1337
|
attr_accessor :add_invoice_items
|
830
1338
|
# 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 +1369,20 @@ module Stripe
|
|
861
1369
|
attr_accessor :metadata
|
862
1370
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
863
1371
|
attr_accessor :on_behalf_of
|
1372
|
+
# 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).
|
1373
|
+
attr_accessor :pause_collection
|
864
1374
|
# 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
1375
|
attr_accessor :proration_behavior
|
866
1376
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
867
1377
|
attr_accessor :transfer_data
|
868
1378
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
869
1379
|
attr_accessor :trial
|
1380
|
+
# Specify trial behavior when crossing phase boundaries
|
1381
|
+
attr_accessor :trial_continuation
|
870
1382
|
# 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
1383
|
attr_accessor :trial_end
|
1384
|
+
# Settings related to subscription trials.
|
1385
|
+
attr_accessor :trial_settings
|
872
1386
|
|
873
1387
|
def initialize(
|
874
1388
|
add_invoice_items: nil,
|
@@ -889,10 +1403,13 @@ module Stripe
|
|
889
1403
|
iterations: nil,
|
890
1404
|
metadata: nil,
|
891
1405
|
on_behalf_of: nil,
|
1406
|
+
pause_collection: nil,
|
892
1407
|
proration_behavior: nil,
|
893
1408
|
transfer_data: nil,
|
894
1409
|
trial: nil,
|
895
|
-
|
1410
|
+
trial_continuation: nil,
|
1411
|
+
trial_end: nil,
|
1412
|
+
trial_settings: nil
|
896
1413
|
)
|
897
1414
|
@add_invoice_items = add_invoice_items
|
898
1415
|
@application_fee_percent = application_fee_percent
|
@@ -912,16 +1429,35 @@ module Stripe
|
|
912
1429
|
@iterations = iterations
|
913
1430
|
@metadata = metadata
|
914
1431
|
@on_behalf_of = on_behalf_of
|
1432
|
+
@pause_collection = pause_collection
|
915
1433
|
@proration_behavior = proration_behavior
|
916
1434
|
@transfer_data = transfer_data
|
917
1435
|
@trial = trial
|
1436
|
+
@trial_continuation = trial_continuation
|
918
1437
|
@trial_end = trial_end
|
1438
|
+
@trial_settings = trial_settings
|
1439
|
+
end
|
1440
|
+
end
|
1441
|
+
|
1442
|
+
class Prebilling < Stripe::RequestParams
|
1443
|
+
# This is used to determine the number of billing cycles to prebill.
|
1444
|
+
attr_accessor :iterations
|
1445
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1446
|
+
attr_accessor :update_behavior
|
1447
|
+
|
1448
|
+
def initialize(iterations: nil, update_behavior: nil)
|
1449
|
+
@iterations = iterations
|
1450
|
+
@update_behavior = update_behavior
|
919
1451
|
end
|
920
1452
|
end
|
1453
|
+
# 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.
|
1454
|
+
attr_accessor :billing_behavior
|
921
1455
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
922
1456
|
attr_accessor :billing_mode
|
923
1457
|
# The identifier of the customer to create the subscription schedule for.
|
924
1458
|
attr_accessor :customer
|
1459
|
+
# The identifier of the account to create the subscription schedule for.
|
1460
|
+
attr_accessor :customer_account
|
925
1461
|
# Object representing the subscription schedule's default settings.
|
926
1462
|
attr_accessor :default_settings
|
927
1463
|
# 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 +1470,36 @@ module Stripe
|
|
934
1470
|
attr_accessor :metadata
|
935
1471
|
# 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
1472
|
attr_accessor :phases
|
1473
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1474
|
+
attr_accessor :prebilling
|
937
1475
|
# 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
1476
|
attr_accessor :start_date
|
939
1477
|
|
940
1478
|
def initialize(
|
1479
|
+
billing_behavior: nil,
|
941
1480
|
billing_mode: nil,
|
942
1481
|
customer: nil,
|
1482
|
+
customer_account: nil,
|
943
1483
|
default_settings: nil,
|
944
1484
|
end_behavior: nil,
|
945
1485
|
expand: nil,
|
946
1486
|
from_subscription: nil,
|
947
1487
|
metadata: nil,
|
948
1488
|
phases: nil,
|
1489
|
+
prebilling: nil,
|
949
1490
|
start_date: nil
|
950
1491
|
)
|
1492
|
+
@billing_behavior = billing_behavior
|
951
1493
|
@billing_mode = billing_mode
|
952
1494
|
@customer = customer
|
1495
|
+
@customer_account = customer_account
|
953
1496
|
@default_settings = default_settings
|
954
1497
|
@end_behavior = end_behavior
|
955
1498
|
@expand = expand
|
956
1499
|
@from_subscription = from_subscription
|
957
1500
|
@metadata = metadata
|
958
1501
|
@phases = phases
|
1502
|
+
@prebilling = prebilling
|
959
1503
|
@start_date = start_date
|
960
1504
|
end
|
961
1505
|
end
|
@@ -1083,16 +1627,44 @@ module Stripe
|
|
1083
1627
|
class Phase < Stripe::RequestParams
|
1084
1628
|
class AddInvoiceItem < Stripe::RequestParams
|
1085
1629
|
class Discount < Stripe::RequestParams
|
1630
|
+
class DiscountEnd < Stripe::RequestParams
|
1631
|
+
class Duration < Stripe::RequestParams
|
1632
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1633
|
+
attr_accessor :interval
|
1634
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1635
|
+
attr_accessor :interval_count
|
1636
|
+
|
1637
|
+
def initialize(interval: nil, interval_count: nil)
|
1638
|
+
@interval = interval
|
1639
|
+
@interval_count = interval_count
|
1640
|
+
end
|
1641
|
+
end
|
1642
|
+
# Time span for the redeemed discount.
|
1643
|
+
attr_accessor :duration
|
1644
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1645
|
+
attr_accessor :timestamp
|
1646
|
+
# The type of calculation made to determine when the discount ends.
|
1647
|
+
attr_accessor :type
|
1648
|
+
|
1649
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1650
|
+
@duration = duration
|
1651
|
+
@timestamp = timestamp
|
1652
|
+
@type = type
|
1653
|
+
end
|
1654
|
+
end
|
1086
1655
|
# ID of the coupon to create a new discount for.
|
1087
1656
|
attr_accessor :coupon
|
1088
1657
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1089
1658
|
attr_accessor :discount
|
1659
|
+
# Details to determine how long the discount should be applied for.
|
1660
|
+
attr_accessor :discount_end
|
1090
1661
|
# ID of the promotion code to create a new discount for.
|
1091
1662
|
attr_accessor :promotion_code
|
1092
1663
|
|
1093
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1664
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1094
1665
|
@coupon = coupon
|
1095
1666
|
@discount = discount
|
1667
|
+
@discount_end = discount_end
|
1096
1668
|
@promotion_code = promotion_code
|
1097
1669
|
end
|
1098
1670
|
end
|
@@ -1228,16 +1800,44 @@ module Stripe
|
|
1228
1800
|
end
|
1229
1801
|
|
1230
1802
|
class Discount < Stripe::RequestParams
|
1803
|
+
class DiscountEnd < Stripe::RequestParams
|
1804
|
+
class Duration < Stripe::RequestParams
|
1805
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1806
|
+
attr_accessor :interval
|
1807
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1808
|
+
attr_accessor :interval_count
|
1809
|
+
|
1810
|
+
def initialize(interval: nil, interval_count: nil)
|
1811
|
+
@interval = interval
|
1812
|
+
@interval_count = interval_count
|
1813
|
+
end
|
1814
|
+
end
|
1815
|
+
# Time span for the redeemed discount.
|
1816
|
+
attr_accessor :duration
|
1817
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1818
|
+
attr_accessor :timestamp
|
1819
|
+
# The type of calculation made to determine when the discount ends.
|
1820
|
+
attr_accessor :type
|
1821
|
+
|
1822
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1823
|
+
@duration = duration
|
1824
|
+
@timestamp = timestamp
|
1825
|
+
@type = type
|
1826
|
+
end
|
1827
|
+
end
|
1231
1828
|
# ID of the coupon to create a new discount for.
|
1232
1829
|
attr_accessor :coupon
|
1233
1830
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1234
1831
|
attr_accessor :discount
|
1832
|
+
# Details to determine how long the discount should be applied for.
|
1833
|
+
attr_accessor :discount_end
|
1235
1834
|
# ID of the promotion code to create a new discount for.
|
1236
1835
|
attr_accessor :promotion_code
|
1237
1836
|
|
1238
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1837
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1239
1838
|
@coupon = coupon
|
1240
1839
|
@discount = discount
|
1840
|
+
@discount_end = discount_end
|
1241
1841
|
@promotion_code = promotion_code
|
1242
1842
|
end
|
1243
1843
|
end
|
@@ -1291,16 +1891,44 @@ module Stripe
|
|
1291
1891
|
end
|
1292
1892
|
|
1293
1893
|
class Discount < Stripe::RequestParams
|
1894
|
+
class DiscountEnd < Stripe::RequestParams
|
1895
|
+
class Duration < Stripe::RequestParams
|
1896
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1897
|
+
attr_accessor :interval
|
1898
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1899
|
+
attr_accessor :interval_count
|
1900
|
+
|
1901
|
+
def initialize(interval: nil, interval_count: nil)
|
1902
|
+
@interval = interval
|
1903
|
+
@interval_count = interval_count
|
1904
|
+
end
|
1905
|
+
end
|
1906
|
+
# Time span for the redeemed discount.
|
1907
|
+
attr_accessor :duration
|
1908
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1909
|
+
attr_accessor :timestamp
|
1910
|
+
# The type of calculation made to determine when the discount ends.
|
1911
|
+
attr_accessor :type
|
1912
|
+
|
1913
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1914
|
+
@duration = duration
|
1915
|
+
@timestamp = timestamp
|
1916
|
+
@type = type
|
1917
|
+
end
|
1918
|
+
end
|
1294
1919
|
# ID of the coupon to create a new discount for.
|
1295
1920
|
attr_accessor :coupon
|
1296
1921
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1297
1922
|
attr_accessor :discount
|
1923
|
+
# Details to determine how long the discount should be applied for.
|
1924
|
+
attr_accessor :discount_end
|
1298
1925
|
# ID of the promotion code to create a new discount for.
|
1299
1926
|
attr_accessor :promotion_code
|
1300
1927
|
|
1301
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1928
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1302
1929
|
@coupon = coupon
|
1303
1930
|
@discount = discount
|
1931
|
+
@discount_end = discount_end
|
1304
1932
|
@promotion_code = promotion_code
|
1305
1933
|
end
|
1306
1934
|
end
|
@@ -1346,6 +1974,18 @@ module Stripe
|
|
1346
1974
|
@unit_amount_decimal = unit_amount_decimal
|
1347
1975
|
end
|
1348
1976
|
end
|
1977
|
+
|
1978
|
+
class Trial < Stripe::RequestParams
|
1979
|
+
# 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.
|
1980
|
+
attr_accessor :converts_to
|
1981
|
+
# Determines the type of trial for this item.
|
1982
|
+
attr_accessor :type
|
1983
|
+
|
1984
|
+
def initialize(converts_to: nil, type: nil)
|
1985
|
+
@converts_to = converts_to
|
1986
|
+
@type = type
|
1987
|
+
end
|
1988
|
+
end
|
1349
1989
|
# 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
1990
|
attr_accessor :billing_thresholds
|
1351
1991
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -1362,6 +2002,8 @@ module Stripe
|
|
1362
2002
|
attr_accessor :quantity
|
1363
2003
|
# 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
2004
|
attr_accessor :tax_rates
|
2005
|
+
# Options that configure the trial on the subscription item.
|
2006
|
+
attr_accessor :trial
|
1365
2007
|
|
1366
2008
|
def initialize(
|
1367
2009
|
billing_thresholds: nil,
|
@@ -1371,7 +2013,8 @@ module Stripe
|
|
1371
2013
|
price: nil,
|
1372
2014
|
price_data: nil,
|
1373
2015
|
quantity: nil,
|
1374
|
-
tax_rates: nil
|
2016
|
+
tax_rates: nil,
|
2017
|
+
trial: nil
|
1375
2018
|
)
|
1376
2019
|
@billing_thresholds = billing_thresholds
|
1377
2020
|
@discounts = discounts
|
@@ -1381,6 +2024,16 @@ module Stripe
|
|
1381
2024
|
@price_data = price_data
|
1382
2025
|
@quantity = quantity
|
1383
2026
|
@tax_rates = tax_rates
|
2027
|
+
@trial = trial
|
2028
|
+
end
|
2029
|
+
end
|
2030
|
+
|
2031
|
+
class PauseCollection < Stripe::RequestParams
|
2032
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2033
|
+
attr_accessor :behavior
|
2034
|
+
|
2035
|
+
def initialize(behavior: nil)
|
2036
|
+
@behavior = behavior
|
1384
2037
|
end
|
1385
2038
|
end
|
1386
2039
|
|
@@ -1395,6 +2048,23 @@ module Stripe
|
|
1395
2048
|
@destination = destination
|
1396
2049
|
end
|
1397
2050
|
end
|
2051
|
+
|
2052
|
+
class TrialSettings < Stripe::RequestParams
|
2053
|
+
class EndBehavior < Stripe::RequestParams
|
2054
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2055
|
+
attr_accessor :prorate_up_front
|
2056
|
+
|
2057
|
+
def initialize(prorate_up_front: nil)
|
2058
|
+
@prorate_up_front = prorate_up_front
|
2059
|
+
end
|
2060
|
+
end
|
2061
|
+
# Defines how the subscription should behave when a trial ends.
|
2062
|
+
attr_accessor :end_behavior
|
2063
|
+
|
2064
|
+
def initialize(end_behavior: nil)
|
2065
|
+
@end_behavior = end_behavior
|
2066
|
+
end
|
2067
|
+
end
|
1398
2068
|
# 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
2069
|
attr_accessor :add_invoice_items
|
1400
2070
|
# 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 +2101,8 @@ module Stripe
|
|
1431
2101
|
attr_accessor :metadata
|
1432
2102
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
1433
2103
|
attr_accessor :on_behalf_of
|
2104
|
+
# 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).
|
2105
|
+
attr_accessor :pause_collection
|
1434
2106
|
# 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
2107
|
attr_accessor :proration_behavior
|
1436
2108
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -1439,8 +2111,12 @@ module Stripe
|
|
1439
2111
|
attr_accessor :transfer_data
|
1440
2112
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
1441
2113
|
attr_accessor :trial
|
2114
|
+
# Specify trial behavior when crossing phase boundaries
|
2115
|
+
attr_accessor :trial_continuation
|
1442
2116
|
# 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
2117
|
attr_accessor :trial_end
|
2118
|
+
# Settings related to subscription trials.
|
2119
|
+
attr_accessor :trial_settings
|
1444
2120
|
|
1445
2121
|
def initialize(
|
1446
2122
|
add_invoice_items: nil,
|
@@ -1461,11 +2137,14 @@ module Stripe
|
|
1461
2137
|
iterations: nil,
|
1462
2138
|
metadata: nil,
|
1463
2139
|
on_behalf_of: nil,
|
2140
|
+
pause_collection: nil,
|
1464
2141
|
proration_behavior: nil,
|
1465
2142
|
start_date: nil,
|
1466
2143
|
transfer_data: nil,
|
1467
2144
|
trial: nil,
|
1468
|
-
|
2145
|
+
trial_continuation: nil,
|
2146
|
+
trial_end: nil,
|
2147
|
+
trial_settings: nil
|
1469
2148
|
)
|
1470
2149
|
@add_invoice_items = add_invoice_items
|
1471
2150
|
@application_fee_percent = application_fee_percent
|
@@ -1485,13 +2164,30 @@ module Stripe
|
|
1485
2164
|
@iterations = iterations
|
1486
2165
|
@metadata = metadata
|
1487
2166
|
@on_behalf_of = on_behalf_of
|
2167
|
+
@pause_collection = pause_collection
|
1488
2168
|
@proration_behavior = proration_behavior
|
1489
2169
|
@start_date = start_date
|
1490
2170
|
@transfer_data = transfer_data
|
1491
2171
|
@trial = trial
|
2172
|
+
@trial_continuation = trial_continuation
|
1492
2173
|
@trial_end = trial_end
|
2174
|
+
@trial_settings = trial_settings
|
2175
|
+
end
|
2176
|
+
end
|
2177
|
+
|
2178
|
+
class Prebilling < Stripe::RequestParams
|
2179
|
+
# This is used to determine the number of billing cycles to prebill.
|
2180
|
+
attr_accessor :iterations
|
2181
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
2182
|
+
attr_accessor :update_behavior
|
2183
|
+
|
2184
|
+
def initialize(iterations: nil, update_behavior: nil)
|
2185
|
+
@iterations = iterations
|
2186
|
+
@update_behavior = update_behavior
|
1493
2187
|
end
|
1494
2188
|
end
|
2189
|
+
# 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.
|
2190
|
+
attr_accessor :billing_behavior
|
1495
2191
|
# Object representing the subscription schedule's default settings.
|
1496
2192
|
attr_accessor :default_settings
|
1497
2193
|
# 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,23 +2198,595 @@ module Stripe
|
|
1502
2198
|
attr_accessor :metadata
|
1503
2199
|
# 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
2200
|
attr_accessor :phases
|
2201
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
2202
|
+
attr_accessor :prebilling
|
1505
2203
|
# 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
2204
|
attr_accessor :proration_behavior
|
1507
2205
|
|
1508
2206
|
def initialize(
|
2207
|
+
billing_behavior: nil,
|
1509
2208
|
default_settings: nil,
|
1510
2209
|
end_behavior: nil,
|
1511
2210
|
expand: nil,
|
1512
2211
|
metadata: nil,
|
1513
2212
|
phases: nil,
|
2213
|
+
prebilling: nil,
|
1514
2214
|
proration_behavior: nil
|
1515
2215
|
)
|
2216
|
+
@billing_behavior = billing_behavior
|
1516
2217
|
@default_settings = default_settings
|
1517
2218
|
@end_behavior = end_behavior
|
1518
2219
|
@expand = expand
|
1519
2220
|
@metadata = metadata
|
1520
2221
|
@phases = phases
|
2222
|
+
@prebilling = prebilling
|
2223
|
+
@proration_behavior = proration_behavior
|
2224
|
+
end
|
2225
|
+
end
|
2226
|
+
|
2227
|
+
class AmendParams < Stripe::RequestParams
|
2228
|
+
class Amendment < Stripe::RequestParams
|
2229
|
+
class AmendmentEnd < Stripe::RequestParams
|
2230
|
+
class DiscountEnd < Stripe::RequestParams
|
2231
|
+
# The ID of a specific discount.
|
2232
|
+
attr_accessor :discount
|
2233
|
+
|
2234
|
+
def initialize(discount: nil)
|
2235
|
+
@discount = discount
|
2236
|
+
end
|
2237
|
+
end
|
2238
|
+
|
2239
|
+
class Duration < Stripe::RequestParams
|
2240
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2241
|
+
attr_accessor :interval
|
2242
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2243
|
+
attr_accessor :interval_count
|
2244
|
+
|
2245
|
+
def initialize(interval: nil, interval_count: nil)
|
2246
|
+
@interval = interval
|
2247
|
+
@interval_count = interval_count
|
2248
|
+
end
|
2249
|
+
end
|
2250
|
+
# Use the `end` time of a given discount.
|
2251
|
+
attr_accessor :discount_end
|
2252
|
+
# Time span for the amendment starting from the `amendment_start`.
|
2253
|
+
attr_accessor :duration
|
2254
|
+
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
2255
|
+
attr_accessor :timestamp
|
2256
|
+
# Select one of three ways to pass the `amendment_end`.
|
2257
|
+
attr_accessor :type
|
2258
|
+
|
2259
|
+
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
2260
|
+
@discount_end = discount_end
|
2261
|
+
@duration = duration
|
2262
|
+
@timestamp = timestamp
|
2263
|
+
@type = type
|
2264
|
+
end
|
2265
|
+
end
|
2266
|
+
|
2267
|
+
class AmendmentStart < Stripe::RequestParams
|
2268
|
+
class AmendmentEnd < Stripe::RequestParams
|
2269
|
+
# 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.
|
2270
|
+
attr_accessor :index
|
2271
|
+
|
2272
|
+
def initialize(index: nil)
|
2273
|
+
@index = index
|
2274
|
+
end
|
2275
|
+
end
|
2276
|
+
|
2277
|
+
class DiscountEnd < Stripe::RequestParams
|
2278
|
+
# The ID of a specific discount.
|
2279
|
+
attr_accessor :discount
|
2280
|
+
|
2281
|
+
def initialize(discount: nil)
|
2282
|
+
@discount = discount
|
2283
|
+
end
|
2284
|
+
end
|
2285
|
+
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
2286
|
+
attr_accessor :amendment_end
|
2287
|
+
# Use the `end` time of a given discount.
|
2288
|
+
attr_accessor :discount_end
|
2289
|
+
# A precise Unix timestamp for the amendment to start.
|
2290
|
+
attr_accessor :timestamp
|
2291
|
+
# Select one of three ways to pass the `amendment_start`.
|
2292
|
+
attr_accessor :type
|
2293
|
+
|
2294
|
+
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
2295
|
+
@amendment_end = amendment_end
|
2296
|
+
@discount_end = discount_end
|
2297
|
+
@timestamp = timestamp
|
2298
|
+
@type = type
|
2299
|
+
end
|
2300
|
+
end
|
2301
|
+
|
2302
|
+
class DiscountAction < Stripe::RequestParams
|
2303
|
+
class Add < Stripe::RequestParams
|
2304
|
+
class DiscountEnd < Stripe::RequestParams
|
2305
|
+
# The type of calculation made to determine when the discount ends.
|
2306
|
+
attr_accessor :type
|
2307
|
+
|
2308
|
+
def initialize(type: nil)
|
2309
|
+
@type = type
|
2310
|
+
end
|
2311
|
+
end
|
2312
|
+
# The coupon code to redeem.
|
2313
|
+
attr_accessor :coupon
|
2314
|
+
# An ID of an existing discount for a coupon that was already redeemed.
|
2315
|
+
attr_accessor :discount
|
2316
|
+
# Details to determine how long the discount should be applied for.
|
2317
|
+
attr_accessor :discount_end
|
2318
|
+
# 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.
|
2319
|
+
attr_accessor :index
|
2320
|
+
# The promotion code to redeem.
|
2321
|
+
attr_accessor :promotion_code
|
2322
|
+
|
2323
|
+
def initialize(
|
2324
|
+
coupon: nil,
|
2325
|
+
discount: nil,
|
2326
|
+
discount_end: nil,
|
2327
|
+
index: nil,
|
2328
|
+
promotion_code: nil
|
2329
|
+
)
|
2330
|
+
@coupon = coupon
|
2331
|
+
@discount = discount
|
2332
|
+
@discount_end = discount_end
|
2333
|
+
@index = index
|
2334
|
+
@promotion_code = promotion_code
|
2335
|
+
end
|
2336
|
+
end
|
2337
|
+
|
2338
|
+
class Remove < Stripe::RequestParams
|
2339
|
+
# The coupon code to remove from the `discounts` array.
|
2340
|
+
attr_accessor :coupon
|
2341
|
+
# The ID of a discount to remove from the `discounts` array.
|
2342
|
+
attr_accessor :discount
|
2343
|
+
# The ID of a promotion code to remove from the `discounts` array.
|
2344
|
+
attr_accessor :promotion_code
|
2345
|
+
|
2346
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2347
|
+
@coupon = coupon
|
2348
|
+
@discount = discount
|
2349
|
+
@promotion_code = promotion_code
|
2350
|
+
end
|
2351
|
+
end
|
2352
|
+
|
2353
|
+
class Set < Stripe::RequestParams
|
2354
|
+
# The coupon code to replace the `discounts` array with.
|
2355
|
+
attr_accessor :coupon
|
2356
|
+
# An ID of an existing discount to replace the `discounts` array with.
|
2357
|
+
attr_accessor :discount
|
2358
|
+
# An ID of an existing promotion code to replace the `discounts` array with.
|
2359
|
+
attr_accessor :promotion_code
|
2360
|
+
|
2361
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2362
|
+
@coupon = coupon
|
2363
|
+
@discount = discount
|
2364
|
+
@promotion_code = promotion_code
|
2365
|
+
end
|
2366
|
+
end
|
2367
|
+
# Details of the discount to add.
|
2368
|
+
attr_accessor :add
|
2369
|
+
# Details of the discount to remove.
|
2370
|
+
attr_accessor :remove
|
2371
|
+
# Details of the discount to replace the existing discounts with.
|
2372
|
+
attr_accessor :set
|
2373
|
+
# Determines the type of discount action.
|
2374
|
+
attr_accessor :type
|
2375
|
+
|
2376
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2377
|
+
@add = add
|
2378
|
+
@remove = remove
|
2379
|
+
@set = set
|
2380
|
+
@type = type
|
2381
|
+
end
|
2382
|
+
end
|
2383
|
+
|
2384
|
+
class ItemAction < Stripe::RequestParams
|
2385
|
+
class Add < Stripe::RequestParams
|
2386
|
+
class Discount < Stripe::RequestParams
|
2387
|
+
class DiscountEnd < Stripe::RequestParams
|
2388
|
+
class Duration < Stripe::RequestParams
|
2389
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2390
|
+
attr_accessor :interval
|
2391
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2392
|
+
attr_accessor :interval_count
|
2393
|
+
|
2394
|
+
def initialize(interval: nil, interval_count: nil)
|
2395
|
+
@interval = interval
|
2396
|
+
@interval_count = interval_count
|
2397
|
+
end
|
2398
|
+
end
|
2399
|
+
# Time span for the redeemed discount.
|
2400
|
+
attr_accessor :duration
|
2401
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2402
|
+
attr_accessor :timestamp
|
2403
|
+
# The type of calculation made to determine when the discount ends.
|
2404
|
+
attr_accessor :type
|
2405
|
+
|
2406
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2407
|
+
@duration = duration
|
2408
|
+
@timestamp = timestamp
|
2409
|
+
@type = type
|
2410
|
+
end
|
2411
|
+
end
|
2412
|
+
# ID of the coupon to create a new discount for.
|
2413
|
+
attr_accessor :coupon
|
2414
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2415
|
+
attr_accessor :discount
|
2416
|
+
# Details to determine how long the discount should be applied for.
|
2417
|
+
attr_accessor :discount_end
|
2418
|
+
# ID of the promotion code to create a new discount for.
|
2419
|
+
attr_accessor :promotion_code
|
2420
|
+
|
2421
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2422
|
+
@coupon = coupon
|
2423
|
+
@discount = discount
|
2424
|
+
@discount_end = discount_end
|
2425
|
+
@promotion_code = promotion_code
|
2426
|
+
end
|
2427
|
+
end
|
2428
|
+
|
2429
|
+
class Trial < Stripe::RequestParams
|
2430
|
+
# 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.
|
2431
|
+
attr_accessor :converts_to
|
2432
|
+
# Determines the type of trial for this item.
|
2433
|
+
attr_accessor :type
|
2434
|
+
|
2435
|
+
def initialize(converts_to: nil, type: nil)
|
2436
|
+
@converts_to = converts_to
|
2437
|
+
@type = type
|
2438
|
+
end
|
2439
|
+
end
|
2440
|
+
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
2441
|
+
attr_accessor :discounts
|
2442
|
+
# 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`.
|
2443
|
+
attr_accessor :metadata
|
2444
|
+
# The ID of the price object.
|
2445
|
+
attr_accessor :price
|
2446
|
+
# Quantity for this item.
|
2447
|
+
attr_accessor :quantity
|
2448
|
+
# 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`.
|
2449
|
+
attr_accessor :tax_rates
|
2450
|
+
# Options that configure the trial on the subscription item.
|
2451
|
+
attr_accessor :trial
|
2452
|
+
|
2453
|
+
def initialize(
|
2454
|
+
discounts: nil,
|
2455
|
+
metadata: nil,
|
2456
|
+
price: nil,
|
2457
|
+
quantity: nil,
|
2458
|
+
tax_rates: nil,
|
2459
|
+
trial: nil
|
2460
|
+
)
|
2461
|
+
@discounts = discounts
|
2462
|
+
@metadata = metadata
|
2463
|
+
@price = price
|
2464
|
+
@quantity = quantity
|
2465
|
+
@tax_rates = tax_rates
|
2466
|
+
@trial = trial
|
2467
|
+
end
|
2468
|
+
end
|
2469
|
+
|
2470
|
+
class Remove < Stripe::RequestParams
|
2471
|
+
# ID of a price to remove.
|
2472
|
+
attr_accessor :price
|
2473
|
+
|
2474
|
+
def initialize(price: nil)
|
2475
|
+
@price = price
|
2476
|
+
end
|
2477
|
+
end
|
2478
|
+
|
2479
|
+
class Set < Stripe::RequestParams
|
2480
|
+
class Discount < Stripe::RequestParams
|
2481
|
+
class DiscountEnd < Stripe::RequestParams
|
2482
|
+
class Duration < Stripe::RequestParams
|
2483
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2484
|
+
attr_accessor :interval
|
2485
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2486
|
+
attr_accessor :interval_count
|
2487
|
+
|
2488
|
+
def initialize(interval: nil, interval_count: nil)
|
2489
|
+
@interval = interval
|
2490
|
+
@interval_count = interval_count
|
2491
|
+
end
|
2492
|
+
end
|
2493
|
+
# Time span for the redeemed discount.
|
2494
|
+
attr_accessor :duration
|
2495
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2496
|
+
attr_accessor :timestamp
|
2497
|
+
# The type of calculation made to determine when the discount ends.
|
2498
|
+
attr_accessor :type
|
2499
|
+
|
2500
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2501
|
+
@duration = duration
|
2502
|
+
@timestamp = timestamp
|
2503
|
+
@type = type
|
2504
|
+
end
|
2505
|
+
end
|
2506
|
+
# ID of the coupon to create a new discount for.
|
2507
|
+
attr_accessor :coupon
|
2508
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2509
|
+
attr_accessor :discount
|
2510
|
+
# Details to determine how long the discount should be applied for.
|
2511
|
+
attr_accessor :discount_end
|
2512
|
+
# ID of the promotion code to create a new discount for.
|
2513
|
+
attr_accessor :promotion_code
|
2514
|
+
|
2515
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2516
|
+
@coupon = coupon
|
2517
|
+
@discount = discount
|
2518
|
+
@discount_end = discount_end
|
2519
|
+
@promotion_code = promotion_code
|
2520
|
+
end
|
2521
|
+
end
|
2522
|
+
|
2523
|
+
class Trial < Stripe::RequestParams
|
2524
|
+
# 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.
|
2525
|
+
attr_accessor :converts_to
|
2526
|
+
# Determines the type of trial for this item.
|
2527
|
+
attr_accessor :type
|
2528
|
+
|
2529
|
+
def initialize(converts_to: nil, type: nil)
|
2530
|
+
@converts_to = converts_to
|
2531
|
+
@type = type
|
2532
|
+
end
|
2533
|
+
end
|
2534
|
+
# 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`.
|
2535
|
+
attr_accessor :discounts
|
2536
|
+
# 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`.
|
2537
|
+
attr_accessor :metadata
|
2538
|
+
# The ID of the price object.
|
2539
|
+
attr_accessor :price
|
2540
|
+
# 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`.
|
2541
|
+
attr_accessor :quantity
|
2542
|
+
# 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`.
|
2543
|
+
attr_accessor :tax_rates
|
2544
|
+
# 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`.
|
2545
|
+
attr_accessor :trial
|
2546
|
+
|
2547
|
+
def initialize(
|
2548
|
+
discounts: nil,
|
2549
|
+
metadata: nil,
|
2550
|
+
price: nil,
|
2551
|
+
quantity: nil,
|
2552
|
+
tax_rates: nil,
|
2553
|
+
trial: nil
|
2554
|
+
)
|
2555
|
+
@discounts = discounts
|
2556
|
+
@metadata = metadata
|
2557
|
+
@price = price
|
2558
|
+
@quantity = quantity
|
2559
|
+
@tax_rates = tax_rates
|
2560
|
+
@trial = trial
|
2561
|
+
end
|
2562
|
+
end
|
2563
|
+
# 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.
|
2564
|
+
attr_accessor :add
|
2565
|
+
# Details of the subscription item to remove.
|
2566
|
+
attr_accessor :remove
|
2567
|
+
# 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.
|
2568
|
+
attr_accessor :set
|
2569
|
+
# Determines the type of item action.
|
2570
|
+
attr_accessor :type
|
2571
|
+
|
2572
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2573
|
+
@add = add
|
2574
|
+
@remove = remove
|
2575
|
+
@set = set
|
2576
|
+
@type = type
|
2577
|
+
end
|
2578
|
+
end
|
2579
|
+
|
2580
|
+
class MetadataAction < Stripe::RequestParams
|
2581
|
+
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
2582
|
+
attr_accessor :add
|
2583
|
+
# Keys to remove from schedule phase metadata.
|
2584
|
+
attr_accessor :remove
|
2585
|
+
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
2586
|
+
attr_accessor :set
|
2587
|
+
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
2588
|
+
attr_accessor :type
|
2589
|
+
|
2590
|
+
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2591
|
+
@add = add
|
2592
|
+
@remove = remove
|
2593
|
+
@set = set
|
2594
|
+
@type = type
|
2595
|
+
end
|
2596
|
+
end
|
2597
|
+
|
2598
|
+
class SetPauseCollection < Stripe::RequestParams
|
2599
|
+
class Set < Stripe::RequestParams
|
2600
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2601
|
+
attr_accessor :behavior
|
2602
|
+
|
2603
|
+
def initialize(behavior: nil)
|
2604
|
+
@behavior = behavior
|
2605
|
+
end
|
2606
|
+
end
|
2607
|
+
# Details of the pause_collection behavior to apply to the amendment.
|
2608
|
+
attr_accessor :set
|
2609
|
+
# Determines the type of the pause_collection amendment.
|
2610
|
+
attr_accessor :type
|
2611
|
+
|
2612
|
+
def initialize(set: nil, type: nil)
|
2613
|
+
@set = set
|
2614
|
+
@type = type
|
2615
|
+
end
|
2616
|
+
end
|
2617
|
+
|
2618
|
+
class TrialSettings < Stripe::RequestParams
|
2619
|
+
class EndBehavior < Stripe::RequestParams
|
2620
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2621
|
+
attr_accessor :prorate_up_front
|
2622
|
+
|
2623
|
+
def initialize(prorate_up_front: nil)
|
2624
|
+
@prorate_up_front = prorate_up_front
|
2625
|
+
end
|
2626
|
+
end
|
2627
|
+
# Defines how the subscription should behave when a trial ends.
|
2628
|
+
attr_accessor :end_behavior
|
2629
|
+
|
2630
|
+
def initialize(end_behavior: nil)
|
2631
|
+
@end_behavior = end_behavior
|
2632
|
+
end
|
2633
|
+
end
|
2634
|
+
# 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.
|
2635
|
+
attr_accessor :amendment_end
|
2636
|
+
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2637
|
+
attr_accessor :amendment_start
|
2638
|
+
# 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.
|
2639
|
+
attr_accessor :billing_cycle_anchor
|
2640
|
+
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
2641
|
+
attr_accessor :discount_actions
|
2642
|
+
# Changes to the subscription items during the amendment time span.
|
2643
|
+
attr_accessor :item_actions
|
2644
|
+
# Instructions for how to modify phase metadata
|
2645
|
+
attr_accessor :metadata_actions
|
2646
|
+
# 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`.
|
2647
|
+
attr_accessor :proration_behavior
|
2648
|
+
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2649
|
+
attr_accessor :set_pause_collection
|
2650
|
+
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
2651
|
+
attr_accessor :set_schedule_end
|
2652
|
+
# Settings related to subscription trials.
|
2653
|
+
attr_accessor :trial_settings
|
2654
|
+
|
2655
|
+
def initialize(
|
2656
|
+
amendment_end: nil,
|
2657
|
+
amendment_start: nil,
|
2658
|
+
billing_cycle_anchor: nil,
|
2659
|
+
discount_actions: nil,
|
2660
|
+
item_actions: nil,
|
2661
|
+
metadata_actions: nil,
|
2662
|
+
proration_behavior: nil,
|
2663
|
+
set_pause_collection: nil,
|
2664
|
+
set_schedule_end: nil,
|
2665
|
+
trial_settings: nil
|
2666
|
+
)
|
2667
|
+
@amendment_end = amendment_end
|
2668
|
+
@amendment_start = amendment_start
|
2669
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
2670
|
+
@discount_actions = discount_actions
|
2671
|
+
@item_actions = item_actions
|
2672
|
+
@metadata_actions = metadata_actions
|
2673
|
+
@proration_behavior = proration_behavior
|
2674
|
+
@set_pause_collection = set_pause_collection
|
2675
|
+
@set_schedule_end = set_schedule_end
|
2676
|
+
@trial_settings = trial_settings
|
2677
|
+
end
|
2678
|
+
end
|
2679
|
+
|
2680
|
+
class Prebilling < Stripe::RequestParams
|
2681
|
+
class BillFrom < Stripe::RequestParams
|
2682
|
+
class AmendmentStart < Stripe::RequestParams
|
2683
|
+
# 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.
|
2684
|
+
attr_accessor :index
|
2685
|
+
|
2686
|
+
def initialize(index: nil)
|
2687
|
+
@index = index
|
2688
|
+
end
|
2689
|
+
end
|
2690
|
+
# Start the prebilled period when a specified amendment begins.
|
2691
|
+
attr_accessor :amendment_start
|
2692
|
+
# Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2693
|
+
attr_accessor :timestamp
|
2694
|
+
# Select one of several ways to pass the `bill_from` value.
|
2695
|
+
attr_accessor :type
|
2696
|
+
|
2697
|
+
def initialize(amendment_start: nil, timestamp: nil, type: nil)
|
2698
|
+
@amendment_start = amendment_start
|
2699
|
+
@timestamp = timestamp
|
2700
|
+
@type = type
|
2701
|
+
end
|
2702
|
+
end
|
2703
|
+
|
2704
|
+
class BillUntil < Stripe::RequestParams
|
2705
|
+
class AmendmentEnd < Stripe::RequestParams
|
2706
|
+
# 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.
|
2707
|
+
attr_accessor :index
|
2708
|
+
|
2709
|
+
def initialize(index: nil)
|
2710
|
+
@index = index
|
2711
|
+
end
|
2712
|
+
end
|
2713
|
+
|
2714
|
+
class Duration < Stripe::RequestParams
|
2715
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2716
|
+
attr_accessor :interval
|
2717
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2718
|
+
attr_accessor :interval_count
|
2719
|
+
|
2720
|
+
def initialize(interval: nil, interval_count: nil)
|
2721
|
+
@interval = interval
|
2722
|
+
@interval_count = interval_count
|
2723
|
+
end
|
2724
|
+
end
|
2725
|
+
# End the prebilled period when a specified amendment ends.
|
2726
|
+
attr_accessor :amendment_end
|
2727
|
+
# Time span for prebilling, starting from `bill_from`.
|
2728
|
+
attr_accessor :duration
|
2729
|
+
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2730
|
+
attr_accessor :timestamp
|
2731
|
+
# Select one of several ways to pass the `bill_until` value.
|
2732
|
+
attr_accessor :type
|
2733
|
+
|
2734
|
+
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
2735
|
+
@amendment_end = amendment_end
|
2736
|
+
@duration = duration
|
2737
|
+
@timestamp = timestamp
|
2738
|
+
@type = type
|
2739
|
+
end
|
2740
|
+
end
|
2741
|
+
# The beginning of the prebilled time period. The default value is `now`.
|
2742
|
+
attr_accessor :bill_from
|
2743
|
+
# The end of the prebilled time period.
|
2744
|
+
attr_accessor :bill_until
|
2745
|
+
# When the prebilling invoice should be created. The default value is `now`.
|
2746
|
+
attr_accessor :invoice_at
|
2747
|
+
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
2748
|
+
attr_accessor :update_behavior
|
2749
|
+
|
2750
|
+
def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
|
2751
|
+
@bill_from = bill_from
|
2752
|
+
@bill_until = bill_until
|
2753
|
+
@invoice_at = invoice_at
|
2754
|
+
@update_behavior = update_behavior
|
2755
|
+
end
|
2756
|
+
end
|
2757
|
+
|
2758
|
+
class ScheduleSettings < Stripe::RequestParams
|
2759
|
+
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2760
|
+
attr_accessor :end_behavior
|
2761
|
+
|
2762
|
+
def initialize(end_behavior: nil)
|
2763
|
+
@end_behavior = end_behavior
|
2764
|
+
end
|
2765
|
+
end
|
2766
|
+
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
2767
|
+
attr_accessor :amendments
|
2768
|
+
# Specifies which fields in the response should be expanded.
|
2769
|
+
attr_accessor :expand
|
2770
|
+
# Provide any time periods to bill in advance.
|
2771
|
+
attr_accessor :prebilling
|
2772
|
+
# In cases where the amendment changes the currently active phase,
|
2773
|
+
# specifies if and how to prorate at the time of the request.
|
2774
|
+
attr_accessor :proration_behavior
|
2775
|
+
# Changes to apply to the subscription schedule.
|
2776
|
+
attr_accessor :schedule_settings
|
2777
|
+
|
2778
|
+
def initialize(
|
2779
|
+
amendments: nil,
|
2780
|
+
expand: nil,
|
2781
|
+
prebilling: nil,
|
2782
|
+
proration_behavior: nil,
|
2783
|
+
schedule_settings: nil
|
2784
|
+
)
|
2785
|
+
@amendments = amendments
|
2786
|
+
@expand = expand
|
2787
|
+
@prebilling = prebilling
|
1521
2788
|
@proration_behavior = proration_behavior
|
2789
|
+
@schedule_settings = schedule_settings
|
1522
2790
|
end
|
1523
2791
|
end
|
1524
2792
|
|
@@ -1550,6 +2818,8 @@ module Stripe
|
|
1550
2818
|
end
|
1551
2819
|
# ID of the Connect Application that created the schedule.
|
1552
2820
|
attr_reader :application
|
2821
|
+
# 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.
|
2822
|
+
attr_reader :billing_behavior
|
1553
2823
|
# The billing mode of the subscription.
|
1554
2824
|
attr_reader :billing_mode
|
1555
2825
|
# Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
|
@@ -1562,12 +2832,16 @@ module Stripe
|
|
1562
2832
|
attr_reader :current_phase
|
1563
2833
|
# ID of the customer who owns the subscription schedule.
|
1564
2834
|
attr_reader :customer
|
2835
|
+
# ID of the account who owns the subscription schedule.
|
2836
|
+
attr_reader :customer_account
|
1565
2837
|
# Attribute for field default_settings
|
1566
2838
|
attr_reader :default_settings
|
1567
2839
|
# 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
2840
|
attr_reader :end_behavior
|
1569
2841
|
# Unique identifier for the object.
|
1570
2842
|
attr_reader :id
|
2843
|
+
# Details of the most recent price migration that failed for the subscription schedule.
|
2844
|
+
attr_reader :last_price_migration_error
|
1571
2845
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
1572
2846
|
attr_reader :livemode
|
1573
2847
|
# 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 +2850,8 @@ module Stripe
|
|
1576
2850
|
attr_reader :object
|
1577
2851
|
# Configuration for the subscription schedule's phases.
|
1578
2852
|
attr_reader :phases
|
2853
|
+
# Time period and invoice for a Subscription billed in advance.
|
2854
|
+
attr_reader :prebilling
|
1579
2855
|
# Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
|
1580
2856
|
attr_reader :released_at
|
1581
2857
|
# ID of the subscription once managed by the subscription schedule (if it is released).
|
@@ -1587,6 +2863,26 @@ module Stripe
|
|
1587
2863
|
# ID of the test clock this subscription schedule belongs to.
|
1588
2864
|
attr_reader :test_clock
|
1589
2865
|
|
2866
|
+
# Amends an existing subscription schedule.
|
2867
|
+
def amend(params = {}, opts = {})
|
2868
|
+
request_stripe_object(
|
2869
|
+
method: :post,
|
2870
|
+
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
|
2871
|
+
params: params,
|
2872
|
+
opts: opts
|
2873
|
+
)
|
2874
|
+
end
|
2875
|
+
|
2876
|
+
# Amends an existing subscription schedule.
|
2877
|
+
def self.amend(schedule, params = {}, opts = {})
|
2878
|
+
request_stripe_object(
|
2879
|
+
method: :post,
|
2880
|
+
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
2881
|
+
params: params,
|
2882
|
+
opts: opts
|
2883
|
+
)
|
2884
|
+
end
|
2885
|
+
|
1590
2886
|
# 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
2887
|
def cancel(params = {}, opts = {})
|
1592
2888
|
request_stripe_object(
|
@@ -1656,5 +2952,20 @@ module Stripe
|
|
1656
2952
|
opts: opts
|
1657
2953
|
)
|
1658
2954
|
end
|
2955
|
+
|
2956
|
+
def self.inner_class_types
|
2957
|
+
@inner_class_types = {
|
2958
|
+
billing_mode: BillingMode,
|
2959
|
+
current_phase: CurrentPhase,
|
2960
|
+
default_settings: DefaultSettings,
|
2961
|
+
last_price_migration_error: LastPriceMigrationError,
|
2962
|
+
phases: Phase,
|
2963
|
+
prebilling: Prebilling,
|
2964
|
+
}
|
2965
|
+
end
|
2966
|
+
|
2967
|
+
def self.field_remappings
|
2968
|
+
@field_remappings = {}
|
2969
|
+
end
|
1659
2970
|
end
|
1660
2971
|
end
|