stripe 15.4.0.pre.beta.1 → 15.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/API_VERSION +1 -1
- data/CHANGELOG.md +686 -1593
- data/OPENAPI_VERSION +1 -1
- data/README.md +1 -1
- 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/object_types.rb +0 -50
- data/lib/stripe/resources/account.rb +6 -658
- data/lib/stripe/resources/account_link.rb +3 -1
- data/lib/stripe/resources/account_session.rb +52 -256
- data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -2
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -4
- data/lib/stripe/resources/billing/credit_grant.rb +1 -11
- data/lib/stripe/resources/billing_portal/configuration.rb +46 -2
- data/lib/stripe/resources/billing_portal/session.rb +0 -6
- data/lib/stripe/resources/card.rb +0 -2
- data/lib/stripe/resources/cash_balance.rb +0 -2
- data/lib/stripe/resources/charge.rb +7 -1543
- data/lib/stripe/resources/checkout/session.rb +24 -320
- data/lib/stripe/resources/confirmation_token.rb +3 -173
- data/lib/stripe/resources/coupon.rb +1 -30
- data/lib/stripe/resources/credit_note.rb +0 -6
- data/lib/stripe/resources/credit_note_line_item.rb +0 -9
- data/lib/stripe/resources/customer.rb +1 -3
- data/lib/stripe/resources/customer_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_session.rb +1 -6
- data/lib/stripe/resources/discount.rb +0 -2
- data/lib/stripe/resources/dispute.rb +1 -3
- data/lib/stripe/resources/event.rb +14 -57
- data/lib/stripe/resources/financial_connections/account.rb +1 -22
- data/lib/stripe/resources/financial_connections/session.rb +2 -62
- data/lib/stripe/resources/identity/verification_session.rb +0 -10
- data/lib/stripe/resources/invoice.rb +40 -1071
- data/lib/stripe/resources/invoice_item.rb +3 -79
- data/lib/stripe/resources/invoice_line_item.rb +1 -55
- data/lib/stripe/resources/invoice_payment.rb +53 -2
- data/lib/stripe/resources/issuing/cardholder.rb +1 -2
- data/lib/stripe/resources/issuing/transaction.rb +0 -6
- data/lib/stripe/resources/line_item.rb +0 -37
- data/lib/stripe/resources/mandate.rb +0 -24
- data/lib/stripe/resources/payment_intent.rb +297 -5243
- data/lib/stripe/resources/payment_link.rb +83 -5
- data/lib/stripe/resources/payment_method.rb +5 -196
- data/lib/stripe/resources/payment_method_configuration.rb +0 -295
- data/lib/stripe/resources/payout.rb +0 -6
- data/lib/stripe/resources/price.rb +0 -30
- data/lib/stripe/resources/promotion_code.rb +0 -10
- data/lib/stripe/resources/quote.rb +8 -2039
- data/lib/stripe/resources/radar/value_list.rb +2 -2
- data/lib/stripe/resources/refund.rb +1 -10
- data/lib/stripe/resources/review.rb +2 -2
- data/lib/stripe/resources/setup_attempt.rb +1 -22
- data/lib/stripe/resources/setup_intent.rb +9 -578
- data/lib/stripe/resources/source.rb +0 -29
- data/lib/stripe/resources/subscription.rb +11 -290
- data/lib/stripe/resources/subscription_item.rb +5 -86
- data/lib/stripe/resources/subscription_schedule.rb +45 -1010
- data/lib/stripe/resources/tax/registration.rb +408 -30
- data/lib/stripe/resources/tax_id.rb +2 -12
- data/lib/stripe/resources/terminal/configuration.rb +196 -0
- data/lib/stripe/resources/terminal/reader.rb +0 -8
- data/lib/stripe/resources/transfer.rb +0 -6
- data/lib/stripe/resources/treasury/financial_account.rb +3 -22
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
- data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
- data/lib/stripe/resources/treasury/received_credit.rb +1 -38
- data/lib/stripe/resources/treasury/received_debit.rb +1 -40
- data/lib/stripe/resources.rb +0 -104
- data/lib/stripe/services/account_link_service.rb +3 -1
- data/lib/stripe/services/account_service.rb +4 -565
- data/lib/stripe/services/account_session_service.rb +35 -226
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
- data/lib/stripe/services/billing/credit_grant_service.rb +1 -9
- data/lib/stripe/services/billing_portal/configuration_service.rb +36 -2
- data/lib/stripe/services/billing_portal/session_service.rb +0 -4
- data/lib/stripe/services/charge_service.rb +0 -1418
- data/lib/stripe/services/checkout/session_service.rb +16 -241
- data/lib/stripe/services/coupon_service.rb +1 -17
- data/lib/stripe/services/credit_note_service.rb +0 -4
- data/lib/stripe/services/customer_session_service.rb +1 -4
- data/lib/stripe/services/financial_connections/account_service.rb +2 -7
- data/lib/stripe/services/financial_connections/session_service.rb +2 -34
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/identity/verification_session_service.rb +0 -8
- data/lib/stripe/services/invoice_item_service.rb +3 -75
- data/lib/stripe/services/invoice_line_item_service.rb +1 -33
- data/lib/stripe/services/invoice_payment_service.rb +83 -0
- data/lib/stripe/services/invoice_service.rb +40 -1022
- data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
- data/lib/stripe/services/issuing/transaction_service.rb +0 -4
- data/lib/stripe/services/issuing_service.rb +1 -5
- data/lib/stripe/services/payment_intent_service.rb +399 -4882
- data/lib/stripe/services/payment_link_service.rb +81 -5
- data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
- data/lib/stripe/services/payment_method_service.rb +2 -121
- data/lib/stripe/services/payout_service.rb +0 -4
- data/lib/stripe/services/price_service.rb +0 -19
- data/lib/stripe/services/promotion_code_service.rb +0 -8
- data/lib/stripe/services/quote_service.rb +9 -1724
- data/lib/stripe/services/radar/value_list_service.rb +1 -1
- data/lib/stripe/services/setup_intent_service.rb +9 -538
- data/lib/stripe/services/subscription_item_service.rb +5 -77
- data/lib/stripe/services/subscription_schedule_service.rb +45 -914
- data/lib/stripe/services/subscription_service.rb +11 -251
- data/lib/stripe/services/tax/registration_service.rb +360 -30
- data/lib/stripe/services/tax_id_service.rb +2 -8
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/configuration_service.rb +152 -0
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -97
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
- data/lib/stripe/services/transfer_service.rb +0 -4
- data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
- data/lib/stripe/services/treasury/financial_account_service.rb +2 -16
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
- data/lib/stripe/services/v1_services.rb +2 -11
- data/lib/stripe/services/v2/core_service.rb +1 -4
- data/lib/stripe/services/v2_services.rb +1 -4
- data/lib/stripe/services.rb +1 -53
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/util.rb +1 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -53
- data/rbi/stripe/resources/account.rbi +4995 -0
- data/rbi/stripe/resources/account_link.rbi +76 -0
- data/rbi/stripe/resources/account_session.rbi +1074 -0
- data/rbi/stripe/resources/apple_pay_domain.rbi +88 -0
- data/rbi/stripe/resources/application.rbi +20 -0
- data/rbi/stripe/resources/application_fee.rbi +118 -0
- data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
- data/rbi/stripe/resources/apps/secret.rbi +195 -0
- data/rbi/stripe/resources/balance.rbi +235 -0
- data/rbi/stripe/resources/balance_transaction.rbi +147 -0
- data/rbi/stripe/resources/bank_account.rbi +127 -0
- data/rbi/stripe/resources/billing/alert.rbi +201 -0
- data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
- data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
- data/rbi/stripe/resources/billing/meter.rbi +226 -0
- data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
- data/rbi/stripe/resources/billing_portal/configuration.rbi +703 -0
- data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
- data/rbi/stripe/resources/capability.rbi +125 -0
- data/rbi/stripe/resources/card.rbi +125 -0
- data/rbi/stripe/resources/cash_balance.rbi +32 -0
- data/rbi/stripe/resources/charge.rbi +2089 -0
- data/rbi/stripe/resources/checkout/session.rbi +4095 -0
- data/rbi/stripe/resources/climate/order.rbi +245 -0
- data/rbi/stripe/resources/climate/product.rbi +75 -0
- data/rbi/stripe/resources/climate/supplier.rbi +72 -0
- data/rbi/stripe/resources/confirmation_token.rbi +1818 -0
- data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
- data/rbi/stripe/resources/country_spec.rbi +85 -0
- data/rbi/stripe/resources/coupon.rbi +250 -0
- data/rbi/stripe/resources/credit_note.rbi +752 -0
- data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
- data/rbi/stripe/resources/customer.rbi +1005 -0
- data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
- data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
- data/rbi/stripe/resources/customer_session.rbi +200 -0
- data/rbi/stripe/resources/discount.rbi +53 -0
- data/rbi/stripe/resources/dispute.rbi +761 -0
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
- data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
- data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
- data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
- data/rbi/stripe/resources/event.rbi +137 -0
- data/rbi/stripe/resources/exchange_rate.rbi +66 -0
- data/rbi/stripe/resources/file.rbi +143 -0
- data/rbi/stripe/resources/file_link.rbi +141 -0
- data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
- data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
- data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
- data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
- data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
- data/rbi/stripe/resources/forwarding/request.rbi +216 -0
- data/rbi/stripe/resources/funding_instructions.rbi +437 -0
- data/rbi/stripe/resources/identity/verification_report.rbi +360 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +564 -0
- data/rbi/stripe/resources/invoice.rbi +3858 -0
- data/rbi/stripe/resources/invoice_item.rbi +470 -0
- data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
- data/rbi/stripe/resources/invoice_payment.rbi +121 -0
- data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
- data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
- data/rbi/stripe/resources/issuing/card.rbi +741 -0
- data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
- data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
- data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
- data/rbi/stripe/resources/issuing/token.rbi +226 -0
- data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
- data/rbi/stripe/resources/line_item.rbi +72 -0
- data/rbi/stripe/resources/login_link.rbi +19 -0
- data/rbi/stripe/resources/mandate.rbi +191 -0
- data/rbi/stripe/resources/payment_intent.rbi +9997 -0
- data/rbi/stripe/resources/payment_link.rbi +1893 -0
- data/rbi/stripe/resources/payment_method.rbi +1770 -0
- data/rbi/stripe/resources/payment_method_configuration.rbi +3550 -0
- data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
- data/rbi/stripe/resources/payout.rbi +300 -0
- data/rbi/stripe/resources/person.rbi +401 -0
- data/rbi/stripe/resources/plan.rbi +371 -0
- data/rbi/stripe/resources/price.rbi +694 -0
- data/rbi/stripe/resources/product.rbi +555 -0
- data/rbi/stripe/resources/product_feature.rbi +26 -0
- data/rbi/stripe/resources/promotion_code.rbi +261 -0
- data/rbi/stripe/resources/quote.rbi +1145 -0
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
- data/rbi/stripe/resources/radar/value_list.rbi +168 -0
- data/rbi/stripe/resources/radar/value_list_item.rbi +129 -0
- data/rbi/stripe/resources/refund.rbi +523 -0
- data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
- data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
- data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
- data/rbi/stripe/resources/reversal.rbi +51 -0
- data/rbi/stripe/resources/review.rbi +154 -0
- data/rbi/stripe/resources/setup_attempt.rbi +477 -0
- data/rbi/stripe/resources/setup_intent.rbi +3978 -0
- data/rbi/stripe/resources/shipping_rate.rbi +305 -0
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
- data/rbi/stripe/resources/source.rbi +1496 -0
- data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
- data/rbi/stripe/resources/source_transaction.rbi +127 -0
- data/rbi/stripe/resources/subscription.rbi +2080 -0
- data/rbi/stripe/resources/subscription_item.rbi +404 -0
- data/rbi/stripe/resources/subscription_schedule.rbi +1673 -0
- data/rbi/stripe/resources/tax/calculation.rbi +478 -0
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +91 -0
- data/rbi/stripe/resources/tax/registration.rbi +3216 -0
- data/rbi/stripe/resources/tax/settings.rbi +141 -0
- data/rbi/stripe/resources/tax/transaction.rbi +351 -0
- data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
- data/rbi/stripe/resources/tax_code.rbi +44 -0
- data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
- data/rbi/stripe/resources/tax_id.rbi +165 -0
- data/rbi/stripe/resources/tax_rate.rbi +239 -0
- data/rbi/stripe/resources/terminal/configuration.rbi +1595 -0
- data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
- data/rbi/stripe/resources/terminal/location.rbi +222 -0
- data/rbi/stripe/resources/terminal/reader.rbi +994 -0
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +132 -0
- data/rbi/stripe/resources/token.rbi +1283 -0
- data/rbi/stripe/resources/topup.rbi +222 -0
- data/rbi/stripe/resources/transfer.rbi +199 -0
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
- data/rbi/stripe/resources/treasury/financial_account.rbi +869 -0
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
- data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
- data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
- data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
- data/rbi/stripe/resources/v2/amount.rbi +14 -0
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
- data/rbi/stripe/resources/v2/event.rbi +48 -0
- data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
- data/rbi/stripe/resources/webhook_endpoint.rbi +168 -0
- data/rbi/stripe/services/account_capability_service.rbi +51 -0
- data/{lib/stripe/services/external_account_service.rb → rbi/stripe/services/account_external_account_service.rbi} +122 -135
- data/rbi/stripe/services/account_link_service.rbi +60 -0
- data/rbi/stripe/services/account_login_link_service.rbi +22 -0
- data/rbi/stripe/services/account_person_service.rbi +1011 -0
- data/rbi/stripe/services/account_service.rbi +4281 -0
- data/rbi/stripe/services/account_session_service.rbi +685 -0
- data/rbi/stripe/services/apple_pay_domain_service.rbi +76 -0
- data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
- data/rbi/stripe/services/application_fee_service.rbi +78 -0
- data/rbi/stripe/services/apps/secret_service.rbi +151 -0
- data/rbi/stripe/services/apps_service.rbi +9 -0
- data/rbi/stripe/services/balance_service.rbi +21 -0
- data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
- data/rbi/stripe/services/billing/alert_service.rbi +152 -0
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
- data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
- data/rbi/stripe/services/billing/meter_service.rbi +163 -0
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +555 -0
- data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
- data/rbi/stripe/services/billing_portal_service.rbi +10 -0
- data/rbi/stripe/services/billing_service.rbi +15 -0
- data/rbi/stripe/services/charge_service.rbi +448 -0
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
- data/rbi/stripe/services/checkout/session_service.rbi +2690 -0
- data/rbi/stripe/services/checkout_service.rbi +9 -0
- data/rbi/stripe/services/climate/order_service.rbi +142 -0
- data/rbi/stripe/services/climate/product_service.rbi +46 -0
- data/{lib/stripe/services/financial_connections/institution_service.rb → rbi/stripe/services/climate/supplier_service.rbi} +25 -36
- data/rbi/stripe/services/climate_service.rbi +11 -0
- data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
- data/rbi/stripe/services/country_spec_service.rbi +44 -0
- data/rbi/stripe/services/coupon_service.rbi +194 -0
- data/{lib/stripe/services/quote_preview_invoice_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
- data/rbi/stripe/services/credit_note_service.rbi +415 -0
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
- data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
- data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
- data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
- data/rbi/stripe/services/customer_service.rbi +647 -0
- data/rbi/stripe/services/customer_session_service.rbi +116 -0
- data/rbi/stripe/services/customer_tax_id_service.rbi +70 -0
- data/rbi/stripe/services/dispute_service.rbi +424 -0
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
- data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
- data/rbi/stripe/services/entitlements_service.rbi +10 -0
- data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
- data/rbi/stripe/services/event_service.rbi +83 -0
- data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
- data/rbi/stripe/services/file_link_service.rbi +124 -0
- data/rbi/stripe/services/file_service.rbi +116 -0
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
- data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
- data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
- data/rbi/stripe/services/financial_connections_service.rbi +11 -0
- data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
- data/rbi/stripe/services/forwarding_service.rbi +9 -0
- data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
- data/rbi/stripe/services/identity/verification_session_service.rbi +339 -0
- data/rbi/stripe/services/identity_service.rbi +10 -0
- data/rbi/stripe/services/invoice_item_service.rbi +366 -0
- data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
- data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
- data/rbi/stripe/services/invoice_service.rbi +3027 -0
- data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
- data/rbi/stripe/services/issuing/card_service.rbi +495 -0
- data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
- data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
- data/rbi/stripe/services/issuing/token_service.rbi +99 -0
- data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
- data/rbi/stripe/services/issuing_service.rbi +16 -0
- data/rbi/stripe/services/mandate_service.rbi +20 -0
- data/rbi/stripe/services/payment_intent_service.rbi +7994 -0
- data/{lib/stripe/services/payment_intent_amount_details_line_item_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/payment_link_service.rbi +1441 -0
- data/rbi/stripe/services/payment_method_configuration_service.rbi +2487 -0
- data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
- data/rbi/stripe/services/payment_method_service.rbi +781 -0
- data/rbi/stripe/services/payout_service.rbi +205 -0
- data/rbi/stripe/services/plan_service.rbi +282 -0
- data/rbi/stripe/services/price_service.rbi +546 -0
- data/rbi/stripe/services/product_feature_service.rbi +67 -0
- data/rbi/stripe/services/product_service.rbi +477 -0
- data/rbi/stripe/services/promotion_code_service.rbi +214 -0
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
- data/{lib/stripe/services/order_line_item_service.rb → rbi/stripe/services/quote_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/quote_service.rbi +699 -0
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
- data/rbi/stripe/services/radar/value_list_item_service.rbi +109 -0
- data/rbi/stripe/services/radar/value_list_service.rbi +141 -0
- data/rbi/stripe/services/radar_service.rbi +11 -0
- data/rbi/stripe/services/refund_service.rbi +185 -0
- data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
- data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
- data/rbi/stripe/services/reporting_service.rbi +10 -0
- data/rbi/stripe/services/review_service.rbi +84 -0
- data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
- data/rbi/stripe/services/setup_intent_service.rbi +3709 -0
- data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
- data/rbi/stripe/services/sigma_service.rbi +9 -0
- data/rbi/stripe/services/source_service.rbi +663 -0
- data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
- data/rbi/stripe/services/subscription_item_service.rbi +350 -0
- data/rbi/stripe/services/subscription_schedule_service.rbi +1333 -0
- data/rbi/stripe/services/subscription_service.rbi +1684 -0
- data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/calculation_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/calculation_service.rbi +234 -0
- data/rbi/stripe/services/tax/registration_service.rbi +2278 -0
- data/rbi/stripe/services/tax/settings_service.rbi +93 -0
- data/{lib/stripe/services/privacy/redaction_job_validation_error_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
- data/rbi/stripe/services/tax_code_service.rbi +44 -0
- data/rbi/stripe/services/tax_id_service.rbi +110 -0
- data/rbi/stripe/services/tax_rate_service.rbi +185 -0
- data/rbi/stripe/services/tax_service.rbi +12 -0
- data/rbi/stripe/services/terminal/configuration_service.rbi +1286 -0
- data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
- data/rbi/stripe/services/terminal/location_service.rbi +182 -0
- data/rbi/stripe/services/terminal/reader_service.rbi +540 -0
- data/rbi/stripe/services/terminal_service.rbi +12 -0
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +746 -0
- data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
- data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
- data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +93 -0
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
- data/rbi/stripe/services/test_helpers_service.rbi +15 -0
- data/rbi/stripe/services/token_service.rbi +1257 -0
- data/rbi/stripe/services/topup_service.rbi +176 -0
- data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
- data/rbi/stripe/services/transfer_service.rbi +152 -0
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
- data/rbi/stripe/services/treasury/financial_account_service.rbi +566 -0
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
- data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
- data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
- data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
- data/rbi/stripe/services/treasury_service.rbi +18 -0
- data/rbi/stripe/services/v1_services.rbi +77 -0
- data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +18 -0
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
- data/rbi/stripe/services/v2/billing_service.rbi +14 -0
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +192 -0
- data/rbi/stripe/services/v2/core/event_service.rbi +36 -0
- data/rbi/stripe/services/v2/core_service.rbi +12 -0
- data/rbi/stripe/services/v2_services.rbi +10 -0
- data/rbi/stripe/services/webhook_endpoint_service.rbi +129 -0
- data/stripe.gemspec +1 -4
- metadata +325 -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 -2958
- data/lib/stripe/resources/payment_attempt_record.rb +0 -1099
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -72
- data/lib/stripe/resources/payment_record.rb +0 -1628
- data/lib/stripe/resources/privacy/redaction_job.rb +0 -298
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -33
- data/lib/stripe/resources/quote_line.rb +0 -274
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -663
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -371
- data/lib/stripe/resources/tax/association.rb +0 -66
- data/lib/stripe/resources/tax/form.rb +0 -211
- data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
- data/lib/stripe/resources/v2/core/account.rb +0 -1755
- 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 -122
- data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -84
- data/lib/stripe/resources/v2/money_management/transaction.rb +0 -78
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -68
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +0 -72
- data/lib/stripe/services/account_notice_service.rb +0 -101
- data/lib/stripe/services/balance_settings_service.rb +0 -96
- data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
- data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
- data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
- data/lib/stripe/services/capital_service.rb +0 -15
- data/lib/stripe/services/fx_quote_service.rb +0 -123
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
- data/lib/stripe/services/margin_service.rb +0 -119
- data/lib/stripe/services/order_service.rb +0 -2388
- data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
- data/lib/stripe/services/payment_record_service.rb +0 -542
- data/lib/stripe/services/privacy/redaction_job_service.rb +0 -240
- data/lib/stripe/services/privacy_service.rb +0 -13
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
- data/lib/stripe/services/tax/association_service.rb +0 -31
- data/lib/stripe/services/tax/form_service.rb +0 -100
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
- data/lib/stripe/services/v2/core/account_link_service.rb +0 -76
- data/lib/stripe/services/v2/core/account_service.rb +0 -4170
- data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1045
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -130
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -107
- data/lib/stripe/services/v2/core/vault_service.rb +0 -18
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -74
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -43
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -82
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -125
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -95
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -199
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -235
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -172
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -90
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -70
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -43
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -69
- data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -73
- data/lib/stripe/services/v2/money_management_service.rb +0 -31
- data/lib/stripe/services/v2/payment_service.rb +0 -15
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +0 -137
- data/lib/stripe/services/v2/test_helper_service.rb +0 -15
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -49
- data/rbi/stripe.rbi +0 -193855
@@ -83,8 +83,6 @@ module Stripe
|
|
83
83
|
attr_accessor :created
|
84
84
|
# Only return subscription schedules for the given customer.
|
85
85
|
attr_accessor :customer
|
86
|
-
# Only return subscription schedules for the given account.
|
87
|
-
attr_accessor :customer_account
|
88
86
|
# 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.
|
89
87
|
attr_accessor :ending_before
|
90
88
|
# Specifies which fields in the response should be expanded.
|
@@ -103,7 +101,6 @@ module Stripe
|
|
103
101
|
completed_at: nil,
|
104
102
|
created: nil,
|
105
103
|
customer: nil,
|
106
|
-
customer_account: nil,
|
107
104
|
ending_before: nil,
|
108
105
|
expand: nil,
|
109
106
|
limit: nil,
|
@@ -115,7 +112,6 @@ module Stripe
|
|
115
112
|
@completed_at = completed_at
|
116
113
|
@created = created
|
117
114
|
@customer = customer
|
118
|
-
@customer_account = customer_account
|
119
115
|
@ending_before = ending_before
|
120
116
|
@expand = expand
|
121
117
|
@limit = limit
|
@@ -127,7 +123,7 @@ module Stripe
|
|
127
123
|
|
128
124
|
class CreateParams < Stripe::RequestParams
|
129
125
|
class BillingMode < Stripe::RequestParams
|
130
|
-
#
|
126
|
+
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
131
127
|
attr_accessor :type
|
132
128
|
|
133
129
|
def initialize(type: nil)
|
@@ -257,44 +253,16 @@ module Stripe
|
|
257
253
|
class Phase < Stripe::RequestParams
|
258
254
|
class AddInvoiceItem < Stripe::RequestParams
|
259
255
|
class Discount < Stripe::RequestParams
|
260
|
-
class DiscountEnd < Stripe::RequestParams
|
261
|
-
class Duration < Stripe::RequestParams
|
262
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
263
|
-
attr_accessor :interval
|
264
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
265
|
-
attr_accessor :interval_count
|
266
|
-
|
267
|
-
def initialize(interval: nil, interval_count: nil)
|
268
|
-
@interval = interval
|
269
|
-
@interval_count = interval_count
|
270
|
-
end
|
271
|
-
end
|
272
|
-
# Time span for the redeemed discount.
|
273
|
-
attr_accessor :duration
|
274
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
275
|
-
attr_accessor :timestamp
|
276
|
-
# The type of calculation made to determine when the discount ends.
|
277
|
-
attr_accessor :type
|
278
|
-
|
279
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
280
|
-
@duration = duration
|
281
|
-
@timestamp = timestamp
|
282
|
-
@type = type
|
283
|
-
end
|
284
|
-
end
|
285
256
|
# ID of the coupon to create a new discount for.
|
286
257
|
attr_accessor :coupon
|
287
258
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
288
259
|
attr_accessor :discount
|
289
|
-
# Details to determine how long the discount should be applied for.
|
290
|
-
attr_accessor :discount_end
|
291
260
|
# ID of the promotion code to create a new discount for.
|
292
261
|
attr_accessor :promotion_code
|
293
262
|
|
294
|
-
def initialize(coupon: nil, discount: nil,
|
263
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
295
264
|
@coupon = coupon
|
296
265
|
@discount = discount
|
297
|
-
@discount_end = discount_end
|
298
266
|
@promotion_code = promotion_code
|
299
267
|
end
|
300
268
|
end
|
@@ -381,48 +349,32 @@ module Stripe
|
|
381
349
|
end
|
382
350
|
|
383
351
|
class Discount < Stripe::RequestParams
|
384
|
-
class DiscountEnd < Stripe::RequestParams
|
385
|
-
class Duration < Stripe::RequestParams
|
386
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
387
|
-
attr_accessor :interval
|
388
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
389
|
-
attr_accessor :interval_count
|
390
|
-
|
391
|
-
def initialize(interval: nil, interval_count: nil)
|
392
|
-
@interval = interval
|
393
|
-
@interval_count = interval_count
|
394
|
-
end
|
395
|
-
end
|
396
|
-
# Time span for the redeemed discount.
|
397
|
-
attr_accessor :duration
|
398
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
399
|
-
attr_accessor :timestamp
|
400
|
-
# The type of calculation made to determine when the discount ends.
|
401
|
-
attr_accessor :type
|
402
|
-
|
403
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
404
|
-
@duration = duration
|
405
|
-
@timestamp = timestamp
|
406
|
-
@type = type
|
407
|
-
end
|
408
|
-
end
|
409
352
|
# ID of the coupon to create a new discount for.
|
410
353
|
attr_accessor :coupon
|
411
354
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
412
355
|
attr_accessor :discount
|
413
|
-
# Details to determine how long the discount should be applied for.
|
414
|
-
attr_accessor :discount_end
|
415
356
|
# ID of the promotion code to create a new discount for.
|
416
357
|
attr_accessor :promotion_code
|
417
358
|
|
418
|
-
def initialize(coupon: nil, discount: nil,
|
359
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
419
360
|
@coupon = coupon
|
420
361
|
@discount = discount
|
421
|
-
@discount_end = discount_end
|
422
362
|
@promotion_code = promotion_code
|
423
363
|
end
|
424
364
|
end
|
425
365
|
|
366
|
+
class Duration < Stripe::RequestParams
|
367
|
+
# Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
368
|
+
attr_accessor :interval
|
369
|
+
# The multiplier applied to the interval.
|
370
|
+
attr_accessor :interval_count
|
371
|
+
|
372
|
+
def initialize(interval: nil, interval_count: nil)
|
373
|
+
@interval = interval
|
374
|
+
@interval_count = interval_count
|
375
|
+
end
|
376
|
+
end
|
377
|
+
|
426
378
|
class InvoiceSettings < Stripe::RequestParams
|
427
379
|
class Issuer < Stripe::RequestParams
|
428
380
|
# The connected account being referenced when `type` is `account`.
|
@@ -460,44 +412,16 @@ module Stripe
|
|
460
412
|
end
|
461
413
|
|
462
414
|
class Discount < Stripe::RequestParams
|
463
|
-
class DiscountEnd < Stripe::RequestParams
|
464
|
-
class Duration < Stripe::RequestParams
|
465
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
466
|
-
attr_accessor :interval
|
467
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
468
|
-
attr_accessor :interval_count
|
469
|
-
|
470
|
-
def initialize(interval: nil, interval_count: nil)
|
471
|
-
@interval = interval
|
472
|
-
@interval_count = interval_count
|
473
|
-
end
|
474
|
-
end
|
475
|
-
# Time span for the redeemed discount.
|
476
|
-
attr_accessor :duration
|
477
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
478
|
-
attr_accessor :timestamp
|
479
|
-
# The type of calculation made to determine when the discount ends.
|
480
|
-
attr_accessor :type
|
481
|
-
|
482
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
483
|
-
@duration = duration
|
484
|
-
@timestamp = timestamp
|
485
|
-
@type = type
|
486
|
-
end
|
487
|
-
end
|
488
415
|
# ID of the coupon to create a new discount for.
|
489
416
|
attr_accessor :coupon
|
490
417
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
491
418
|
attr_accessor :discount
|
492
|
-
# Details to determine how long the discount should be applied for.
|
493
|
-
attr_accessor :discount_end
|
494
419
|
# ID of the promotion code to create a new discount for.
|
495
420
|
attr_accessor :promotion_code
|
496
421
|
|
497
|
-
def initialize(coupon: nil, discount: nil,
|
422
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
498
423
|
@coupon = coupon
|
499
424
|
@discount = discount
|
500
|
-
@discount_end = discount_end
|
501
425
|
@promotion_code = promotion_code
|
502
426
|
end
|
503
427
|
end
|
@@ -543,18 +467,6 @@ module Stripe
|
|
543
467
|
@unit_amount_decimal = unit_amount_decimal
|
544
468
|
end
|
545
469
|
end
|
546
|
-
|
547
|
-
class Trial < Stripe::RequestParams
|
548
|
-
# 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.
|
549
|
-
attr_accessor :converts_to
|
550
|
-
# Determines the type of trial for this item.
|
551
|
-
attr_accessor :type
|
552
|
-
|
553
|
-
def initialize(converts_to: nil, type: nil)
|
554
|
-
@converts_to = converts_to
|
555
|
-
@type = type
|
556
|
-
end
|
557
|
-
end
|
558
470
|
# 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.
|
559
471
|
attr_accessor :billing_thresholds
|
560
472
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -571,8 +483,6 @@ module Stripe
|
|
571
483
|
attr_accessor :quantity
|
572
484
|
# 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.
|
573
485
|
attr_accessor :tax_rates
|
574
|
-
# Options that configure the trial on the subscription item.
|
575
|
-
attr_accessor :trial
|
576
486
|
|
577
487
|
def initialize(
|
578
488
|
billing_thresholds: nil,
|
@@ -582,8 +492,7 @@ module Stripe
|
|
582
492
|
price: nil,
|
583
493
|
price_data: nil,
|
584
494
|
quantity: nil,
|
585
|
-
tax_rates: nil
|
586
|
-
trial: nil
|
495
|
+
tax_rates: nil
|
587
496
|
)
|
588
497
|
@billing_thresholds = billing_thresholds
|
589
498
|
@discounts = discounts
|
@@ -593,16 +502,6 @@ module Stripe
|
|
593
502
|
@price_data = price_data
|
594
503
|
@quantity = quantity
|
595
504
|
@tax_rates = tax_rates
|
596
|
-
@trial = trial
|
597
|
-
end
|
598
|
-
end
|
599
|
-
|
600
|
-
class PauseCollection < Stripe::RequestParams
|
601
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
602
|
-
attr_accessor :behavior
|
603
|
-
|
604
|
-
def initialize(behavior: nil)
|
605
|
-
@behavior = behavior
|
606
505
|
end
|
607
506
|
end
|
608
507
|
|
@@ -617,23 +516,6 @@ module Stripe
|
|
617
516
|
@destination = destination
|
618
517
|
end
|
619
518
|
end
|
620
|
-
|
621
|
-
class TrialSettings < Stripe::RequestParams
|
622
|
-
class EndBehavior < Stripe::RequestParams
|
623
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
624
|
-
attr_accessor :prorate_up_front
|
625
|
-
|
626
|
-
def initialize(prorate_up_front: nil)
|
627
|
-
@prorate_up_front = prorate_up_front
|
628
|
-
end
|
629
|
-
end
|
630
|
-
# Defines how the subscription should behave when a trial ends.
|
631
|
-
attr_accessor :end_behavior
|
632
|
-
|
633
|
-
def initialize(end_behavior: nil)
|
634
|
-
@end_behavior = end_behavior
|
635
|
-
end
|
636
|
-
end
|
637
519
|
# 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.
|
638
520
|
attr_accessor :add_invoice_items
|
639
521
|
# 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).
|
@@ -656,32 +538,28 @@ module Stripe
|
|
656
538
|
attr_accessor :description
|
657
539
|
# The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
|
658
540
|
attr_accessor :discounts
|
541
|
+
# The number of intervals the phase should last. If set, `end_date` must not be set.
|
542
|
+
attr_accessor :duration
|
659
543
|
# The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
660
544
|
attr_accessor :end_date
|
661
545
|
# All invoices will be billed using the specified settings.
|
662
546
|
attr_accessor :invoice_settings
|
663
547
|
# List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
|
664
548
|
attr_accessor :items
|
665
|
-
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
|
549
|
+
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
|
666
550
|
attr_accessor :iterations
|
667
551
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
|
668
552
|
attr_accessor :metadata
|
669
553
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
670
554
|
attr_accessor :on_behalf_of
|
671
|
-
# 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).
|
672
|
-
attr_accessor :pause_collection
|
673
555
|
# 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.
|
674
556
|
attr_accessor :proration_behavior
|
675
557
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
676
558
|
attr_accessor :transfer_data
|
677
559
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
678
560
|
attr_accessor :trial
|
679
|
-
# Specify trial behavior when crossing phase boundaries
|
680
|
-
attr_accessor :trial_continuation
|
681
561
|
# 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`
|
682
562
|
attr_accessor :trial_end
|
683
|
-
# Settings related to subscription trials.
|
684
|
-
attr_accessor :trial_settings
|
685
563
|
|
686
564
|
def initialize(
|
687
565
|
add_invoice_items: nil,
|
@@ -695,19 +573,17 @@ module Stripe
|
|
695
573
|
default_tax_rates: nil,
|
696
574
|
description: nil,
|
697
575
|
discounts: nil,
|
576
|
+
duration: nil,
|
698
577
|
end_date: nil,
|
699
578
|
invoice_settings: nil,
|
700
579
|
items: nil,
|
701
580
|
iterations: nil,
|
702
581
|
metadata: nil,
|
703
582
|
on_behalf_of: nil,
|
704
|
-
pause_collection: nil,
|
705
583
|
proration_behavior: nil,
|
706
584
|
transfer_data: nil,
|
707
585
|
trial: nil,
|
708
|
-
|
709
|
-
trial_end: nil,
|
710
|
-
trial_settings: nil
|
586
|
+
trial_end: nil
|
711
587
|
)
|
712
588
|
@add_invoice_items = add_invoice_items
|
713
589
|
@application_fee_percent = application_fee_percent
|
@@ -720,41 +596,23 @@ module Stripe
|
|
720
596
|
@default_tax_rates = default_tax_rates
|
721
597
|
@description = description
|
722
598
|
@discounts = discounts
|
599
|
+
@duration = duration
|
723
600
|
@end_date = end_date
|
724
601
|
@invoice_settings = invoice_settings
|
725
602
|
@items = items
|
726
603
|
@iterations = iterations
|
727
604
|
@metadata = metadata
|
728
605
|
@on_behalf_of = on_behalf_of
|
729
|
-
@pause_collection = pause_collection
|
730
606
|
@proration_behavior = proration_behavior
|
731
607
|
@transfer_data = transfer_data
|
732
608
|
@trial = trial
|
733
|
-
@trial_continuation = trial_continuation
|
734
609
|
@trial_end = trial_end
|
735
|
-
@trial_settings = trial_settings
|
736
|
-
end
|
737
|
-
end
|
738
|
-
|
739
|
-
class Prebilling < Stripe::RequestParams
|
740
|
-
# This is used to determine the number of billing cycles to prebill.
|
741
|
-
attr_accessor :iterations
|
742
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
743
|
-
attr_accessor :update_behavior
|
744
|
-
|
745
|
-
def initialize(iterations: nil, update_behavior: nil)
|
746
|
-
@iterations = iterations
|
747
|
-
@update_behavior = update_behavior
|
748
610
|
end
|
749
611
|
end
|
750
|
-
# 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.
|
751
|
-
attr_accessor :billing_behavior
|
752
612
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
753
613
|
attr_accessor :billing_mode
|
754
614
|
# The identifier of the customer to create the subscription schedule for.
|
755
615
|
attr_accessor :customer
|
756
|
-
# The identifier of the account to create the subscription schedule for.
|
757
|
-
attr_accessor :customer_account
|
758
616
|
# Object representing the subscription schedule's default settings.
|
759
617
|
attr_accessor :default_settings
|
760
618
|
# 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.
|
@@ -767,36 +625,28 @@ module Stripe
|
|
767
625
|
attr_accessor :metadata
|
768
626
|
# 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.
|
769
627
|
attr_accessor :phases
|
770
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
771
|
-
attr_accessor :prebilling
|
772
628
|
# 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.
|
773
629
|
attr_accessor :start_date
|
774
630
|
|
775
631
|
def initialize(
|
776
|
-
billing_behavior: nil,
|
777
632
|
billing_mode: nil,
|
778
633
|
customer: nil,
|
779
|
-
customer_account: nil,
|
780
634
|
default_settings: nil,
|
781
635
|
end_behavior: nil,
|
782
636
|
expand: nil,
|
783
637
|
from_subscription: nil,
|
784
638
|
metadata: nil,
|
785
639
|
phases: nil,
|
786
|
-
prebilling: nil,
|
787
640
|
start_date: nil
|
788
641
|
)
|
789
|
-
@billing_behavior = billing_behavior
|
790
642
|
@billing_mode = billing_mode
|
791
643
|
@customer = customer
|
792
|
-
@customer_account = customer_account
|
793
644
|
@default_settings = default_settings
|
794
645
|
@end_behavior = end_behavior
|
795
646
|
@expand = expand
|
796
647
|
@from_subscription = from_subscription
|
797
648
|
@metadata = metadata
|
798
649
|
@phases = phases
|
799
|
-
@prebilling = prebilling
|
800
650
|
@start_date = start_date
|
801
651
|
end
|
802
652
|
end
|
@@ -933,44 +783,16 @@ module Stripe
|
|
933
783
|
class Phase < Stripe::RequestParams
|
934
784
|
class AddInvoiceItem < Stripe::RequestParams
|
935
785
|
class Discount < Stripe::RequestParams
|
936
|
-
class DiscountEnd < Stripe::RequestParams
|
937
|
-
class Duration < Stripe::RequestParams
|
938
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
939
|
-
attr_accessor :interval
|
940
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
941
|
-
attr_accessor :interval_count
|
942
|
-
|
943
|
-
def initialize(interval: nil, interval_count: nil)
|
944
|
-
@interval = interval
|
945
|
-
@interval_count = interval_count
|
946
|
-
end
|
947
|
-
end
|
948
|
-
# Time span for the redeemed discount.
|
949
|
-
attr_accessor :duration
|
950
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
951
|
-
attr_accessor :timestamp
|
952
|
-
# The type of calculation made to determine when the discount ends.
|
953
|
-
attr_accessor :type
|
954
|
-
|
955
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
956
|
-
@duration = duration
|
957
|
-
@timestamp = timestamp
|
958
|
-
@type = type
|
959
|
-
end
|
960
|
-
end
|
961
786
|
# ID of the coupon to create a new discount for.
|
962
787
|
attr_accessor :coupon
|
963
788
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
964
789
|
attr_accessor :discount
|
965
|
-
# Details to determine how long the discount should be applied for.
|
966
|
-
attr_accessor :discount_end
|
967
790
|
# ID of the promotion code to create a new discount for.
|
968
791
|
attr_accessor :promotion_code
|
969
792
|
|
970
|
-
def initialize(coupon: nil, discount: nil,
|
793
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
971
794
|
@coupon = coupon
|
972
795
|
@discount = discount
|
973
|
-
@discount_end = discount_end
|
974
796
|
@promotion_code = promotion_code
|
975
797
|
end
|
976
798
|
end
|
@@ -1057,48 +879,32 @@ module Stripe
|
|
1057
879
|
end
|
1058
880
|
|
1059
881
|
class Discount < Stripe::RequestParams
|
1060
|
-
class DiscountEnd < Stripe::RequestParams
|
1061
|
-
class Duration < Stripe::RequestParams
|
1062
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1063
|
-
attr_accessor :interval
|
1064
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1065
|
-
attr_accessor :interval_count
|
1066
|
-
|
1067
|
-
def initialize(interval: nil, interval_count: nil)
|
1068
|
-
@interval = interval
|
1069
|
-
@interval_count = interval_count
|
1070
|
-
end
|
1071
|
-
end
|
1072
|
-
# Time span for the redeemed discount.
|
1073
|
-
attr_accessor :duration
|
1074
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1075
|
-
attr_accessor :timestamp
|
1076
|
-
# The type of calculation made to determine when the discount ends.
|
1077
|
-
attr_accessor :type
|
1078
|
-
|
1079
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1080
|
-
@duration = duration
|
1081
|
-
@timestamp = timestamp
|
1082
|
-
@type = type
|
1083
|
-
end
|
1084
|
-
end
|
1085
882
|
# ID of the coupon to create a new discount for.
|
1086
883
|
attr_accessor :coupon
|
1087
884
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1088
885
|
attr_accessor :discount
|
1089
|
-
# Details to determine how long the discount should be applied for.
|
1090
|
-
attr_accessor :discount_end
|
1091
886
|
# ID of the promotion code to create a new discount for.
|
1092
887
|
attr_accessor :promotion_code
|
1093
888
|
|
1094
|
-
def initialize(coupon: nil, discount: nil,
|
889
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1095
890
|
@coupon = coupon
|
1096
891
|
@discount = discount
|
1097
|
-
@discount_end = discount_end
|
1098
892
|
@promotion_code = promotion_code
|
1099
893
|
end
|
1100
894
|
end
|
1101
895
|
|
896
|
+
class Duration < Stripe::RequestParams
|
897
|
+
# Specifies phase duration. Either `day`, `week`, `month` or `year`.
|
898
|
+
attr_accessor :interval
|
899
|
+
# The multiplier applied to the interval.
|
900
|
+
attr_accessor :interval_count
|
901
|
+
|
902
|
+
def initialize(interval: nil, interval_count: nil)
|
903
|
+
@interval = interval
|
904
|
+
@interval_count = interval_count
|
905
|
+
end
|
906
|
+
end
|
907
|
+
|
1102
908
|
class InvoiceSettings < Stripe::RequestParams
|
1103
909
|
class Issuer < Stripe::RequestParams
|
1104
910
|
# The connected account being referenced when `type` is `account`.
|
@@ -1136,44 +942,16 @@ module Stripe
|
|
1136
942
|
end
|
1137
943
|
|
1138
944
|
class Discount < Stripe::RequestParams
|
1139
|
-
class DiscountEnd < Stripe::RequestParams
|
1140
|
-
class Duration < Stripe::RequestParams
|
1141
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1142
|
-
attr_accessor :interval
|
1143
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1144
|
-
attr_accessor :interval_count
|
1145
|
-
|
1146
|
-
def initialize(interval: nil, interval_count: nil)
|
1147
|
-
@interval = interval
|
1148
|
-
@interval_count = interval_count
|
1149
|
-
end
|
1150
|
-
end
|
1151
|
-
# Time span for the redeemed discount.
|
1152
|
-
attr_accessor :duration
|
1153
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1154
|
-
attr_accessor :timestamp
|
1155
|
-
# The type of calculation made to determine when the discount ends.
|
1156
|
-
attr_accessor :type
|
1157
|
-
|
1158
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1159
|
-
@duration = duration
|
1160
|
-
@timestamp = timestamp
|
1161
|
-
@type = type
|
1162
|
-
end
|
1163
|
-
end
|
1164
945
|
# ID of the coupon to create a new discount for.
|
1165
946
|
attr_accessor :coupon
|
1166
947
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1167
948
|
attr_accessor :discount
|
1168
|
-
# Details to determine how long the discount should be applied for.
|
1169
|
-
attr_accessor :discount_end
|
1170
949
|
# ID of the promotion code to create a new discount for.
|
1171
950
|
attr_accessor :promotion_code
|
1172
951
|
|
1173
|
-
def initialize(coupon: nil, discount: nil,
|
952
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1174
953
|
@coupon = coupon
|
1175
954
|
@discount = discount
|
1176
|
-
@discount_end = discount_end
|
1177
955
|
@promotion_code = promotion_code
|
1178
956
|
end
|
1179
957
|
end
|
@@ -1219,18 +997,6 @@ module Stripe
|
|
1219
997
|
@unit_amount_decimal = unit_amount_decimal
|
1220
998
|
end
|
1221
999
|
end
|
1222
|
-
|
1223
|
-
class Trial < Stripe::RequestParams
|
1224
|
-
# 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.
|
1225
|
-
attr_accessor :converts_to
|
1226
|
-
# Determines the type of trial for this item.
|
1227
|
-
attr_accessor :type
|
1228
|
-
|
1229
|
-
def initialize(converts_to: nil, type: nil)
|
1230
|
-
@converts_to = converts_to
|
1231
|
-
@type = type
|
1232
|
-
end
|
1233
|
-
end
|
1234
1000
|
# 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.
|
1235
1001
|
attr_accessor :billing_thresholds
|
1236
1002
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -1247,8 +1013,6 @@ module Stripe
|
|
1247
1013
|
attr_accessor :quantity
|
1248
1014
|
# 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.
|
1249
1015
|
attr_accessor :tax_rates
|
1250
|
-
# Options that configure the trial on the subscription item.
|
1251
|
-
attr_accessor :trial
|
1252
1016
|
|
1253
1017
|
def initialize(
|
1254
1018
|
billing_thresholds: nil,
|
@@ -1258,8 +1022,7 @@ module Stripe
|
|
1258
1022
|
price: nil,
|
1259
1023
|
price_data: nil,
|
1260
1024
|
quantity: nil,
|
1261
|
-
tax_rates: nil
|
1262
|
-
trial: nil
|
1025
|
+
tax_rates: nil
|
1263
1026
|
)
|
1264
1027
|
@billing_thresholds = billing_thresholds
|
1265
1028
|
@discounts = discounts
|
@@ -1269,16 +1032,6 @@ module Stripe
|
|
1269
1032
|
@price_data = price_data
|
1270
1033
|
@quantity = quantity
|
1271
1034
|
@tax_rates = tax_rates
|
1272
|
-
@trial = trial
|
1273
|
-
end
|
1274
|
-
end
|
1275
|
-
|
1276
|
-
class PauseCollection < Stripe::RequestParams
|
1277
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1278
|
-
attr_accessor :behavior
|
1279
|
-
|
1280
|
-
def initialize(behavior: nil)
|
1281
|
-
@behavior = behavior
|
1282
1035
|
end
|
1283
1036
|
end
|
1284
1037
|
|
@@ -1293,23 +1046,6 @@ module Stripe
|
|
1293
1046
|
@destination = destination
|
1294
1047
|
end
|
1295
1048
|
end
|
1296
|
-
|
1297
|
-
class TrialSettings < Stripe::RequestParams
|
1298
|
-
class EndBehavior < Stripe::RequestParams
|
1299
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1300
|
-
attr_accessor :prorate_up_front
|
1301
|
-
|
1302
|
-
def initialize(prorate_up_front: nil)
|
1303
|
-
@prorate_up_front = prorate_up_front
|
1304
|
-
end
|
1305
|
-
end
|
1306
|
-
# Defines how the subscription should behave when a trial ends.
|
1307
|
-
attr_accessor :end_behavior
|
1308
|
-
|
1309
|
-
def initialize(end_behavior: nil)
|
1310
|
-
@end_behavior = end_behavior
|
1311
|
-
end
|
1312
|
-
end
|
1313
1049
|
# 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.
|
1314
1050
|
attr_accessor :add_invoice_items
|
1315
1051
|
# 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).
|
@@ -1332,20 +1068,20 @@ module Stripe
|
|
1332
1068
|
attr_accessor :description
|
1333
1069
|
# The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
|
1334
1070
|
attr_accessor :discounts
|
1071
|
+
# The number of intervals the phase should last. If set, `end_date` must not be set.
|
1072
|
+
attr_accessor :duration
|
1335
1073
|
# The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
1336
1074
|
attr_accessor :end_date
|
1337
1075
|
# All invoices will be billed using the specified settings.
|
1338
1076
|
attr_accessor :invoice_settings
|
1339
1077
|
# List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
|
1340
1078
|
attr_accessor :items
|
1341
|
-
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
|
1079
|
+
# Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
|
1342
1080
|
attr_accessor :iterations
|
1343
1081
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
|
1344
1082
|
attr_accessor :metadata
|
1345
1083
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
1346
1084
|
attr_accessor :on_behalf_of
|
1347
|
-
# 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).
|
1348
|
-
attr_accessor :pause_collection
|
1349
1085
|
# 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.
|
1350
1086
|
attr_accessor :proration_behavior
|
1351
1087
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -1354,12 +1090,8 @@ module Stripe
|
|
1354
1090
|
attr_accessor :transfer_data
|
1355
1091
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
1356
1092
|
attr_accessor :trial
|
1357
|
-
# Specify trial behavior when crossing phase boundaries
|
1358
|
-
attr_accessor :trial_continuation
|
1359
1093
|
# 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`
|
1360
1094
|
attr_accessor :trial_end
|
1361
|
-
# Settings related to subscription trials.
|
1362
|
-
attr_accessor :trial_settings
|
1363
1095
|
|
1364
1096
|
def initialize(
|
1365
1097
|
add_invoice_items: nil,
|
@@ -1373,20 +1105,18 @@ module Stripe
|
|
1373
1105
|
default_tax_rates: nil,
|
1374
1106
|
description: nil,
|
1375
1107
|
discounts: nil,
|
1108
|
+
duration: nil,
|
1376
1109
|
end_date: nil,
|
1377
1110
|
invoice_settings: nil,
|
1378
1111
|
items: nil,
|
1379
1112
|
iterations: nil,
|
1380
1113
|
metadata: nil,
|
1381
1114
|
on_behalf_of: nil,
|
1382
|
-
pause_collection: nil,
|
1383
1115
|
proration_behavior: nil,
|
1384
1116
|
start_date: nil,
|
1385
1117
|
transfer_data: nil,
|
1386
1118
|
trial: nil,
|
1387
|
-
|
1388
|
-
trial_end: nil,
|
1389
|
-
trial_settings: nil
|
1119
|
+
trial_end: nil
|
1390
1120
|
)
|
1391
1121
|
@add_invoice_items = add_invoice_items
|
1392
1122
|
@application_fee_percent = application_fee_percent
|
@@ -1399,36 +1129,20 @@ module Stripe
|
|
1399
1129
|
@default_tax_rates = default_tax_rates
|
1400
1130
|
@description = description
|
1401
1131
|
@discounts = discounts
|
1132
|
+
@duration = duration
|
1402
1133
|
@end_date = end_date
|
1403
1134
|
@invoice_settings = invoice_settings
|
1404
1135
|
@items = items
|
1405
1136
|
@iterations = iterations
|
1406
1137
|
@metadata = metadata
|
1407
1138
|
@on_behalf_of = on_behalf_of
|
1408
|
-
@pause_collection = pause_collection
|
1409
1139
|
@proration_behavior = proration_behavior
|
1410
1140
|
@start_date = start_date
|
1411
1141
|
@transfer_data = transfer_data
|
1412
1142
|
@trial = trial
|
1413
|
-
@trial_continuation = trial_continuation
|
1414
1143
|
@trial_end = trial_end
|
1415
|
-
@trial_settings = trial_settings
|
1416
1144
|
end
|
1417
1145
|
end
|
1418
|
-
|
1419
|
-
class Prebilling < Stripe::RequestParams
|
1420
|
-
# This is used to determine the number of billing cycles to prebill.
|
1421
|
-
attr_accessor :iterations
|
1422
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1423
|
-
attr_accessor :update_behavior
|
1424
|
-
|
1425
|
-
def initialize(iterations: nil, update_behavior: nil)
|
1426
|
-
@iterations = iterations
|
1427
|
-
@update_behavior = update_behavior
|
1428
|
-
end
|
1429
|
-
end
|
1430
|
-
# 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.
|
1431
|
-
attr_accessor :billing_behavior
|
1432
1146
|
# Object representing the subscription schedule's default settings.
|
1433
1147
|
attr_accessor :default_settings
|
1434
1148
|
# 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.
|
@@ -1439,598 +1153,26 @@ module Stripe
|
|
1439
1153
|
attr_accessor :metadata
|
1440
1154
|
# 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.
|
1441
1155
|
attr_accessor :phases
|
1442
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1443
|
-
attr_accessor :prebilling
|
1444
1156
|
# 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`.
|
1445
1157
|
attr_accessor :proration_behavior
|
1446
1158
|
|
1447
1159
|
def initialize(
|
1448
|
-
billing_behavior: nil,
|
1449
1160
|
default_settings: nil,
|
1450
1161
|
end_behavior: nil,
|
1451
1162
|
expand: nil,
|
1452
1163
|
metadata: nil,
|
1453
1164
|
phases: nil,
|
1454
|
-
prebilling: nil,
|
1455
1165
|
proration_behavior: nil
|
1456
1166
|
)
|
1457
|
-
@billing_behavior = billing_behavior
|
1458
1167
|
@default_settings = default_settings
|
1459
1168
|
@end_behavior = end_behavior
|
1460
1169
|
@expand = expand
|
1461
1170
|
@metadata = metadata
|
1462
1171
|
@phases = phases
|
1463
|
-
@prebilling = prebilling
|
1464
1172
|
@proration_behavior = proration_behavior
|
1465
1173
|
end
|
1466
1174
|
end
|
1467
1175
|
|
1468
|
-
class AmendParams < Stripe::RequestParams
|
1469
|
-
class Amendment < Stripe::RequestParams
|
1470
|
-
class AmendmentEnd < Stripe::RequestParams
|
1471
|
-
class DiscountEnd < Stripe::RequestParams
|
1472
|
-
# The ID of a specific discount.
|
1473
|
-
attr_accessor :discount
|
1474
|
-
|
1475
|
-
def initialize(discount: nil)
|
1476
|
-
@discount = discount
|
1477
|
-
end
|
1478
|
-
end
|
1479
|
-
|
1480
|
-
class Duration < Stripe::RequestParams
|
1481
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1482
|
-
attr_accessor :interval
|
1483
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1484
|
-
attr_accessor :interval_count
|
1485
|
-
|
1486
|
-
def initialize(interval: nil, interval_count: nil)
|
1487
|
-
@interval = interval
|
1488
|
-
@interval_count = interval_count
|
1489
|
-
end
|
1490
|
-
end
|
1491
|
-
# Use the `end` time of a given discount.
|
1492
|
-
attr_accessor :discount_end
|
1493
|
-
# Time span for the amendment starting from the `amendment_start`.
|
1494
|
-
attr_accessor :duration
|
1495
|
-
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
1496
|
-
attr_accessor :timestamp
|
1497
|
-
# Select one of three ways to pass the `amendment_end`.
|
1498
|
-
attr_accessor :type
|
1499
|
-
|
1500
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
1501
|
-
@discount_end = discount_end
|
1502
|
-
@duration = duration
|
1503
|
-
@timestamp = timestamp
|
1504
|
-
@type = type
|
1505
|
-
end
|
1506
|
-
end
|
1507
|
-
|
1508
|
-
class AmendmentStart < Stripe::RequestParams
|
1509
|
-
class AmendmentEnd < Stripe::RequestParams
|
1510
|
-
# 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.
|
1511
|
-
attr_accessor :index
|
1512
|
-
|
1513
|
-
def initialize(index: nil)
|
1514
|
-
@index = index
|
1515
|
-
end
|
1516
|
-
end
|
1517
|
-
|
1518
|
-
class DiscountEnd < Stripe::RequestParams
|
1519
|
-
# The ID of a specific discount.
|
1520
|
-
attr_accessor :discount
|
1521
|
-
|
1522
|
-
def initialize(discount: nil)
|
1523
|
-
@discount = discount
|
1524
|
-
end
|
1525
|
-
end
|
1526
|
-
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
1527
|
-
attr_accessor :amendment_end
|
1528
|
-
# Use the `end` time of a given discount.
|
1529
|
-
attr_accessor :discount_end
|
1530
|
-
# A precise Unix timestamp for the amendment to start.
|
1531
|
-
attr_accessor :timestamp
|
1532
|
-
# Select one of three ways to pass the `amendment_start`.
|
1533
|
-
attr_accessor :type
|
1534
|
-
|
1535
|
-
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
1536
|
-
@amendment_end = amendment_end
|
1537
|
-
@discount_end = discount_end
|
1538
|
-
@timestamp = timestamp
|
1539
|
-
@type = type
|
1540
|
-
end
|
1541
|
-
end
|
1542
|
-
|
1543
|
-
class DiscountAction < Stripe::RequestParams
|
1544
|
-
class Add < Stripe::RequestParams
|
1545
|
-
class DiscountEnd < Stripe::RequestParams
|
1546
|
-
# The type of calculation made to determine when the discount ends.
|
1547
|
-
attr_accessor :type
|
1548
|
-
|
1549
|
-
def initialize(type: nil)
|
1550
|
-
@type = type
|
1551
|
-
end
|
1552
|
-
end
|
1553
|
-
# The coupon code to redeem.
|
1554
|
-
attr_accessor :coupon
|
1555
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
1556
|
-
attr_accessor :discount
|
1557
|
-
# Details to determine how long the discount should be applied for.
|
1558
|
-
attr_accessor :discount_end
|
1559
|
-
# 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.
|
1560
|
-
attr_accessor :index
|
1561
|
-
# The promotion code to redeem.
|
1562
|
-
attr_accessor :promotion_code
|
1563
|
-
|
1564
|
-
def initialize(
|
1565
|
-
coupon: nil,
|
1566
|
-
discount: nil,
|
1567
|
-
discount_end: nil,
|
1568
|
-
index: nil,
|
1569
|
-
promotion_code: nil
|
1570
|
-
)
|
1571
|
-
@coupon = coupon
|
1572
|
-
@discount = discount
|
1573
|
-
@discount_end = discount_end
|
1574
|
-
@index = index
|
1575
|
-
@promotion_code = promotion_code
|
1576
|
-
end
|
1577
|
-
end
|
1578
|
-
|
1579
|
-
class Remove < Stripe::RequestParams
|
1580
|
-
# The coupon code to remove from the `discounts` array.
|
1581
|
-
attr_accessor :coupon
|
1582
|
-
# The ID of a discount to remove from the `discounts` array.
|
1583
|
-
attr_accessor :discount
|
1584
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
1585
|
-
attr_accessor :promotion_code
|
1586
|
-
|
1587
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1588
|
-
@coupon = coupon
|
1589
|
-
@discount = discount
|
1590
|
-
@promotion_code = promotion_code
|
1591
|
-
end
|
1592
|
-
end
|
1593
|
-
|
1594
|
-
class Set < Stripe::RequestParams
|
1595
|
-
# The coupon code to replace the `discounts` array with.
|
1596
|
-
attr_accessor :coupon
|
1597
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
1598
|
-
attr_accessor :discount
|
1599
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
1600
|
-
attr_accessor :promotion_code
|
1601
|
-
|
1602
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1603
|
-
@coupon = coupon
|
1604
|
-
@discount = discount
|
1605
|
-
@promotion_code = promotion_code
|
1606
|
-
end
|
1607
|
-
end
|
1608
|
-
# Details of the discount to add.
|
1609
|
-
attr_accessor :add
|
1610
|
-
# Details of the discount to remove.
|
1611
|
-
attr_accessor :remove
|
1612
|
-
# Details of the discount to replace the existing discounts with.
|
1613
|
-
attr_accessor :set
|
1614
|
-
# Determines the type of discount action.
|
1615
|
-
attr_accessor :type
|
1616
|
-
|
1617
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1618
|
-
@add = add
|
1619
|
-
@remove = remove
|
1620
|
-
@set = set
|
1621
|
-
@type = type
|
1622
|
-
end
|
1623
|
-
end
|
1624
|
-
|
1625
|
-
class ItemAction < Stripe::RequestParams
|
1626
|
-
class Add < Stripe::RequestParams
|
1627
|
-
class Discount < Stripe::RequestParams
|
1628
|
-
class DiscountEnd < Stripe::RequestParams
|
1629
|
-
class Duration < Stripe::RequestParams
|
1630
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1631
|
-
attr_accessor :interval
|
1632
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1633
|
-
attr_accessor :interval_count
|
1634
|
-
|
1635
|
-
def initialize(interval: nil, interval_count: nil)
|
1636
|
-
@interval = interval
|
1637
|
-
@interval_count = interval_count
|
1638
|
-
end
|
1639
|
-
end
|
1640
|
-
# Time span for the redeemed discount.
|
1641
|
-
attr_accessor :duration
|
1642
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1643
|
-
attr_accessor :timestamp
|
1644
|
-
# The type of calculation made to determine when the discount ends.
|
1645
|
-
attr_accessor :type
|
1646
|
-
|
1647
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1648
|
-
@duration = duration
|
1649
|
-
@timestamp = timestamp
|
1650
|
-
@type = type
|
1651
|
-
end
|
1652
|
-
end
|
1653
|
-
# ID of the coupon to create a new discount for.
|
1654
|
-
attr_accessor :coupon
|
1655
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1656
|
-
attr_accessor :discount
|
1657
|
-
# Details to determine how long the discount should be applied for.
|
1658
|
-
attr_accessor :discount_end
|
1659
|
-
# ID of the promotion code to create a new discount for.
|
1660
|
-
attr_accessor :promotion_code
|
1661
|
-
|
1662
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1663
|
-
@coupon = coupon
|
1664
|
-
@discount = discount
|
1665
|
-
@discount_end = discount_end
|
1666
|
-
@promotion_code = promotion_code
|
1667
|
-
end
|
1668
|
-
end
|
1669
|
-
|
1670
|
-
class Trial < Stripe::RequestParams
|
1671
|
-
# 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.
|
1672
|
-
attr_accessor :converts_to
|
1673
|
-
# Determines the type of trial for this item.
|
1674
|
-
attr_accessor :type
|
1675
|
-
|
1676
|
-
def initialize(converts_to: nil, type: nil)
|
1677
|
-
@converts_to = converts_to
|
1678
|
-
@type = type
|
1679
|
-
end
|
1680
|
-
end
|
1681
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
1682
|
-
attr_accessor :discounts
|
1683
|
-
# 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`.
|
1684
|
-
attr_accessor :metadata
|
1685
|
-
# The ID of the price object.
|
1686
|
-
attr_accessor :price
|
1687
|
-
# Quantity for this item.
|
1688
|
-
attr_accessor :quantity
|
1689
|
-
# 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`.
|
1690
|
-
attr_accessor :tax_rates
|
1691
|
-
# Options that configure the trial on the subscription item.
|
1692
|
-
attr_accessor :trial
|
1693
|
-
|
1694
|
-
def initialize(
|
1695
|
-
discounts: nil,
|
1696
|
-
metadata: nil,
|
1697
|
-
price: nil,
|
1698
|
-
quantity: nil,
|
1699
|
-
tax_rates: nil,
|
1700
|
-
trial: nil
|
1701
|
-
)
|
1702
|
-
@discounts = discounts
|
1703
|
-
@metadata = metadata
|
1704
|
-
@price = price
|
1705
|
-
@quantity = quantity
|
1706
|
-
@tax_rates = tax_rates
|
1707
|
-
@trial = trial
|
1708
|
-
end
|
1709
|
-
end
|
1710
|
-
|
1711
|
-
class Remove < Stripe::RequestParams
|
1712
|
-
# ID of a price to remove.
|
1713
|
-
attr_accessor :price
|
1714
|
-
|
1715
|
-
def initialize(price: nil)
|
1716
|
-
@price = price
|
1717
|
-
end
|
1718
|
-
end
|
1719
|
-
|
1720
|
-
class Set < Stripe::RequestParams
|
1721
|
-
class Discount < Stripe::RequestParams
|
1722
|
-
class DiscountEnd < Stripe::RequestParams
|
1723
|
-
class Duration < Stripe::RequestParams
|
1724
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1725
|
-
attr_accessor :interval
|
1726
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1727
|
-
attr_accessor :interval_count
|
1728
|
-
|
1729
|
-
def initialize(interval: nil, interval_count: nil)
|
1730
|
-
@interval = interval
|
1731
|
-
@interval_count = interval_count
|
1732
|
-
end
|
1733
|
-
end
|
1734
|
-
# Time span for the redeemed discount.
|
1735
|
-
attr_accessor :duration
|
1736
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1737
|
-
attr_accessor :timestamp
|
1738
|
-
# The type of calculation made to determine when the discount ends.
|
1739
|
-
attr_accessor :type
|
1740
|
-
|
1741
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1742
|
-
@duration = duration
|
1743
|
-
@timestamp = timestamp
|
1744
|
-
@type = type
|
1745
|
-
end
|
1746
|
-
end
|
1747
|
-
# ID of the coupon to create a new discount for.
|
1748
|
-
attr_accessor :coupon
|
1749
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1750
|
-
attr_accessor :discount
|
1751
|
-
# Details to determine how long the discount should be applied for.
|
1752
|
-
attr_accessor :discount_end
|
1753
|
-
# ID of the promotion code to create a new discount for.
|
1754
|
-
attr_accessor :promotion_code
|
1755
|
-
|
1756
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1757
|
-
@coupon = coupon
|
1758
|
-
@discount = discount
|
1759
|
-
@discount_end = discount_end
|
1760
|
-
@promotion_code = promotion_code
|
1761
|
-
end
|
1762
|
-
end
|
1763
|
-
|
1764
|
-
class Trial < Stripe::RequestParams
|
1765
|
-
# 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.
|
1766
|
-
attr_accessor :converts_to
|
1767
|
-
# Determines the type of trial for this item.
|
1768
|
-
attr_accessor :type
|
1769
|
-
|
1770
|
-
def initialize(converts_to: nil, type: nil)
|
1771
|
-
@converts_to = converts_to
|
1772
|
-
@type = type
|
1773
|
-
end
|
1774
|
-
end
|
1775
|
-
# 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`.
|
1776
|
-
attr_accessor :discounts
|
1777
|
-
# 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`.
|
1778
|
-
attr_accessor :metadata
|
1779
|
-
# The ID of the price object.
|
1780
|
-
attr_accessor :price
|
1781
|
-
# 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`.
|
1782
|
-
attr_accessor :quantity
|
1783
|
-
# 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`.
|
1784
|
-
attr_accessor :tax_rates
|
1785
|
-
# 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`.
|
1786
|
-
attr_accessor :trial
|
1787
|
-
|
1788
|
-
def initialize(
|
1789
|
-
discounts: nil,
|
1790
|
-
metadata: nil,
|
1791
|
-
price: nil,
|
1792
|
-
quantity: nil,
|
1793
|
-
tax_rates: nil,
|
1794
|
-
trial: nil
|
1795
|
-
)
|
1796
|
-
@discounts = discounts
|
1797
|
-
@metadata = metadata
|
1798
|
-
@price = price
|
1799
|
-
@quantity = quantity
|
1800
|
-
@tax_rates = tax_rates
|
1801
|
-
@trial = trial
|
1802
|
-
end
|
1803
|
-
end
|
1804
|
-
# 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.
|
1805
|
-
attr_accessor :add
|
1806
|
-
# Details of the subscription item to remove.
|
1807
|
-
attr_accessor :remove
|
1808
|
-
# 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.
|
1809
|
-
attr_accessor :set
|
1810
|
-
# Determines the type of item action.
|
1811
|
-
attr_accessor :type
|
1812
|
-
|
1813
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1814
|
-
@add = add
|
1815
|
-
@remove = remove
|
1816
|
-
@set = set
|
1817
|
-
@type = type
|
1818
|
-
end
|
1819
|
-
end
|
1820
|
-
|
1821
|
-
class MetadataAction < Stripe::RequestParams
|
1822
|
-
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
1823
|
-
attr_accessor :add
|
1824
|
-
# Keys to remove from schedule phase metadata.
|
1825
|
-
attr_accessor :remove
|
1826
|
-
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
1827
|
-
attr_accessor :set
|
1828
|
-
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
1829
|
-
attr_accessor :type
|
1830
|
-
|
1831
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1832
|
-
@add = add
|
1833
|
-
@remove = remove
|
1834
|
-
@set = set
|
1835
|
-
@type = type
|
1836
|
-
end
|
1837
|
-
end
|
1838
|
-
|
1839
|
-
class SetPauseCollection < Stripe::RequestParams
|
1840
|
-
class Set < Stripe::RequestParams
|
1841
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1842
|
-
attr_accessor :behavior
|
1843
|
-
|
1844
|
-
def initialize(behavior: nil)
|
1845
|
-
@behavior = behavior
|
1846
|
-
end
|
1847
|
-
end
|
1848
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
1849
|
-
attr_accessor :set
|
1850
|
-
# Determines the type of the pause_collection amendment.
|
1851
|
-
attr_accessor :type
|
1852
|
-
|
1853
|
-
def initialize(set: nil, type: nil)
|
1854
|
-
@set = set
|
1855
|
-
@type = type
|
1856
|
-
end
|
1857
|
-
end
|
1858
|
-
|
1859
|
-
class TrialSettings < Stripe::RequestParams
|
1860
|
-
class EndBehavior < Stripe::RequestParams
|
1861
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1862
|
-
attr_accessor :prorate_up_front
|
1863
|
-
|
1864
|
-
def initialize(prorate_up_front: nil)
|
1865
|
-
@prorate_up_front = prorate_up_front
|
1866
|
-
end
|
1867
|
-
end
|
1868
|
-
# Defines how the subscription should behave when a trial ends.
|
1869
|
-
attr_accessor :end_behavior
|
1870
|
-
|
1871
|
-
def initialize(end_behavior: nil)
|
1872
|
-
@end_behavior = end_behavior
|
1873
|
-
end
|
1874
|
-
end
|
1875
|
-
# 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.
|
1876
|
-
attr_accessor :amendment_end
|
1877
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
1878
|
-
attr_accessor :amendment_start
|
1879
|
-
# 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.
|
1880
|
-
attr_accessor :billing_cycle_anchor
|
1881
|
-
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
1882
|
-
attr_accessor :discount_actions
|
1883
|
-
# Changes to the subscription items during the amendment time span.
|
1884
|
-
attr_accessor :item_actions
|
1885
|
-
# Instructions for how to modify phase metadata
|
1886
|
-
attr_accessor :metadata_actions
|
1887
|
-
# 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`.
|
1888
|
-
attr_accessor :proration_behavior
|
1889
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
1890
|
-
attr_accessor :set_pause_collection
|
1891
|
-
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
1892
|
-
attr_accessor :set_schedule_end
|
1893
|
-
# Settings related to subscription trials.
|
1894
|
-
attr_accessor :trial_settings
|
1895
|
-
|
1896
|
-
def initialize(
|
1897
|
-
amendment_end: nil,
|
1898
|
-
amendment_start: nil,
|
1899
|
-
billing_cycle_anchor: nil,
|
1900
|
-
discount_actions: nil,
|
1901
|
-
item_actions: nil,
|
1902
|
-
metadata_actions: nil,
|
1903
|
-
proration_behavior: nil,
|
1904
|
-
set_pause_collection: nil,
|
1905
|
-
set_schedule_end: nil,
|
1906
|
-
trial_settings: nil
|
1907
|
-
)
|
1908
|
-
@amendment_end = amendment_end
|
1909
|
-
@amendment_start = amendment_start
|
1910
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
1911
|
-
@discount_actions = discount_actions
|
1912
|
-
@item_actions = item_actions
|
1913
|
-
@metadata_actions = metadata_actions
|
1914
|
-
@proration_behavior = proration_behavior
|
1915
|
-
@set_pause_collection = set_pause_collection
|
1916
|
-
@set_schedule_end = set_schedule_end
|
1917
|
-
@trial_settings = trial_settings
|
1918
|
-
end
|
1919
|
-
end
|
1920
|
-
|
1921
|
-
class Prebilling < Stripe::RequestParams
|
1922
|
-
class BillFrom < Stripe::RequestParams
|
1923
|
-
class AmendmentStart < Stripe::RequestParams
|
1924
|
-
# 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.
|
1925
|
-
attr_accessor :index
|
1926
|
-
|
1927
|
-
def initialize(index: nil)
|
1928
|
-
@index = index
|
1929
|
-
end
|
1930
|
-
end
|
1931
|
-
# Start the prebilled period when a specified amendment begins.
|
1932
|
-
attr_accessor :amendment_start
|
1933
|
-
# Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
1934
|
-
attr_accessor :timestamp
|
1935
|
-
# Select one of several ways to pass the `bill_from` value.
|
1936
|
-
attr_accessor :type
|
1937
|
-
|
1938
|
-
def initialize(amendment_start: nil, timestamp: nil, type: nil)
|
1939
|
-
@amendment_start = amendment_start
|
1940
|
-
@timestamp = timestamp
|
1941
|
-
@type = type
|
1942
|
-
end
|
1943
|
-
end
|
1944
|
-
|
1945
|
-
class BillUntil < Stripe::RequestParams
|
1946
|
-
class AmendmentEnd < Stripe::RequestParams
|
1947
|
-
# 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.
|
1948
|
-
attr_accessor :index
|
1949
|
-
|
1950
|
-
def initialize(index: nil)
|
1951
|
-
@index = index
|
1952
|
-
end
|
1953
|
-
end
|
1954
|
-
|
1955
|
-
class Duration < Stripe::RequestParams
|
1956
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1957
|
-
attr_accessor :interval
|
1958
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1959
|
-
attr_accessor :interval_count
|
1960
|
-
|
1961
|
-
def initialize(interval: nil, interval_count: nil)
|
1962
|
-
@interval = interval
|
1963
|
-
@interval_count = interval_count
|
1964
|
-
end
|
1965
|
-
end
|
1966
|
-
# End the prebilled period when a specified amendment ends.
|
1967
|
-
attr_accessor :amendment_end
|
1968
|
-
# Time span for prebilling, starting from `bill_from`.
|
1969
|
-
attr_accessor :duration
|
1970
|
-
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
1971
|
-
attr_accessor :timestamp
|
1972
|
-
# Select one of several ways to pass the `bill_until` value.
|
1973
|
-
attr_accessor :type
|
1974
|
-
|
1975
|
-
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
1976
|
-
@amendment_end = amendment_end
|
1977
|
-
@duration = duration
|
1978
|
-
@timestamp = timestamp
|
1979
|
-
@type = type
|
1980
|
-
end
|
1981
|
-
end
|
1982
|
-
# The beginning of the prebilled time period. The default value is `now`.
|
1983
|
-
attr_accessor :bill_from
|
1984
|
-
# The end of the prebilled time period.
|
1985
|
-
attr_accessor :bill_until
|
1986
|
-
# When the prebilling invoice should be created. The default value is `now`.
|
1987
|
-
attr_accessor :invoice_at
|
1988
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1989
|
-
attr_accessor :update_behavior
|
1990
|
-
|
1991
|
-
def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
|
1992
|
-
@bill_from = bill_from
|
1993
|
-
@bill_until = bill_until
|
1994
|
-
@invoice_at = invoice_at
|
1995
|
-
@update_behavior = update_behavior
|
1996
|
-
end
|
1997
|
-
end
|
1998
|
-
|
1999
|
-
class ScheduleSettings < Stripe::RequestParams
|
2000
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2001
|
-
attr_accessor :end_behavior
|
2002
|
-
|
2003
|
-
def initialize(end_behavior: nil)
|
2004
|
-
@end_behavior = end_behavior
|
2005
|
-
end
|
2006
|
-
end
|
2007
|
-
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
2008
|
-
attr_accessor :amendments
|
2009
|
-
# Specifies which fields in the response should be expanded.
|
2010
|
-
attr_accessor :expand
|
2011
|
-
# Provide any time periods to bill in advance.
|
2012
|
-
attr_accessor :prebilling
|
2013
|
-
# In cases where the amendment changes the currently active phase,
|
2014
|
-
# specifies if and how to prorate at the time of the request.
|
2015
|
-
attr_accessor :proration_behavior
|
2016
|
-
# Changes to apply to the subscription schedule.
|
2017
|
-
attr_accessor :schedule_settings
|
2018
|
-
|
2019
|
-
def initialize(
|
2020
|
-
amendments: nil,
|
2021
|
-
expand: nil,
|
2022
|
-
prebilling: nil,
|
2023
|
-
proration_behavior: nil,
|
2024
|
-
schedule_settings: nil
|
2025
|
-
)
|
2026
|
-
@amendments = amendments
|
2027
|
-
@expand = expand
|
2028
|
-
@prebilling = prebilling
|
2029
|
-
@proration_behavior = proration_behavior
|
2030
|
-
@schedule_settings = schedule_settings
|
2031
|
-
end
|
2032
|
-
end
|
2033
|
-
|
2034
1176
|
class CancelParams < Stripe::RequestParams
|
2035
1177
|
# Specifies which fields in the response should be expanded.
|
2036
1178
|
attr_accessor :expand
|
@@ -2058,17 +1200,6 @@ module Stripe
|
|
2058
1200
|
end
|
2059
1201
|
end
|
2060
1202
|
|
2061
|
-
# Amends an existing subscription schedule.
|
2062
|
-
def amend(schedule, params = {}, opts = {})
|
2063
|
-
request(
|
2064
|
-
method: :post,
|
2065
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
2066
|
-
params: params,
|
2067
|
-
opts: opts,
|
2068
|
-
base_address: :api
|
2069
|
-
)
|
2070
|
-
end
|
2071
|
-
|
2072
1203
|
# 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.
|
2073
1204
|
def cancel(schedule, params = {}, opts = {})
|
2074
1205
|
request(
|