stripe 15.4.0.pre.beta.2 → 15.4.0
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 +686 -1602
- data/OPENAPI_VERSION +1 -1
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +0 -32
- data/lib/stripe/api_version.rb +2 -1
- data/lib/stripe/errors.rb +0 -60
- data/lib/stripe/event_types.rb +0 -102
- data/lib/stripe/object_types.rb +0 -50
- data/lib/stripe/resources/account.rb +6 -658
- data/lib/stripe/resources/account_link.rb +3 -1
- data/lib/stripe/resources/account_session.rb +52 -256
- data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -2
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -4
- data/lib/stripe/resources/billing/credit_grant.rb +1 -11
- data/lib/stripe/resources/billing_portal/configuration.rb +46 -2
- data/lib/stripe/resources/billing_portal/session.rb +0 -6
- data/lib/stripe/resources/card.rb +0 -2
- data/lib/stripe/resources/cash_balance.rb +0 -2
- data/lib/stripe/resources/charge.rb +7 -1543
- data/lib/stripe/resources/checkout/session.rb +24 -320
- data/lib/stripe/resources/confirmation_token.rb +3 -173
- data/lib/stripe/resources/coupon.rb +1 -30
- data/lib/stripe/resources/credit_note.rb +0 -6
- data/lib/stripe/resources/credit_note_line_item.rb +0 -9
- data/lib/stripe/resources/customer.rb +1 -3
- data/lib/stripe/resources/customer_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_session.rb +1 -6
- data/lib/stripe/resources/discount.rb +0 -2
- data/lib/stripe/resources/dispute.rb +1 -3
- data/lib/stripe/resources/event.rb +14 -57
- data/lib/stripe/resources/financial_connections/account.rb +1 -22
- data/lib/stripe/resources/financial_connections/session.rb +2 -62
- data/lib/stripe/resources/identity/verification_session.rb +0 -10
- data/lib/stripe/resources/invoice.rb +40 -1071
- data/lib/stripe/resources/invoice_item.rb +3 -79
- data/lib/stripe/resources/invoice_line_item.rb +1 -55
- data/lib/stripe/resources/invoice_payment.rb +53 -2
- data/lib/stripe/resources/issuing/cardholder.rb +1 -2
- data/lib/stripe/resources/issuing/transaction.rb +0 -6
- data/lib/stripe/resources/line_item.rb +0 -37
- data/lib/stripe/resources/mandate.rb +0 -24
- data/lib/stripe/resources/payment_intent.rb +297 -5243
- data/lib/stripe/resources/payment_link.rb +83 -5
- data/lib/stripe/resources/payment_method.rb +5 -196
- data/lib/stripe/resources/payment_method_configuration.rb +0 -295
- data/lib/stripe/resources/payout.rb +0 -6
- data/lib/stripe/resources/price.rb +0 -30
- data/lib/stripe/resources/promotion_code.rb +0 -10
- data/lib/stripe/resources/quote.rb +8 -2039
- data/lib/stripe/resources/radar/value_list.rb +2 -2
- data/lib/stripe/resources/refund.rb +1 -10
- data/lib/stripe/resources/review.rb +2 -2
- data/lib/stripe/resources/setup_attempt.rb +1 -22
- data/lib/stripe/resources/setup_intent.rb +9 -578
- data/lib/stripe/resources/source.rb +0 -29
- data/lib/stripe/resources/subscription.rb +11 -290
- data/lib/stripe/resources/subscription_item.rb +5 -86
- data/lib/stripe/resources/subscription_schedule.rb +45 -1010
- data/lib/stripe/resources/tax/registration.rb +408 -30
- data/lib/stripe/resources/tax_id.rb +2 -12
- data/lib/stripe/resources/terminal/configuration.rb +196 -0
- data/lib/stripe/resources/terminal/reader.rb +0 -8
- data/lib/stripe/resources/transfer.rb +0 -6
- data/lib/stripe/resources/treasury/financial_account.rb +3 -22
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
- data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
- data/lib/stripe/resources/treasury/received_credit.rb +1 -38
- data/lib/stripe/resources/treasury/received_debit.rb +1 -40
- data/lib/stripe/resources.rb +0 -106
- data/lib/stripe/services/account_link_service.rb +3 -1
- data/lib/stripe/services/account_service.rb +4 -565
- data/lib/stripe/services/account_session_service.rb +35 -226
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
- data/lib/stripe/services/billing/credit_grant_service.rb +1 -9
- data/lib/stripe/services/billing_portal/configuration_service.rb +36 -2
- data/lib/stripe/services/billing_portal/session_service.rb +0 -4
- data/lib/stripe/services/charge_service.rb +0 -1418
- data/lib/stripe/services/checkout/session_service.rb +16 -241
- data/lib/stripe/services/coupon_service.rb +1 -17
- data/lib/stripe/services/credit_note_service.rb +0 -4
- data/lib/stripe/services/customer_session_service.rb +1 -4
- data/lib/stripe/services/financial_connections/account_service.rb +2 -7
- data/lib/stripe/services/financial_connections/session_service.rb +2 -34
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/identity/verification_session_service.rb +0 -8
- data/lib/stripe/services/invoice_item_service.rb +3 -75
- data/lib/stripe/services/invoice_line_item_service.rb +1 -33
- data/lib/stripe/services/invoice_payment_service.rb +83 -0
- data/lib/stripe/services/invoice_service.rb +40 -1022
- data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
- data/lib/stripe/services/issuing/transaction_service.rb +0 -4
- data/lib/stripe/services/issuing_service.rb +1 -5
- data/lib/stripe/services/payment_intent_service.rb +399 -4882
- data/lib/stripe/services/payment_link_service.rb +81 -5
- data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
- data/lib/stripe/services/payment_method_service.rb +2 -121
- data/lib/stripe/services/payout_service.rb +0 -4
- data/lib/stripe/services/price_service.rb +0 -19
- data/lib/stripe/services/promotion_code_service.rb +0 -8
- data/lib/stripe/services/quote_service.rb +9 -1724
- data/lib/stripe/services/radar/value_list_service.rb +1 -1
- data/lib/stripe/services/setup_intent_service.rb +9 -538
- data/lib/stripe/services/subscription_item_service.rb +5 -77
- data/lib/stripe/services/subscription_schedule_service.rb +45 -914
- data/lib/stripe/services/subscription_service.rb +11 -251
- data/lib/stripe/services/tax/registration_service.rb +360 -30
- data/lib/stripe/services/tax_id_service.rb +2 -8
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/configuration_service.rb +152 -0
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -97
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
- data/lib/stripe/services/transfer_service.rb +0 -4
- data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
- data/lib/stripe/services/treasury/financial_account_service.rb +2 -16
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
- data/lib/stripe/services/v1_services.rb +2 -11
- data/lib/stripe/services/v2/core_service.rb +1 -4
- data/lib/stripe/services/v2_services.rb +1 -4
- data/lib/stripe/services.rb +1 -53
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/util.rb +1 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -53
- data/rbi/stripe/resources/account.rbi +4995 -0
- data/rbi/stripe/resources/account_link.rbi +76 -0
- data/rbi/stripe/resources/account_session.rbi +1074 -0
- data/rbi/stripe/resources/apple_pay_domain.rbi +88 -0
- data/rbi/stripe/resources/application.rbi +20 -0
- data/rbi/stripe/resources/application_fee.rbi +118 -0
- data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
- data/rbi/stripe/resources/apps/secret.rbi +195 -0
- data/rbi/stripe/resources/balance.rbi +235 -0
- data/rbi/stripe/resources/balance_transaction.rbi +147 -0
- data/rbi/stripe/resources/bank_account.rbi +127 -0
- data/rbi/stripe/resources/billing/alert.rbi +201 -0
- data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
- data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
- data/rbi/stripe/resources/billing/meter.rbi +226 -0
- data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
- data/rbi/stripe/resources/billing_portal/configuration.rbi +703 -0
- data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
- data/rbi/stripe/resources/capability.rbi +125 -0
- data/rbi/stripe/resources/card.rbi +125 -0
- data/rbi/stripe/resources/cash_balance.rbi +32 -0
- data/rbi/stripe/resources/charge.rbi +2089 -0
- data/rbi/stripe/resources/checkout/session.rbi +4095 -0
- data/rbi/stripe/resources/climate/order.rbi +245 -0
- data/rbi/stripe/resources/climate/product.rbi +75 -0
- data/rbi/stripe/resources/climate/supplier.rbi +72 -0
- data/rbi/stripe/resources/confirmation_token.rbi +1818 -0
- data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
- data/rbi/stripe/resources/country_spec.rbi +85 -0
- data/rbi/stripe/resources/coupon.rbi +250 -0
- data/rbi/stripe/resources/credit_note.rbi +752 -0
- data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
- data/rbi/stripe/resources/customer.rbi +1005 -0
- data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
- data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
- data/rbi/stripe/resources/customer_session.rbi +200 -0
- data/rbi/stripe/resources/discount.rbi +53 -0
- data/rbi/stripe/resources/dispute.rbi +761 -0
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
- data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
- data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
- data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
- data/rbi/stripe/resources/event.rbi +137 -0
- data/rbi/stripe/resources/exchange_rate.rbi +66 -0
- data/rbi/stripe/resources/file.rbi +143 -0
- data/rbi/stripe/resources/file_link.rbi +141 -0
- data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
- data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
- data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
- data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
- data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
- data/rbi/stripe/resources/forwarding/request.rbi +216 -0
- data/rbi/stripe/resources/funding_instructions.rbi +437 -0
- data/rbi/stripe/resources/identity/verification_report.rbi +360 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +564 -0
- data/rbi/stripe/resources/invoice.rbi +3858 -0
- data/rbi/stripe/resources/invoice_item.rbi +470 -0
- data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
- data/rbi/stripe/resources/invoice_payment.rbi +121 -0
- data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
- data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
- data/rbi/stripe/resources/issuing/card.rbi +741 -0
- data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
- data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
- data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
- data/rbi/stripe/resources/issuing/token.rbi +226 -0
- data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
- data/rbi/stripe/resources/line_item.rbi +72 -0
- data/rbi/stripe/resources/login_link.rbi +19 -0
- data/rbi/stripe/resources/mandate.rbi +191 -0
- data/rbi/stripe/resources/payment_intent.rbi +9997 -0
- data/rbi/stripe/resources/payment_link.rbi +1893 -0
- data/rbi/stripe/resources/payment_method.rbi +1770 -0
- data/rbi/stripe/resources/payment_method_configuration.rbi +3550 -0
- data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
- data/rbi/stripe/resources/payout.rbi +300 -0
- data/rbi/stripe/resources/person.rbi +401 -0
- data/rbi/stripe/resources/plan.rbi +371 -0
- data/rbi/stripe/resources/price.rbi +694 -0
- data/rbi/stripe/resources/product.rbi +555 -0
- data/rbi/stripe/resources/product_feature.rbi +26 -0
- data/rbi/stripe/resources/promotion_code.rbi +261 -0
- data/rbi/stripe/resources/quote.rbi +1145 -0
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
- data/rbi/stripe/resources/radar/value_list.rbi +168 -0
- data/rbi/stripe/resources/radar/value_list_item.rbi +129 -0
- data/rbi/stripe/resources/refund.rbi +523 -0
- data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
- data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
- data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
- data/rbi/stripe/resources/reversal.rbi +51 -0
- data/rbi/stripe/resources/review.rbi +154 -0
- data/rbi/stripe/resources/setup_attempt.rbi +477 -0
- data/rbi/stripe/resources/setup_intent.rbi +3978 -0
- data/rbi/stripe/resources/shipping_rate.rbi +305 -0
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
- data/rbi/stripe/resources/source.rbi +1496 -0
- data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
- data/rbi/stripe/resources/source_transaction.rbi +127 -0
- data/rbi/stripe/resources/subscription.rbi +2080 -0
- data/rbi/stripe/resources/subscription_item.rbi +404 -0
- data/rbi/stripe/resources/subscription_schedule.rbi +1673 -0
- data/rbi/stripe/resources/tax/calculation.rbi +478 -0
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +91 -0
- data/rbi/stripe/resources/tax/registration.rbi +3216 -0
- data/rbi/stripe/resources/tax/settings.rbi +141 -0
- data/rbi/stripe/resources/tax/transaction.rbi +351 -0
- data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
- data/rbi/stripe/resources/tax_code.rbi +44 -0
- data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
- data/rbi/stripe/resources/tax_id.rbi +165 -0
- data/rbi/stripe/resources/tax_rate.rbi +239 -0
- data/rbi/stripe/resources/terminal/configuration.rbi +1595 -0
- data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
- data/rbi/stripe/resources/terminal/location.rbi +222 -0
- data/rbi/stripe/resources/terminal/reader.rbi +994 -0
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +132 -0
- data/rbi/stripe/resources/token.rbi +1283 -0
- data/rbi/stripe/resources/topup.rbi +222 -0
- data/rbi/stripe/resources/transfer.rbi +199 -0
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
- data/rbi/stripe/resources/treasury/financial_account.rbi +869 -0
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
- data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
- data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
- data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
- data/rbi/stripe/resources/v2/amount.rbi +14 -0
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
- data/rbi/stripe/resources/v2/event.rbi +48 -0
- data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
- data/rbi/stripe/resources/webhook_endpoint.rbi +168 -0
- data/rbi/stripe/services/account_capability_service.rbi +51 -0
- data/{lib/stripe/services/external_account_service.rb → rbi/stripe/services/account_external_account_service.rbi} +122 -135
- data/rbi/stripe/services/account_link_service.rbi +60 -0
- data/rbi/stripe/services/account_login_link_service.rbi +22 -0
- data/rbi/stripe/services/account_person_service.rbi +1011 -0
- data/rbi/stripe/services/account_service.rbi +4281 -0
- data/rbi/stripe/services/account_session_service.rbi +685 -0
- data/rbi/stripe/services/apple_pay_domain_service.rbi +76 -0
- data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
- data/rbi/stripe/services/application_fee_service.rbi +78 -0
- data/rbi/stripe/services/apps/secret_service.rbi +151 -0
- data/rbi/stripe/services/apps_service.rbi +9 -0
- data/rbi/stripe/services/balance_service.rbi +21 -0
- data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
- data/rbi/stripe/services/billing/alert_service.rbi +152 -0
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
- data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
- data/rbi/stripe/services/billing/meter_service.rbi +163 -0
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +555 -0
- data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
- data/rbi/stripe/services/billing_portal_service.rbi +10 -0
- data/rbi/stripe/services/billing_service.rbi +15 -0
- data/rbi/stripe/services/charge_service.rbi +448 -0
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
- data/rbi/stripe/services/checkout/session_service.rbi +2690 -0
- data/rbi/stripe/services/checkout_service.rbi +9 -0
- data/rbi/stripe/services/climate/order_service.rbi +142 -0
- data/rbi/stripe/services/climate/product_service.rbi +46 -0
- data/{lib/stripe/services/financial_connections/institution_service.rb → rbi/stripe/services/climate/supplier_service.rbi} +25 -36
- data/rbi/stripe/services/climate_service.rbi +11 -0
- data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
- data/rbi/stripe/services/country_spec_service.rbi +44 -0
- data/rbi/stripe/services/coupon_service.rbi +194 -0
- data/{lib/stripe/services/quote_preview_invoice_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
- data/rbi/stripe/services/credit_note_service.rbi +415 -0
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
- data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
- data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
- data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
- data/rbi/stripe/services/customer_service.rbi +647 -0
- data/rbi/stripe/services/customer_session_service.rbi +116 -0
- data/rbi/stripe/services/customer_tax_id_service.rbi +70 -0
- data/rbi/stripe/services/dispute_service.rbi +424 -0
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
- data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
- data/rbi/stripe/services/entitlements_service.rbi +10 -0
- data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
- data/rbi/stripe/services/event_service.rbi +83 -0
- data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
- data/rbi/stripe/services/file_link_service.rbi +124 -0
- data/rbi/stripe/services/file_service.rbi +116 -0
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
- data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
- data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
- data/rbi/stripe/services/financial_connections_service.rbi +11 -0
- data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
- data/rbi/stripe/services/forwarding_service.rbi +9 -0
- data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
- data/rbi/stripe/services/identity/verification_session_service.rbi +339 -0
- data/rbi/stripe/services/identity_service.rbi +10 -0
- data/rbi/stripe/services/invoice_item_service.rbi +366 -0
- data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
- data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
- data/rbi/stripe/services/invoice_service.rbi +3027 -0
- data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
- data/rbi/stripe/services/issuing/card_service.rbi +495 -0
- data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
- data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
- data/rbi/stripe/services/issuing/token_service.rbi +99 -0
- data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
- data/rbi/stripe/services/issuing_service.rbi +16 -0
- data/rbi/stripe/services/mandate_service.rbi +20 -0
- data/rbi/stripe/services/payment_intent_service.rbi +7994 -0
- data/{lib/stripe/services/payment_intent_amount_details_line_item_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/payment_link_service.rbi +1441 -0
- data/rbi/stripe/services/payment_method_configuration_service.rbi +2487 -0
- data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
- data/rbi/stripe/services/payment_method_service.rbi +781 -0
- data/rbi/stripe/services/payout_service.rbi +205 -0
- data/rbi/stripe/services/plan_service.rbi +282 -0
- data/rbi/stripe/services/price_service.rbi +546 -0
- data/rbi/stripe/services/product_feature_service.rbi +67 -0
- data/rbi/stripe/services/product_service.rbi +477 -0
- data/rbi/stripe/services/promotion_code_service.rbi +214 -0
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
- data/{lib/stripe/services/order_line_item_service.rb → rbi/stripe/services/quote_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/quote_service.rbi +699 -0
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
- data/rbi/stripe/services/radar/value_list_item_service.rbi +109 -0
- data/rbi/stripe/services/radar/value_list_service.rbi +141 -0
- data/rbi/stripe/services/radar_service.rbi +11 -0
- data/rbi/stripe/services/refund_service.rbi +185 -0
- data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
- data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
- data/rbi/stripe/services/reporting_service.rbi +10 -0
- data/rbi/stripe/services/review_service.rbi +84 -0
- data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
- data/rbi/stripe/services/setup_intent_service.rbi +3709 -0
- data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
- data/rbi/stripe/services/sigma_service.rbi +9 -0
- data/rbi/stripe/services/source_service.rbi +663 -0
- data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
- data/rbi/stripe/services/subscription_item_service.rbi +350 -0
- data/rbi/stripe/services/subscription_schedule_service.rbi +1333 -0
- data/rbi/stripe/services/subscription_service.rbi +1684 -0
- data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/calculation_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/calculation_service.rbi +234 -0
- data/rbi/stripe/services/tax/registration_service.rbi +2278 -0
- data/rbi/stripe/services/tax/settings_service.rbi +93 -0
- data/{lib/stripe/services/privacy/redaction_job_validation_error_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
- data/rbi/stripe/services/tax_code_service.rbi +44 -0
- data/rbi/stripe/services/tax_id_service.rbi +110 -0
- data/rbi/stripe/services/tax_rate_service.rbi +185 -0
- data/rbi/stripe/services/tax_service.rbi +12 -0
- data/rbi/stripe/services/terminal/configuration_service.rbi +1286 -0
- data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
- data/rbi/stripe/services/terminal/location_service.rbi +182 -0
- data/rbi/stripe/services/terminal/reader_service.rbi +540 -0
- data/rbi/stripe/services/terminal_service.rbi +12 -0
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +746 -0
- data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
- data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
- data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +93 -0
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
- data/rbi/stripe/services/test_helpers_service.rbi +15 -0
- data/rbi/stripe/services/token_service.rbi +1257 -0
- data/rbi/stripe/services/topup_service.rbi +176 -0
- data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
- data/rbi/stripe/services/transfer_service.rbi +152 -0
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
- data/rbi/stripe/services/treasury/financial_account_service.rbi +566 -0
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
- data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
- data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
- data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
- data/rbi/stripe/services/treasury_service.rbi +18 -0
- data/rbi/stripe/services/v1_services.rbi +77 -0
- data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +18 -0
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
- data/rbi/stripe/services/v2/billing_service.rbi +14 -0
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +192 -0
- data/rbi/stripe/services/v2/core/event_service.rbi +36 -0
- data/rbi/stripe/services/v2/core_service.rbi +12 -0
- data/rbi/stripe/services/v2_services.rbi +10 -0
- data/rbi/stripe/services/webhook_endpoint_service.rbi +129 -0
- data/stripe.gemspec +1 -4
- metadata +325 -164
- data/lib/stripe/events/v2_core_account_closed_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_created_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_link_completed_event.rb +0 -13
- data/lib/stripe/events/v2_core_account_person_created_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_person_deleted_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_person_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
- data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_transaction_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +0 -21
- data/lib/stripe/events/v2_off_session_payment_requires_capture_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +0 -21
- data/lib/stripe/resources/account_notice.rb +0 -123
- data/lib/stripe/resources/balance_settings.rb +0 -105
- data/lib/stripe/resources/capital/financing_offer.rb +0 -179
- data/lib/stripe/resources/capital/financing_summary.rb +0 -55
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -114
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
- data/lib/stripe/resources/financial_connections/institution.rb +0 -92
- data/lib/stripe/resources/fx_quote.rb +0 -184
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
- data/lib/stripe/resources/issuing/settlement.rb +0 -53
- data/lib/stripe/resources/margin.rb +0 -115
- data/lib/stripe/resources/order.rb +0 -2958
- data/lib/stripe/resources/payment_attempt_record.rb +0 -1099
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -72
- data/lib/stripe/resources/payment_record.rb +0 -1628
- data/lib/stripe/resources/privacy/redaction_job.rb +0 -298
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -33
- data/lib/stripe/resources/quote_line.rb +0 -274
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -663
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -371
- data/lib/stripe/resources/tax/association.rb +0 -66
- data/lib/stripe/resources/tax/form.rb +0 -211
- data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
- data/lib/stripe/resources/v2/core/account.rb +0 -1919
- data/lib/stripe/resources/v2/core/account_link.rb +0 -56
- data/lib/stripe/resources/v2/core/person.rb +0 -276
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -74
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -39
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -20
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -22
- data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -51
- data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -77
- data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -68
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -94
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -129
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -82
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -45
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -117
- data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -75
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -49
- data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -122
- data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -84
- data/lib/stripe/resources/v2/money_management/transaction.rb +0 -78
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -68
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +0 -72
- data/lib/stripe/services/account_notice_service.rb +0 -101
- data/lib/stripe/services/balance_settings_service.rb +0 -96
- data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
- data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
- data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
- data/lib/stripe/services/capital_service.rb +0 -15
- data/lib/stripe/services/fx_quote_service.rb +0 -123
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
- data/lib/stripe/services/margin_service.rb +0 -119
- data/lib/stripe/services/order_service.rb +0 -2388
- data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
- data/lib/stripe/services/payment_record_service.rb +0 -542
- data/lib/stripe/services/privacy/redaction_job_service.rb +0 -240
- data/lib/stripe/services/privacy_service.rb +0 -13
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
- data/lib/stripe/services/tax/association_service.rb +0 -31
- data/lib/stripe/services/tax/form_service.rb +0 -100
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
- data/lib/stripe/services/v2/core/account_link_service.rb +0 -76
- data/lib/stripe/services/v2/core/account_service.rb +0 -4486
- data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1045
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -130
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -107
- data/lib/stripe/services/v2/core/vault_service.rb +0 -18
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -74
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -116
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -82
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -125
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -95
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -199
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -235
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -172
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -90
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -70
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -43
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -69
- data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -73
- data/lib/stripe/services/v2/money_management_service.rb +0 -31
- data/lib/stripe/services/v2/payment_service.rb +0 -15
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +0 -137
- data/lib/stripe/services/v2/test_helper_service.rb +0 -15
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -49
- data/rbi/stripe.rbi +0 -194513
@@ -95,36 +95,13 @@ module Stripe
|
|
95
95
|
attr_reader :transfer_data
|
96
96
|
end
|
97
97
|
|
98
|
-
class LastPriceMigrationError < Stripe::StripeObject
|
99
|
-
class FailedTransition < Stripe::StripeObject
|
100
|
-
# The original price to be migrated.
|
101
|
-
attr_reader :source_price
|
102
|
-
# The intended resulting price of the migration.
|
103
|
-
attr_reader :target_price
|
104
|
-
end
|
105
|
-
# The time at which the price migration encountered an error.
|
106
|
-
attr_reader :errored_at
|
107
|
-
# The involved price pairs in each failed transition.
|
108
|
-
attr_reader :failed_transitions
|
109
|
-
# The type of error encountered by the price migration.
|
110
|
-
attr_reader :type
|
111
|
-
end
|
112
|
-
|
113
98
|
class Phase < Stripe::StripeObject
|
114
99
|
class AddInvoiceItem < Stripe::StripeObject
|
115
100
|
class Discount < Stripe::StripeObject
|
116
|
-
class DiscountEnd < Stripe::StripeObject
|
117
|
-
# The discount end timestamp.
|
118
|
-
attr_reader :timestamp
|
119
|
-
# The discount end type.
|
120
|
-
attr_reader :type
|
121
|
-
end
|
122
101
|
# ID of the coupon to create a new discount for.
|
123
102
|
attr_reader :coupon
|
124
103
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
125
104
|
attr_reader :discount
|
126
|
-
# Details to determine how long the discount should be applied for.
|
127
|
-
attr_reader :discount_end
|
128
105
|
# ID of the promotion code to create a new discount for.
|
129
106
|
attr_reader :promotion_code
|
130
107
|
end
|
@@ -161,18 +138,10 @@ module Stripe
|
|
161
138
|
end
|
162
139
|
|
163
140
|
class Discount < Stripe::StripeObject
|
164
|
-
class DiscountEnd < Stripe::StripeObject
|
165
|
-
# The discount end timestamp.
|
166
|
-
attr_reader :timestamp
|
167
|
-
# The discount end type.
|
168
|
-
attr_reader :type
|
169
|
-
end
|
170
141
|
# ID of the coupon to create a new discount for.
|
171
142
|
attr_reader :coupon
|
172
143
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
173
144
|
attr_reader :discount
|
174
|
-
# Details to determine how long the discount should be applied for.
|
175
|
-
attr_reader :discount_end
|
176
145
|
# ID of the promotion code to create a new discount for.
|
177
146
|
attr_reader :promotion_code
|
178
147
|
end
|
@@ -199,28 +168,13 @@ module Stripe
|
|
199
168
|
end
|
200
169
|
|
201
170
|
class Discount < Stripe::StripeObject
|
202
|
-
class DiscountEnd < Stripe::StripeObject
|
203
|
-
# The discount end timestamp.
|
204
|
-
attr_reader :timestamp
|
205
|
-
# The discount end type.
|
206
|
-
attr_reader :type
|
207
|
-
end
|
208
171
|
# ID of the coupon to create a new discount for.
|
209
172
|
attr_reader :coupon
|
210
173
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
211
174
|
attr_reader :discount
|
212
|
-
# Details to determine how long the discount should be applied for.
|
213
|
-
attr_reader :discount_end
|
214
175
|
# ID of the promotion code to create a new discount for.
|
215
176
|
attr_reader :promotion_code
|
216
177
|
end
|
217
|
-
|
218
|
-
class Trial < Stripe::StripeObject
|
219
|
-
# List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
|
220
|
-
attr_reader :converts_to
|
221
|
-
# Determines the type of trial for this item.
|
222
|
-
attr_reader :type
|
223
|
-
end
|
224
178
|
# Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
225
179
|
attr_reader :billing_thresholds
|
226
180
|
# The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
|
@@ -235,13 +189,6 @@ module Stripe
|
|
235
189
|
attr_reader :quantity
|
236
190
|
# 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`.
|
237
191
|
attr_reader :tax_rates
|
238
|
-
# Options that configure the trial on the subscription item.
|
239
|
-
attr_reader :trial
|
240
|
-
end
|
241
|
-
|
242
|
-
class PauseCollection < Stripe::StripeObject
|
243
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
244
|
-
attr_reader :behavior
|
245
192
|
end
|
246
193
|
|
247
194
|
class TransferData < Stripe::StripeObject
|
@@ -250,15 +197,6 @@ module Stripe
|
|
250
197
|
# The account where funds from the payment will be transferred to upon payment success.
|
251
198
|
attr_reader :destination
|
252
199
|
end
|
253
|
-
|
254
|
-
class TrialSettings < Stripe::StripeObject
|
255
|
-
class EndBehavior < Stripe::StripeObject
|
256
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
257
|
-
attr_reader :prorate_up_front
|
258
|
-
end
|
259
|
-
# Defines how the subscription should behave when a trial ends.
|
260
|
-
attr_reader :end_behavior
|
261
|
-
end
|
262
200
|
# A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
|
263
201
|
attr_reader :add_invoice_items
|
264
202
|
# 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.
|
@@ -291,31 +229,14 @@ module Stripe
|
|
291
229
|
attr_reader :metadata
|
292
230
|
# 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.
|
293
231
|
attr_reader :on_behalf_of
|
294
|
-
# 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).
|
295
|
-
attr_reader :pause_collection
|
296
232
|
# When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
|
297
233
|
attr_reader :proration_behavior
|
298
234
|
# The start of this phase of the subscription schedule.
|
299
235
|
attr_reader :start_date
|
300
236
|
# 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.
|
301
237
|
attr_reader :transfer_data
|
302
|
-
# Specify behavior of the trial when crossing schedule phase boundaries
|
303
|
-
attr_reader :trial_continuation
|
304
238
|
# When the trial ends within the phase.
|
305
239
|
attr_reader :trial_end
|
306
|
-
# Settings related to any trials on the subscription during this phase.
|
307
|
-
attr_reader :trial_settings
|
308
|
-
end
|
309
|
-
|
310
|
-
class Prebilling < Stripe::StripeObject
|
311
|
-
# ID of the prebilling invoice.
|
312
|
-
attr_reader :invoice
|
313
|
-
# The end of the last period for which the invoice pre-bills.
|
314
|
-
attr_reader :period_end
|
315
|
-
# The start of the first period for which the invoice pre-bills.
|
316
|
-
attr_reader :period_start
|
317
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
|
318
|
-
attr_reader :update_behavior
|
319
240
|
end
|
320
241
|
|
321
242
|
class ListParams < Stripe::RequestParams
|
@@ -398,8 +319,6 @@ module Stripe
|
|
398
319
|
attr_accessor :created
|
399
320
|
# Only return subscription schedules for the given customer.
|
400
321
|
attr_accessor :customer
|
401
|
-
# Only return subscription schedules for the given account.
|
402
|
-
attr_accessor :customer_account
|
403
322
|
# 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.
|
404
323
|
attr_accessor :ending_before
|
405
324
|
# Specifies which fields in the response should be expanded.
|
@@ -418,7 +337,6 @@ module Stripe
|
|
418
337
|
completed_at: nil,
|
419
338
|
created: nil,
|
420
339
|
customer: nil,
|
421
|
-
customer_account: nil,
|
422
340
|
ending_before: nil,
|
423
341
|
expand: nil,
|
424
342
|
limit: nil,
|
@@ -430,7 +348,6 @@ module Stripe
|
|
430
348
|
@completed_at = completed_at
|
431
349
|
@created = created
|
432
350
|
@customer = customer
|
433
|
-
@customer_account = customer_account
|
434
351
|
@ending_before = ending_before
|
435
352
|
@expand = expand
|
436
353
|
@limit = limit
|
@@ -442,7 +359,7 @@ module Stripe
|
|
442
359
|
|
443
360
|
class CreateParams < Stripe::RequestParams
|
444
361
|
class BillingMode < Stripe::RequestParams
|
445
|
-
#
|
362
|
+
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
446
363
|
attr_accessor :type
|
447
364
|
|
448
365
|
def initialize(type: nil)
|
@@ -572,44 +489,16 @@ module Stripe
|
|
572
489
|
class Phase < Stripe::RequestParams
|
573
490
|
class AddInvoiceItem < Stripe::RequestParams
|
574
491
|
class Discount < Stripe::RequestParams
|
575
|
-
class DiscountEnd < Stripe::RequestParams
|
576
|
-
class Duration < Stripe::RequestParams
|
577
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
578
|
-
attr_accessor :interval
|
579
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
580
|
-
attr_accessor :interval_count
|
581
|
-
|
582
|
-
def initialize(interval: nil, interval_count: nil)
|
583
|
-
@interval = interval
|
584
|
-
@interval_count = interval_count
|
585
|
-
end
|
586
|
-
end
|
587
|
-
# Time span for the redeemed discount.
|
588
|
-
attr_accessor :duration
|
589
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
590
|
-
attr_accessor :timestamp
|
591
|
-
# The type of calculation made to determine when the discount ends.
|
592
|
-
attr_accessor :type
|
593
|
-
|
594
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
595
|
-
@duration = duration
|
596
|
-
@timestamp = timestamp
|
597
|
-
@type = type
|
598
|
-
end
|
599
|
-
end
|
600
492
|
# ID of the coupon to create a new discount for.
|
601
493
|
attr_accessor :coupon
|
602
494
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
603
495
|
attr_accessor :discount
|
604
|
-
# Details to determine how long the discount should be applied for.
|
605
|
-
attr_accessor :discount_end
|
606
496
|
# ID of the promotion code to create a new discount for.
|
607
497
|
attr_accessor :promotion_code
|
608
498
|
|
609
|
-
def initialize(coupon: nil, discount: nil,
|
499
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
610
500
|
@coupon = coupon
|
611
501
|
@discount = discount
|
612
|
-
@discount_end = discount_end
|
613
502
|
@promotion_code = promotion_code
|
614
503
|
end
|
615
504
|
end
|
@@ -696,48 +585,32 @@ module Stripe
|
|
696
585
|
end
|
697
586
|
|
698
587
|
class Discount < Stripe::RequestParams
|
699
|
-
class DiscountEnd < Stripe::RequestParams
|
700
|
-
class Duration < Stripe::RequestParams
|
701
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
702
|
-
attr_accessor :interval
|
703
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
704
|
-
attr_accessor :interval_count
|
705
|
-
|
706
|
-
def initialize(interval: nil, interval_count: nil)
|
707
|
-
@interval = interval
|
708
|
-
@interval_count = interval_count
|
709
|
-
end
|
710
|
-
end
|
711
|
-
# Time span for the redeemed discount.
|
712
|
-
attr_accessor :duration
|
713
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
714
|
-
attr_accessor :timestamp
|
715
|
-
# The type of calculation made to determine when the discount ends.
|
716
|
-
attr_accessor :type
|
717
|
-
|
718
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
719
|
-
@duration = duration
|
720
|
-
@timestamp = timestamp
|
721
|
-
@type = type
|
722
|
-
end
|
723
|
-
end
|
724
588
|
# ID of the coupon to create a new discount for.
|
725
589
|
attr_accessor :coupon
|
726
590
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
727
591
|
attr_accessor :discount
|
728
|
-
# Details to determine how long the discount should be applied for.
|
729
|
-
attr_accessor :discount_end
|
730
592
|
# ID of the promotion code to create a new discount for.
|
731
593
|
attr_accessor :promotion_code
|
732
594
|
|
733
|
-
def initialize(coupon: nil, discount: nil,
|
595
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
734
596
|
@coupon = coupon
|
735
597
|
@discount = discount
|
736
|
-
@discount_end = discount_end
|
737
598
|
@promotion_code = promotion_code
|
738
599
|
end
|
739
600
|
end
|
740
601
|
|
602
|
+
class Duration < Stripe::RequestParams
|
603
|
+
# Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
604
|
+
attr_accessor :interval
|
605
|
+
# The multiplier applied to the interval.
|
606
|
+
attr_accessor :interval_count
|
607
|
+
|
608
|
+
def initialize(interval: nil, interval_count: nil)
|
609
|
+
@interval = interval
|
610
|
+
@interval_count = interval_count
|
611
|
+
end
|
612
|
+
end
|
613
|
+
|
741
614
|
class InvoiceSettings < Stripe::RequestParams
|
742
615
|
class Issuer < Stripe::RequestParams
|
743
616
|
# The connected account being referenced when `type` is `account`.
|
@@ -775,44 +648,16 @@ module Stripe
|
|
775
648
|
end
|
776
649
|
|
777
650
|
class Discount < Stripe::RequestParams
|
778
|
-
class DiscountEnd < Stripe::RequestParams
|
779
|
-
class Duration < Stripe::RequestParams
|
780
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
781
|
-
attr_accessor :interval
|
782
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
783
|
-
attr_accessor :interval_count
|
784
|
-
|
785
|
-
def initialize(interval: nil, interval_count: nil)
|
786
|
-
@interval = interval
|
787
|
-
@interval_count = interval_count
|
788
|
-
end
|
789
|
-
end
|
790
|
-
# Time span for the redeemed discount.
|
791
|
-
attr_accessor :duration
|
792
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
793
|
-
attr_accessor :timestamp
|
794
|
-
# The type of calculation made to determine when the discount ends.
|
795
|
-
attr_accessor :type
|
796
|
-
|
797
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
798
|
-
@duration = duration
|
799
|
-
@timestamp = timestamp
|
800
|
-
@type = type
|
801
|
-
end
|
802
|
-
end
|
803
651
|
# ID of the coupon to create a new discount for.
|
804
652
|
attr_accessor :coupon
|
805
653
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
806
654
|
attr_accessor :discount
|
807
|
-
# Details to determine how long the discount should be applied for.
|
808
|
-
attr_accessor :discount_end
|
809
655
|
# ID of the promotion code to create a new discount for.
|
810
656
|
attr_accessor :promotion_code
|
811
657
|
|
812
|
-
def initialize(coupon: nil, discount: nil,
|
658
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
813
659
|
@coupon = coupon
|
814
660
|
@discount = discount
|
815
|
-
@discount_end = discount_end
|
816
661
|
@promotion_code = promotion_code
|
817
662
|
end
|
818
663
|
end
|
@@ -858,18 +703,6 @@ module Stripe
|
|
858
703
|
@unit_amount_decimal = unit_amount_decimal
|
859
704
|
end
|
860
705
|
end
|
861
|
-
|
862
|
-
class Trial < Stripe::RequestParams
|
863
|
-
# 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.
|
864
|
-
attr_accessor :converts_to
|
865
|
-
# Determines the type of trial for this item.
|
866
|
-
attr_accessor :type
|
867
|
-
|
868
|
-
def initialize(converts_to: nil, type: nil)
|
869
|
-
@converts_to = converts_to
|
870
|
-
@type = type
|
871
|
-
end
|
872
|
-
end
|
873
706
|
# 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.
|
874
707
|
attr_accessor :billing_thresholds
|
875
708
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -886,8 +719,6 @@ module Stripe
|
|
886
719
|
attr_accessor :quantity
|
887
720
|
# 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.
|
888
721
|
attr_accessor :tax_rates
|
889
|
-
# Options that configure the trial on the subscription item.
|
890
|
-
attr_accessor :trial
|
891
722
|
|
892
723
|
def initialize(
|
893
724
|
billing_thresholds: nil,
|
@@ -897,8 +728,7 @@ module Stripe
|
|
897
728
|
price: nil,
|
898
729
|
price_data: nil,
|
899
730
|
quantity: nil,
|
900
|
-
tax_rates: nil
|
901
|
-
trial: nil
|
731
|
+
tax_rates: nil
|
902
732
|
)
|
903
733
|
@billing_thresholds = billing_thresholds
|
904
734
|
@discounts = discounts
|
@@ -908,16 +738,6 @@ module Stripe
|
|
908
738
|
@price_data = price_data
|
909
739
|
@quantity = quantity
|
910
740
|
@tax_rates = tax_rates
|
911
|
-
@trial = trial
|
912
|
-
end
|
913
|
-
end
|
914
|
-
|
915
|
-
class PauseCollection < Stripe::RequestParams
|
916
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
917
|
-
attr_accessor :behavior
|
918
|
-
|
919
|
-
def initialize(behavior: nil)
|
920
|
-
@behavior = behavior
|
921
741
|
end
|
922
742
|
end
|
923
743
|
|
@@ -932,23 +752,6 @@ module Stripe
|
|
932
752
|
@destination = destination
|
933
753
|
end
|
934
754
|
end
|
935
|
-
|
936
|
-
class TrialSettings < Stripe::RequestParams
|
937
|
-
class EndBehavior < Stripe::RequestParams
|
938
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
939
|
-
attr_accessor :prorate_up_front
|
940
|
-
|
941
|
-
def initialize(prorate_up_front: nil)
|
942
|
-
@prorate_up_front = prorate_up_front
|
943
|
-
end
|
944
|
-
end
|
945
|
-
# Defines how the subscription should behave when a trial ends.
|
946
|
-
attr_accessor :end_behavior
|
947
|
-
|
948
|
-
def initialize(end_behavior: nil)
|
949
|
-
@end_behavior = end_behavior
|
950
|
-
end
|
951
|
-
end
|
952
755
|
# 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.
|
953
756
|
attr_accessor :add_invoice_items
|
954
757
|
# 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).
|
@@ -971,32 +774,28 @@ module Stripe
|
|
971
774
|
attr_accessor :description
|
972
775
|
# The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
|
973
776
|
attr_accessor :discounts
|
777
|
+
# The number of intervals the phase should last. If set, `end_date` must not be set.
|
778
|
+
attr_accessor :duration
|
974
779
|
# The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
975
780
|
attr_accessor :end_date
|
976
781
|
# All invoices will be billed using the specified settings.
|
977
782
|
attr_accessor :invoice_settings
|
978
783
|
# List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
|
979
784
|
attr_accessor :items
|
980
|
-
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
|
785
|
+
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
|
981
786
|
attr_accessor :iterations
|
982
787
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
|
983
788
|
attr_accessor :metadata
|
984
789
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
985
790
|
attr_accessor :on_behalf_of
|
986
|
-
# 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).
|
987
|
-
attr_accessor :pause_collection
|
988
791
|
# 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.
|
989
792
|
attr_accessor :proration_behavior
|
990
793
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
991
794
|
attr_accessor :transfer_data
|
992
795
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
993
796
|
attr_accessor :trial
|
994
|
-
# Specify trial behavior when crossing phase boundaries
|
995
|
-
attr_accessor :trial_continuation
|
996
797
|
# 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`
|
997
798
|
attr_accessor :trial_end
|
998
|
-
# Settings related to subscription trials.
|
999
|
-
attr_accessor :trial_settings
|
1000
799
|
|
1001
800
|
def initialize(
|
1002
801
|
add_invoice_items: nil,
|
@@ -1010,19 +809,17 @@ module Stripe
|
|
1010
809
|
default_tax_rates: nil,
|
1011
810
|
description: nil,
|
1012
811
|
discounts: nil,
|
812
|
+
duration: nil,
|
1013
813
|
end_date: nil,
|
1014
814
|
invoice_settings: nil,
|
1015
815
|
items: nil,
|
1016
816
|
iterations: nil,
|
1017
817
|
metadata: nil,
|
1018
818
|
on_behalf_of: nil,
|
1019
|
-
pause_collection: nil,
|
1020
819
|
proration_behavior: nil,
|
1021
820
|
transfer_data: nil,
|
1022
821
|
trial: nil,
|
1023
|
-
|
1024
|
-
trial_end: nil,
|
1025
|
-
trial_settings: nil
|
822
|
+
trial_end: nil
|
1026
823
|
)
|
1027
824
|
@add_invoice_items = add_invoice_items
|
1028
825
|
@application_fee_percent = application_fee_percent
|
@@ -1035,41 +832,23 @@ module Stripe
|
|
1035
832
|
@default_tax_rates = default_tax_rates
|
1036
833
|
@description = description
|
1037
834
|
@discounts = discounts
|
835
|
+
@duration = duration
|
1038
836
|
@end_date = end_date
|
1039
837
|
@invoice_settings = invoice_settings
|
1040
838
|
@items = items
|
1041
839
|
@iterations = iterations
|
1042
840
|
@metadata = metadata
|
1043
841
|
@on_behalf_of = on_behalf_of
|
1044
|
-
@pause_collection = pause_collection
|
1045
842
|
@proration_behavior = proration_behavior
|
1046
843
|
@transfer_data = transfer_data
|
1047
844
|
@trial = trial
|
1048
|
-
@trial_continuation = trial_continuation
|
1049
845
|
@trial_end = trial_end
|
1050
|
-
@trial_settings = trial_settings
|
1051
846
|
end
|
1052
847
|
end
|
1053
|
-
|
1054
|
-
class Prebilling < Stripe::RequestParams
|
1055
|
-
# This is used to determine the number of billing cycles to prebill.
|
1056
|
-
attr_accessor :iterations
|
1057
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1058
|
-
attr_accessor :update_behavior
|
1059
|
-
|
1060
|
-
def initialize(iterations: nil, update_behavior: nil)
|
1061
|
-
@iterations = iterations
|
1062
|
-
@update_behavior = update_behavior
|
1063
|
-
end
|
1064
|
-
end
|
1065
|
-
# 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.
|
1066
|
-
attr_accessor :billing_behavior
|
1067
848
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
1068
849
|
attr_accessor :billing_mode
|
1069
850
|
# The identifier of the customer to create the subscription schedule for.
|
1070
851
|
attr_accessor :customer
|
1071
|
-
# The identifier of the account to create the subscription schedule for.
|
1072
|
-
attr_accessor :customer_account
|
1073
852
|
# Object representing the subscription schedule's default settings.
|
1074
853
|
attr_accessor :default_settings
|
1075
854
|
# 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.
|
@@ -1082,36 +861,28 @@ module Stripe
|
|
1082
861
|
attr_accessor :metadata
|
1083
862
|
# 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.
|
1084
863
|
attr_accessor :phases
|
1085
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1086
|
-
attr_accessor :prebilling
|
1087
864
|
# 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.
|
1088
865
|
attr_accessor :start_date
|
1089
866
|
|
1090
867
|
def initialize(
|
1091
|
-
billing_behavior: nil,
|
1092
868
|
billing_mode: nil,
|
1093
869
|
customer: nil,
|
1094
|
-
customer_account: nil,
|
1095
870
|
default_settings: nil,
|
1096
871
|
end_behavior: nil,
|
1097
872
|
expand: nil,
|
1098
873
|
from_subscription: nil,
|
1099
874
|
metadata: nil,
|
1100
875
|
phases: nil,
|
1101
|
-
prebilling: nil,
|
1102
876
|
start_date: nil
|
1103
877
|
)
|
1104
|
-
@billing_behavior = billing_behavior
|
1105
878
|
@billing_mode = billing_mode
|
1106
879
|
@customer = customer
|
1107
|
-
@customer_account = customer_account
|
1108
880
|
@default_settings = default_settings
|
1109
881
|
@end_behavior = end_behavior
|
1110
882
|
@expand = expand
|
1111
883
|
@from_subscription = from_subscription
|
1112
884
|
@metadata = metadata
|
1113
885
|
@phases = phases
|
1114
|
-
@prebilling = prebilling
|
1115
886
|
@start_date = start_date
|
1116
887
|
end
|
1117
888
|
end
|
@@ -1239,44 +1010,16 @@ module Stripe
|
|
1239
1010
|
class Phase < Stripe::RequestParams
|
1240
1011
|
class AddInvoiceItem < Stripe::RequestParams
|
1241
1012
|
class Discount < Stripe::RequestParams
|
1242
|
-
class DiscountEnd < Stripe::RequestParams
|
1243
|
-
class Duration < Stripe::RequestParams
|
1244
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1245
|
-
attr_accessor :interval
|
1246
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1247
|
-
attr_accessor :interval_count
|
1248
|
-
|
1249
|
-
def initialize(interval: nil, interval_count: nil)
|
1250
|
-
@interval = interval
|
1251
|
-
@interval_count = interval_count
|
1252
|
-
end
|
1253
|
-
end
|
1254
|
-
# Time span for the redeemed discount.
|
1255
|
-
attr_accessor :duration
|
1256
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1257
|
-
attr_accessor :timestamp
|
1258
|
-
# The type of calculation made to determine when the discount ends.
|
1259
|
-
attr_accessor :type
|
1260
|
-
|
1261
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1262
|
-
@duration = duration
|
1263
|
-
@timestamp = timestamp
|
1264
|
-
@type = type
|
1265
|
-
end
|
1266
|
-
end
|
1267
1013
|
# ID of the coupon to create a new discount for.
|
1268
1014
|
attr_accessor :coupon
|
1269
1015
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1270
1016
|
attr_accessor :discount
|
1271
|
-
# Details to determine how long the discount should be applied for.
|
1272
|
-
attr_accessor :discount_end
|
1273
1017
|
# ID of the promotion code to create a new discount for.
|
1274
1018
|
attr_accessor :promotion_code
|
1275
1019
|
|
1276
|
-
def initialize(coupon: nil, discount: nil,
|
1020
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1277
1021
|
@coupon = coupon
|
1278
1022
|
@discount = discount
|
1279
|
-
@discount_end = discount_end
|
1280
1023
|
@promotion_code = promotion_code
|
1281
1024
|
end
|
1282
1025
|
end
|
@@ -1363,48 +1106,32 @@ module Stripe
|
|
1363
1106
|
end
|
1364
1107
|
|
1365
1108
|
class Discount < Stripe::RequestParams
|
1366
|
-
class DiscountEnd < Stripe::RequestParams
|
1367
|
-
class Duration < Stripe::RequestParams
|
1368
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1369
|
-
attr_accessor :interval
|
1370
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1371
|
-
attr_accessor :interval_count
|
1372
|
-
|
1373
|
-
def initialize(interval: nil, interval_count: nil)
|
1374
|
-
@interval = interval
|
1375
|
-
@interval_count = interval_count
|
1376
|
-
end
|
1377
|
-
end
|
1378
|
-
# Time span for the redeemed discount.
|
1379
|
-
attr_accessor :duration
|
1380
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1381
|
-
attr_accessor :timestamp
|
1382
|
-
# The type of calculation made to determine when the discount ends.
|
1383
|
-
attr_accessor :type
|
1384
|
-
|
1385
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1386
|
-
@duration = duration
|
1387
|
-
@timestamp = timestamp
|
1388
|
-
@type = type
|
1389
|
-
end
|
1390
|
-
end
|
1391
1109
|
# ID of the coupon to create a new discount for.
|
1392
1110
|
attr_accessor :coupon
|
1393
1111
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1394
1112
|
attr_accessor :discount
|
1395
|
-
# Details to determine how long the discount should be applied for.
|
1396
|
-
attr_accessor :discount_end
|
1397
1113
|
# ID of the promotion code to create a new discount for.
|
1398
1114
|
attr_accessor :promotion_code
|
1399
1115
|
|
1400
|
-
def initialize(coupon: nil, discount: nil,
|
1116
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1401
1117
|
@coupon = coupon
|
1402
1118
|
@discount = discount
|
1403
|
-
@discount_end = discount_end
|
1404
1119
|
@promotion_code = promotion_code
|
1405
1120
|
end
|
1406
1121
|
end
|
1407
1122
|
|
1123
|
+
class Duration < Stripe::RequestParams
|
1124
|
+
# Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
1125
|
+
attr_accessor :interval
|
1126
|
+
# The multiplier applied to the interval.
|
1127
|
+
attr_accessor :interval_count
|
1128
|
+
|
1129
|
+
def initialize(interval: nil, interval_count: nil)
|
1130
|
+
@interval = interval
|
1131
|
+
@interval_count = interval_count
|
1132
|
+
end
|
1133
|
+
end
|
1134
|
+
|
1408
1135
|
class InvoiceSettings < Stripe::RequestParams
|
1409
1136
|
class Issuer < Stripe::RequestParams
|
1410
1137
|
# The connected account being referenced when `type` is `account`.
|
@@ -1442,44 +1169,16 @@ module Stripe
|
|
1442
1169
|
end
|
1443
1170
|
|
1444
1171
|
class Discount < Stripe::RequestParams
|
1445
|
-
class DiscountEnd < Stripe::RequestParams
|
1446
|
-
class Duration < Stripe::RequestParams
|
1447
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1448
|
-
attr_accessor :interval
|
1449
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1450
|
-
attr_accessor :interval_count
|
1451
|
-
|
1452
|
-
def initialize(interval: nil, interval_count: nil)
|
1453
|
-
@interval = interval
|
1454
|
-
@interval_count = interval_count
|
1455
|
-
end
|
1456
|
-
end
|
1457
|
-
# Time span for the redeemed discount.
|
1458
|
-
attr_accessor :duration
|
1459
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1460
|
-
attr_accessor :timestamp
|
1461
|
-
# The type of calculation made to determine when the discount ends.
|
1462
|
-
attr_accessor :type
|
1463
|
-
|
1464
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1465
|
-
@duration = duration
|
1466
|
-
@timestamp = timestamp
|
1467
|
-
@type = type
|
1468
|
-
end
|
1469
|
-
end
|
1470
1172
|
# ID of the coupon to create a new discount for.
|
1471
1173
|
attr_accessor :coupon
|
1472
1174
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1473
1175
|
attr_accessor :discount
|
1474
|
-
# Details to determine how long the discount should be applied for.
|
1475
|
-
attr_accessor :discount_end
|
1476
1176
|
# ID of the promotion code to create a new discount for.
|
1477
1177
|
attr_accessor :promotion_code
|
1478
1178
|
|
1479
|
-
def initialize(coupon: nil, discount: nil,
|
1179
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1480
1180
|
@coupon = coupon
|
1481
1181
|
@discount = discount
|
1482
|
-
@discount_end = discount_end
|
1483
1182
|
@promotion_code = promotion_code
|
1484
1183
|
end
|
1485
1184
|
end
|
@@ -1525,18 +1224,6 @@ module Stripe
|
|
1525
1224
|
@unit_amount_decimal = unit_amount_decimal
|
1526
1225
|
end
|
1527
1226
|
end
|
1528
|
-
|
1529
|
-
class Trial < Stripe::RequestParams
|
1530
|
-
# 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.
|
1531
|
-
attr_accessor :converts_to
|
1532
|
-
# Determines the type of trial for this item.
|
1533
|
-
attr_accessor :type
|
1534
|
-
|
1535
|
-
def initialize(converts_to: nil, type: nil)
|
1536
|
-
@converts_to = converts_to
|
1537
|
-
@type = type
|
1538
|
-
end
|
1539
|
-
end
|
1540
1227
|
# 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.
|
1541
1228
|
attr_accessor :billing_thresholds
|
1542
1229
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -1553,8 +1240,6 @@ module Stripe
|
|
1553
1240
|
attr_accessor :quantity
|
1554
1241
|
# 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.
|
1555
1242
|
attr_accessor :tax_rates
|
1556
|
-
# Options that configure the trial on the subscription item.
|
1557
|
-
attr_accessor :trial
|
1558
1243
|
|
1559
1244
|
def initialize(
|
1560
1245
|
billing_thresholds: nil,
|
@@ -1564,8 +1249,7 @@ module Stripe
|
|
1564
1249
|
price: nil,
|
1565
1250
|
price_data: nil,
|
1566
1251
|
quantity: nil,
|
1567
|
-
tax_rates: nil
|
1568
|
-
trial: nil
|
1252
|
+
tax_rates: nil
|
1569
1253
|
)
|
1570
1254
|
@billing_thresholds = billing_thresholds
|
1571
1255
|
@discounts = discounts
|
@@ -1575,16 +1259,6 @@ module Stripe
|
|
1575
1259
|
@price_data = price_data
|
1576
1260
|
@quantity = quantity
|
1577
1261
|
@tax_rates = tax_rates
|
1578
|
-
@trial = trial
|
1579
|
-
end
|
1580
|
-
end
|
1581
|
-
|
1582
|
-
class PauseCollection < Stripe::RequestParams
|
1583
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1584
|
-
attr_accessor :behavior
|
1585
|
-
|
1586
|
-
def initialize(behavior: nil)
|
1587
|
-
@behavior = behavior
|
1588
1262
|
end
|
1589
1263
|
end
|
1590
1264
|
|
@@ -1599,23 +1273,6 @@ module Stripe
|
|
1599
1273
|
@destination = destination
|
1600
1274
|
end
|
1601
1275
|
end
|
1602
|
-
|
1603
|
-
class TrialSettings < Stripe::RequestParams
|
1604
|
-
class EndBehavior < Stripe::RequestParams
|
1605
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1606
|
-
attr_accessor :prorate_up_front
|
1607
|
-
|
1608
|
-
def initialize(prorate_up_front: nil)
|
1609
|
-
@prorate_up_front = prorate_up_front
|
1610
|
-
end
|
1611
|
-
end
|
1612
|
-
# Defines how the subscription should behave when a trial ends.
|
1613
|
-
attr_accessor :end_behavior
|
1614
|
-
|
1615
|
-
def initialize(end_behavior: nil)
|
1616
|
-
@end_behavior = end_behavior
|
1617
|
-
end
|
1618
|
-
end
|
1619
1276
|
# 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.
|
1620
1277
|
attr_accessor :add_invoice_items
|
1621
1278
|
# 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).
|
@@ -1638,20 +1295,20 @@ module Stripe
|
|
1638
1295
|
attr_accessor :description
|
1639
1296
|
# The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
|
1640
1297
|
attr_accessor :discounts
|
1298
|
+
# The number of intervals the phase should last. If set, `end_date` must not be set.
|
1299
|
+
attr_accessor :duration
|
1641
1300
|
# The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
1642
1301
|
attr_accessor :end_date
|
1643
1302
|
# All invoices will be billed using the specified settings.
|
1644
1303
|
attr_accessor :invoice_settings
|
1645
1304
|
# List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
|
1646
1305
|
attr_accessor :items
|
1647
|
-
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
|
1306
|
+
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
|
1648
1307
|
attr_accessor :iterations
|
1649
1308
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
|
1650
1309
|
attr_accessor :metadata
|
1651
1310
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
1652
1311
|
attr_accessor :on_behalf_of
|
1653
|
-
# 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).
|
1654
|
-
attr_accessor :pause_collection
|
1655
1312
|
# 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.
|
1656
1313
|
attr_accessor :proration_behavior
|
1657
1314
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -1660,12 +1317,8 @@ module Stripe
|
|
1660
1317
|
attr_accessor :transfer_data
|
1661
1318
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
1662
1319
|
attr_accessor :trial
|
1663
|
-
# Specify trial behavior when crossing phase boundaries
|
1664
|
-
attr_accessor :trial_continuation
|
1665
1320
|
# 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`
|
1666
1321
|
attr_accessor :trial_end
|
1667
|
-
# Settings related to subscription trials.
|
1668
|
-
attr_accessor :trial_settings
|
1669
1322
|
|
1670
1323
|
def initialize(
|
1671
1324
|
add_invoice_items: nil,
|
@@ -1679,20 +1332,18 @@ module Stripe
|
|
1679
1332
|
default_tax_rates: nil,
|
1680
1333
|
description: nil,
|
1681
1334
|
discounts: nil,
|
1335
|
+
duration: nil,
|
1682
1336
|
end_date: nil,
|
1683
1337
|
invoice_settings: nil,
|
1684
1338
|
items: nil,
|
1685
1339
|
iterations: nil,
|
1686
1340
|
metadata: nil,
|
1687
1341
|
on_behalf_of: nil,
|
1688
|
-
pause_collection: nil,
|
1689
1342
|
proration_behavior: nil,
|
1690
1343
|
start_date: nil,
|
1691
1344
|
transfer_data: nil,
|
1692
1345
|
trial: nil,
|
1693
|
-
|
1694
|
-
trial_end: nil,
|
1695
|
-
trial_settings: nil
|
1346
|
+
trial_end: nil
|
1696
1347
|
)
|
1697
1348
|
@add_invoice_items = add_invoice_items
|
1698
1349
|
@application_fee_percent = application_fee_percent
|
@@ -1705,36 +1356,20 @@ module Stripe
|
|
1705
1356
|
@default_tax_rates = default_tax_rates
|
1706
1357
|
@description = description
|
1707
1358
|
@discounts = discounts
|
1359
|
+
@duration = duration
|
1708
1360
|
@end_date = end_date
|
1709
1361
|
@invoice_settings = invoice_settings
|
1710
1362
|
@items = items
|
1711
1363
|
@iterations = iterations
|
1712
1364
|
@metadata = metadata
|
1713
1365
|
@on_behalf_of = on_behalf_of
|
1714
|
-
@pause_collection = pause_collection
|
1715
1366
|
@proration_behavior = proration_behavior
|
1716
1367
|
@start_date = start_date
|
1717
1368
|
@transfer_data = transfer_data
|
1718
1369
|
@trial = trial
|
1719
|
-
@trial_continuation = trial_continuation
|
1720
1370
|
@trial_end = trial_end
|
1721
|
-
@trial_settings = trial_settings
|
1722
1371
|
end
|
1723
1372
|
end
|
1724
|
-
|
1725
|
-
class Prebilling < Stripe::RequestParams
|
1726
|
-
# This is used to determine the number of billing cycles to prebill.
|
1727
|
-
attr_accessor :iterations
|
1728
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1729
|
-
attr_accessor :update_behavior
|
1730
|
-
|
1731
|
-
def initialize(iterations: nil, update_behavior: nil)
|
1732
|
-
@iterations = iterations
|
1733
|
-
@update_behavior = update_behavior
|
1734
|
-
end
|
1735
|
-
end
|
1736
|
-
# 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.
|
1737
|
-
attr_accessor :billing_behavior
|
1738
1373
|
# Object representing the subscription schedule's default settings.
|
1739
1374
|
attr_accessor :default_settings
|
1740
1375
|
# 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.
|
@@ -1745,598 +1380,26 @@ module Stripe
|
|
1745
1380
|
attr_accessor :metadata
|
1746
1381
|
# 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.
|
1747
1382
|
attr_accessor :phases
|
1748
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1749
|
-
attr_accessor :prebilling
|
1750
1383
|
# 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`.
|
1751
1384
|
attr_accessor :proration_behavior
|
1752
1385
|
|
1753
1386
|
def initialize(
|
1754
|
-
billing_behavior: nil,
|
1755
1387
|
default_settings: nil,
|
1756
1388
|
end_behavior: nil,
|
1757
1389
|
expand: nil,
|
1758
1390
|
metadata: nil,
|
1759
1391
|
phases: nil,
|
1760
|
-
prebilling: nil,
|
1761
1392
|
proration_behavior: nil
|
1762
1393
|
)
|
1763
|
-
@billing_behavior = billing_behavior
|
1764
1394
|
@default_settings = default_settings
|
1765
1395
|
@end_behavior = end_behavior
|
1766
1396
|
@expand = expand
|
1767
1397
|
@metadata = metadata
|
1768
1398
|
@phases = phases
|
1769
|
-
@prebilling = prebilling
|
1770
1399
|
@proration_behavior = proration_behavior
|
1771
1400
|
end
|
1772
1401
|
end
|
1773
1402
|
|
1774
|
-
class AmendParams < Stripe::RequestParams
|
1775
|
-
class Amendment < Stripe::RequestParams
|
1776
|
-
class AmendmentEnd < Stripe::RequestParams
|
1777
|
-
class DiscountEnd < Stripe::RequestParams
|
1778
|
-
# The ID of a specific discount.
|
1779
|
-
attr_accessor :discount
|
1780
|
-
|
1781
|
-
def initialize(discount: nil)
|
1782
|
-
@discount = discount
|
1783
|
-
end
|
1784
|
-
end
|
1785
|
-
|
1786
|
-
class Duration < Stripe::RequestParams
|
1787
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1788
|
-
attr_accessor :interval
|
1789
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1790
|
-
attr_accessor :interval_count
|
1791
|
-
|
1792
|
-
def initialize(interval: nil, interval_count: nil)
|
1793
|
-
@interval = interval
|
1794
|
-
@interval_count = interval_count
|
1795
|
-
end
|
1796
|
-
end
|
1797
|
-
# Use the `end` time of a given discount.
|
1798
|
-
attr_accessor :discount_end
|
1799
|
-
# Time span for the amendment starting from the `amendment_start`.
|
1800
|
-
attr_accessor :duration
|
1801
|
-
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
1802
|
-
attr_accessor :timestamp
|
1803
|
-
# Select one of three ways to pass the `amendment_end`.
|
1804
|
-
attr_accessor :type
|
1805
|
-
|
1806
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
1807
|
-
@discount_end = discount_end
|
1808
|
-
@duration = duration
|
1809
|
-
@timestamp = timestamp
|
1810
|
-
@type = type
|
1811
|
-
end
|
1812
|
-
end
|
1813
|
-
|
1814
|
-
class AmendmentStart < Stripe::RequestParams
|
1815
|
-
class AmendmentEnd < Stripe::RequestParams
|
1816
|
-
# 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.
|
1817
|
-
attr_accessor :index
|
1818
|
-
|
1819
|
-
def initialize(index: nil)
|
1820
|
-
@index = index
|
1821
|
-
end
|
1822
|
-
end
|
1823
|
-
|
1824
|
-
class DiscountEnd < Stripe::RequestParams
|
1825
|
-
# The ID of a specific discount.
|
1826
|
-
attr_accessor :discount
|
1827
|
-
|
1828
|
-
def initialize(discount: nil)
|
1829
|
-
@discount = discount
|
1830
|
-
end
|
1831
|
-
end
|
1832
|
-
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
1833
|
-
attr_accessor :amendment_end
|
1834
|
-
# Use the `end` time of a given discount.
|
1835
|
-
attr_accessor :discount_end
|
1836
|
-
# A precise Unix timestamp for the amendment to start.
|
1837
|
-
attr_accessor :timestamp
|
1838
|
-
# Select one of three ways to pass the `amendment_start`.
|
1839
|
-
attr_accessor :type
|
1840
|
-
|
1841
|
-
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
1842
|
-
@amendment_end = amendment_end
|
1843
|
-
@discount_end = discount_end
|
1844
|
-
@timestamp = timestamp
|
1845
|
-
@type = type
|
1846
|
-
end
|
1847
|
-
end
|
1848
|
-
|
1849
|
-
class DiscountAction < Stripe::RequestParams
|
1850
|
-
class Add < Stripe::RequestParams
|
1851
|
-
class DiscountEnd < Stripe::RequestParams
|
1852
|
-
# The type of calculation made to determine when the discount ends.
|
1853
|
-
attr_accessor :type
|
1854
|
-
|
1855
|
-
def initialize(type: nil)
|
1856
|
-
@type = type
|
1857
|
-
end
|
1858
|
-
end
|
1859
|
-
# The coupon code to redeem.
|
1860
|
-
attr_accessor :coupon
|
1861
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
1862
|
-
attr_accessor :discount
|
1863
|
-
# Details to determine how long the discount should be applied for.
|
1864
|
-
attr_accessor :discount_end
|
1865
|
-
# 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.
|
1866
|
-
attr_accessor :index
|
1867
|
-
# The promotion code to redeem.
|
1868
|
-
attr_accessor :promotion_code
|
1869
|
-
|
1870
|
-
def initialize(
|
1871
|
-
coupon: nil,
|
1872
|
-
discount: nil,
|
1873
|
-
discount_end: nil,
|
1874
|
-
index: nil,
|
1875
|
-
promotion_code: nil
|
1876
|
-
)
|
1877
|
-
@coupon = coupon
|
1878
|
-
@discount = discount
|
1879
|
-
@discount_end = discount_end
|
1880
|
-
@index = index
|
1881
|
-
@promotion_code = promotion_code
|
1882
|
-
end
|
1883
|
-
end
|
1884
|
-
|
1885
|
-
class Remove < Stripe::RequestParams
|
1886
|
-
# The coupon code to remove from the `discounts` array.
|
1887
|
-
attr_accessor :coupon
|
1888
|
-
# The ID of a discount to remove from the `discounts` array.
|
1889
|
-
attr_accessor :discount
|
1890
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
1891
|
-
attr_accessor :promotion_code
|
1892
|
-
|
1893
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1894
|
-
@coupon = coupon
|
1895
|
-
@discount = discount
|
1896
|
-
@promotion_code = promotion_code
|
1897
|
-
end
|
1898
|
-
end
|
1899
|
-
|
1900
|
-
class Set < Stripe::RequestParams
|
1901
|
-
# The coupon code to replace the `discounts` array with.
|
1902
|
-
attr_accessor :coupon
|
1903
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
1904
|
-
attr_accessor :discount
|
1905
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
1906
|
-
attr_accessor :promotion_code
|
1907
|
-
|
1908
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1909
|
-
@coupon = coupon
|
1910
|
-
@discount = discount
|
1911
|
-
@promotion_code = promotion_code
|
1912
|
-
end
|
1913
|
-
end
|
1914
|
-
# Details of the discount to add.
|
1915
|
-
attr_accessor :add
|
1916
|
-
# Details of the discount to remove.
|
1917
|
-
attr_accessor :remove
|
1918
|
-
# Details of the discount to replace the existing discounts with.
|
1919
|
-
attr_accessor :set
|
1920
|
-
# Determines the type of discount action.
|
1921
|
-
attr_accessor :type
|
1922
|
-
|
1923
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1924
|
-
@add = add
|
1925
|
-
@remove = remove
|
1926
|
-
@set = set
|
1927
|
-
@type = type
|
1928
|
-
end
|
1929
|
-
end
|
1930
|
-
|
1931
|
-
class ItemAction < Stripe::RequestParams
|
1932
|
-
class Add < Stripe::RequestParams
|
1933
|
-
class Discount < Stripe::RequestParams
|
1934
|
-
class DiscountEnd < Stripe::RequestParams
|
1935
|
-
class Duration < Stripe::RequestParams
|
1936
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1937
|
-
attr_accessor :interval
|
1938
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1939
|
-
attr_accessor :interval_count
|
1940
|
-
|
1941
|
-
def initialize(interval: nil, interval_count: nil)
|
1942
|
-
@interval = interval
|
1943
|
-
@interval_count = interval_count
|
1944
|
-
end
|
1945
|
-
end
|
1946
|
-
# Time span for the redeemed discount.
|
1947
|
-
attr_accessor :duration
|
1948
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1949
|
-
attr_accessor :timestamp
|
1950
|
-
# The type of calculation made to determine when the discount ends.
|
1951
|
-
attr_accessor :type
|
1952
|
-
|
1953
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1954
|
-
@duration = duration
|
1955
|
-
@timestamp = timestamp
|
1956
|
-
@type = type
|
1957
|
-
end
|
1958
|
-
end
|
1959
|
-
# ID of the coupon to create a new discount for.
|
1960
|
-
attr_accessor :coupon
|
1961
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1962
|
-
attr_accessor :discount
|
1963
|
-
# Details to determine how long the discount should be applied for.
|
1964
|
-
attr_accessor :discount_end
|
1965
|
-
# ID of the promotion code to create a new discount for.
|
1966
|
-
attr_accessor :promotion_code
|
1967
|
-
|
1968
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1969
|
-
@coupon = coupon
|
1970
|
-
@discount = discount
|
1971
|
-
@discount_end = discount_end
|
1972
|
-
@promotion_code = promotion_code
|
1973
|
-
end
|
1974
|
-
end
|
1975
|
-
|
1976
|
-
class Trial < Stripe::RequestParams
|
1977
|
-
# 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.
|
1978
|
-
attr_accessor :converts_to
|
1979
|
-
# Determines the type of trial for this item.
|
1980
|
-
attr_accessor :type
|
1981
|
-
|
1982
|
-
def initialize(converts_to: nil, type: nil)
|
1983
|
-
@converts_to = converts_to
|
1984
|
-
@type = type
|
1985
|
-
end
|
1986
|
-
end
|
1987
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
1988
|
-
attr_accessor :discounts
|
1989
|
-
# 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`.
|
1990
|
-
attr_accessor :metadata
|
1991
|
-
# The ID of the price object.
|
1992
|
-
attr_accessor :price
|
1993
|
-
# Quantity for this item.
|
1994
|
-
attr_accessor :quantity
|
1995
|
-
# 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`.
|
1996
|
-
attr_accessor :tax_rates
|
1997
|
-
# Options that configure the trial on the subscription item.
|
1998
|
-
attr_accessor :trial
|
1999
|
-
|
2000
|
-
def initialize(
|
2001
|
-
discounts: nil,
|
2002
|
-
metadata: nil,
|
2003
|
-
price: nil,
|
2004
|
-
quantity: nil,
|
2005
|
-
tax_rates: nil,
|
2006
|
-
trial: nil
|
2007
|
-
)
|
2008
|
-
@discounts = discounts
|
2009
|
-
@metadata = metadata
|
2010
|
-
@price = price
|
2011
|
-
@quantity = quantity
|
2012
|
-
@tax_rates = tax_rates
|
2013
|
-
@trial = trial
|
2014
|
-
end
|
2015
|
-
end
|
2016
|
-
|
2017
|
-
class Remove < Stripe::RequestParams
|
2018
|
-
# ID of a price to remove.
|
2019
|
-
attr_accessor :price
|
2020
|
-
|
2021
|
-
def initialize(price: nil)
|
2022
|
-
@price = price
|
2023
|
-
end
|
2024
|
-
end
|
2025
|
-
|
2026
|
-
class Set < Stripe::RequestParams
|
2027
|
-
class Discount < Stripe::RequestParams
|
2028
|
-
class DiscountEnd < Stripe::RequestParams
|
2029
|
-
class Duration < Stripe::RequestParams
|
2030
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2031
|
-
attr_accessor :interval
|
2032
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2033
|
-
attr_accessor :interval_count
|
2034
|
-
|
2035
|
-
def initialize(interval: nil, interval_count: nil)
|
2036
|
-
@interval = interval
|
2037
|
-
@interval_count = interval_count
|
2038
|
-
end
|
2039
|
-
end
|
2040
|
-
# Time span for the redeemed discount.
|
2041
|
-
attr_accessor :duration
|
2042
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2043
|
-
attr_accessor :timestamp
|
2044
|
-
# The type of calculation made to determine when the discount ends.
|
2045
|
-
attr_accessor :type
|
2046
|
-
|
2047
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2048
|
-
@duration = duration
|
2049
|
-
@timestamp = timestamp
|
2050
|
-
@type = type
|
2051
|
-
end
|
2052
|
-
end
|
2053
|
-
# ID of the coupon to create a new discount for.
|
2054
|
-
attr_accessor :coupon
|
2055
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2056
|
-
attr_accessor :discount
|
2057
|
-
# Details to determine how long the discount should be applied for.
|
2058
|
-
attr_accessor :discount_end
|
2059
|
-
# ID of the promotion code to create a new discount for.
|
2060
|
-
attr_accessor :promotion_code
|
2061
|
-
|
2062
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2063
|
-
@coupon = coupon
|
2064
|
-
@discount = discount
|
2065
|
-
@discount_end = discount_end
|
2066
|
-
@promotion_code = promotion_code
|
2067
|
-
end
|
2068
|
-
end
|
2069
|
-
|
2070
|
-
class Trial < Stripe::RequestParams
|
2071
|
-
# 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.
|
2072
|
-
attr_accessor :converts_to
|
2073
|
-
# Determines the type of trial for this item.
|
2074
|
-
attr_accessor :type
|
2075
|
-
|
2076
|
-
def initialize(converts_to: nil, type: nil)
|
2077
|
-
@converts_to = converts_to
|
2078
|
-
@type = type
|
2079
|
-
end
|
2080
|
-
end
|
2081
|
-
# 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`.
|
2082
|
-
attr_accessor :discounts
|
2083
|
-
# 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`.
|
2084
|
-
attr_accessor :metadata
|
2085
|
-
# The ID of the price object.
|
2086
|
-
attr_accessor :price
|
2087
|
-
# 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`.
|
2088
|
-
attr_accessor :quantity
|
2089
|
-
# 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`.
|
2090
|
-
attr_accessor :tax_rates
|
2091
|
-
# 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`.
|
2092
|
-
attr_accessor :trial
|
2093
|
-
|
2094
|
-
def initialize(
|
2095
|
-
discounts: nil,
|
2096
|
-
metadata: nil,
|
2097
|
-
price: nil,
|
2098
|
-
quantity: nil,
|
2099
|
-
tax_rates: nil,
|
2100
|
-
trial: nil
|
2101
|
-
)
|
2102
|
-
@discounts = discounts
|
2103
|
-
@metadata = metadata
|
2104
|
-
@price = price
|
2105
|
-
@quantity = quantity
|
2106
|
-
@tax_rates = tax_rates
|
2107
|
-
@trial = trial
|
2108
|
-
end
|
2109
|
-
end
|
2110
|
-
# 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.
|
2111
|
-
attr_accessor :add
|
2112
|
-
# Details of the subscription item to remove.
|
2113
|
-
attr_accessor :remove
|
2114
|
-
# 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.
|
2115
|
-
attr_accessor :set
|
2116
|
-
# Determines the type of item action.
|
2117
|
-
attr_accessor :type
|
2118
|
-
|
2119
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2120
|
-
@add = add
|
2121
|
-
@remove = remove
|
2122
|
-
@set = set
|
2123
|
-
@type = type
|
2124
|
-
end
|
2125
|
-
end
|
2126
|
-
|
2127
|
-
class MetadataAction < Stripe::RequestParams
|
2128
|
-
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
2129
|
-
attr_accessor :add
|
2130
|
-
# Keys to remove from schedule phase metadata.
|
2131
|
-
attr_accessor :remove
|
2132
|
-
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
2133
|
-
attr_accessor :set
|
2134
|
-
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
2135
|
-
attr_accessor :type
|
2136
|
-
|
2137
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2138
|
-
@add = add
|
2139
|
-
@remove = remove
|
2140
|
-
@set = set
|
2141
|
-
@type = type
|
2142
|
-
end
|
2143
|
-
end
|
2144
|
-
|
2145
|
-
class SetPauseCollection < Stripe::RequestParams
|
2146
|
-
class Set < Stripe::RequestParams
|
2147
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2148
|
-
attr_accessor :behavior
|
2149
|
-
|
2150
|
-
def initialize(behavior: nil)
|
2151
|
-
@behavior = behavior
|
2152
|
-
end
|
2153
|
-
end
|
2154
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
2155
|
-
attr_accessor :set
|
2156
|
-
# Determines the type of the pause_collection amendment.
|
2157
|
-
attr_accessor :type
|
2158
|
-
|
2159
|
-
def initialize(set: nil, type: nil)
|
2160
|
-
@set = set
|
2161
|
-
@type = type
|
2162
|
-
end
|
2163
|
-
end
|
2164
|
-
|
2165
|
-
class TrialSettings < Stripe::RequestParams
|
2166
|
-
class EndBehavior < Stripe::RequestParams
|
2167
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2168
|
-
attr_accessor :prorate_up_front
|
2169
|
-
|
2170
|
-
def initialize(prorate_up_front: nil)
|
2171
|
-
@prorate_up_front = prorate_up_front
|
2172
|
-
end
|
2173
|
-
end
|
2174
|
-
# Defines how the subscription should behave when a trial ends.
|
2175
|
-
attr_accessor :end_behavior
|
2176
|
-
|
2177
|
-
def initialize(end_behavior: nil)
|
2178
|
-
@end_behavior = end_behavior
|
2179
|
-
end
|
2180
|
-
end
|
2181
|
-
# 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.
|
2182
|
-
attr_accessor :amendment_end
|
2183
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2184
|
-
attr_accessor :amendment_start
|
2185
|
-
# 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.
|
2186
|
-
attr_accessor :billing_cycle_anchor
|
2187
|
-
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
2188
|
-
attr_accessor :discount_actions
|
2189
|
-
# Changes to the subscription items during the amendment time span.
|
2190
|
-
attr_accessor :item_actions
|
2191
|
-
# Instructions for how to modify phase metadata
|
2192
|
-
attr_accessor :metadata_actions
|
2193
|
-
# 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`.
|
2194
|
-
attr_accessor :proration_behavior
|
2195
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2196
|
-
attr_accessor :set_pause_collection
|
2197
|
-
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
2198
|
-
attr_accessor :set_schedule_end
|
2199
|
-
# Settings related to subscription trials.
|
2200
|
-
attr_accessor :trial_settings
|
2201
|
-
|
2202
|
-
def initialize(
|
2203
|
-
amendment_end: nil,
|
2204
|
-
amendment_start: nil,
|
2205
|
-
billing_cycle_anchor: nil,
|
2206
|
-
discount_actions: nil,
|
2207
|
-
item_actions: nil,
|
2208
|
-
metadata_actions: nil,
|
2209
|
-
proration_behavior: nil,
|
2210
|
-
set_pause_collection: nil,
|
2211
|
-
set_schedule_end: nil,
|
2212
|
-
trial_settings: nil
|
2213
|
-
)
|
2214
|
-
@amendment_end = amendment_end
|
2215
|
-
@amendment_start = amendment_start
|
2216
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
2217
|
-
@discount_actions = discount_actions
|
2218
|
-
@item_actions = item_actions
|
2219
|
-
@metadata_actions = metadata_actions
|
2220
|
-
@proration_behavior = proration_behavior
|
2221
|
-
@set_pause_collection = set_pause_collection
|
2222
|
-
@set_schedule_end = set_schedule_end
|
2223
|
-
@trial_settings = trial_settings
|
2224
|
-
end
|
2225
|
-
end
|
2226
|
-
|
2227
|
-
class Prebilling < Stripe::RequestParams
|
2228
|
-
class BillFrom < Stripe::RequestParams
|
2229
|
-
class AmendmentStart < Stripe::RequestParams
|
2230
|
-
# 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.
|
2231
|
-
attr_accessor :index
|
2232
|
-
|
2233
|
-
def initialize(index: nil)
|
2234
|
-
@index = index
|
2235
|
-
end
|
2236
|
-
end
|
2237
|
-
# Start the prebilled period when a specified amendment begins.
|
2238
|
-
attr_accessor :amendment_start
|
2239
|
-
# Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2240
|
-
attr_accessor :timestamp
|
2241
|
-
# Select one of several ways to pass the `bill_from` value.
|
2242
|
-
attr_accessor :type
|
2243
|
-
|
2244
|
-
def initialize(amendment_start: nil, timestamp: nil, type: nil)
|
2245
|
-
@amendment_start = amendment_start
|
2246
|
-
@timestamp = timestamp
|
2247
|
-
@type = type
|
2248
|
-
end
|
2249
|
-
end
|
2250
|
-
|
2251
|
-
class BillUntil < Stripe::RequestParams
|
2252
|
-
class AmendmentEnd < Stripe::RequestParams
|
2253
|
-
# 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.
|
2254
|
-
attr_accessor :index
|
2255
|
-
|
2256
|
-
def initialize(index: nil)
|
2257
|
-
@index = index
|
2258
|
-
end
|
2259
|
-
end
|
2260
|
-
|
2261
|
-
class Duration < Stripe::RequestParams
|
2262
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2263
|
-
attr_accessor :interval
|
2264
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2265
|
-
attr_accessor :interval_count
|
2266
|
-
|
2267
|
-
def initialize(interval: nil, interval_count: nil)
|
2268
|
-
@interval = interval
|
2269
|
-
@interval_count = interval_count
|
2270
|
-
end
|
2271
|
-
end
|
2272
|
-
# End the prebilled period when a specified amendment ends.
|
2273
|
-
attr_accessor :amendment_end
|
2274
|
-
# Time span for prebilling, starting from `bill_from`.
|
2275
|
-
attr_accessor :duration
|
2276
|
-
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2277
|
-
attr_accessor :timestamp
|
2278
|
-
# Select one of several ways to pass the `bill_until` value.
|
2279
|
-
attr_accessor :type
|
2280
|
-
|
2281
|
-
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
2282
|
-
@amendment_end = amendment_end
|
2283
|
-
@duration = duration
|
2284
|
-
@timestamp = timestamp
|
2285
|
-
@type = type
|
2286
|
-
end
|
2287
|
-
end
|
2288
|
-
# The beginning of the prebilled time period. The default value is `now`.
|
2289
|
-
attr_accessor :bill_from
|
2290
|
-
# The end of the prebilled time period.
|
2291
|
-
attr_accessor :bill_until
|
2292
|
-
# When the prebilling invoice should be created. The default value is `now`.
|
2293
|
-
attr_accessor :invoice_at
|
2294
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
2295
|
-
attr_accessor :update_behavior
|
2296
|
-
|
2297
|
-
def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
|
2298
|
-
@bill_from = bill_from
|
2299
|
-
@bill_until = bill_until
|
2300
|
-
@invoice_at = invoice_at
|
2301
|
-
@update_behavior = update_behavior
|
2302
|
-
end
|
2303
|
-
end
|
2304
|
-
|
2305
|
-
class ScheduleSettings < Stripe::RequestParams
|
2306
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2307
|
-
attr_accessor :end_behavior
|
2308
|
-
|
2309
|
-
def initialize(end_behavior: nil)
|
2310
|
-
@end_behavior = end_behavior
|
2311
|
-
end
|
2312
|
-
end
|
2313
|
-
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
2314
|
-
attr_accessor :amendments
|
2315
|
-
# Specifies which fields in the response should be expanded.
|
2316
|
-
attr_accessor :expand
|
2317
|
-
# Provide any time periods to bill in advance.
|
2318
|
-
attr_accessor :prebilling
|
2319
|
-
# In cases where the amendment changes the currently active phase,
|
2320
|
-
# specifies if and how to prorate at the time of the request.
|
2321
|
-
attr_accessor :proration_behavior
|
2322
|
-
# Changes to apply to the subscription schedule.
|
2323
|
-
attr_accessor :schedule_settings
|
2324
|
-
|
2325
|
-
def initialize(
|
2326
|
-
amendments: nil,
|
2327
|
-
expand: nil,
|
2328
|
-
prebilling: nil,
|
2329
|
-
proration_behavior: nil,
|
2330
|
-
schedule_settings: nil
|
2331
|
-
)
|
2332
|
-
@amendments = amendments
|
2333
|
-
@expand = expand
|
2334
|
-
@prebilling = prebilling
|
2335
|
-
@proration_behavior = proration_behavior
|
2336
|
-
@schedule_settings = schedule_settings
|
2337
|
-
end
|
2338
|
-
end
|
2339
|
-
|
2340
1403
|
class CancelParams < Stripe::RequestParams
|
2341
1404
|
# Specifies which fields in the response should be expanded.
|
2342
1405
|
attr_accessor :expand
|
@@ -2365,8 +1428,6 @@ module Stripe
|
|
2365
1428
|
end
|
2366
1429
|
# ID of the Connect Application that created the schedule.
|
2367
1430
|
attr_reader :application
|
2368
|
-
# 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.
|
2369
|
-
attr_reader :billing_behavior
|
2370
1431
|
# The billing mode of the subscription.
|
2371
1432
|
attr_reader :billing_mode
|
2372
1433
|
# Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
|
@@ -2379,16 +1440,12 @@ module Stripe
|
|
2379
1440
|
attr_reader :current_phase
|
2380
1441
|
# ID of the customer who owns the subscription schedule.
|
2381
1442
|
attr_reader :customer
|
2382
|
-
# ID of the account who owns the subscription schedule.
|
2383
|
-
attr_reader :customer_account
|
2384
1443
|
# Attribute for field default_settings
|
2385
1444
|
attr_reader :default_settings
|
2386
1445
|
# 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.
|
2387
1446
|
attr_reader :end_behavior
|
2388
1447
|
# Unique identifier for the object.
|
2389
1448
|
attr_reader :id
|
2390
|
-
# Details of the most recent price migration that failed for the subscription schedule.
|
2391
|
-
attr_reader :last_price_migration_error
|
2392
1449
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
2393
1450
|
attr_reader :livemode
|
2394
1451
|
# 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.
|
@@ -2397,8 +1454,6 @@ module Stripe
|
|
2397
1454
|
attr_reader :object
|
2398
1455
|
# Configuration for the subscription schedule's phases.
|
2399
1456
|
attr_reader :phases
|
2400
|
-
# Time period and invoice for a Subscription billed in advance.
|
2401
|
-
attr_reader :prebilling
|
2402
1457
|
# Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
|
2403
1458
|
attr_reader :released_at
|
2404
1459
|
# ID of the subscription once managed by the subscription schedule (if it is released).
|
@@ -2410,26 +1465,6 @@ module Stripe
|
|
2410
1465
|
# ID of the test clock this subscription schedule belongs to.
|
2411
1466
|
attr_reader :test_clock
|
2412
1467
|
|
2413
|
-
# Amends an existing subscription schedule.
|
2414
|
-
def amend(params = {}, opts = {})
|
2415
|
-
request_stripe_object(
|
2416
|
-
method: :post,
|
2417
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
|
2418
|
-
params: params,
|
2419
|
-
opts: opts
|
2420
|
-
)
|
2421
|
-
end
|
2422
|
-
|
2423
|
-
# Amends an existing subscription schedule.
|
2424
|
-
def self.amend(schedule, params = {}, opts = {})
|
2425
|
-
request_stripe_object(
|
2426
|
-
method: :post,
|
2427
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
2428
|
-
params: params,
|
2429
|
-
opts: opts
|
2430
|
-
)
|
2431
|
-
end
|
2432
|
-
|
2433
1468
|
# 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.
|
2434
1469
|
def cancel(params = {}, opts = {})
|
2435
1470
|
request_stripe_object(
|