stripe 15.3.0.pre.beta.2 → 15.3.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 -0
- data/CHANGELOG.md +683 -1584
- data/OPENAPI_VERSION +1 -1
- data/README.md +14 -50
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +0 -28
- data/lib/stripe/api_version.rb +2 -1
- data/lib/stripe/errors.rb +0 -54
- data/lib/stripe/event_types.rb +0 -98
- data/lib/stripe/events/v2_core_event_destination_ping_event.rb +1 -1
- data/lib/stripe/object_types.rb +0 -50
- data/lib/stripe/resources/account.rb +82 -650
- data/lib/stripe/resources/account_session.rb +80 -335
- 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 +0 -10
- data/lib/stripe/resources/billing_portal/session.rb +2 -8
- data/lib/stripe/resources/card.rb +0 -2
- data/lib/stripe/resources/cash_balance.rb +0 -2
- data/lib/stripe/resources/charge.rb +28 -1553
- data/lib/stripe/resources/checkout/session.rb +55 -333
- data/lib/stripe/resources/confirmation_token.rb +19 -181
- data/lib/stripe/resources/coupon.rb +1 -30
- data/lib/stripe/resources/credit_note.rb +9 -15
- data/lib/stripe/resources/credit_note_line_item.rb +0 -9
- data/lib/stripe/resources/customer.rb +0 -2
- 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 +3 -8
- data/lib/stripe/resources/discount.rb +0 -2
- data/lib/stripe/resources/event.rb +1 -32
- 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 +34 -10
- data/lib/stripe/resources/invoice.rb +33 -1062
- data/lib/stripe/resources/invoice_item.rb +3 -82
- 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 +3 -24
- data/lib/stripe/resources/payment_intent.rb +875 -5512
- data/lib/stripe/resources/payment_method.rb +18 -201
- 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 +16 -2033
- data/lib/stripe/resources/refund.rb +0 -9
- data/lib/stripe/resources/setup_attempt.rb +1 -22
- data/lib/stripe/resources/setup_intent.rb +294 -581
- data/lib/stripe/resources/source.rb +0 -29
- data/lib/stripe/resources/subscription.rb +36 -298
- data/lib/stripe/resources/subscription_item.rb +3 -84
- data/lib/stripe/resources/subscription_schedule.rb +27 -1008
- data/lib/stripe/resources/tax/registration.rb +20 -0
- data/lib/stripe/resources/tax_id.rb +2 -12
- data/lib/stripe/resources/terminal/configuration.rb +1 -0
- data/lib/stripe/resources/terminal/reader.rb +10 -18
- data/lib/stripe/resources/token.rb +1 -1
- data/lib/stripe/resources/transfer.rb +0 -6
- data/lib/stripe/resources/treasury/financial_account.rb +8 -23
- 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 -104
- data/lib/stripe/services/account_service.rb +76 -559
- data/lib/stripe/services/account_session_service.rb +49 -274
- 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 +0 -8
- data/lib/stripe/services/billing_portal/session_service.rb +1 -5
- data/lib/stripe/services/charge_service.rb +0 -1418
- data/lib/stripe/services/checkout/session_service.rb +55 -250
- data/lib/stripe/services/coupon_service.rb +1 -17
- data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
- data/lib/stripe/services/credit_note_service.rb +6 -10
- data/lib/stripe/services/customer_session_service.rb +2 -5
- 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 +16 -8
- data/lib/stripe/services/invoice_item_service.rb +2 -74
- 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 +33 -1013
- 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 +650 -4832
- data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
- data/lib/stripe/services/payment_method_service.rb +6 -120
- 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 +13 -1719
- data/lib/stripe/services/setup_intent_service.rb +284 -540
- data/lib/stripe/services/subscription_item_service.rb +3 -75
- data/lib/stripe/services/subscription_schedule_service.rb +19 -911
- data/lib/stripe/services/subscription_service.rb +30 -253
- data/lib/stripe/services/tax/registration_service.rb +13 -0
- data/lib/stripe/services/tax_id_service.rb +2 -8
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/reader_service.rb +4 -4
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +6 -98
- 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/token_service.rb +1 -1
- 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 +7 -17
- 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/billing_service.rb +2 -2
- data/lib/stripe/services/v2/core/event_destination_service.rb +16 -16
- data/lib/stripe/services/v2/core_service.rb +1 -4
- data/lib/stripe/services/v2_services.rb +2 -5
- 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/webhook.rb +1 -1
- data/lib/stripe.rb +0 -53
- data/rbi/stripe/resources/account.rbi +4995 -0
- data/rbi/stripe/resources/account_link.rbi +74 -0
- data/rbi/stripe/resources/account_session.rbi +1013 -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 +645 -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 +2086 -0
- data/rbi/stripe/resources/checkout/session.rbi +4060 -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 +149 -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 +3842 -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 +9987 -0
- data/rbi/stripe/resources/payment_link.rbi +1801 -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 +1645 -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 +2732 -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 +1387 -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 +58 -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 +646 -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 +511 -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 +2670 -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 +3011 -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 +7989 -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 +1352 -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 +1301 -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 +1858 -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 +1118 -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 +326 -162
- 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_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 -2806
- data/lib/stripe/resources/payment_attempt_record.rb +0 -1086
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -72
- data/lib/stripe/resources/payment_record.rb +0 -1615
- 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 -364
- 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 -1746
- 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 -58
- 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 -116
- 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 -2236
- 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 -4138
- data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1046
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -131
- 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 -43
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -81
- 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 -200
- 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 -91
- 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 -138
- 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 -191636
@@ -15,6 +15,13 @@ module Stripe
|
|
15
15
|
"subscription_schedule"
|
16
16
|
end
|
17
17
|
|
18
|
+
class BillingMode < Stripe::StripeObject
|
19
|
+
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
20
|
+
attr_reader :type
|
21
|
+
# Details on when the current billing_mode was adopted.
|
22
|
+
attr_reader :updated_at
|
23
|
+
end
|
24
|
+
|
18
25
|
class CurrentPhase < Stripe::StripeObject
|
19
26
|
# The end of this phase of the subscription schedule.
|
20
27
|
attr_reader :end_date
|
@@ -88,36 +95,13 @@ module Stripe
|
|
88
95
|
attr_reader :transfer_data
|
89
96
|
end
|
90
97
|
|
91
|
-
class LastPriceMigrationError < Stripe::StripeObject
|
92
|
-
class FailedTransition < Stripe::StripeObject
|
93
|
-
# The original price to be migrated.
|
94
|
-
attr_reader :source_price
|
95
|
-
# The intended resulting price of the migration.
|
96
|
-
attr_reader :target_price
|
97
|
-
end
|
98
|
-
# The time at which the price migration encountered an error.
|
99
|
-
attr_reader :errored_at
|
100
|
-
# The involved price pairs in each failed transition.
|
101
|
-
attr_reader :failed_transitions
|
102
|
-
# The type of error encountered by the price migration.
|
103
|
-
attr_reader :type
|
104
|
-
end
|
105
|
-
|
106
98
|
class Phase < Stripe::StripeObject
|
107
99
|
class AddInvoiceItem < Stripe::StripeObject
|
108
100
|
class Discount < Stripe::StripeObject
|
109
|
-
class DiscountEnd < Stripe::StripeObject
|
110
|
-
# The discount end timestamp.
|
111
|
-
attr_reader :timestamp
|
112
|
-
# The discount end type.
|
113
|
-
attr_reader :type
|
114
|
-
end
|
115
101
|
# ID of the coupon to create a new discount for.
|
116
102
|
attr_reader :coupon
|
117
103
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
118
104
|
attr_reader :discount
|
119
|
-
# Details to determine how long the discount should be applied for.
|
120
|
-
attr_reader :discount_end
|
121
105
|
# ID of the promotion code to create a new discount for.
|
122
106
|
attr_reader :promotion_code
|
123
107
|
end
|
@@ -154,18 +138,10 @@ module Stripe
|
|
154
138
|
end
|
155
139
|
|
156
140
|
class Discount < Stripe::StripeObject
|
157
|
-
class DiscountEnd < Stripe::StripeObject
|
158
|
-
# The discount end timestamp.
|
159
|
-
attr_reader :timestamp
|
160
|
-
# The discount end type.
|
161
|
-
attr_reader :type
|
162
|
-
end
|
163
141
|
# ID of the coupon to create a new discount for.
|
164
142
|
attr_reader :coupon
|
165
143
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
166
144
|
attr_reader :discount
|
167
|
-
# Details to determine how long the discount should be applied for.
|
168
|
-
attr_reader :discount_end
|
169
145
|
# ID of the promotion code to create a new discount for.
|
170
146
|
attr_reader :promotion_code
|
171
147
|
end
|
@@ -192,28 +168,13 @@ module Stripe
|
|
192
168
|
end
|
193
169
|
|
194
170
|
class Discount < Stripe::StripeObject
|
195
|
-
class DiscountEnd < Stripe::StripeObject
|
196
|
-
# The discount end timestamp.
|
197
|
-
attr_reader :timestamp
|
198
|
-
# The discount end type.
|
199
|
-
attr_reader :type
|
200
|
-
end
|
201
171
|
# ID of the coupon to create a new discount for.
|
202
172
|
attr_reader :coupon
|
203
173
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
204
174
|
attr_reader :discount
|
205
|
-
# Details to determine how long the discount should be applied for.
|
206
|
-
attr_reader :discount_end
|
207
175
|
# ID of the promotion code to create a new discount for.
|
208
176
|
attr_reader :promotion_code
|
209
177
|
end
|
210
|
-
|
211
|
-
class Trial < Stripe::StripeObject
|
212
|
-
# List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
|
213
|
-
attr_reader :converts_to
|
214
|
-
# Determines the type of trial for this item.
|
215
|
-
attr_reader :type
|
216
|
-
end
|
217
178
|
# Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
218
179
|
attr_reader :billing_thresholds
|
219
180
|
# The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
|
@@ -228,13 +189,6 @@ module Stripe
|
|
228
189
|
attr_reader :quantity
|
229
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`.
|
230
191
|
attr_reader :tax_rates
|
231
|
-
# Options that configure the trial on the subscription item.
|
232
|
-
attr_reader :trial
|
233
|
-
end
|
234
|
-
|
235
|
-
class PauseCollection < Stripe::StripeObject
|
236
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
237
|
-
attr_reader :behavior
|
238
192
|
end
|
239
193
|
|
240
194
|
class TransferData < Stripe::StripeObject
|
@@ -243,15 +197,6 @@ module Stripe
|
|
243
197
|
# The account where funds from the payment will be transferred to upon payment success.
|
244
198
|
attr_reader :destination
|
245
199
|
end
|
246
|
-
|
247
|
-
class TrialSettings < Stripe::StripeObject
|
248
|
-
class EndBehavior < Stripe::StripeObject
|
249
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
250
|
-
attr_reader :prorate_up_front
|
251
|
-
end
|
252
|
-
# Defines how the subscription should behave when a trial ends.
|
253
|
-
attr_reader :end_behavior
|
254
|
-
end
|
255
200
|
# A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
|
256
201
|
attr_reader :add_invoice_items
|
257
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.
|
@@ -284,31 +229,14 @@ module Stripe
|
|
284
229
|
attr_reader :metadata
|
285
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.
|
286
231
|
attr_reader :on_behalf_of
|
287
|
-
# 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).
|
288
|
-
attr_reader :pause_collection
|
289
232
|
# When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
|
290
233
|
attr_reader :proration_behavior
|
291
234
|
# The start of this phase of the subscription schedule.
|
292
235
|
attr_reader :start_date
|
293
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.
|
294
237
|
attr_reader :transfer_data
|
295
|
-
# Specify behavior of the trial when crossing schedule phase boundaries
|
296
|
-
attr_reader :trial_continuation
|
297
238
|
# When the trial ends within the phase.
|
298
239
|
attr_reader :trial_end
|
299
|
-
# Settings related to any trials on the subscription during this phase.
|
300
|
-
attr_reader :trial_settings
|
301
|
-
end
|
302
|
-
|
303
|
-
class Prebilling < Stripe::StripeObject
|
304
|
-
# ID of the prebilling invoice.
|
305
|
-
attr_reader :invoice
|
306
|
-
# The end of the last period for which the invoice pre-bills.
|
307
|
-
attr_reader :period_end
|
308
|
-
# The start of the first period for which the invoice pre-bills.
|
309
|
-
attr_reader :period_start
|
310
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
|
311
|
-
attr_reader :update_behavior
|
312
240
|
end
|
313
241
|
|
314
242
|
class ListParams < Stripe::RequestParams
|
@@ -391,8 +319,6 @@ module Stripe
|
|
391
319
|
attr_accessor :created
|
392
320
|
# Only return subscription schedules for the given customer.
|
393
321
|
attr_accessor :customer
|
394
|
-
# Only return subscription schedules for the given account.
|
395
|
-
attr_accessor :customer_account
|
396
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.
|
397
323
|
attr_accessor :ending_before
|
398
324
|
# Specifies which fields in the response should be expanded.
|
@@ -411,7 +337,6 @@ module Stripe
|
|
411
337
|
completed_at: nil,
|
412
338
|
created: nil,
|
413
339
|
customer: nil,
|
414
|
-
customer_account: nil,
|
415
340
|
ending_before: nil,
|
416
341
|
expand: nil,
|
417
342
|
limit: nil,
|
@@ -423,7 +348,6 @@ module Stripe
|
|
423
348
|
@completed_at = completed_at
|
424
349
|
@created = created
|
425
350
|
@customer = customer
|
426
|
-
@customer_account = customer_account
|
427
351
|
@ending_before = ending_before
|
428
352
|
@expand = expand
|
429
353
|
@limit = limit
|
@@ -434,6 +358,15 @@ module Stripe
|
|
434
358
|
end
|
435
359
|
|
436
360
|
class CreateParams < Stripe::RequestParams
|
361
|
+
class BillingMode < Stripe::RequestParams
|
362
|
+
# Attribute for param field type
|
363
|
+
attr_accessor :type
|
364
|
+
|
365
|
+
def initialize(type: nil)
|
366
|
+
@type = type
|
367
|
+
end
|
368
|
+
end
|
369
|
+
|
437
370
|
class DefaultSettings < Stripe::RequestParams
|
438
371
|
class AutomaticTax < Stripe::RequestParams
|
439
372
|
class Liability < Stripe::RequestParams
|
@@ -556,44 +489,16 @@ module Stripe
|
|
556
489
|
class Phase < Stripe::RequestParams
|
557
490
|
class AddInvoiceItem < Stripe::RequestParams
|
558
491
|
class Discount < Stripe::RequestParams
|
559
|
-
class DiscountEnd < Stripe::RequestParams
|
560
|
-
class Duration < Stripe::RequestParams
|
561
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
562
|
-
attr_accessor :interval
|
563
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
564
|
-
attr_accessor :interval_count
|
565
|
-
|
566
|
-
def initialize(interval: nil, interval_count: nil)
|
567
|
-
@interval = interval
|
568
|
-
@interval_count = interval_count
|
569
|
-
end
|
570
|
-
end
|
571
|
-
# Time span for the redeemed discount.
|
572
|
-
attr_accessor :duration
|
573
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
574
|
-
attr_accessor :timestamp
|
575
|
-
# The type of calculation made to determine when the discount ends.
|
576
|
-
attr_accessor :type
|
577
|
-
|
578
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
579
|
-
@duration = duration
|
580
|
-
@timestamp = timestamp
|
581
|
-
@type = type
|
582
|
-
end
|
583
|
-
end
|
584
492
|
# ID of the coupon to create a new discount for.
|
585
493
|
attr_accessor :coupon
|
586
494
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
587
495
|
attr_accessor :discount
|
588
|
-
# Details to determine how long the discount should be applied for.
|
589
|
-
attr_accessor :discount_end
|
590
496
|
# ID of the promotion code to create a new discount for.
|
591
497
|
attr_accessor :promotion_code
|
592
498
|
|
593
|
-
def initialize(coupon: nil, discount: nil,
|
499
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
594
500
|
@coupon = coupon
|
595
501
|
@discount = discount
|
596
|
-
@discount_end = discount_end
|
597
502
|
@promotion_code = promotion_code
|
598
503
|
end
|
599
504
|
end
|
@@ -680,44 +585,16 @@ module Stripe
|
|
680
585
|
end
|
681
586
|
|
682
587
|
class Discount < Stripe::RequestParams
|
683
|
-
class DiscountEnd < Stripe::RequestParams
|
684
|
-
class Duration < Stripe::RequestParams
|
685
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
686
|
-
attr_accessor :interval
|
687
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
688
|
-
attr_accessor :interval_count
|
689
|
-
|
690
|
-
def initialize(interval: nil, interval_count: nil)
|
691
|
-
@interval = interval
|
692
|
-
@interval_count = interval_count
|
693
|
-
end
|
694
|
-
end
|
695
|
-
# Time span for the redeemed discount.
|
696
|
-
attr_accessor :duration
|
697
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
698
|
-
attr_accessor :timestamp
|
699
|
-
# The type of calculation made to determine when the discount ends.
|
700
|
-
attr_accessor :type
|
701
|
-
|
702
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
703
|
-
@duration = duration
|
704
|
-
@timestamp = timestamp
|
705
|
-
@type = type
|
706
|
-
end
|
707
|
-
end
|
708
588
|
# ID of the coupon to create a new discount for.
|
709
589
|
attr_accessor :coupon
|
710
590
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
711
591
|
attr_accessor :discount
|
712
|
-
# Details to determine how long the discount should be applied for.
|
713
|
-
attr_accessor :discount_end
|
714
592
|
# ID of the promotion code to create a new discount for.
|
715
593
|
attr_accessor :promotion_code
|
716
594
|
|
717
|
-
def initialize(coupon: nil, discount: nil,
|
595
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
718
596
|
@coupon = coupon
|
719
597
|
@discount = discount
|
720
|
-
@discount_end = discount_end
|
721
598
|
@promotion_code = promotion_code
|
722
599
|
end
|
723
600
|
end
|
@@ -759,44 +636,16 @@ module Stripe
|
|
759
636
|
end
|
760
637
|
|
761
638
|
class Discount < Stripe::RequestParams
|
762
|
-
class DiscountEnd < Stripe::RequestParams
|
763
|
-
class Duration < Stripe::RequestParams
|
764
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
765
|
-
attr_accessor :interval
|
766
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
767
|
-
attr_accessor :interval_count
|
768
|
-
|
769
|
-
def initialize(interval: nil, interval_count: nil)
|
770
|
-
@interval = interval
|
771
|
-
@interval_count = interval_count
|
772
|
-
end
|
773
|
-
end
|
774
|
-
# Time span for the redeemed discount.
|
775
|
-
attr_accessor :duration
|
776
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
777
|
-
attr_accessor :timestamp
|
778
|
-
# The type of calculation made to determine when the discount ends.
|
779
|
-
attr_accessor :type
|
780
|
-
|
781
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
782
|
-
@duration = duration
|
783
|
-
@timestamp = timestamp
|
784
|
-
@type = type
|
785
|
-
end
|
786
|
-
end
|
787
639
|
# ID of the coupon to create a new discount for.
|
788
640
|
attr_accessor :coupon
|
789
641
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
790
642
|
attr_accessor :discount
|
791
|
-
# Details to determine how long the discount should be applied for.
|
792
|
-
attr_accessor :discount_end
|
793
643
|
# ID of the promotion code to create a new discount for.
|
794
644
|
attr_accessor :promotion_code
|
795
645
|
|
796
|
-
def initialize(coupon: nil, discount: nil,
|
646
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
797
647
|
@coupon = coupon
|
798
648
|
@discount = discount
|
799
|
-
@discount_end = discount_end
|
800
649
|
@promotion_code = promotion_code
|
801
650
|
end
|
802
651
|
end
|
@@ -842,18 +691,6 @@ module Stripe
|
|
842
691
|
@unit_amount_decimal = unit_amount_decimal
|
843
692
|
end
|
844
693
|
end
|
845
|
-
|
846
|
-
class Trial < Stripe::RequestParams
|
847
|
-
# 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.
|
848
|
-
attr_accessor :converts_to
|
849
|
-
# Determines the type of trial for this item.
|
850
|
-
attr_accessor :type
|
851
|
-
|
852
|
-
def initialize(converts_to: nil, type: nil)
|
853
|
-
@converts_to = converts_to
|
854
|
-
@type = type
|
855
|
-
end
|
856
|
-
end
|
857
694
|
# 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.
|
858
695
|
attr_accessor :billing_thresholds
|
859
696
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -870,8 +707,6 @@ module Stripe
|
|
870
707
|
attr_accessor :quantity
|
871
708
|
# 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.
|
872
709
|
attr_accessor :tax_rates
|
873
|
-
# Options that configure the trial on the subscription item.
|
874
|
-
attr_accessor :trial
|
875
710
|
|
876
711
|
def initialize(
|
877
712
|
billing_thresholds: nil,
|
@@ -881,8 +716,7 @@ module Stripe
|
|
881
716
|
price: nil,
|
882
717
|
price_data: nil,
|
883
718
|
quantity: nil,
|
884
|
-
tax_rates: nil
|
885
|
-
trial: nil
|
719
|
+
tax_rates: nil
|
886
720
|
)
|
887
721
|
@billing_thresholds = billing_thresholds
|
888
722
|
@discounts = discounts
|
@@ -892,16 +726,6 @@ module Stripe
|
|
892
726
|
@price_data = price_data
|
893
727
|
@quantity = quantity
|
894
728
|
@tax_rates = tax_rates
|
895
|
-
@trial = trial
|
896
|
-
end
|
897
|
-
end
|
898
|
-
|
899
|
-
class PauseCollection < Stripe::RequestParams
|
900
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
901
|
-
attr_accessor :behavior
|
902
|
-
|
903
|
-
def initialize(behavior: nil)
|
904
|
-
@behavior = behavior
|
905
729
|
end
|
906
730
|
end
|
907
731
|
|
@@ -916,23 +740,6 @@ module Stripe
|
|
916
740
|
@destination = destination
|
917
741
|
end
|
918
742
|
end
|
919
|
-
|
920
|
-
class TrialSettings < Stripe::RequestParams
|
921
|
-
class EndBehavior < Stripe::RequestParams
|
922
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
923
|
-
attr_accessor :prorate_up_front
|
924
|
-
|
925
|
-
def initialize(prorate_up_front: nil)
|
926
|
-
@prorate_up_front = prorate_up_front
|
927
|
-
end
|
928
|
-
end
|
929
|
-
# Defines how the subscription should behave when a trial ends.
|
930
|
-
attr_accessor :end_behavior
|
931
|
-
|
932
|
-
def initialize(end_behavior: nil)
|
933
|
-
@end_behavior = end_behavior
|
934
|
-
end
|
935
|
-
end
|
936
743
|
# 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.
|
937
744
|
attr_accessor :add_invoice_items
|
938
745
|
# 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).
|
@@ -967,20 +774,14 @@ module Stripe
|
|
967
774
|
attr_accessor :metadata
|
968
775
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
969
776
|
attr_accessor :on_behalf_of
|
970
|
-
# 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).
|
971
|
-
attr_accessor :pause_collection
|
972
777
|
# 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.
|
973
778
|
attr_accessor :proration_behavior
|
974
779
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
975
780
|
attr_accessor :transfer_data
|
976
781
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
977
782
|
attr_accessor :trial
|
978
|
-
# Specify trial behavior when crossing phase boundaries
|
979
|
-
attr_accessor :trial_continuation
|
980
783
|
# 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`
|
981
784
|
attr_accessor :trial_end
|
982
|
-
# Settings related to subscription trials.
|
983
|
-
attr_accessor :trial_settings
|
984
785
|
|
985
786
|
def initialize(
|
986
787
|
add_invoice_items: nil,
|
@@ -1000,13 +801,10 @@ module Stripe
|
|
1000
801
|
iterations: nil,
|
1001
802
|
metadata: nil,
|
1002
803
|
on_behalf_of: nil,
|
1003
|
-
pause_collection: nil,
|
1004
804
|
proration_behavior: nil,
|
1005
805
|
transfer_data: nil,
|
1006
806
|
trial: nil,
|
1007
|
-
|
1008
|
-
trial_end: nil,
|
1009
|
-
trial_settings: nil
|
807
|
+
trial_end: nil
|
1010
808
|
)
|
1011
809
|
@add_invoice_items = add_invoice_items
|
1012
810
|
@application_fee_percent = application_fee_percent
|
@@ -1025,35 +823,16 @@ module Stripe
|
|
1025
823
|
@iterations = iterations
|
1026
824
|
@metadata = metadata
|
1027
825
|
@on_behalf_of = on_behalf_of
|
1028
|
-
@pause_collection = pause_collection
|
1029
826
|
@proration_behavior = proration_behavior
|
1030
827
|
@transfer_data = transfer_data
|
1031
828
|
@trial = trial
|
1032
|
-
@trial_continuation = trial_continuation
|
1033
829
|
@trial_end = trial_end
|
1034
|
-
@trial_settings = trial_settings
|
1035
|
-
end
|
1036
|
-
end
|
1037
|
-
|
1038
|
-
class Prebilling < Stripe::RequestParams
|
1039
|
-
# This is used to determine the number of billing cycles to prebill.
|
1040
|
-
attr_accessor :iterations
|
1041
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1042
|
-
attr_accessor :update_behavior
|
1043
|
-
|
1044
|
-
def initialize(iterations: nil, update_behavior: nil)
|
1045
|
-
@iterations = iterations
|
1046
|
-
@update_behavior = update_behavior
|
1047
830
|
end
|
1048
831
|
end
|
1049
|
-
# 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.
|
1050
|
-
attr_accessor :billing_behavior
|
1051
832
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
1052
833
|
attr_accessor :billing_mode
|
1053
834
|
# The identifier of the customer to create the subscription schedule for.
|
1054
835
|
attr_accessor :customer
|
1055
|
-
# The identifier of the account to create the subscription schedule for.
|
1056
|
-
attr_accessor :customer_account
|
1057
836
|
# Object representing the subscription schedule's default settings.
|
1058
837
|
attr_accessor :default_settings
|
1059
838
|
# 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.
|
@@ -1066,36 +845,28 @@ module Stripe
|
|
1066
845
|
attr_accessor :metadata
|
1067
846
|
# 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.
|
1068
847
|
attr_accessor :phases
|
1069
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1070
|
-
attr_accessor :prebilling
|
1071
848
|
# 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.
|
1072
849
|
attr_accessor :start_date
|
1073
850
|
|
1074
851
|
def initialize(
|
1075
|
-
billing_behavior: nil,
|
1076
852
|
billing_mode: nil,
|
1077
853
|
customer: nil,
|
1078
|
-
customer_account: nil,
|
1079
854
|
default_settings: nil,
|
1080
855
|
end_behavior: nil,
|
1081
856
|
expand: nil,
|
1082
857
|
from_subscription: nil,
|
1083
858
|
metadata: nil,
|
1084
859
|
phases: nil,
|
1085
|
-
prebilling: nil,
|
1086
860
|
start_date: nil
|
1087
861
|
)
|
1088
|
-
@billing_behavior = billing_behavior
|
1089
862
|
@billing_mode = billing_mode
|
1090
863
|
@customer = customer
|
1091
|
-
@customer_account = customer_account
|
1092
864
|
@default_settings = default_settings
|
1093
865
|
@end_behavior = end_behavior
|
1094
866
|
@expand = expand
|
1095
867
|
@from_subscription = from_subscription
|
1096
868
|
@metadata = metadata
|
1097
869
|
@phases = phases
|
1098
|
-
@prebilling = prebilling
|
1099
870
|
@start_date = start_date
|
1100
871
|
end
|
1101
872
|
end
|
@@ -1223,44 +994,16 @@ module Stripe
|
|
1223
994
|
class Phase < Stripe::RequestParams
|
1224
995
|
class AddInvoiceItem < Stripe::RequestParams
|
1225
996
|
class Discount < Stripe::RequestParams
|
1226
|
-
class DiscountEnd < Stripe::RequestParams
|
1227
|
-
class Duration < Stripe::RequestParams
|
1228
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1229
|
-
attr_accessor :interval
|
1230
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1231
|
-
attr_accessor :interval_count
|
1232
|
-
|
1233
|
-
def initialize(interval: nil, interval_count: nil)
|
1234
|
-
@interval = interval
|
1235
|
-
@interval_count = interval_count
|
1236
|
-
end
|
1237
|
-
end
|
1238
|
-
# Time span for the redeemed discount.
|
1239
|
-
attr_accessor :duration
|
1240
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1241
|
-
attr_accessor :timestamp
|
1242
|
-
# The type of calculation made to determine when the discount ends.
|
1243
|
-
attr_accessor :type
|
1244
|
-
|
1245
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1246
|
-
@duration = duration
|
1247
|
-
@timestamp = timestamp
|
1248
|
-
@type = type
|
1249
|
-
end
|
1250
|
-
end
|
1251
997
|
# ID of the coupon to create a new discount for.
|
1252
998
|
attr_accessor :coupon
|
1253
999
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1254
1000
|
attr_accessor :discount
|
1255
|
-
# Details to determine how long the discount should be applied for.
|
1256
|
-
attr_accessor :discount_end
|
1257
1001
|
# ID of the promotion code to create a new discount for.
|
1258
1002
|
attr_accessor :promotion_code
|
1259
1003
|
|
1260
|
-
def initialize(coupon: nil, discount: nil,
|
1004
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1261
1005
|
@coupon = coupon
|
1262
1006
|
@discount = discount
|
1263
|
-
@discount_end = discount_end
|
1264
1007
|
@promotion_code = promotion_code
|
1265
1008
|
end
|
1266
1009
|
end
|
@@ -1347,44 +1090,16 @@ module Stripe
|
|
1347
1090
|
end
|
1348
1091
|
|
1349
1092
|
class Discount < Stripe::RequestParams
|
1350
|
-
class DiscountEnd < Stripe::RequestParams
|
1351
|
-
class Duration < Stripe::RequestParams
|
1352
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1353
|
-
attr_accessor :interval
|
1354
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1355
|
-
attr_accessor :interval_count
|
1356
|
-
|
1357
|
-
def initialize(interval: nil, interval_count: nil)
|
1358
|
-
@interval = interval
|
1359
|
-
@interval_count = interval_count
|
1360
|
-
end
|
1361
|
-
end
|
1362
|
-
# Time span for the redeemed discount.
|
1363
|
-
attr_accessor :duration
|
1364
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1365
|
-
attr_accessor :timestamp
|
1366
|
-
# The type of calculation made to determine when the discount ends.
|
1367
|
-
attr_accessor :type
|
1368
|
-
|
1369
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1370
|
-
@duration = duration
|
1371
|
-
@timestamp = timestamp
|
1372
|
-
@type = type
|
1373
|
-
end
|
1374
|
-
end
|
1375
1093
|
# ID of the coupon to create a new discount for.
|
1376
1094
|
attr_accessor :coupon
|
1377
1095
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1378
1096
|
attr_accessor :discount
|
1379
|
-
# Details to determine how long the discount should be applied for.
|
1380
|
-
attr_accessor :discount_end
|
1381
1097
|
# ID of the promotion code to create a new discount for.
|
1382
1098
|
attr_accessor :promotion_code
|
1383
1099
|
|
1384
|
-
def initialize(coupon: nil, discount: nil,
|
1100
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1385
1101
|
@coupon = coupon
|
1386
1102
|
@discount = discount
|
1387
|
-
@discount_end = discount_end
|
1388
1103
|
@promotion_code = promotion_code
|
1389
1104
|
end
|
1390
1105
|
end
|
@@ -1426,44 +1141,16 @@ module Stripe
|
|
1426
1141
|
end
|
1427
1142
|
|
1428
1143
|
class Discount < Stripe::RequestParams
|
1429
|
-
class DiscountEnd < Stripe::RequestParams
|
1430
|
-
class Duration < Stripe::RequestParams
|
1431
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1432
|
-
attr_accessor :interval
|
1433
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1434
|
-
attr_accessor :interval_count
|
1435
|
-
|
1436
|
-
def initialize(interval: nil, interval_count: nil)
|
1437
|
-
@interval = interval
|
1438
|
-
@interval_count = interval_count
|
1439
|
-
end
|
1440
|
-
end
|
1441
|
-
# Time span for the redeemed discount.
|
1442
|
-
attr_accessor :duration
|
1443
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1444
|
-
attr_accessor :timestamp
|
1445
|
-
# The type of calculation made to determine when the discount ends.
|
1446
|
-
attr_accessor :type
|
1447
|
-
|
1448
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1449
|
-
@duration = duration
|
1450
|
-
@timestamp = timestamp
|
1451
|
-
@type = type
|
1452
|
-
end
|
1453
|
-
end
|
1454
1144
|
# ID of the coupon to create a new discount for.
|
1455
1145
|
attr_accessor :coupon
|
1456
1146
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1457
1147
|
attr_accessor :discount
|
1458
|
-
# Details to determine how long the discount should be applied for.
|
1459
|
-
attr_accessor :discount_end
|
1460
1148
|
# ID of the promotion code to create a new discount for.
|
1461
1149
|
attr_accessor :promotion_code
|
1462
1150
|
|
1463
|
-
def initialize(coupon: nil, discount: nil,
|
1151
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1464
1152
|
@coupon = coupon
|
1465
1153
|
@discount = discount
|
1466
|
-
@discount_end = discount_end
|
1467
1154
|
@promotion_code = promotion_code
|
1468
1155
|
end
|
1469
1156
|
end
|
@@ -1509,18 +1196,6 @@ module Stripe
|
|
1509
1196
|
@unit_amount_decimal = unit_amount_decimal
|
1510
1197
|
end
|
1511
1198
|
end
|
1512
|
-
|
1513
|
-
class Trial < Stripe::RequestParams
|
1514
|
-
# 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.
|
1515
|
-
attr_accessor :converts_to
|
1516
|
-
# Determines the type of trial for this item.
|
1517
|
-
attr_accessor :type
|
1518
|
-
|
1519
|
-
def initialize(converts_to: nil, type: nil)
|
1520
|
-
@converts_to = converts_to
|
1521
|
-
@type = type
|
1522
|
-
end
|
1523
|
-
end
|
1524
1199
|
# 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.
|
1525
1200
|
attr_accessor :billing_thresholds
|
1526
1201
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -1537,8 +1212,6 @@ module Stripe
|
|
1537
1212
|
attr_accessor :quantity
|
1538
1213
|
# 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.
|
1539
1214
|
attr_accessor :tax_rates
|
1540
|
-
# Options that configure the trial on the subscription item.
|
1541
|
-
attr_accessor :trial
|
1542
1215
|
|
1543
1216
|
def initialize(
|
1544
1217
|
billing_thresholds: nil,
|
@@ -1548,8 +1221,7 @@ module Stripe
|
|
1548
1221
|
price: nil,
|
1549
1222
|
price_data: nil,
|
1550
1223
|
quantity: nil,
|
1551
|
-
tax_rates: nil
|
1552
|
-
trial: nil
|
1224
|
+
tax_rates: nil
|
1553
1225
|
)
|
1554
1226
|
@billing_thresholds = billing_thresholds
|
1555
1227
|
@discounts = discounts
|
@@ -1559,16 +1231,6 @@ module Stripe
|
|
1559
1231
|
@price_data = price_data
|
1560
1232
|
@quantity = quantity
|
1561
1233
|
@tax_rates = tax_rates
|
1562
|
-
@trial = trial
|
1563
|
-
end
|
1564
|
-
end
|
1565
|
-
|
1566
|
-
class PauseCollection < Stripe::RequestParams
|
1567
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1568
|
-
attr_accessor :behavior
|
1569
|
-
|
1570
|
-
def initialize(behavior: nil)
|
1571
|
-
@behavior = behavior
|
1572
1234
|
end
|
1573
1235
|
end
|
1574
1236
|
|
@@ -1583,23 +1245,6 @@ module Stripe
|
|
1583
1245
|
@destination = destination
|
1584
1246
|
end
|
1585
1247
|
end
|
1586
|
-
|
1587
|
-
class TrialSettings < Stripe::RequestParams
|
1588
|
-
class EndBehavior < Stripe::RequestParams
|
1589
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1590
|
-
attr_accessor :prorate_up_front
|
1591
|
-
|
1592
|
-
def initialize(prorate_up_front: nil)
|
1593
|
-
@prorate_up_front = prorate_up_front
|
1594
|
-
end
|
1595
|
-
end
|
1596
|
-
# Defines how the subscription should behave when a trial ends.
|
1597
|
-
attr_accessor :end_behavior
|
1598
|
-
|
1599
|
-
def initialize(end_behavior: nil)
|
1600
|
-
@end_behavior = end_behavior
|
1601
|
-
end
|
1602
|
-
end
|
1603
1248
|
# 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.
|
1604
1249
|
attr_accessor :add_invoice_items
|
1605
1250
|
# 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).
|
@@ -1634,8 +1279,6 @@ module Stripe
|
|
1634
1279
|
attr_accessor :metadata
|
1635
1280
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
1636
1281
|
attr_accessor :on_behalf_of
|
1637
|
-
# 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).
|
1638
|
-
attr_accessor :pause_collection
|
1639
1282
|
# 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.
|
1640
1283
|
attr_accessor :proration_behavior
|
1641
1284
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -1644,12 +1287,8 @@ module Stripe
|
|
1644
1287
|
attr_accessor :transfer_data
|
1645
1288
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
1646
1289
|
attr_accessor :trial
|
1647
|
-
# Specify trial behavior when crossing phase boundaries
|
1648
|
-
attr_accessor :trial_continuation
|
1649
1290
|
# 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`
|
1650
1291
|
attr_accessor :trial_end
|
1651
|
-
# Settings related to subscription trials.
|
1652
|
-
attr_accessor :trial_settings
|
1653
1292
|
|
1654
1293
|
def initialize(
|
1655
1294
|
add_invoice_items: nil,
|
@@ -1669,14 +1308,11 @@ module Stripe
|
|
1669
1308
|
iterations: nil,
|
1670
1309
|
metadata: nil,
|
1671
1310
|
on_behalf_of: nil,
|
1672
|
-
pause_collection: nil,
|
1673
1311
|
proration_behavior: nil,
|
1674
1312
|
start_date: nil,
|
1675
1313
|
transfer_data: nil,
|
1676
1314
|
trial: nil,
|
1677
|
-
|
1678
|
-
trial_end: nil,
|
1679
|
-
trial_settings: nil
|
1315
|
+
trial_end: nil
|
1680
1316
|
)
|
1681
1317
|
@add_invoice_items = add_invoice_items
|
1682
1318
|
@application_fee_percent = application_fee_percent
|
@@ -1695,30 +1331,13 @@ module Stripe
|
|
1695
1331
|
@iterations = iterations
|
1696
1332
|
@metadata = metadata
|
1697
1333
|
@on_behalf_of = on_behalf_of
|
1698
|
-
@pause_collection = pause_collection
|
1699
1334
|
@proration_behavior = proration_behavior
|
1700
1335
|
@start_date = start_date
|
1701
1336
|
@transfer_data = transfer_data
|
1702
1337
|
@trial = trial
|
1703
|
-
@trial_continuation = trial_continuation
|
1704
1338
|
@trial_end = trial_end
|
1705
|
-
@trial_settings = trial_settings
|
1706
1339
|
end
|
1707
1340
|
end
|
1708
|
-
|
1709
|
-
class Prebilling < Stripe::RequestParams
|
1710
|
-
# This is used to determine the number of billing cycles to prebill.
|
1711
|
-
attr_accessor :iterations
|
1712
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1713
|
-
attr_accessor :update_behavior
|
1714
|
-
|
1715
|
-
def initialize(iterations: nil, update_behavior: nil)
|
1716
|
-
@iterations = iterations
|
1717
|
-
@update_behavior = update_behavior
|
1718
|
-
end
|
1719
|
-
end
|
1720
|
-
# 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.
|
1721
|
-
attr_accessor :billing_behavior
|
1722
1341
|
# Object representing the subscription schedule's default settings.
|
1723
1342
|
attr_accessor :default_settings
|
1724
1343
|
# 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.
|
@@ -1729,598 +1348,26 @@ module Stripe
|
|
1729
1348
|
attr_accessor :metadata
|
1730
1349
|
# 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.
|
1731
1350
|
attr_accessor :phases
|
1732
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1733
|
-
attr_accessor :prebilling
|
1734
1351
|
# 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`.
|
1735
1352
|
attr_accessor :proration_behavior
|
1736
1353
|
|
1737
1354
|
def initialize(
|
1738
|
-
billing_behavior: nil,
|
1739
1355
|
default_settings: nil,
|
1740
1356
|
end_behavior: nil,
|
1741
1357
|
expand: nil,
|
1742
1358
|
metadata: nil,
|
1743
1359
|
phases: nil,
|
1744
|
-
prebilling: nil,
|
1745
1360
|
proration_behavior: nil
|
1746
1361
|
)
|
1747
|
-
@billing_behavior = billing_behavior
|
1748
1362
|
@default_settings = default_settings
|
1749
1363
|
@end_behavior = end_behavior
|
1750
1364
|
@expand = expand
|
1751
1365
|
@metadata = metadata
|
1752
1366
|
@phases = phases
|
1753
|
-
@prebilling = prebilling
|
1754
1367
|
@proration_behavior = proration_behavior
|
1755
1368
|
end
|
1756
1369
|
end
|
1757
1370
|
|
1758
|
-
class AmendParams < Stripe::RequestParams
|
1759
|
-
class Amendment < Stripe::RequestParams
|
1760
|
-
class AmendmentEnd < Stripe::RequestParams
|
1761
|
-
class DiscountEnd < Stripe::RequestParams
|
1762
|
-
# The ID of a specific discount.
|
1763
|
-
attr_accessor :discount
|
1764
|
-
|
1765
|
-
def initialize(discount: nil)
|
1766
|
-
@discount = discount
|
1767
|
-
end
|
1768
|
-
end
|
1769
|
-
|
1770
|
-
class Duration < Stripe::RequestParams
|
1771
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1772
|
-
attr_accessor :interval
|
1773
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1774
|
-
attr_accessor :interval_count
|
1775
|
-
|
1776
|
-
def initialize(interval: nil, interval_count: nil)
|
1777
|
-
@interval = interval
|
1778
|
-
@interval_count = interval_count
|
1779
|
-
end
|
1780
|
-
end
|
1781
|
-
# Use the `end` time of a given discount.
|
1782
|
-
attr_accessor :discount_end
|
1783
|
-
# Time span for the amendment starting from the `amendment_start`.
|
1784
|
-
attr_accessor :duration
|
1785
|
-
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
1786
|
-
attr_accessor :timestamp
|
1787
|
-
# Select one of three ways to pass the `amendment_end`.
|
1788
|
-
attr_accessor :type
|
1789
|
-
|
1790
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
1791
|
-
@discount_end = discount_end
|
1792
|
-
@duration = duration
|
1793
|
-
@timestamp = timestamp
|
1794
|
-
@type = type
|
1795
|
-
end
|
1796
|
-
end
|
1797
|
-
|
1798
|
-
class AmendmentStart < Stripe::RequestParams
|
1799
|
-
class AmendmentEnd < Stripe::RequestParams
|
1800
|
-
# 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.
|
1801
|
-
attr_accessor :index
|
1802
|
-
|
1803
|
-
def initialize(index: nil)
|
1804
|
-
@index = index
|
1805
|
-
end
|
1806
|
-
end
|
1807
|
-
|
1808
|
-
class DiscountEnd < Stripe::RequestParams
|
1809
|
-
# The ID of a specific discount.
|
1810
|
-
attr_accessor :discount
|
1811
|
-
|
1812
|
-
def initialize(discount: nil)
|
1813
|
-
@discount = discount
|
1814
|
-
end
|
1815
|
-
end
|
1816
|
-
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
1817
|
-
attr_accessor :amendment_end
|
1818
|
-
# Use the `end` time of a given discount.
|
1819
|
-
attr_accessor :discount_end
|
1820
|
-
# A precise Unix timestamp for the amendment to start.
|
1821
|
-
attr_accessor :timestamp
|
1822
|
-
# Select one of three ways to pass the `amendment_start`.
|
1823
|
-
attr_accessor :type
|
1824
|
-
|
1825
|
-
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
1826
|
-
@amendment_end = amendment_end
|
1827
|
-
@discount_end = discount_end
|
1828
|
-
@timestamp = timestamp
|
1829
|
-
@type = type
|
1830
|
-
end
|
1831
|
-
end
|
1832
|
-
|
1833
|
-
class DiscountAction < Stripe::RequestParams
|
1834
|
-
class Add < Stripe::RequestParams
|
1835
|
-
class DiscountEnd < Stripe::RequestParams
|
1836
|
-
# The type of calculation made to determine when the discount ends.
|
1837
|
-
attr_accessor :type
|
1838
|
-
|
1839
|
-
def initialize(type: nil)
|
1840
|
-
@type = type
|
1841
|
-
end
|
1842
|
-
end
|
1843
|
-
# The coupon code to redeem.
|
1844
|
-
attr_accessor :coupon
|
1845
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
1846
|
-
attr_accessor :discount
|
1847
|
-
# Details to determine how long the discount should be applied for.
|
1848
|
-
attr_accessor :discount_end
|
1849
|
-
# 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.
|
1850
|
-
attr_accessor :index
|
1851
|
-
# The promotion code to redeem.
|
1852
|
-
attr_accessor :promotion_code
|
1853
|
-
|
1854
|
-
def initialize(
|
1855
|
-
coupon: nil,
|
1856
|
-
discount: nil,
|
1857
|
-
discount_end: nil,
|
1858
|
-
index: nil,
|
1859
|
-
promotion_code: nil
|
1860
|
-
)
|
1861
|
-
@coupon = coupon
|
1862
|
-
@discount = discount
|
1863
|
-
@discount_end = discount_end
|
1864
|
-
@index = index
|
1865
|
-
@promotion_code = promotion_code
|
1866
|
-
end
|
1867
|
-
end
|
1868
|
-
|
1869
|
-
class Remove < Stripe::RequestParams
|
1870
|
-
# The coupon code to remove from the `discounts` array.
|
1871
|
-
attr_accessor :coupon
|
1872
|
-
# The ID of a discount to remove from the `discounts` array.
|
1873
|
-
attr_accessor :discount
|
1874
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
1875
|
-
attr_accessor :promotion_code
|
1876
|
-
|
1877
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1878
|
-
@coupon = coupon
|
1879
|
-
@discount = discount
|
1880
|
-
@promotion_code = promotion_code
|
1881
|
-
end
|
1882
|
-
end
|
1883
|
-
|
1884
|
-
class Set < Stripe::RequestParams
|
1885
|
-
# The coupon code to replace the `discounts` array with.
|
1886
|
-
attr_accessor :coupon
|
1887
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
1888
|
-
attr_accessor :discount
|
1889
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
1890
|
-
attr_accessor :promotion_code
|
1891
|
-
|
1892
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1893
|
-
@coupon = coupon
|
1894
|
-
@discount = discount
|
1895
|
-
@promotion_code = promotion_code
|
1896
|
-
end
|
1897
|
-
end
|
1898
|
-
# Details of the discount to add.
|
1899
|
-
attr_accessor :add
|
1900
|
-
# Details of the discount to remove.
|
1901
|
-
attr_accessor :remove
|
1902
|
-
# Details of the discount to replace the existing discounts with.
|
1903
|
-
attr_accessor :set
|
1904
|
-
# Determines the type of discount action.
|
1905
|
-
attr_accessor :type
|
1906
|
-
|
1907
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1908
|
-
@add = add
|
1909
|
-
@remove = remove
|
1910
|
-
@set = set
|
1911
|
-
@type = type
|
1912
|
-
end
|
1913
|
-
end
|
1914
|
-
|
1915
|
-
class ItemAction < Stripe::RequestParams
|
1916
|
-
class Add < Stripe::RequestParams
|
1917
|
-
class Discount < Stripe::RequestParams
|
1918
|
-
class DiscountEnd < Stripe::RequestParams
|
1919
|
-
class Duration < Stripe::RequestParams
|
1920
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1921
|
-
attr_accessor :interval
|
1922
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1923
|
-
attr_accessor :interval_count
|
1924
|
-
|
1925
|
-
def initialize(interval: nil, interval_count: nil)
|
1926
|
-
@interval = interval
|
1927
|
-
@interval_count = interval_count
|
1928
|
-
end
|
1929
|
-
end
|
1930
|
-
# Time span for the redeemed discount.
|
1931
|
-
attr_accessor :duration
|
1932
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1933
|
-
attr_accessor :timestamp
|
1934
|
-
# The type of calculation made to determine when the discount ends.
|
1935
|
-
attr_accessor :type
|
1936
|
-
|
1937
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1938
|
-
@duration = duration
|
1939
|
-
@timestamp = timestamp
|
1940
|
-
@type = type
|
1941
|
-
end
|
1942
|
-
end
|
1943
|
-
# ID of the coupon to create a new discount for.
|
1944
|
-
attr_accessor :coupon
|
1945
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1946
|
-
attr_accessor :discount
|
1947
|
-
# Details to determine how long the discount should be applied for.
|
1948
|
-
attr_accessor :discount_end
|
1949
|
-
# ID of the promotion code to create a new discount for.
|
1950
|
-
attr_accessor :promotion_code
|
1951
|
-
|
1952
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1953
|
-
@coupon = coupon
|
1954
|
-
@discount = discount
|
1955
|
-
@discount_end = discount_end
|
1956
|
-
@promotion_code = promotion_code
|
1957
|
-
end
|
1958
|
-
end
|
1959
|
-
|
1960
|
-
class Trial < Stripe::RequestParams
|
1961
|
-
# 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.
|
1962
|
-
attr_accessor :converts_to
|
1963
|
-
# Determines the type of trial for this item.
|
1964
|
-
attr_accessor :type
|
1965
|
-
|
1966
|
-
def initialize(converts_to: nil, type: nil)
|
1967
|
-
@converts_to = converts_to
|
1968
|
-
@type = type
|
1969
|
-
end
|
1970
|
-
end
|
1971
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
1972
|
-
attr_accessor :discounts
|
1973
|
-
# 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`.
|
1974
|
-
attr_accessor :metadata
|
1975
|
-
# The ID of the price object.
|
1976
|
-
attr_accessor :price
|
1977
|
-
# Quantity for this item.
|
1978
|
-
attr_accessor :quantity
|
1979
|
-
# 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`.
|
1980
|
-
attr_accessor :tax_rates
|
1981
|
-
# Options that configure the trial on the subscription item.
|
1982
|
-
attr_accessor :trial
|
1983
|
-
|
1984
|
-
def initialize(
|
1985
|
-
discounts: nil,
|
1986
|
-
metadata: nil,
|
1987
|
-
price: nil,
|
1988
|
-
quantity: nil,
|
1989
|
-
tax_rates: nil,
|
1990
|
-
trial: nil
|
1991
|
-
)
|
1992
|
-
@discounts = discounts
|
1993
|
-
@metadata = metadata
|
1994
|
-
@price = price
|
1995
|
-
@quantity = quantity
|
1996
|
-
@tax_rates = tax_rates
|
1997
|
-
@trial = trial
|
1998
|
-
end
|
1999
|
-
end
|
2000
|
-
|
2001
|
-
class Remove < Stripe::RequestParams
|
2002
|
-
# ID of a price to remove.
|
2003
|
-
attr_accessor :price
|
2004
|
-
|
2005
|
-
def initialize(price: nil)
|
2006
|
-
@price = price
|
2007
|
-
end
|
2008
|
-
end
|
2009
|
-
|
2010
|
-
class Set < Stripe::RequestParams
|
2011
|
-
class Discount < Stripe::RequestParams
|
2012
|
-
class DiscountEnd < Stripe::RequestParams
|
2013
|
-
class Duration < Stripe::RequestParams
|
2014
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2015
|
-
attr_accessor :interval
|
2016
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2017
|
-
attr_accessor :interval_count
|
2018
|
-
|
2019
|
-
def initialize(interval: nil, interval_count: nil)
|
2020
|
-
@interval = interval
|
2021
|
-
@interval_count = interval_count
|
2022
|
-
end
|
2023
|
-
end
|
2024
|
-
# Time span for the redeemed discount.
|
2025
|
-
attr_accessor :duration
|
2026
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2027
|
-
attr_accessor :timestamp
|
2028
|
-
# The type of calculation made to determine when the discount ends.
|
2029
|
-
attr_accessor :type
|
2030
|
-
|
2031
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2032
|
-
@duration = duration
|
2033
|
-
@timestamp = timestamp
|
2034
|
-
@type = type
|
2035
|
-
end
|
2036
|
-
end
|
2037
|
-
# ID of the coupon to create a new discount for.
|
2038
|
-
attr_accessor :coupon
|
2039
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2040
|
-
attr_accessor :discount
|
2041
|
-
# Details to determine how long the discount should be applied for.
|
2042
|
-
attr_accessor :discount_end
|
2043
|
-
# ID of the promotion code to create a new discount for.
|
2044
|
-
attr_accessor :promotion_code
|
2045
|
-
|
2046
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2047
|
-
@coupon = coupon
|
2048
|
-
@discount = discount
|
2049
|
-
@discount_end = discount_end
|
2050
|
-
@promotion_code = promotion_code
|
2051
|
-
end
|
2052
|
-
end
|
2053
|
-
|
2054
|
-
class Trial < Stripe::RequestParams
|
2055
|
-
# 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.
|
2056
|
-
attr_accessor :converts_to
|
2057
|
-
# Determines the type of trial for this item.
|
2058
|
-
attr_accessor :type
|
2059
|
-
|
2060
|
-
def initialize(converts_to: nil, type: nil)
|
2061
|
-
@converts_to = converts_to
|
2062
|
-
@type = type
|
2063
|
-
end
|
2064
|
-
end
|
2065
|
-
# 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`.
|
2066
|
-
attr_accessor :discounts
|
2067
|
-
# 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`.
|
2068
|
-
attr_accessor :metadata
|
2069
|
-
# The ID of the price object.
|
2070
|
-
attr_accessor :price
|
2071
|
-
# 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`.
|
2072
|
-
attr_accessor :quantity
|
2073
|
-
# 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`.
|
2074
|
-
attr_accessor :tax_rates
|
2075
|
-
# 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`.
|
2076
|
-
attr_accessor :trial
|
2077
|
-
|
2078
|
-
def initialize(
|
2079
|
-
discounts: nil,
|
2080
|
-
metadata: nil,
|
2081
|
-
price: nil,
|
2082
|
-
quantity: nil,
|
2083
|
-
tax_rates: nil,
|
2084
|
-
trial: nil
|
2085
|
-
)
|
2086
|
-
@discounts = discounts
|
2087
|
-
@metadata = metadata
|
2088
|
-
@price = price
|
2089
|
-
@quantity = quantity
|
2090
|
-
@tax_rates = tax_rates
|
2091
|
-
@trial = trial
|
2092
|
-
end
|
2093
|
-
end
|
2094
|
-
# 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.
|
2095
|
-
attr_accessor :add
|
2096
|
-
# Details of the subscription item to remove.
|
2097
|
-
attr_accessor :remove
|
2098
|
-
# 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.
|
2099
|
-
attr_accessor :set
|
2100
|
-
# Determines the type of item action.
|
2101
|
-
attr_accessor :type
|
2102
|
-
|
2103
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2104
|
-
@add = add
|
2105
|
-
@remove = remove
|
2106
|
-
@set = set
|
2107
|
-
@type = type
|
2108
|
-
end
|
2109
|
-
end
|
2110
|
-
|
2111
|
-
class MetadataAction < Stripe::RequestParams
|
2112
|
-
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
2113
|
-
attr_accessor :add
|
2114
|
-
# Keys to remove from schedule phase metadata.
|
2115
|
-
attr_accessor :remove
|
2116
|
-
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
2117
|
-
attr_accessor :set
|
2118
|
-
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
2119
|
-
attr_accessor :type
|
2120
|
-
|
2121
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
2122
|
-
@add = add
|
2123
|
-
@remove = remove
|
2124
|
-
@set = set
|
2125
|
-
@type = type
|
2126
|
-
end
|
2127
|
-
end
|
2128
|
-
|
2129
|
-
class SetPauseCollection < Stripe::RequestParams
|
2130
|
-
class Set < Stripe::RequestParams
|
2131
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2132
|
-
attr_accessor :behavior
|
2133
|
-
|
2134
|
-
def initialize(behavior: nil)
|
2135
|
-
@behavior = behavior
|
2136
|
-
end
|
2137
|
-
end
|
2138
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
2139
|
-
attr_accessor :set
|
2140
|
-
# Determines the type of the pause_collection amendment.
|
2141
|
-
attr_accessor :type
|
2142
|
-
|
2143
|
-
def initialize(set: nil, type: nil)
|
2144
|
-
@set = set
|
2145
|
-
@type = type
|
2146
|
-
end
|
2147
|
-
end
|
2148
|
-
|
2149
|
-
class TrialSettings < Stripe::RequestParams
|
2150
|
-
class EndBehavior < Stripe::RequestParams
|
2151
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2152
|
-
attr_accessor :prorate_up_front
|
2153
|
-
|
2154
|
-
def initialize(prorate_up_front: nil)
|
2155
|
-
@prorate_up_front = prorate_up_front
|
2156
|
-
end
|
2157
|
-
end
|
2158
|
-
# Defines how the subscription should behave when a trial ends.
|
2159
|
-
attr_accessor :end_behavior
|
2160
|
-
|
2161
|
-
def initialize(end_behavior: nil)
|
2162
|
-
@end_behavior = end_behavior
|
2163
|
-
end
|
2164
|
-
end
|
2165
|
-
# 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.
|
2166
|
-
attr_accessor :amendment_end
|
2167
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2168
|
-
attr_accessor :amendment_start
|
2169
|
-
# 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.
|
2170
|
-
attr_accessor :billing_cycle_anchor
|
2171
|
-
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
2172
|
-
attr_accessor :discount_actions
|
2173
|
-
# Changes to the subscription items during the amendment time span.
|
2174
|
-
attr_accessor :item_actions
|
2175
|
-
# Instructions for how to modify phase metadata
|
2176
|
-
attr_accessor :metadata_actions
|
2177
|
-
# 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`.
|
2178
|
-
attr_accessor :proration_behavior
|
2179
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2180
|
-
attr_accessor :set_pause_collection
|
2181
|
-
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
2182
|
-
attr_accessor :set_schedule_end
|
2183
|
-
# Settings related to subscription trials.
|
2184
|
-
attr_accessor :trial_settings
|
2185
|
-
|
2186
|
-
def initialize(
|
2187
|
-
amendment_end: nil,
|
2188
|
-
amendment_start: nil,
|
2189
|
-
billing_cycle_anchor: nil,
|
2190
|
-
discount_actions: nil,
|
2191
|
-
item_actions: nil,
|
2192
|
-
metadata_actions: nil,
|
2193
|
-
proration_behavior: nil,
|
2194
|
-
set_pause_collection: nil,
|
2195
|
-
set_schedule_end: nil,
|
2196
|
-
trial_settings: nil
|
2197
|
-
)
|
2198
|
-
@amendment_end = amendment_end
|
2199
|
-
@amendment_start = amendment_start
|
2200
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
2201
|
-
@discount_actions = discount_actions
|
2202
|
-
@item_actions = item_actions
|
2203
|
-
@metadata_actions = metadata_actions
|
2204
|
-
@proration_behavior = proration_behavior
|
2205
|
-
@set_pause_collection = set_pause_collection
|
2206
|
-
@set_schedule_end = set_schedule_end
|
2207
|
-
@trial_settings = trial_settings
|
2208
|
-
end
|
2209
|
-
end
|
2210
|
-
|
2211
|
-
class Prebilling < Stripe::RequestParams
|
2212
|
-
class BillFrom < Stripe::RequestParams
|
2213
|
-
class AmendmentStart < Stripe::RequestParams
|
2214
|
-
# 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.
|
2215
|
-
attr_accessor :index
|
2216
|
-
|
2217
|
-
def initialize(index: nil)
|
2218
|
-
@index = index
|
2219
|
-
end
|
2220
|
-
end
|
2221
|
-
# Start the prebilled period when a specified amendment begins.
|
2222
|
-
attr_accessor :amendment_start
|
2223
|
-
# Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2224
|
-
attr_accessor :timestamp
|
2225
|
-
# Select one of several ways to pass the `bill_from` value.
|
2226
|
-
attr_accessor :type
|
2227
|
-
|
2228
|
-
def initialize(amendment_start: nil, timestamp: nil, type: nil)
|
2229
|
-
@amendment_start = amendment_start
|
2230
|
-
@timestamp = timestamp
|
2231
|
-
@type = type
|
2232
|
-
end
|
2233
|
-
end
|
2234
|
-
|
2235
|
-
class BillUntil < Stripe::RequestParams
|
2236
|
-
class AmendmentEnd < Stripe::RequestParams
|
2237
|
-
# 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.
|
2238
|
-
attr_accessor :index
|
2239
|
-
|
2240
|
-
def initialize(index: nil)
|
2241
|
-
@index = index
|
2242
|
-
end
|
2243
|
-
end
|
2244
|
-
|
2245
|
-
class Duration < Stripe::RequestParams
|
2246
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2247
|
-
attr_accessor :interval
|
2248
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2249
|
-
attr_accessor :interval_count
|
2250
|
-
|
2251
|
-
def initialize(interval: nil, interval_count: nil)
|
2252
|
-
@interval = interval
|
2253
|
-
@interval_count = interval_count
|
2254
|
-
end
|
2255
|
-
end
|
2256
|
-
# End the prebilled period when a specified amendment ends.
|
2257
|
-
attr_accessor :amendment_end
|
2258
|
-
# Time span for prebilling, starting from `bill_from`.
|
2259
|
-
attr_accessor :duration
|
2260
|
-
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2261
|
-
attr_accessor :timestamp
|
2262
|
-
# Select one of several ways to pass the `bill_until` value.
|
2263
|
-
attr_accessor :type
|
2264
|
-
|
2265
|
-
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
2266
|
-
@amendment_end = amendment_end
|
2267
|
-
@duration = duration
|
2268
|
-
@timestamp = timestamp
|
2269
|
-
@type = type
|
2270
|
-
end
|
2271
|
-
end
|
2272
|
-
# The beginning of the prebilled time period. The default value is `now`.
|
2273
|
-
attr_accessor :bill_from
|
2274
|
-
# The end of the prebilled time period.
|
2275
|
-
attr_accessor :bill_until
|
2276
|
-
# When the prebilling invoice should be created. The default value is `now`.
|
2277
|
-
attr_accessor :invoice_at
|
2278
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
2279
|
-
attr_accessor :update_behavior
|
2280
|
-
|
2281
|
-
def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
|
2282
|
-
@bill_from = bill_from
|
2283
|
-
@bill_until = bill_until
|
2284
|
-
@invoice_at = invoice_at
|
2285
|
-
@update_behavior = update_behavior
|
2286
|
-
end
|
2287
|
-
end
|
2288
|
-
|
2289
|
-
class ScheduleSettings < Stripe::RequestParams
|
2290
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2291
|
-
attr_accessor :end_behavior
|
2292
|
-
|
2293
|
-
def initialize(end_behavior: nil)
|
2294
|
-
@end_behavior = end_behavior
|
2295
|
-
end
|
2296
|
-
end
|
2297
|
-
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
2298
|
-
attr_accessor :amendments
|
2299
|
-
# Specifies which fields in the response should be expanded.
|
2300
|
-
attr_accessor :expand
|
2301
|
-
# Provide any time periods to bill in advance.
|
2302
|
-
attr_accessor :prebilling
|
2303
|
-
# In cases where the amendment changes the currently active phase,
|
2304
|
-
# specifies if and how to prorate at the time of the request.
|
2305
|
-
attr_accessor :proration_behavior
|
2306
|
-
# Changes to apply to the subscription schedule.
|
2307
|
-
attr_accessor :schedule_settings
|
2308
|
-
|
2309
|
-
def initialize(
|
2310
|
-
amendments: nil,
|
2311
|
-
expand: nil,
|
2312
|
-
prebilling: nil,
|
2313
|
-
proration_behavior: nil,
|
2314
|
-
schedule_settings: nil
|
2315
|
-
)
|
2316
|
-
@amendments = amendments
|
2317
|
-
@expand = expand
|
2318
|
-
@prebilling = prebilling
|
2319
|
-
@proration_behavior = proration_behavior
|
2320
|
-
@schedule_settings = schedule_settings
|
2321
|
-
end
|
2322
|
-
end
|
2323
|
-
|
2324
1371
|
class CancelParams < Stripe::RequestParams
|
2325
1372
|
# Specifies which fields in the response should be expanded.
|
2326
1373
|
attr_accessor :expand
|
@@ -2349,9 +1396,7 @@ module Stripe
|
|
2349
1396
|
end
|
2350
1397
|
# ID of the Connect Application that created the schedule.
|
2351
1398
|
attr_reader :application
|
2352
|
-
#
|
2353
|
-
attr_reader :billing_behavior
|
2354
|
-
# The [billing mode](/api/subscriptions/create#create_subscription-billing_mode) that will be used to process all future operations for the subscription schedule.
|
1399
|
+
# The billing mode of the subscription.
|
2355
1400
|
attr_reader :billing_mode
|
2356
1401
|
# Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
|
2357
1402
|
attr_reader :canceled_at
|
@@ -2363,16 +1408,12 @@ module Stripe
|
|
2363
1408
|
attr_reader :current_phase
|
2364
1409
|
# ID of the customer who owns the subscription schedule.
|
2365
1410
|
attr_reader :customer
|
2366
|
-
# ID of the account who owns the subscription schedule.
|
2367
|
-
attr_reader :customer_account
|
2368
1411
|
# Attribute for field default_settings
|
2369
1412
|
attr_reader :default_settings
|
2370
1413
|
# 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.
|
2371
1414
|
attr_reader :end_behavior
|
2372
1415
|
# Unique identifier for the object.
|
2373
1416
|
attr_reader :id
|
2374
|
-
# Details of the most recent price migration that failed for the subscription schedule.
|
2375
|
-
attr_reader :last_price_migration_error
|
2376
1417
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
2377
1418
|
attr_reader :livemode
|
2378
1419
|
# 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.
|
@@ -2381,8 +1422,6 @@ module Stripe
|
|
2381
1422
|
attr_reader :object
|
2382
1423
|
# Configuration for the subscription schedule's phases.
|
2383
1424
|
attr_reader :phases
|
2384
|
-
# Time period and invoice for a Subscription billed in advance.
|
2385
|
-
attr_reader :prebilling
|
2386
1425
|
# Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
|
2387
1426
|
attr_reader :released_at
|
2388
1427
|
# ID of the subscription once managed by the subscription schedule (if it is released).
|
@@ -2394,26 +1433,6 @@ module Stripe
|
|
2394
1433
|
# ID of the test clock this subscription schedule belongs to.
|
2395
1434
|
attr_reader :test_clock
|
2396
1435
|
|
2397
|
-
# Amends an existing subscription schedule.
|
2398
|
-
def amend(params = {}, opts = {})
|
2399
|
-
request_stripe_object(
|
2400
|
-
method: :post,
|
2401
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
|
2402
|
-
params: params,
|
2403
|
-
opts: opts
|
2404
|
-
)
|
2405
|
-
end
|
2406
|
-
|
2407
|
-
# Amends an existing subscription schedule.
|
2408
|
-
def self.amend(schedule, params = {}, opts = {})
|
2409
|
-
request_stripe_object(
|
2410
|
-
method: :post,
|
2411
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
2412
|
-
params: params,
|
2413
|
-
opts: opts
|
2414
|
-
)
|
2415
|
-
end
|
2416
|
-
|
2417
1436
|
# 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.
|
2418
1437
|
def cancel(params = {}, opts = {})
|
2419
1438
|
request_stripe_object(
|