stripe 15.3.0.pre.beta.2 → 15.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/API_VERSION +1 -0
- data/CHANGELOG.md +683 -1584
- data/OPENAPI_VERSION +1 -1
- data/README.md +14 -50
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +0 -28
- data/lib/stripe/api_version.rb +2 -1
- data/lib/stripe/errors.rb +0 -54
- data/lib/stripe/event_types.rb +0 -98
- data/lib/stripe/events/v2_core_event_destination_ping_event.rb +1 -1
- data/lib/stripe/object_types.rb +0 -50
- data/lib/stripe/resources/account.rb +82 -650
- data/lib/stripe/resources/account_session.rb +80 -335
- data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -2
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -4
- data/lib/stripe/resources/billing/credit_grant.rb +0 -10
- data/lib/stripe/resources/billing_portal/session.rb +2 -8
- data/lib/stripe/resources/card.rb +0 -2
- data/lib/stripe/resources/cash_balance.rb +0 -2
- data/lib/stripe/resources/charge.rb +28 -1553
- data/lib/stripe/resources/checkout/session.rb +55 -333
- data/lib/stripe/resources/confirmation_token.rb +19 -181
- data/lib/stripe/resources/coupon.rb +1 -30
- data/lib/stripe/resources/credit_note.rb +9 -15
- data/lib/stripe/resources/credit_note_line_item.rb +0 -9
- data/lib/stripe/resources/customer.rb +0 -2
- data/lib/stripe/resources/customer_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_session.rb +3 -8
- data/lib/stripe/resources/discount.rb +0 -2
- data/lib/stripe/resources/event.rb +1 -32
- data/lib/stripe/resources/financial_connections/account.rb +1 -22
- data/lib/stripe/resources/financial_connections/session.rb +2 -62
- data/lib/stripe/resources/identity/verification_session.rb +34 -10
- data/lib/stripe/resources/invoice.rb +33 -1062
- data/lib/stripe/resources/invoice_item.rb +3 -82
- data/lib/stripe/resources/invoice_line_item.rb +1 -55
- data/lib/stripe/resources/invoice_payment.rb +53 -2
- data/lib/stripe/resources/issuing/cardholder.rb +1 -2
- data/lib/stripe/resources/issuing/transaction.rb +0 -6
- data/lib/stripe/resources/line_item.rb +0 -37
- data/lib/stripe/resources/mandate.rb +3 -24
- data/lib/stripe/resources/payment_intent.rb +875 -5512
- data/lib/stripe/resources/payment_method.rb +18 -201
- data/lib/stripe/resources/payment_method_configuration.rb +0 -295
- data/lib/stripe/resources/payout.rb +0 -6
- data/lib/stripe/resources/price.rb +0 -30
- data/lib/stripe/resources/promotion_code.rb +0 -10
- data/lib/stripe/resources/quote.rb +16 -2033
- data/lib/stripe/resources/refund.rb +0 -9
- data/lib/stripe/resources/setup_attempt.rb +1 -22
- data/lib/stripe/resources/setup_intent.rb +294 -581
- data/lib/stripe/resources/source.rb +0 -29
- data/lib/stripe/resources/subscription.rb +36 -298
- data/lib/stripe/resources/subscription_item.rb +3 -84
- data/lib/stripe/resources/subscription_schedule.rb +27 -1008
- data/lib/stripe/resources/tax/registration.rb +20 -0
- data/lib/stripe/resources/tax_id.rb +2 -12
- data/lib/stripe/resources/terminal/configuration.rb +1 -0
- data/lib/stripe/resources/terminal/reader.rb +10 -18
- data/lib/stripe/resources/token.rb +1 -1
- data/lib/stripe/resources/transfer.rb +0 -6
- data/lib/stripe/resources/treasury/financial_account.rb +8 -23
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
- data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
- data/lib/stripe/resources/treasury/received_credit.rb +1 -38
- data/lib/stripe/resources/treasury/received_debit.rb +1 -40
- data/lib/stripe/resources.rb +0 -104
- data/lib/stripe/services/account_service.rb +76 -559
- data/lib/stripe/services/account_session_service.rb +49 -274
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
- data/lib/stripe/services/billing/credit_grant_service.rb +0 -8
- data/lib/stripe/services/billing_portal/session_service.rb +1 -5
- data/lib/stripe/services/charge_service.rb +0 -1418
- data/lib/stripe/services/checkout/session_service.rb +55 -250
- data/lib/stripe/services/coupon_service.rb +1 -17
- data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
- data/lib/stripe/services/credit_note_service.rb +6 -10
- data/lib/stripe/services/customer_session_service.rb +2 -5
- data/lib/stripe/services/financial_connections/account_service.rb +2 -7
- data/lib/stripe/services/financial_connections/session_service.rb +2 -34
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/identity/verification_session_service.rb +16 -8
- data/lib/stripe/services/invoice_item_service.rb +2 -74
- data/lib/stripe/services/invoice_line_item_service.rb +1 -33
- data/lib/stripe/services/invoice_payment_service.rb +83 -0
- data/lib/stripe/services/invoice_service.rb +33 -1013
- data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
- data/lib/stripe/services/issuing/transaction_service.rb +0 -4
- data/lib/stripe/services/issuing_service.rb +1 -5
- data/lib/stripe/services/payment_intent_service.rb +650 -4832
- data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
- data/lib/stripe/services/payment_method_service.rb +6 -120
- data/lib/stripe/services/payout_service.rb +0 -4
- data/lib/stripe/services/price_service.rb +0 -19
- data/lib/stripe/services/promotion_code_service.rb +0 -8
- data/lib/stripe/services/quote_service.rb +13 -1719
- data/lib/stripe/services/setup_intent_service.rb +284 -540
- data/lib/stripe/services/subscription_item_service.rb +3 -75
- data/lib/stripe/services/subscription_schedule_service.rb +19 -911
- data/lib/stripe/services/subscription_service.rb +30 -253
- data/lib/stripe/services/tax/registration_service.rb +13 -0
- data/lib/stripe/services/tax_id_service.rb +2 -8
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/reader_service.rb +4 -4
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +6 -98
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
- data/lib/stripe/services/token_service.rb +1 -1
- data/lib/stripe/services/transfer_service.rb +0 -4
- data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
- data/lib/stripe/services/treasury/financial_account_service.rb +7 -17
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
- data/lib/stripe/services/v1_services.rb +2 -11
- data/lib/stripe/services/v2/billing_service.rb +2 -2
- data/lib/stripe/services/v2/core/event_destination_service.rb +16 -16
- data/lib/stripe/services/v2/core_service.rb +1 -4
- data/lib/stripe/services/v2_services.rb +2 -5
- data/lib/stripe/services.rb +1 -53
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/util.rb +1 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe/webhook.rb +1 -1
- data/lib/stripe.rb +0 -53
- data/rbi/stripe/resources/account.rbi +4995 -0
- data/rbi/stripe/resources/account_link.rbi +74 -0
- data/rbi/stripe/resources/account_session.rbi +1013 -0
- data/rbi/stripe/resources/apple_pay_domain.rbi +88 -0
- data/rbi/stripe/resources/application.rbi +20 -0
- data/rbi/stripe/resources/application_fee.rbi +118 -0
- data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
- data/rbi/stripe/resources/apps/secret.rbi +195 -0
- data/rbi/stripe/resources/balance.rbi +235 -0
- data/rbi/stripe/resources/balance_transaction.rbi +147 -0
- data/rbi/stripe/resources/bank_account.rbi +127 -0
- data/rbi/stripe/resources/billing/alert.rbi +201 -0
- data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
- data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
- data/rbi/stripe/resources/billing/meter.rbi +226 -0
- data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
- data/rbi/stripe/resources/billing_portal/configuration.rbi +645 -0
- data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
- data/rbi/stripe/resources/capability.rbi +125 -0
- data/rbi/stripe/resources/card.rbi +125 -0
- data/rbi/stripe/resources/cash_balance.rbi +32 -0
- data/rbi/stripe/resources/charge.rbi +2086 -0
- data/rbi/stripe/resources/checkout/session.rbi +4060 -0
- data/rbi/stripe/resources/climate/order.rbi +245 -0
- data/rbi/stripe/resources/climate/product.rbi +75 -0
- data/rbi/stripe/resources/climate/supplier.rbi +72 -0
- data/rbi/stripe/resources/confirmation_token.rbi +1818 -0
- data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
- data/rbi/stripe/resources/country_spec.rbi +85 -0
- data/rbi/stripe/resources/coupon.rbi +250 -0
- data/rbi/stripe/resources/credit_note.rbi +752 -0
- data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
- data/rbi/stripe/resources/customer.rbi +1005 -0
- data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
- data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
- data/rbi/stripe/resources/customer_session.rbi +200 -0
- data/rbi/stripe/resources/discount.rbi +53 -0
- data/rbi/stripe/resources/dispute.rbi +761 -0
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
- data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
- data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
- data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
- data/rbi/stripe/resources/event.rbi +149 -0
- data/rbi/stripe/resources/exchange_rate.rbi +66 -0
- data/rbi/stripe/resources/file.rbi +143 -0
- data/rbi/stripe/resources/file_link.rbi +141 -0
- data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
- data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
- data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
- data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
- data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
- data/rbi/stripe/resources/forwarding/request.rbi +216 -0
- data/rbi/stripe/resources/funding_instructions.rbi +437 -0
- data/rbi/stripe/resources/identity/verification_report.rbi +360 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +564 -0
- data/rbi/stripe/resources/invoice.rbi +3842 -0
- data/rbi/stripe/resources/invoice_item.rbi +470 -0
- data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
- data/rbi/stripe/resources/invoice_payment.rbi +121 -0
- data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
- data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
- data/rbi/stripe/resources/issuing/card.rbi +741 -0
- data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
- data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
- data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
- data/rbi/stripe/resources/issuing/token.rbi +226 -0
- data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
- data/rbi/stripe/resources/line_item.rbi +72 -0
- data/rbi/stripe/resources/login_link.rbi +19 -0
- data/rbi/stripe/resources/mandate.rbi +191 -0
- data/rbi/stripe/resources/payment_intent.rbi +9987 -0
- data/rbi/stripe/resources/payment_link.rbi +1801 -0
- data/rbi/stripe/resources/payment_method.rbi +1770 -0
- data/rbi/stripe/resources/payment_method_configuration.rbi +3550 -0
- data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
- data/rbi/stripe/resources/payout.rbi +300 -0
- data/rbi/stripe/resources/person.rbi +401 -0
- data/rbi/stripe/resources/plan.rbi +371 -0
- data/rbi/stripe/resources/price.rbi +694 -0
- data/rbi/stripe/resources/product.rbi +555 -0
- data/rbi/stripe/resources/product_feature.rbi +26 -0
- data/rbi/stripe/resources/promotion_code.rbi +261 -0
- data/rbi/stripe/resources/quote.rbi +1145 -0
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
- data/rbi/stripe/resources/radar/value_list.rbi +168 -0
- data/rbi/stripe/resources/radar/value_list_item.rbi +129 -0
- data/rbi/stripe/resources/refund.rbi +523 -0
- data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
- data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
- data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
- data/rbi/stripe/resources/reversal.rbi +51 -0
- data/rbi/stripe/resources/review.rbi +154 -0
- data/rbi/stripe/resources/setup_attempt.rbi +477 -0
- data/rbi/stripe/resources/setup_intent.rbi +3978 -0
- data/rbi/stripe/resources/shipping_rate.rbi +305 -0
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
- data/rbi/stripe/resources/source.rbi +1496 -0
- data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
- data/rbi/stripe/resources/source_transaction.rbi +127 -0
- data/rbi/stripe/resources/subscription.rbi +2080 -0
- data/rbi/stripe/resources/subscription_item.rbi +404 -0
- data/rbi/stripe/resources/subscription_schedule.rbi +1645 -0
- data/rbi/stripe/resources/tax/calculation.rbi +478 -0
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +91 -0
- data/rbi/stripe/resources/tax/registration.rbi +2732 -0
- data/rbi/stripe/resources/tax/settings.rbi +141 -0
- data/rbi/stripe/resources/tax/transaction.rbi +351 -0
- data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
- data/rbi/stripe/resources/tax_code.rbi +44 -0
- data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
- data/rbi/stripe/resources/tax_id.rbi +165 -0
- data/rbi/stripe/resources/tax_rate.rbi +239 -0
- data/rbi/stripe/resources/terminal/configuration.rbi +1387 -0
- data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
- data/rbi/stripe/resources/terminal/location.rbi +222 -0
- data/rbi/stripe/resources/terminal/reader.rbi +994 -0
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +132 -0
- data/rbi/stripe/resources/token.rbi +1283 -0
- data/rbi/stripe/resources/topup.rbi +222 -0
- data/rbi/stripe/resources/transfer.rbi +199 -0
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
- data/rbi/stripe/resources/treasury/financial_account.rbi +869 -0
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
- data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
- data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
- data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
- data/rbi/stripe/resources/v2/amount.rbi +14 -0
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
- data/rbi/stripe/resources/v2/event.rbi +48 -0
- data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
- data/rbi/stripe/resources/webhook_endpoint.rbi +168 -0
- data/rbi/stripe/services/account_capability_service.rbi +51 -0
- data/{lib/stripe/services/external_account_service.rb → rbi/stripe/services/account_external_account_service.rbi} +122 -135
- data/rbi/stripe/services/account_link_service.rbi +58 -0
- data/rbi/stripe/services/account_login_link_service.rbi +22 -0
- data/rbi/stripe/services/account_person_service.rbi +1011 -0
- data/rbi/stripe/services/account_service.rbi +4281 -0
- data/rbi/stripe/services/account_session_service.rbi +646 -0
- data/rbi/stripe/services/apple_pay_domain_service.rbi +76 -0
- data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
- data/rbi/stripe/services/application_fee_service.rbi +78 -0
- data/rbi/stripe/services/apps/secret_service.rbi +151 -0
- data/rbi/stripe/services/apps_service.rbi +9 -0
- data/rbi/stripe/services/balance_service.rbi +21 -0
- data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
- data/rbi/stripe/services/billing/alert_service.rbi +152 -0
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
- data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
- data/rbi/stripe/services/billing/meter_service.rbi +163 -0
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +511 -0
- data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
- data/rbi/stripe/services/billing_portal_service.rbi +10 -0
- data/rbi/stripe/services/billing_service.rbi +15 -0
- data/rbi/stripe/services/charge_service.rbi +448 -0
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
- data/rbi/stripe/services/checkout/session_service.rbi +2670 -0
- data/rbi/stripe/services/checkout_service.rbi +9 -0
- data/rbi/stripe/services/climate/order_service.rbi +142 -0
- data/rbi/stripe/services/climate/product_service.rbi +46 -0
- data/{lib/stripe/services/financial_connections/institution_service.rb → rbi/stripe/services/climate/supplier_service.rbi} +25 -36
- data/rbi/stripe/services/climate_service.rbi +11 -0
- data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
- data/rbi/stripe/services/country_spec_service.rbi +44 -0
- data/rbi/stripe/services/coupon_service.rbi +194 -0
- data/{lib/stripe/services/quote_preview_invoice_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
- data/rbi/stripe/services/credit_note_service.rbi +415 -0
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
- data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
- data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
- data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
- data/rbi/stripe/services/customer_service.rbi +647 -0
- data/rbi/stripe/services/customer_session_service.rbi +116 -0
- data/rbi/stripe/services/customer_tax_id_service.rbi +70 -0
- data/rbi/stripe/services/dispute_service.rbi +424 -0
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
- data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
- data/rbi/stripe/services/entitlements_service.rbi +10 -0
- data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
- data/rbi/stripe/services/event_service.rbi +83 -0
- data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
- data/rbi/stripe/services/file_link_service.rbi +124 -0
- data/rbi/stripe/services/file_service.rbi +116 -0
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
- data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
- data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
- data/rbi/stripe/services/financial_connections_service.rbi +11 -0
- data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
- data/rbi/stripe/services/forwarding_service.rbi +9 -0
- data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
- data/rbi/stripe/services/identity/verification_session_service.rbi +339 -0
- data/rbi/stripe/services/identity_service.rbi +10 -0
- data/rbi/stripe/services/invoice_item_service.rbi +366 -0
- data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
- data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
- data/rbi/stripe/services/invoice_service.rbi +3011 -0
- data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
- data/rbi/stripe/services/issuing/card_service.rbi +495 -0
- data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
- data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
- data/rbi/stripe/services/issuing/token_service.rbi +99 -0
- data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
- data/rbi/stripe/services/issuing_service.rbi +16 -0
- data/rbi/stripe/services/mandate_service.rbi +20 -0
- data/rbi/stripe/services/payment_intent_service.rbi +7989 -0
- data/{lib/stripe/services/payment_intent_amount_details_line_item_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/payment_link_service.rbi +1352 -0
- data/rbi/stripe/services/payment_method_configuration_service.rbi +2487 -0
- data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
- data/rbi/stripe/services/payment_method_service.rbi +781 -0
- data/rbi/stripe/services/payout_service.rbi +205 -0
- data/rbi/stripe/services/plan_service.rbi +282 -0
- data/rbi/stripe/services/price_service.rbi +546 -0
- data/rbi/stripe/services/product_feature_service.rbi +67 -0
- data/rbi/stripe/services/product_service.rbi +477 -0
- data/rbi/stripe/services/promotion_code_service.rbi +214 -0
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
- data/{lib/stripe/services/order_line_item_service.rb → rbi/stripe/services/quote_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/quote_service.rbi +699 -0
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
- data/rbi/stripe/services/radar/value_list_item_service.rbi +109 -0
- data/rbi/stripe/services/radar/value_list_service.rbi +141 -0
- data/rbi/stripe/services/radar_service.rbi +11 -0
- data/rbi/stripe/services/refund_service.rbi +185 -0
- data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
- data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
- data/rbi/stripe/services/reporting_service.rbi +10 -0
- data/rbi/stripe/services/review_service.rbi +84 -0
- data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
- data/rbi/stripe/services/setup_intent_service.rbi +3709 -0
- data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
- data/rbi/stripe/services/sigma_service.rbi +9 -0
- data/rbi/stripe/services/source_service.rbi +663 -0
- data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
- data/rbi/stripe/services/subscription_item_service.rbi +350 -0
- data/rbi/stripe/services/subscription_schedule_service.rbi +1301 -0
- data/rbi/stripe/services/subscription_service.rbi +1684 -0
- data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/calculation_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/calculation_service.rbi +234 -0
- data/rbi/stripe/services/tax/registration_service.rbi +1858 -0
- data/rbi/stripe/services/tax/settings_service.rbi +93 -0
- data/{lib/stripe/services/privacy/redaction_job_validation_error_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
- data/rbi/stripe/services/tax_code_service.rbi +44 -0
- data/rbi/stripe/services/tax_id_service.rbi +110 -0
- data/rbi/stripe/services/tax_rate_service.rbi +185 -0
- data/rbi/stripe/services/tax_service.rbi +12 -0
- data/rbi/stripe/services/terminal/configuration_service.rbi +1118 -0
- data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
- data/rbi/stripe/services/terminal/location_service.rbi +182 -0
- data/rbi/stripe/services/terminal/reader_service.rbi +540 -0
- data/rbi/stripe/services/terminal_service.rbi +12 -0
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +746 -0
- data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
- data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
- data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +93 -0
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
- data/rbi/stripe/services/test_helpers_service.rbi +15 -0
- data/rbi/stripe/services/token_service.rbi +1257 -0
- data/rbi/stripe/services/topup_service.rbi +176 -0
- data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
- data/rbi/stripe/services/transfer_service.rbi +152 -0
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
- data/rbi/stripe/services/treasury/financial_account_service.rbi +566 -0
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
- data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
- data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
- data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
- data/rbi/stripe/services/treasury_service.rbi +18 -0
- data/rbi/stripe/services/v1_services.rbi +77 -0
- data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +18 -0
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
- data/rbi/stripe/services/v2/billing_service.rbi +14 -0
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +192 -0
- data/rbi/stripe/services/v2/core/event_service.rbi +36 -0
- data/rbi/stripe/services/v2/core_service.rbi +12 -0
- data/rbi/stripe/services/v2_services.rbi +10 -0
- data/rbi/stripe/services/webhook_endpoint_service.rbi +129 -0
- data/stripe.gemspec +1 -4
- metadata +326 -162
- data/lib/stripe/events/v2_core_account_closed_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_created_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_link_completed_event.rb +0 -13
- data/lib/stripe/events/v2_core_account_person_created_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_person_deleted_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_person_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
- data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_transaction_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +0 -21
- data/lib/stripe/events/v2_off_session_payment_requires_capture_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +0 -21
- data/lib/stripe/resources/account_notice.rb +0 -123
- data/lib/stripe/resources/balance_settings.rb +0 -105
- data/lib/stripe/resources/capital/financing_offer.rb +0 -179
- data/lib/stripe/resources/capital/financing_summary.rb +0 -55
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -114
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
- data/lib/stripe/resources/financial_connections/institution.rb +0 -92
- data/lib/stripe/resources/fx_quote.rb +0 -184
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
- data/lib/stripe/resources/issuing/settlement.rb +0 -53
- data/lib/stripe/resources/margin.rb +0 -115
- data/lib/stripe/resources/order.rb +0 -2806
- data/lib/stripe/resources/payment_attempt_record.rb +0 -1086
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -72
- data/lib/stripe/resources/payment_record.rb +0 -1615
- data/lib/stripe/resources/privacy/redaction_job.rb +0 -298
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -33
- data/lib/stripe/resources/quote_line.rb +0 -274
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -663
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -364
- data/lib/stripe/resources/tax/association.rb +0 -66
- data/lib/stripe/resources/tax/form.rb +0 -211
- data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
- data/lib/stripe/resources/v2/core/account.rb +0 -1746
- data/lib/stripe/resources/v2/core/account_link.rb +0 -56
- data/lib/stripe/resources/v2/core/person.rb +0 -276
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -74
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -39
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -20
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -22
- data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -51
- data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -58
- data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -68
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -94
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -129
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -82
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -45
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -117
- data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -75
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -49
- data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -116
- data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -84
- data/lib/stripe/resources/v2/money_management/transaction.rb +0 -78
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -68
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +0 -72
- data/lib/stripe/services/account_notice_service.rb +0 -101
- data/lib/stripe/services/balance_settings_service.rb +0 -96
- data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
- data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
- data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
- data/lib/stripe/services/capital_service.rb +0 -15
- data/lib/stripe/services/fx_quote_service.rb +0 -123
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
- data/lib/stripe/services/margin_service.rb +0 -119
- data/lib/stripe/services/order_service.rb +0 -2236
- data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
- data/lib/stripe/services/payment_record_service.rb +0 -542
- data/lib/stripe/services/privacy/redaction_job_service.rb +0 -240
- data/lib/stripe/services/privacy_service.rb +0 -13
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
- data/lib/stripe/services/tax/association_service.rb +0 -31
- data/lib/stripe/services/tax/form_service.rb +0 -100
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
- data/lib/stripe/services/v2/core/account_link_service.rb +0 -76
- data/lib/stripe/services/v2/core/account_service.rb +0 -4138
- data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1046
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -131
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -107
- data/lib/stripe/services/v2/core/vault_service.rb +0 -18
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -74
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -43
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -81
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -125
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -95
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -200
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -235
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -172
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -91
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -70
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -43
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -69
- data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -73
- data/lib/stripe/services/v2/money_management_service.rb +0 -31
- data/lib/stripe/services/v2/payment_service.rb +0 -15
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +0 -138
- data/lib/stripe/services/v2/test_helper_service.rb +0 -15
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -49
- data/rbi/stripe.rbi +0 -191636
@@ -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
|
@@ -126,6 +122,15 @@ module Stripe
|
|
126
122
|
end
|
127
123
|
|
128
124
|
class CreateParams < Stripe::RequestParams
|
125
|
+
class BillingMode < Stripe::RequestParams
|
126
|
+
# Attribute for param field type
|
127
|
+
attr_accessor :type
|
128
|
+
|
129
|
+
def initialize(type: nil)
|
130
|
+
@type = type
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
129
134
|
class DefaultSettings < Stripe::RequestParams
|
130
135
|
class AutomaticTax < Stripe::RequestParams
|
131
136
|
class Liability < Stripe::RequestParams
|
@@ -248,44 +253,16 @@ module Stripe
|
|
248
253
|
class Phase < Stripe::RequestParams
|
249
254
|
class AddInvoiceItem < Stripe::RequestParams
|
250
255
|
class Discount < Stripe::RequestParams
|
251
|
-
class DiscountEnd < Stripe::RequestParams
|
252
|
-
class Duration < Stripe::RequestParams
|
253
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
254
|
-
attr_accessor :interval
|
255
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
256
|
-
attr_accessor :interval_count
|
257
|
-
|
258
|
-
def initialize(interval: nil, interval_count: nil)
|
259
|
-
@interval = interval
|
260
|
-
@interval_count = interval_count
|
261
|
-
end
|
262
|
-
end
|
263
|
-
# Time span for the redeemed discount.
|
264
|
-
attr_accessor :duration
|
265
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
266
|
-
attr_accessor :timestamp
|
267
|
-
# The type of calculation made to determine when the discount ends.
|
268
|
-
attr_accessor :type
|
269
|
-
|
270
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
271
|
-
@duration = duration
|
272
|
-
@timestamp = timestamp
|
273
|
-
@type = type
|
274
|
-
end
|
275
|
-
end
|
276
256
|
# ID of the coupon to create a new discount for.
|
277
257
|
attr_accessor :coupon
|
278
258
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
279
259
|
attr_accessor :discount
|
280
|
-
# Details to determine how long the discount should be applied for.
|
281
|
-
attr_accessor :discount_end
|
282
260
|
# ID of the promotion code to create a new discount for.
|
283
261
|
attr_accessor :promotion_code
|
284
262
|
|
285
|
-
def initialize(coupon: nil, discount: nil,
|
263
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
286
264
|
@coupon = coupon
|
287
265
|
@discount = discount
|
288
|
-
@discount_end = discount_end
|
289
266
|
@promotion_code = promotion_code
|
290
267
|
end
|
291
268
|
end
|
@@ -372,44 +349,16 @@ module Stripe
|
|
372
349
|
end
|
373
350
|
|
374
351
|
class Discount < Stripe::RequestParams
|
375
|
-
class DiscountEnd < Stripe::RequestParams
|
376
|
-
class Duration < Stripe::RequestParams
|
377
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
378
|
-
attr_accessor :interval
|
379
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
380
|
-
attr_accessor :interval_count
|
381
|
-
|
382
|
-
def initialize(interval: nil, interval_count: nil)
|
383
|
-
@interval = interval
|
384
|
-
@interval_count = interval_count
|
385
|
-
end
|
386
|
-
end
|
387
|
-
# Time span for the redeemed discount.
|
388
|
-
attr_accessor :duration
|
389
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
390
|
-
attr_accessor :timestamp
|
391
|
-
# The type of calculation made to determine when the discount ends.
|
392
|
-
attr_accessor :type
|
393
|
-
|
394
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
395
|
-
@duration = duration
|
396
|
-
@timestamp = timestamp
|
397
|
-
@type = type
|
398
|
-
end
|
399
|
-
end
|
400
352
|
# ID of the coupon to create a new discount for.
|
401
353
|
attr_accessor :coupon
|
402
354
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
403
355
|
attr_accessor :discount
|
404
|
-
# Details to determine how long the discount should be applied for.
|
405
|
-
attr_accessor :discount_end
|
406
356
|
# ID of the promotion code to create a new discount for.
|
407
357
|
attr_accessor :promotion_code
|
408
358
|
|
409
|
-
def initialize(coupon: nil, discount: nil,
|
359
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
410
360
|
@coupon = coupon
|
411
361
|
@discount = discount
|
412
|
-
@discount_end = discount_end
|
413
362
|
@promotion_code = promotion_code
|
414
363
|
end
|
415
364
|
end
|
@@ -451,44 +400,16 @@ module Stripe
|
|
451
400
|
end
|
452
401
|
|
453
402
|
class Discount < Stripe::RequestParams
|
454
|
-
class DiscountEnd < Stripe::RequestParams
|
455
|
-
class Duration < Stripe::RequestParams
|
456
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
457
|
-
attr_accessor :interval
|
458
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
459
|
-
attr_accessor :interval_count
|
460
|
-
|
461
|
-
def initialize(interval: nil, interval_count: nil)
|
462
|
-
@interval = interval
|
463
|
-
@interval_count = interval_count
|
464
|
-
end
|
465
|
-
end
|
466
|
-
# Time span for the redeemed discount.
|
467
|
-
attr_accessor :duration
|
468
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
469
|
-
attr_accessor :timestamp
|
470
|
-
# The type of calculation made to determine when the discount ends.
|
471
|
-
attr_accessor :type
|
472
|
-
|
473
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
474
|
-
@duration = duration
|
475
|
-
@timestamp = timestamp
|
476
|
-
@type = type
|
477
|
-
end
|
478
|
-
end
|
479
403
|
# ID of the coupon to create a new discount for.
|
480
404
|
attr_accessor :coupon
|
481
405
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
482
406
|
attr_accessor :discount
|
483
|
-
# Details to determine how long the discount should be applied for.
|
484
|
-
attr_accessor :discount_end
|
485
407
|
# ID of the promotion code to create a new discount for.
|
486
408
|
attr_accessor :promotion_code
|
487
409
|
|
488
|
-
def initialize(coupon: nil, discount: nil,
|
410
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
489
411
|
@coupon = coupon
|
490
412
|
@discount = discount
|
491
|
-
@discount_end = discount_end
|
492
413
|
@promotion_code = promotion_code
|
493
414
|
end
|
494
415
|
end
|
@@ -534,18 +455,6 @@ module Stripe
|
|
534
455
|
@unit_amount_decimal = unit_amount_decimal
|
535
456
|
end
|
536
457
|
end
|
537
|
-
|
538
|
-
class Trial < Stripe::RequestParams
|
539
|
-
# 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.
|
540
|
-
attr_accessor :converts_to
|
541
|
-
# Determines the type of trial for this item.
|
542
|
-
attr_accessor :type
|
543
|
-
|
544
|
-
def initialize(converts_to: nil, type: nil)
|
545
|
-
@converts_to = converts_to
|
546
|
-
@type = type
|
547
|
-
end
|
548
|
-
end
|
549
458
|
# 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.
|
550
459
|
attr_accessor :billing_thresholds
|
551
460
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -562,8 +471,6 @@ module Stripe
|
|
562
471
|
attr_accessor :quantity
|
563
472
|
# 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.
|
564
473
|
attr_accessor :tax_rates
|
565
|
-
# Options that configure the trial on the subscription item.
|
566
|
-
attr_accessor :trial
|
567
474
|
|
568
475
|
def initialize(
|
569
476
|
billing_thresholds: nil,
|
@@ -573,8 +480,7 @@ module Stripe
|
|
573
480
|
price: nil,
|
574
481
|
price_data: nil,
|
575
482
|
quantity: nil,
|
576
|
-
tax_rates: nil
|
577
|
-
trial: nil
|
483
|
+
tax_rates: nil
|
578
484
|
)
|
579
485
|
@billing_thresholds = billing_thresholds
|
580
486
|
@discounts = discounts
|
@@ -584,16 +490,6 @@ module Stripe
|
|
584
490
|
@price_data = price_data
|
585
491
|
@quantity = quantity
|
586
492
|
@tax_rates = tax_rates
|
587
|
-
@trial = trial
|
588
|
-
end
|
589
|
-
end
|
590
|
-
|
591
|
-
class PauseCollection < Stripe::RequestParams
|
592
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
593
|
-
attr_accessor :behavior
|
594
|
-
|
595
|
-
def initialize(behavior: nil)
|
596
|
-
@behavior = behavior
|
597
493
|
end
|
598
494
|
end
|
599
495
|
|
@@ -608,23 +504,6 @@ module Stripe
|
|
608
504
|
@destination = destination
|
609
505
|
end
|
610
506
|
end
|
611
|
-
|
612
|
-
class TrialSettings < Stripe::RequestParams
|
613
|
-
class EndBehavior < Stripe::RequestParams
|
614
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
615
|
-
attr_accessor :prorate_up_front
|
616
|
-
|
617
|
-
def initialize(prorate_up_front: nil)
|
618
|
-
@prorate_up_front = prorate_up_front
|
619
|
-
end
|
620
|
-
end
|
621
|
-
# Defines how the subscription should behave when a trial ends.
|
622
|
-
attr_accessor :end_behavior
|
623
|
-
|
624
|
-
def initialize(end_behavior: nil)
|
625
|
-
@end_behavior = end_behavior
|
626
|
-
end
|
627
|
-
end
|
628
507
|
# 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.
|
629
508
|
attr_accessor :add_invoice_items
|
630
509
|
# 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).
|
@@ -659,20 +538,14 @@ module Stripe
|
|
659
538
|
attr_accessor :metadata
|
660
539
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
661
540
|
attr_accessor :on_behalf_of
|
662
|
-
# 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).
|
663
|
-
attr_accessor :pause_collection
|
664
541
|
# 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.
|
665
542
|
attr_accessor :proration_behavior
|
666
543
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
667
544
|
attr_accessor :transfer_data
|
668
545
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
669
546
|
attr_accessor :trial
|
670
|
-
# Specify trial behavior when crossing phase boundaries
|
671
|
-
attr_accessor :trial_continuation
|
672
547
|
# 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`
|
673
548
|
attr_accessor :trial_end
|
674
|
-
# Settings related to subscription trials.
|
675
|
-
attr_accessor :trial_settings
|
676
549
|
|
677
550
|
def initialize(
|
678
551
|
add_invoice_items: nil,
|
@@ -692,13 +565,10 @@ module Stripe
|
|
692
565
|
iterations: nil,
|
693
566
|
metadata: nil,
|
694
567
|
on_behalf_of: nil,
|
695
|
-
pause_collection: nil,
|
696
568
|
proration_behavior: nil,
|
697
569
|
transfer_data: nil,
|
698
570
|
trial: nil,
|
699
|
-
|
700
|
-
trial_end: nil,
|
701
|
-
trial_settings: nil
|
571
|
+
trial_end: nil
|
702
572
|
)
|
703
573
|
@add_invoice_items = add_invoice_items
|
704
574
|
@application_fee_percent = application_fee_percent
|
@@ -717,35 +587,16 @@ module Stripe
|
|
717
587
|
@iterations = iterations
|
718
588
|
@metadata = metadata
|
719
589
|
@on_behalf_of = on_behalf_of
|
720
|
-
@pause_collection = pause_collection
|
721
590
|
@proration_behavior = proration_behavior
|
722
591
|
@transfer_data = transfer_data
|
723
592
|
@trial = trial
|
724
|
-
@trial_continuation = trial_continuation
|
725
593
|
@trial_end = trial_end
|
726
|
-
@trial_settings = trial_settings
|
727
|
-
end
|
728
|
-
end
|
729
|
-
|
730
|
-
class Prebilling < Stripe::RequestParams
|
731
|
-
# This is used to determine the number of billing cycles to prebill.
|
732
|
-
attr_accessor :iterations
|
733
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
734
|
-
attr_accessor :update_behavior
|
735
|
-
|
736
|
-
def initialize(iterations: nil, update_behavior: nil)
|
737
|
-
@iterations = iterations
|
738
|
-
@update_behavior = update_behavior
|
739
594
|
end
|
740
595
|
end
|
741
|
-
# 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.
|
742
|
-
attr_accessor :billing_behavior
|
743
596
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
744
597
|
attr_accessor :billing_mode
|
745
598
|
# The identifier of the customer to create the subscription schedule for.
|
746
599
|
attr_accessor :customer
|
747
|
-
# The identifier of the account to create the subscription schedule for.
|
748
|
-
attr_accessor :customer_account
|
749
600
|
# Object representing the subscription schedule's default settings.
|
750
601
|
attr_accessor :default_settings
|
751
602
|
# 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.
|
@@ -758,36 +609,28 @@ module Stripe
|
|
758
609
|
attr_accessor :metadata
|
759
610
|
# 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.
|
760
611
|
attr_accessor :phases
|
761
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
762
|
-
attr_accessor :prebilling
|
763
612
|
# 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.
|
764
613
|
attr_accessor :start_date
|
765
614
|
|
766
615
|
def initialize(
|
767
|
-
billing_behavior: nil,
|
768
616
|
billing_mode: nil,
|
769
617
|
customer: nil,
|
770
|
-
customer_account: nil,
|
771
618
|
default_settings: nil,
|
772
619
|
end_behavior: nil,
|
773
620
|
expand: nil,
|
774
621
|
from_subscription: nil,
|
775
622
|
metadata: nil,
|
776
623
|
phases: nil,
|
777
|
-
prebilling: nil,
|
778
624
|
start_date: nil
|
779
625
|
)
|
780
|
-
@billing_behavior = billing_behavior
|
781
626
|
@billing_mode = billing_mode
|
782
627
|
@customer = customer
|
783
|
-
@customer_account = customer_account
|
784
628
|
@default_settings = default_settings
|
785
629
|
@end_behavior = end_behavior
|
786
630
|
@expand = expand
|
787
631
|
@from_subscription = from_subscription
|
788
632
|
@metadata = metadata
|
789
633
|
@phases = phases
|
790
|
-
@prebilling = prebilling
|
791
634
|
@start_date = start_date
|
792
635
|
end
|
793
636
|
end
|
@@ -924,44 +767,16 @@ module Stripe
|
|
924
767
|
class Phase < Stripe::RequestParams
|
925
768
|
class AddInvoiceItem < Stripe::RequestParams
|
926
769
|
class Discount < Stripe::RequestParams
|
927
|
-
class DiscountEnd < Stripe::RequestParams
|
928
|
-
class Duration < Stripe::RequestParams
|
929
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
930
|
-
attr_accessor :interval
|
931
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
932
|
-
attr_accessor :interval_count
|
933
|
-
|
934
|
-
def initialize(interval: nil, interval_count: nil)
|
935
|
-
@interval = interval
|
936
|
-
@interval_count = interval_count
|
937
|
-
end
|
938
|
-
end
|
939
|
-
# Time span for the redeemed discount.
|
940
|
-
attr_accessor :duration
|
941
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
942
|
-
attr_accessor :timestamp
|
943
|
-
# The type of calculation made to determine when the discount ends.
|
944
|
-
attr_accessor :type
|
945
|
-
|
946
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
947
|
-
@duration = duration
|
948
|
-
@timestamp = timestamp
|
949
|
-
@type = type
|
950
|
-
end
|
951
|
-
end
|
952
770
|
# ID of the coupon to create a new discount for.
|
953
771
|
attr_accessor :coupon
|
954
772
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
955
773
|
attr_accessor :discount
|
956
|
-
# Details to determine how long the discount should be applied for.
|
957
|
-
attr_accessor :discount_end
|
958
774
|
# ID of the promotion code to create a new discount for.
|
959
775
|
attr_accessor :promotion_code
|
960
776
|
|
961
|
-
def initialize(coupon: nil, discount: nil,
|
777
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
962
778
|
@coupon = coupon
|
963
779
|
@discount = discount
|
964
|
-
@discount_end = discount_end
|
965
780
|
@promotion_code = promotion_code
|
966
781
|
end
|
967
782
|
end
|
@@ -1048,44 +863,16 @@ module Stripe
|
|
1048
863
|
end
|
1049
864
|
|
1050
865
|
class Discount < Stripe::RequestParams
|
1051
|
-
class DiscountEnd < Stripe::RequestParams
|
1052
|
-
class Duration < Stripe::RequestParams
|
1053
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1054
|
-
attr_accessor :interval
|
1055
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1056
|
-
attr_accessor :interval_count
|
1057
|
-
|
1058
|
-
def initialize(interval: nil, interval_count: nil)
|
1059
|
-
@interval = interval
|
1060
|
-
@interval_count = interval_count
|
1061
|
-
end
|
1062
|
-
end
|
1063
|
-
# Time span for the redeemed discount.
|
1064
|
-
attr_accessor :duration
|
1065
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1066
|
-
attr_accessor :timestamp
|
1067
|
-
# The type of calculation made to determine when the discount ends.
|
1068
|
-
attr_accessor :type
|
1069
|
-
|
1070
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1071
|
-
@duration = duration
|
1072
|
-
@timestamp = timestamp
|
1073
|
-
@type = type
|
1074
|
-
end
|
1075
|
-
end
|
1076
866
|
# ID of the coupon to create a new discount for.
|
1077
867
|
attr_accessor :coupon
|
1078
868
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1079
869
|
attr_accessor :discount
|
1080
|
-
# Details to determine how long the discount should be applied for.
|
1081
|
-
attr_accessor :discount_end
|
1082
870
|
# ID of the promotion code to create a new discount for.
|
1083
871
|
attr_accessor :promotion_code
|
1084
872
|
|
1085
|
-
def initialize(coupon: nil, discount: nil,
|
873
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1086
874
|
@coupon = coupon
|
1087
875
|
@discount = discount
|
1088
|
-
@discount_end = discount_end
|
1089
876
|
@promotion_code = promotion_code
|
1090
877
|
end
|
1091
878
|
end
|
@@ -1127,44 +914,16 @@ module Stripe
|
|
1127
914
|
end
|
1128
915
|
|
1129
916
|
class Discount < Stripe::RequestParams
|
1130
|
-
class DiscountEnd < Stripe::RequestParams
|
1131
|
-
class Duration < Stripe::RequestParams
|
1132
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1133
|
-
attr_accessor :interval
|
1134
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1135
|
-
attr_accessor :interval_count
|
1136
|
-
|
1137
|
-
def initialize(interval: nil, interval_count: nil)
|
1138
|
-
@interval = interval
|
1139
|
-
@interval_count = interval_count
|
1140
|
-
end
|
1141
|
-
end
|
1142
|
-
# Time span for the redeemed discount.
|
1143
|
-
attr_accessor :duration
|
1144
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1145
|
-
attr_accessor :timestamp
|
1146
|
-
# The type of calculation made to determine when the discount ends.
|
1147
|
-
attr_accessor :type
|
1148
|
-
|
1149
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1150
|
-
@duration = duration
|
1151
|
-
@timestamp = timestamp
|
1152
|
-
@type = type
|
1153
|
-
end
|
1154
|
-
end
|
1155
917
|
# ID of the coupon to create a new discount for.
|
1156
918
|
attr_accessor :coupon
|
1157
919
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1158
920
|
attr_accessor :discount
|
1159
|
-
# Details to determine how long the discount should be applied for.
|
1160
|
-
attr_accessor :discount_end
|
1161
921
|
# ID of the promotion code to create a new discount for.
|
1162
922
|
attr_accessor :promotion_code
|
1163
923
|
|
1164
|
-
def initialize(coupon: nil, discount: nil,
|
924
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1165
925
|
@coupon = coupon
|
1166
926
|
@discount = discount
|
1167
|
-
@discount_end = discount_end
|
1168
927
|
@promotion_code = promotion_code
|
1169
928
|
end
|
1170
929
|
end
|
@@ -1210,18 +969,6 @@ module Stripe
|
|
1210
969
|
@unit_amount_decimal = unit_amount_decimal
|
1211
970
|
end
|
1212
971
|
end
|
1213
|
-
|
1214
|
-
class Trial < Stripe::RequestParams
|
1215
|
-
# 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.
|
1216
|
-
attr_accessor :converts_to
|
1217
|
-
# Determines the type of trial for this item.
|
1218
|
-
attr_accessor :type
|
1219
|
-
|
1220
|
-
def initialize(converts_to: nil, type: nil)
|
1221
|
-
@converts_to = converts_to
|
1222
|
-
@type = type
|
1223
|
-
end
|
1224
|
-
end
|
1225
972
|
# 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.
|
1226
973
|
attr_accessor :billing_thresholds
|
1227
974
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -1238,8 +985,6 @@ module Stripe
|
|
1238
985
|
attr_accessor :quantity
|
1239
986
|
# 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.
|
1240
987
|
attr_accessor :tax_rates
|
1241
|
-
# Options that configure the trial on the subscription item.
|
1242
|
-
attr_accessor :trial
|
1243
988
|
|
1244
989
|
def initialize(
|
1245
990
|
billing_thresholds: nil,
|
@@ -1249,8 +994,7 @@ module Stripe
|
|
1249
994
|
price: nil,
|
1250
995
|
price_data: nil,
|
1251
996
|
quantity: nil,
|
1252
|
-
tax_rates: nil
|
1253
|
-
trial: nil
|
997
|
+
tax_rates: nil
|
1254
998
|
)
|
1255
999
|
@billing_thresholds = billing_thresholds
|
1256
1000
|
@discounts = discounts
|
@@ -1260,16 +1004,6 @@ module Stripe
|
|
1260
1004
|
@price_data = price_data
|
1261
1005
|
@quantity = quantity
|
1262
1006
|
@tax_rates = tax_rates
|
1263
|
-
@trial = trial
|
1264
|
-
end
|
1265
|
-
end
|
1266
|
-
|
1267
|
-
class PauseCollection < Stripe::RequestParams
|
1268
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1269
|
-
attr_accessor :behavior
|
1270
|
-
|
1271
|
-
def initialize(behavior: nil)
|
1272
|
-
@behavior = behavior
|
1273
1007
|
end
|
1274
1008
|
end
|
1275
1009
|
|
@@ -1284,23 +1018,6 @@ module Stripe
|
|
1284
1018
|
@destination = destination
|
1285
1019
|
end
|
1286
1020
|
end
|
1287
|
-
|
1288
|
-
class TrialSettings < Stripe::RequestParams
|
1289
|
-
class EndBehavior < Stripe::RequestParams
|
1290
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1291
|
-
attr_accessor :prorate_up_front
|
1292
|
-
|
1293
|
-
def initialize(prorate_up_front: nil)
|
1294
|
-
@prorate_up_front = prorate_up_front
|
1295
|
-
end
|
1296
|
-
end
|
1297
|
-
# Defines how the subscription should behave when a trial ends.
|
1298
|
-
attr_accessor :end_behavior
|
1299
|
-
|
1300
|
-
def initialize(end_behavior: nil)
|
1301
|
-
@end_behavior = end_behavior
|
1302
|
-
end
|
1303
|
-
end
|
1304
1021
|
# 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.
|
1305
1022
|
attr_accessor :add_invoice_items
|
1306
1023
|
# 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).
|
@@ -1335,8 +1052,6 @@ module Stripe
|
|
1335
1052
|
attr_accessor :metadata
|
1336
1053
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
1337
1054
|
attr_accessor :on_behalf_of
|
1338
|
-
# 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).
|
1339
|
-
attr_accessor :pause_collection
|
1340
1055
|
# 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.
|
1341
1056
|
attr_accessor :proration_behavior
|
1342
1057
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -1345,12 +1060,8 @@ module Stripe
|
|
1345
1060
|
attr_accessor :transfer_data
|
1346
1061
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
1347
1062
|
attr_accessor :trial
|
1348
|
-
# Specify trial behavior when crossing phase boundaries
|
1349
|
-
attr_accessor :trial_continuation
|
1350
1063
|
# 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`
|
1351
1064
|
attr_accessor :trial_end
|
1352
|
-
# Settings related to subscription trials.
|
1353
|
-
attr_accessor :trial_settings
|
1354
1065
|
|
1355
1066
|
def initialize(
|
1356
1067
|
add_invoice_items: nil,
|
@@ -1370,14 +1081,11 @@ module Stripe
|
|
1370
1081
|
iterations: nil,
|
1371
1082
|
metadata: nil,
|
1372
1083
|
on_behalf_of: nil,
|
1373
|
-
pause_collection: nil,
|
1374
1084
|
proration_behavior: nil,
|
1375
1085
|
start_date: nil,
|
1376
1086
|
transfer_data: nil,
|
1377
1087
|
trial: nil,
|
1378
|
-
|
1379
|
-
trial_end: nil,
|
1380
|
-
trial_settings: nil
|
1088
|
+
trial_end: nil
|
1381
1089
|
)
|
1382
1090
|
@add_invoice_items = add_invoice_items
|
1383
1091
|
@application_fee_percent = application_fee_percent
|
@@ -1396,30 +1104,13 @@ module Stripe
|
|
1396
1104
|
@iterations = iterations
|
1397
1105
|
@metadata = metadata
|
1398
1106
|
@on_behalf_of = on_behalf_of
|
1399
|
-
@pause_collection = pause_collection
|
1400
1107
|
@proration_behavior = proration_behavior
|
1401
1108
|
@start_date = start_date
|
1402
1109
|
@transfer_data = transfer_data
|
1403
1110
|
@trial = trial
|
1404
|
-
@trial_continuation = trial_continuation
|
1405
1111
|
@trial_end = trial_end
|
1406
|
-
@trial_settings = trial_settings
|
1407
|
-
end
|
1408
|
-
end
|
1409
|
-
|
1410
|
-
class Prebilling < Stripe::RequestParams
|
1411
|
-
# This is used to determine the number of billing cycles to prebill.
|
1412
|
-
attr_accessor :iterations
|
1413
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1414
|
-
attr_accessor :update_behavior
|
1415
|
-
|
1416
|
-
def initialize(iterations: nil, update_behavior: nil)
|
1417
|
-
@iterations = iterations
|
1418
|
-
@update_behavior = update_behavior
|
1419
1112
|
end
|
1420
1113
|
end
|
1421
|
-
# 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.
|
1422
|
-
attr_accessor :billing_behavior
|
1423
1114
|
# Object representing the subscription schedule's default settings.
|
1424
1115
|
attr_accessor :default_settings
|
1425
1116
|
# 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.
|
@@ -1430,598 +1121,26 @@ module Stripe
|
|
1430
1121
|
attr_accessor :metadata
|
1431
1122
|
# 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.
|
1432
1123
|
attr_accessor :phases
|
1433
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1434
|
-
attr_accessor :prebilling
|
1435
1124
|
# 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`.
|
1436
1125
|
attr_accessor :proration_behavior
|
1437
1126
|
|
1438
1127
|
def initialize(
|
1439
|
-
billing_behavior: nil,
|
1440
1128
|
default_settings: nil,
|
1441
1129
|
end_behavior: nil,
|
1442
1130
|
expand: nil,
|
1443
1131
|
metadata: nil,
|
1444
1132
|
phases: nil,
|
1445
|
-
prebilling: nil,
|
1446
1133
|
proration_behavior: nil
|
1447
1134
|
)
|
1448
|
-
@billing_behavior = billing_behavior
|
1449
1135
|
@default_settings = default_settings
|
1450
1136
|
@end_behavior = end_behavior
|
1451
1137
|
@expand = expand
|
1452
1138
|
@metadata = metadata
|
1453
1139
|
@phases = phases
|
1454
|
-
@prebilling = prebilling
|
1455
1140
|
@proration_behavior = proration_behavior
|
1456
1141
|
end
|
1457
1142
|
end
|
1458
1143
|
|
1459
|
-
class AmendParams < Stripe::RequestParams
|
1460
|
-
class Amendment < Stripe::RequestParams
|
1461
|
-
class AmendmentEnd < Stripe::RequestParams
|
1462
|
-
class DiscountEnd < Stripe::RequestParams
|
1463
|
-
# The ID of a specific discount.
|
1464
|
-
attr_accessor :discount
|
1465
|
-
|
1466
|
-
def initialize(discount: nil)
|
1467
|
-
@discount = discount
|
1468
|
-
end
|
1469
|
-
end
|
1470
|
-
|
1471
|
-
class Duration < Stripe::RequestParams
|
1472
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1473
|
-
attr_accessor :interval
|
1474
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1475
|
-
attr_accessor :interval_count
|
1476
|
-
|
1477
|
-
def initialize(interval: nil, interval_count: nil)
|
1478
|
-
@interval = interval
|
1479
|
-
@interval_count = interval_count
|
1480
|
-
end
|
1481
|
-
end
|
1482
|
-
# Use the `end` time of a given discount.
|
1483
|
-
attr_accessor :discount_end
|
1484
|
-
# Time span for the amendment starting from the `amendment_start`.
|
1485
|
-
attr_accessor :duration
|
1486
|
-
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
1487
|
-
attr_accessor :timestamp
|
1488
|
-
# Select one of three ways to pass the `amendment_end`.
|
1489
|
-
attr_accessor :type
|
1490
|
-
|
1491
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
1492
|
-
@discount_end = discount_end
|
1493
|
-
@duration = duration
|
1494
|
-
@timestamp = timestamp
|
1495
|
-
@type = type
|
1496
|
-
end
|
1497
|
-
end
|
1498
|
-
|
1499
|
-
class AmendmentStart < Stripe::RequestParams
|
1500
|
-
class AmendmentEnd < Stripe::RequestParams
|
1501
|
-
# 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.
|
1502
|
-
attr_accessor :index
|
1503
|
-
|
1504
|
-
def initialize(index: nil)
|
1505
|
-
@index = index
|
1506
|
-
end
|
1507
|
-
end
|
1508
|
-
|
1509
|
-
class DiscountEnd < Stripe::RequestParams
|
1510
|
-
# The ID of a specific discount.
|
1511
|
-
attr_accessor :discount
|
1512
|
-
|
1513
|
-
def initialize(discount: nil)
|
1514
|
-
@discount = discount
|
1515
|
-
end
|
1516
|
-
end
|
1517
|
-
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
1518
|
-
attr_accessor :amendment_end
|
1519
|
-
# Use the `end` time of a given discount.
|
1520
|
-
attr_accessor :discount_end
|
1521
|
-
# A precise Unix timestamp for the amendment to start.
|
1522
|
-
attr_accessor :timestamp
|
1523
|
-
# Select one of three ways to pass the `amendment_start`.
|
1524
|
-
attr_accessor :type
|
1525
|
-
|
1526
|
-
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
1527
|
-
@amendment_end = amendment_end
|
1528
|
-
@discount_end = discount_end
|
1529
|
-
@timestamp = timestamp
|
1530
|
-
@type = type
|
1531
|
-
end
|
1532
|
-
end
|
1533
|
-
|
1534
|
-
class DiscountAction < Stripe::RequestParams
|
1535
|
-
class Add < Stripe::RequestParams
|
1536
|
-
class DiscountEnd < Stripe::RequestParams
|
1537
|
-
# The type of calculation made to determine when the discount ends.
|
1538
|
-
attr_accessor :type
|
1539
|
-
|
1540
|
-
def initialize(type: nil)
|
1541
|
-
@type = type
|
1542
|
-
end
|
1543
|
-
end
|
1544
|
-
# The coupon code to redeem.
|
1545
|
-
attr_accessor :coupon
|
1546
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
1547
|
-
attr_accessor :discount
|
1548
|
-
# Details to determine how long the discount should be applied for.
|
1549
|
-
attr_accessor :discount_end
|
1550
|
-
# 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.
|
1551
|
-
attr_accessor :index
|
1552
|
-
# The promotion code to redeem.
|
1553
|
-
attr_accessor :promotion_code
|
1554
|
-
|
1555
|
-
def initialize(
|
1556
|
-
coupon: nil,
|
1557
|
-
discount: nil,
|
1558
|
-
discount_end: nil,
|
1559
|
-
index: nil,
|
1560
|
-
promotion_code: nil
|
1561
|
-
)
|
1562
|
-
@coupon = coupon
|
1563
|
-
@discount = discount
|
1564
|
-
@discount_end = discount_end
|
1565
|
-
@index = index
|
1566
|
-
@promotion_code = promotion_code
|
1567
|
-
end
|
1568
|
-
end
|
1569
|
-
|
1570
|
-
class Remove < Stripe::RequestParams
|
1571
|
-
# The coupon code to remove from the `discounts` array.
|
1572
|
-
attr_accessor :coupon
|
1573
|
-
# The ID of a discount to remove from the `discounts` array.
|
1574
|
-
attr_accessor :discount
|
1575
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
1576
|
-
attr_accessor :promotion_code
|
1577
|
-
|
1578
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1579
|
-
@coupon = coupon
|
1580
|
-
@discount = discount
|
1581
|
-
@promotion_code = promotion_code
|
1582
|
-
end
|
1583
|
-
end
|
1584
|
-
|
1585
|
-
class Set < Stripe::RequestParams
|
1586
|
-
# The coupon code to replace the `discounts` array with.
|
1587
|
-
attr_accessor :coupon
|
1588
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
1589
|
-
attr_accessor :discount
|
1590
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
1591
|
-
attr_accessor :promotion_code
|
1592
|
-
|
1593
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1594
|
-
@coupon = coupon
|
1595
|
-
@discount = discount
|
1596
|
-
@promotion_code = promotion_code
|
1597
|
-
end
|
1598
|
-
end
|
1599
|
-
# Details of the discount to add.
|
1600
|
-
attr_accessor :add
|
1601
|
-
# Details of the discount to remove.
|
1602
|
-
attr_accessor :remove
|
1603
|
-
# Details of the discount to replace the existing discounts with.
|
1604
|
-
attr_accessor :set
|
1605
|
-
# Determines the type of discount action.
|
1606
|
-
attr_accessor :type
|
1607
|
-
|
1608
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1609
|
-
@add = add
|
1610
|
-
@remove = remove
|
1611
|
-
@set = set
|
1612
|
-
@type = type
|
1613
|
-
end
|
1614
|
-
end
|
1615
|
-
|
1616
|
-
class ItemAction < Stripe::RequestParams
|
1617
|
-
class Add < Stripe::RequestParams
|
1618
|
-
class Discount < Stripe::RequestParams
|
1619
|
-
class DiscountEnd < Stripe::RequestParams
|
1620
|
-
class Duration < Stripe::RequestParams
|
1621
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1622
|
-
attr_accessor :interval
|
1623
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1624
|
-
attr_accessor :interval_count
|
1625
|
-
|
1626
|
-
def initialize(interval: nil, interval_count: nil)
|
1627
|
-
@interval = interval
|
1628
|
-
@interval_count = interval_count
|
1629
|
-
end
|
1630
|
-
end
|
1631
|
-
# Time span for the redeemed discount.
|
1632
|
-
attr_accessor :duration
|
1633
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1634
|
-
attr_accessor :timestamp
|
1635
|
-
# The type of calculation made to determine when the discount ends.
|
1636
|
-
attr_accessor :type
|
1637
|
-
|
1638
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1639
|
-
@duration = duration
|
1640
|
-
@timestamp = timestamp
|
1641
|
-
@type = type
|
1642
|
-
end
|
1643
|
-
end
|
1644
|
-
# ID of the coupon to create a new discount for.
|
1645
|
-
attr_accessor :coupon
|
1646
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1647
|
-
attr_accessor :discount
|
1648
|
-
# Details to determine how long the discount should be applied for.
|
1649
|
-
attr_accessor :discount_end
|
1650
|
-
# ID of the promotion code to create a new discount for.
|
1651
|
-
attr_accessor :promotion_code
|
1652
|
-
|
1653
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1654
|
-
@coupon = coupon
|
1655
|
-
@discount = discount
|
1656
|
-
@discount_end = discount_end
|
1657
|
-
@promotion_code = promotion_code
|
1658
|
-
end
|
1659
|
-
end
|
1660
|
-
|
1661
|
-
class Trial < Stripe::RequestParams
|
1662
|
-
# 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.
|
1663
|
-
attr_accessor :converts_to
|
1664
|
-
# Determines the type of trial for this item.
|
1665
|
-
attr_accessor :type
|
1666
|
-
|
1667
|
-
def initialize(converts_to: nil, type: nil)
|
1668
|
-
@converts_to = converts_to
|
1669
|
-
@type = type
|
1670
|
-
end
|
1671
|
-
end
|
1672
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
1673
|
-
attr_accessor :discounts
|
1674
|
-
# 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`.
|
1675
|
-
attr_accessor :metadata
|
1676
|
-
# The ID of the price object.
|
1677
|
-
attr_accessor :price
|
1678
|
-
# Quantity for this item.
|
1679
|
-
attr_accessor :quantity
|
1680
|
-
# 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`.
|
1681
|
-
attr_accessor :tax_rates
|
1682
|
-
# Options that configure the trial on the subscription item.
|
1683
|
-
attr_accessor :trial
|
1684
|
-
|
1685
|
-
def initialize(
|
1686
|
-
discounts: nil,
|
1687
|
-
metadata: nil,
|
1688
|
-
price: nil,
|
1689
|
-
quantity: nil,
|
1690
|
-
tax_rates: nil,
|
1691
|
-
trial: nil
|
1692
|
-
)
|
1693
|
-
@discounts = discounts
|
1694
|
-
@metadata = metadata
|
1695
|
-
@price = price
|
1696
|
-
@quantity = quantity
|
1697
|
-
@tax_rates = tax_rates
|
1698
|
-
@trial = trial
|
1699
|
-
end
|
1700
|
-
end
|
1701
|
-
|
1702
|
-
class Remove < Stripe::RequestParams
|
1703
|
-
# ID of a price to remove.
|
1704
|
-
attr_accessor :price
|
1705
|
-
|
1706
|
-
def initialize(price: nil)
|
1707
|
-
@price = price
|
1708
|
-
end
|
1709
|
-
end
|
1710
|
-
|
1711
|
-
class Set < Stripe::RequestParams
|
1712
|
-
class Discount < Stripe::RequestParams
|
1713
|
-
class DiscountEnd < Stripe::RequestParams
|
1714
|
-
class Duration < Stripe::RequestParams
|
1715
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1716
|
-
attr_accessor :interval
|
1717
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1718
|
-
attr_accessor :interval_count
|
1719
|
-
|
1720
|
-
def initialize(interval: nil, interval_count: nil)
|
1721
|
-
@interval = interval
|
1722
|
-
@interval_count = interval_count
|
1723
|
-
end
|
1724
|
-
end
|
1725
|
-
# Time span for the redeemed discount.
|
1726
|
-
attr_accessor :duration
|
1727
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1728
|
-
attr_accessor :timestamp
|
1729
|
-
# The type of calculation made to determine when the discount ends.
|
1730
|
-
attr_accessor :type
|
1731
|
-
|
1732
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1733
|
-
@duration = duration
|
1734
|
-
@timestamp = timestamp
|
1735
|
-
@type = type
|
1736
|
-
end
|
1737
|
-
end
|
1738
|
-
# ID of the coupon to create a new discount for.
|
1739
|
-
attr_accessor :coupon
|
1740
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1741
|
-
attr_accessor :discount
|
1742
|
-
# Details to determine how long the discount should be applied for.
|
1743
|
-
attr_accessor :discount_end
|
1744
|
-
# ID of the promotion code to create a new discount for.
|
1745
|
-
attr_accessor :promotion_code
|
1746
|
-
|
1747
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1748
|
-
@coupon = coupon
|
1749
|
-
@discount = discount
|
1750
|
-
@discount_end = discount_end
|
1751
|
-
@promotion_code = promotion_code
|
1752
|
-
end
|
1753
|
-
end
|
1754
|
-
|
1755
|
-
class Trial < Stripe::RequestParams
|
1756
|
-
# 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.
|
1757
|
-
attr_accessor :converts_to
|
1758
|
-
# Determines the type of trial for this item.
|
1759
|
-
attr_accessor :type
|
1760
|
-
|
1761
|
-
def initialize(converts_to: nil, type: nil)
|
1762
|
-
@converts_to = converts_to
|
1763
|
-
@type = type
|
1764
|
-
end
|
1765
|
-
end
|
1766
|
-
# 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`.
|
1767
|
-
attr_accessor :discounts
|
1768
|
-
# 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`.
|
1769
|
-
attr_accessor :metadata
|
1770
|
-
# The ID of the price object.
|
1771
|
-
attr_accessor :price
|
1772
|
-
# 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`.
|
1773
|
-
attr_accessor :quantity
|
1774
|
-
# 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`.
|
1775
|
-
attr_accessor :tax_rates
|
1776
|
-
# 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`.
|
1777
|
-
attr_accessor :trial
|
1778
|
-
|
1779
|
-
def initialize(
|
1780
|
-
discounts: nil,
|
1781
|
-
metadata: nil,
|
1782
|
-
price: nil,
|
1783
|
-
quantity: nil,
|
1784
|
-
tax_rates: nil,
|
1785
|
-
trial: nil
|
1786
|
-
)
|
1787
|
-
@discounts = discounts
|
1788
|
-
@metadata = metadata
|
1789
|
-
@price = price
|
1790
|
-
@quantity = quantity
|
1791
|
-
@tax_rates = tax_rates
|
1792
|
-
@trial = trial
|
1793
|
-
end
|
1794
|
-
end
|
1795
|
-
# 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.
|
1796
|
-
attr_accessor :add
|
1797
|
-
# Details of the subscription item to remove.
|
1798
|
-
attr_accessor :remove
|
1799
|
-
# 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.
|
1800
|
-
attr_accessor :set
|
1801
|
-
# Determines the type of item action.
|
1802
|
-
attr_accessor :type
|
1803
|
-
|
1804
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1805
|
-
@add = add
|
1806
|
-
@remove = remove
|
1807
|
-
@set = set
|
1808
|
-
@type = type
|
1809
|
-
end
|
1810
|
-
end
|
1811
|
-
|
1812
|
-
class MetadataAction < Stripe::RequestParams
|
1813
|
-
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
1814
|
-
attr_accessor :add
|
1815
|
-
# Keys to remove from schedule phase metadata.
|
1816
|
-
attr_accessor :remove
|
1817
|
-
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
1818
|
-
attr_accessor :set
|
1819
|
-
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
1820
|
-
attr_accessor :type
|
1821
|
-
|
1822
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1823
|
-
@add = add
|
1824
|
-
@remove = remove
|
1825
|
-
@set = set
|
1826
|
-
@type = type
|
1827
|
-
end
|
1828
|
-
end
|
1829
|
-
|
1830
|
-
class SetPauseCollection < Stripe::RequestParams
|
1831
|
-
class Set < Stripe::RequestParams
|
1832
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1833
|
-
attr_accessor :behavior
|
1834
|
-
|
1835
|
-
def initialize(behavior: nil)
|
1836
|
-
@behavior = behavior
|
1837
|
-
end
|
1838
|
-
end
|
1839
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
1840
|
-
attr_accessor :set
|
1841
|
-
# Determines the type of the pause_collection amendment.
|
1842
|
-
attr_accessor :type
|
1843
|
-
|
1844
|
-
def initialize(set: nil, type: nil)
|
1845
|
-
@set = set
|
1846
|
-
@type = type
|
1847
|
-
end
|
1848
|
-
end
|
1849
|
-
|
1850
|
-
class TrialSettings < Stripe::RequestParams
|
1851
|
-
class EndBehavior < Stripe::RequestParams
|
1852
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1853
|
-
attr_accessor :prorate_up_front
|
1854
|
-
|
1855
|
-
def initialize(prorate_up_front: nil)
|
1856
|
-
@prorate_up_front = prorate_up_front
|
1857
|
-
end
|
1858
|
-
end
|
1859
|
-
# Defines how the subscription should behave when a trial ends.
|
1860
|
-
attr_accessor :end_behavior
|
1861
|
-
|
1862
|
-
def initialize(end_behavior: nil)
|
1863
|
-
@end_behavior = end_behavior
|
1864
|
-
end
|
1865
|
-
end
|
1866
|
-
# 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.
|
1867
|
-
attr_accessor :amendment_end
|
1868
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
1869
|
-
attr_accessor :amendment_start
|
1870
|
-
# 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.
|
1871
|
-
attr_accessor :billing_cycle_anchor
|
1872
|
-
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
1873
|
-
attr_accessor :discount_actions
|
1874
|
-
# Changes to the subscription items during the amendment time span.
|
1875
|
-
attr_accessor :item_actions
|
1876
|
-
# Instructions for how to modify phase metadata
|
1877
|
-
attr_accessor :metadata_actions
|
1878
|
-
# 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`.
|
1879
|
-
attr_accessor :proration_behavior
|
1880
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
1881
|
-
attr_accessor :set_pause_collection
|
1882
|
-
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
1883
|
-
attr_accessor :set_schedule_end
|
1884
|
-
# Settings related to subscription trials.
|
1885
|
-
attr_accessor :trial_settings
|
1886
|
-
|
1887
|
-
def initialize(
|
1888
|
-
amendment_end: nil,
|
1889
|
-
amendment_start: nil,
|
1890
|
-
billing_cycle_anchor: nil,
|
1891
|
-
discount_actions: nil,
|
1892
|
-
item_actions: nil,
|
1893
|
-
metadata_actions: nil,
|
1894
|
-
proration_behavior: nil,
|
1895
|
-
set_pause_collection: nil,
|
1896
|
-
set_schedule_end: nil,
|
1897
|
-
trial_settings: nil
|
1898
|
-
)
|
1899
|
-
@amendment_end = amendment_end
|
1900
|
-
@amendment_start = amendment_start
|
1901
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
1902
|
-
@discount_actions = discount_actions
|
1903
|
-
@item_actions = item_actions
|
1904
|
-
@metadata_actions = metadata_actions
|
1905
|
-
@proration_behavior = proration_behavior
|
1906
|
-
@set_pause_collection = set_pause_collection
|
1907
|
-
@set_schedule_end = set_schedule_end
|
1908
|
-
@trial_settings = trial_settings
|
1909
|
-
end
|
1910
|
-
end
|
1911
|
-
|
1912
|
-
class Prebilling < Stripe::RequestParams
|
1913
|
-
class BillFrom < Stripe::RequestParams
|
1914
|
-
class AmendmentStart < Stripe::RequestParams
|
1915
|
-
# 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.
|
1916
|
-
attr_accessor :index
|
1917
|
-
|
1918
|
-
def initialize(index: nil)
|
1919
|
-
@index = index
|
1920
|
-
end
|
1921
|
-
end
|
1922
|
-
# Start the prebilled period when a specified amendment begins.
|
1923
|
-
attr_accessor :amendment_start
|
1924
|
-
# Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
1925
|
-
attr_accessor :timestamp
|
1926
|
-
# Select one of several ways to pass the `bill_from` value.
|
1927
|
-
attr_accessor :type
|
1928
|
-
|
1929
|
-
def initialize(amendment_start: nil, timestamp: nil, type: nil)
|
1930
|
-
@amendment_start = amendment_start
|
1931
|
-
@timestamp = timestamp
|
1932
|
-
@type = type
|
1933
|
-
end
|
1934
|
-
end
|
1935
|
-
|
1936
|
-
class BillUntil < Stripe::RequestParams
|
1937
|
-
class AmendmentEnd < Stripe::RequestParams
|
1938
|
-
# 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.
|
1939
|
-
attr_accessor :index
|
1940
|
-
|
1941
|
-
def initialize(index: nil)
|
1942
|
-
@index = index
|
1943
|
-
end
|
1944
|
-
end
|
1945
|
-
|
1946
|
-
class Duration < Stripe::RequestParams
|
1947
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1948
|
-
attr_accessor :interval
|
1949
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1950
|
-
attr_accessor :interval_count
|
1951
|
-
|
1952
|
-
def initialize(interval: nil, interval_count: nil)
|
1953
|
-
@interval = interval
|
1954
|
-
@interval_count = interval_count
|
1955
|
-
end
|
1956
|
-
end
|
1957
|
-
# End the prebilled period when a specified amendment ends.
|
1958
|
-
attr_accessor :amendment_end
|
1959
|
-
# Time span for prebilling, starting from `bill_from`.
|
1960
|
-
attr_accessor :duration
|
1961
|
-
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
1962
|
-
attr_accessor :timestamp
|
1963
|
-
# Select one of several ways to pass the `bill_until` value.
|
1964
|
-
attr_accessor :type
|
1965
|
-
|
1966
|
-
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
1967
|
-
@amendment_end = amendment_end
|
1968
|
-
@duration = duration
|
1969
|
-
@timestamp = timestamp
|
1970
|
-
@type = type
|
1971
|
-
end
|
1972
|
-
end
|
1973
|
-
# The beginning of the prebilled time period. The default value is `now`.
|
1974
|
-
attr_accessor :bill_from
|
1975
|
-
# The end of the prebilled time period.
|
1976
|
-
attr_accessor :bill_until
|
1977
|
-
# When the prebilling invoice should be created. The default value is `now`.
|
1978
|
-
attr_accessor :invoice_at
|
1979
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1980
|
-
attr_accessor :update_behavior
|
1981
|
-
|
1982
|
-
def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
|
1983
|
-
@bill_from = bill_from
|
1984
|
-
@bill_until = bill_until
|
1985
|
-
@invoice_at = invoice_at
|
1986
|
-
@update_behavior = update_behavior
|
1987
|
-
end
|
1988
|
-
end
|
1989
|
-
|
1990
|
-
class ScheduleSettings < Stripe::RequestParams
|
1991
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
1992
|
-
attr_accessor :end_behavior
|
1993
|
-
|
1994
|
-
def initialize(end_behavior: nil)
|
1995
|
-
@end_behavior = end_behavior
|
1996
|
-
end
|
1997
|
-
end
|
1998
|
-
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
1999
|
-
attr_accessor :amendments
|
2000
|
-
# Specifies which fields in the response should be expanded.
|
2001
|
-
attr_accessor :expand
|
2002
|
-
# Provide any time periods to bill in advance.
|
2003
|
-
attr_accessor :prebilling
|
2004
|
-
# In cases where the amendment changes the currently active phase,
|
2005
|
-
# specifies if and how to prorate at the time of the request.
|
2006
|
-
attr_accessor :proration_behavior
|
2007
|
-
# Changes to apply to the subscription schedule.
|
2008
|
-
attr_accessor :schedule_settings
|
2009
|
-
|
2010
|
-
def initialize(
|
2011
|
-
amendments: nil,
|
2012
|
-
expand: nil,
|
2013
|
-
prebilling: nil,
|
2014
|
-
proration_behavior: nil,
|
2015
|
-
schedule_settings: nil
|
2016
|
-
)
|
2017
|
-
@amendments = amendments
|
2018
|
-
@expand = expand
|
2019
|
-
@prebilling = prebilling
|
2020
|
-
@proration_behavior = proration_behavior
|
2021
|
-
@schedule_settings = schedule_settings
|
2022
|
-
end
|
2023
|
-
end
|
2024
|
-
|
2025
1144
|
class CancelParams < Stripe::RequestParams
|
2026
1145
|
# Specifies which fields in the response should be expanded.
|
2027
1146
|
attr_accessor :expand
|
@@ -2049,17 +1168,6 @@ module Stripe
|
|
2049
1168
|
end
|
2050
1169
|
end
|
2051
1170
|
|
2052
|
-
# Amends an existing subscription schedule.
|
2053
|
-
def amend(schedule, params = {}, opts = {})
|
2054
|
-
request(
|
2055
|
-
method: :post,
|
2056
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
2057
|
-
params: params,
|
2058
|
-
opts: opts,
|
2059
|
-
base_address: :api
|
2060
|
-
)
|
2061
|
-
end
|
2062
|
-
|
2063
1171
|
# 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.
|
2064
1172
|
def cancel(schedule, params = {}, opts = {})
|
2065
1173
|
request(
|