stripe 15.5.0.pre.beta.1 → 15.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/API_VERSION +1 -1
- data/CHANGELOG.md +680 -1634
- data/OPENAPI_VERSION +1 -1
- data/README.md +6 -4
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +0 -32
- data/lib/stripe/api_version.rb +2 -1
- data/lib/stripe/errors.rb +0 -60
- data/lib/stripe/event_types.rb +0 -102
- data/lib/stripe/object_types.rb +0 -53
- data/lib/stripe/resources/account.rb +3 -655
- data/lib/stripe/resources/account_session.rb +76 -250
- data/lib/stripe/resources/balance.rb +2 -7
- 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/meter.rb +2 -2
- data/lib/stripe/resources/billing_portal/configuration.rb +12 -2
- data/lib/stripe/resources/billing_portal/session.rb +0 -6
- data/lib/stripe/resources/card.rb +0 -2
- data/lib/stripe/resources/cash_balance.rb +0 -2
- data/lib/stripe/resources/charge.rb +38 -1543
- data/lib/stripe/resources/checkout/session.rb +16 -403
- data/lib/stripe/resources/confirmation_token.rb +0 -170
- data/lib/stripe/resources/coupon.rb +1 -30
- data/lib/stripe/resources/credit_note.rb +3 -9
- 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 +1 -6
- data/lib/stripe/resources/discount.rb +0 -2
- data/lib/stripe/resources/dispute.rb +1 -12
- data/lib/stripe/resources/event.rb +0 -31
- data/lib/stripe/resources/file.rb +1 -1
- data/lib/stripe/resources/file_link.rb +1 -1
- data/lib/stripe/resources/financial_connections/account.rb +1 -22
- data/lib/stripe/resources/financial_connections/session.rb +2 -62
- data/lib/stripe/resources/identity/verification_session.rb +0 -10
- data/lib/stripe/resources/invoice.rb +55 -1136
- data/lib/stripe/resources/invoice_item.rb +2 -78
- data/lib/stripe/resources/invoice_line_item.rb +1 -55
- data/lib/stripe/resources/invoice_payment.rb +53 -2
- data/lib/stripe/resources/issuing/card.rb +8 -0
- data/lib/stripe/resources/issuing/cardholder.rb +1 -2
- data/lib/stripe/resources/issuing/transaction.rb +0 -6
- data/lib/stripe/resources/line_item.rb +0 -37
- data/lib/stripe/resources/mandate.rb +0 -24
- data/lib/stripe/resources/payment_intent.rb +401 -6126
- data/lib/stripe/resources/payment_link.rb +1 -1
- data/lib/stripe/resources/payment_method.rb +1 -192
- data/lib/stripe/resources/payment_method_configuration.rb +0 -295
- data/lib/stripe/resources/price.rb +0 -30
- data/lib/stripe/resources/promotion_code.rb +5 -12
- data/lib/stripe/resources/quote.rb +7 -2038
- data/lib/stripe/resources/refund.rb +0 -9
- data/lib/stripe/resources/setup_attempt.rb +1 -22
- data/lib/stripe/resources/setup_intent.rb +10 -579
- data/lib/stripe/resources/source.rb +0 -29
- data/lib/stripe/resources/subscription.rb +116 -374
- data/lib/stripe/resources/subscription_item.rb +3 -84
- data/lib/stripe/resources/subscription_schedule.rb +134 -1009
- data/lib/stripe/resources/tax_id.rb +2 -12
- data/lib/stripe/resources/terminal/configuration.rb +49 -0
- data/lib/stripe/resources/terminal/reader.rb +22 -8
- data/lib/stripe/resources/transfer.rb +0 -6
- data/lib/stripe/resources/treasury/financial_account.rb +3 -22
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
- data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
- data/lib/stripe/resources/treasury/received_credit.rb +1 -38
- data/lib/stripe/resources/treasury/received_debit.rb +1 -40
- data/lib/stripe/resources.rb +0 -109
- data/lib/stripe/services/account_service.rb +1 -562
- data/lib/stripe/services/account_session_service.rb +46 -220
- 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/meter_service.rb +1 -1
- data/lib/stripe/services/billing_portal/configuration_service.rb +10 -2
- data/lib/stripe/services/billing_portal/session_service.rb +0 -4
- data/lib/stripe/services/billing_service.rb +1 -2
- data/lib/stripe/services/charge_service.rb +0 -1418
- data/lib/stripe/services/checkout/session_service.rb +13 -319
- data/lib/stripe/services/coupon_service.rb +1 -17
- data/lib/stripe/services/credit_note_preview_lines_service.rb +1 -1
- data/lib/stripe/services/credit_note_service.rb +2 -6
- data/lib/stripe/services/customer_service.rb +4 -4
- data/lib/stripe/services/customer_session_service.rb +1 -4
- data/lib/stripe/services/file_link_service.rb +1 -1
- data/lib/stripe/services/file_service.rb +1 -1
- data/lib/stripe/services/financial_connections/account_service.rb +2 -7
- data/lib/stripe/services/financial_connections/session_service.rb +2 -34
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/identity/verification_session_service.rb +0 -8
- data/lib/stripe/services/invoice_item_service.rb +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 +54 -1069
- data/lib/stripe/services/issuing/card_service.rb +8 -0
- 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 +351 -5612
- data/lib/stripe/services/payment_link_service.rb +1 -1
- data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
- data/lib/stripe/services/payment_method_service.rb +1 -120
- data/lib/stripe/services/price_service.rb +0 -19
- data/lib/stripe/services/promotion_code_service.rb +0 -8
- data/lib/stripe/services/quote_service.rb +9 -1724
- data/lib/stripe/services/setup_intent_service.rb +9 -538
- data/lib/stripe/services/subscription_item_service.rb +3 -75
- data/lib/stripe/services/subscription_schedule_service.rb +110 -913
- data/lib/stripe/services/subscription_service.rb +116 -318
- data/lib/stripe/services/tax_id_service.rb +2 -8
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/configuration_service.rb +38 -0
- data/lib/stripe/services/terminal_service.rb +1 -3
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -97
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +22 -0
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
- data/lib/stripe/services/transfer_service.rb +0 -4
- data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
- data/lib/stripe/services/treasury/financial_account_service.rb +2 -16
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
- data/lib/stripe/services/v1_services.rb +5 -14
- data/lib/stripe/services/v2/billing_service.rb +2 -2
- data/lib/stripe/services/v2/core_service.rb +2 -5
- data/lib/stripe/services/v2_services.rb +1 -4
- data/lib/stripe/services.rb +1 -55
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/stripe_service.rb +3 -1
- data/lib/stripe/util.rb +1 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -53
- data/rbi/stripe/resources/account.rbi +4991 -0
- data/rbi/stripe/resources/account_link.rbi +76 -0
- data/rbi/stripe/resources/account_session.rbi +1173 -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 +230 -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 +712 -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 +2136 -0
- data/rbi/stripe/resources/checkout/session.rbi +4105 -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 +993 -0
- data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
- data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
- data/rbi/stripe/resources/customer_session.rbi +200 -0
- data/rbi/stripe/resources/discount.rbi +53 -0
- data/rbi/stripe/resources/dispute.rbi +761 -0
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
- data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
- data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
- data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
- data/rbi/stripe/resources/event.rbi +137 -0
- data/rbi/stripe/resources/exchange_rate.rbi +66 -0
- data/rbi/stripe/resources/file.rbi +143 -0
- data/rbi/stripe/resources/file_link.rbi +141 -0
- data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
- data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
- data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
- data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
- data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
- data/rbi/stripe/resources/forwarding/request.rbi +216 -0
- data/rbi/stripe/resources/funding_instructions.rbi +437 -0
- data/rbi/stripe/resources/identity/verification_report.rbi +360 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +564 -0
- data/rbi/stripe/resources/invoice.rbi +3894 -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 +749 -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 +10011 -0
- data/rbi/stripe/resources/payment_link.rbi +1891 -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 +307 -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 +553 -0
- data/rbi/stripe/resources/product_feature.rbi +26 -0
- data/rbi/stripe/resources/promotion_code.rbi +264 -0
- data/rbi/stripe/resources/quote.rbi +1137 -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 +3974 -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 +2154 -0
- data/rbi/stripe/resources/subscription_item.rbi +404 -0
- data/rbi/stripe/resources/subscription_schedule.rbi +1795 -0
- data/rbi/stripe/resources/tax/calculation.rbi +478 -0
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +91 -0
- data/rbi/stripe/resources/tax/registration.rbi +3216 -0
- data/rbi/stripe/resources/tax/settings.rbi +141 -0
- data/rbi/stripe/resources/tax/transaction.rbi +351 -0
- data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
- data/rbi/stripe/resources/tax_code.rbi +44 -0
- data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
- data/rbi/stripe/resources/tax_id.rbi +165 -0
- data/rbi/stripe/resources/tax_rate.rbi +239 -0
- data/rbi/stripe/resources/terminal/configuration.rbi +1647 -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 +1016 -0
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +132 -0
- data/rbi/stripe/resources/token.rbi +1281 -0
- data/rbi/stripe/resources/topup.rbi +222 -0
- data/rbi/stripe/resources/transfer.rbi +199 -0
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
- data/rbi/stripe/resources/treasury/financial_account.rbi +869 -0
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
- data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
- data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
- data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
- data/rbi/stripe/resources/v2/amount.rbi +14 -0
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
- data/rbi/stripe/resources/v2/event.rbi +48 -0
- data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
- data/rbi/stripe/resources/webhook_endpoint.rbi +168 -0
- data/rbi/stripe/services/account_capability_service.rbi +51 -0
- data/{lib/stripe/services/external_account_service.rb → rbi/stripe/services/account_external_account_service.rbi} +122 -135
- data/rbi/stripe/services/account_link_service.rbi +60 -0
- data/rbi/stripe/services/account_login_link_service.rbi +22 -0
- data/rbi/stripe/services/account_person_service.rbi +1007 -0
- data/rbi/stripe/services/account_service.rbi +4281 -0
- data/rbi/stripe/services/account_session_service.rbi +748 -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 +561 -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 +2697 -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 +635 -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 +3073 -0
- data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
- data/rbi/stripe/services/issuing/card_service.rbi +503 -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 +8010 -0
- data/{lib/stripe/services/payment_intent_amount_details_line_item_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/payment_link_service.rbi +1441 -0
- data/rbi/stripe/services/payment_method_configuration_service.rbi +2487 -0
- data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
- data/rbi/stripe/services/payment_method_service.rbi +781 -0
- data/rbi/stripe/services/payout_service.rbi +209 -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 +695 -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 +1425 -0
- data/rbi/stripe/services/subscription_service.rbi +1768 -0
- data/{lib/stripe/services/privacy/redaction_job_validation_error_service.rb → rbi/stripe/services/tax/calculation_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/calculation_service.rbi +234 -0
- data/rbi/stripe/services/tax/registration_service.rbi +2278 -0
- data/rbi/stripe/services/tax/settings_service.rbi +93 -0
- data/{lib/stripe/services/financial_connections/account_inferred_balance_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 +1328 -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 +117 -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 +1255 -0
- data/rbi/stripe/services/topup_service.rbi +176 -0
- data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
- data/rbi/stripe/services/transfer_service.rbi +152 -0
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
- data/rbi/stripe/services/treasury/financial_account_service.rbi +566 -0
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
- data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
- data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
- data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
- data/rbi/stripe/services/treasury_service.rbi +18 -0
- data/rbi/stripe/services/v1_services.rbi +77 -0
- data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +18 -0
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
- data/rbi/stripe/services/v2/billing_service.rbi +14 -0
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +192 -0
- data/rbi/stripe/services/v2/core/event_service.rbi +36 -0
- data/rbi/stripe/services/v2/core_service.rbi +12 -0
- data/rbi/stripe/services/v2_services.rbi +10 -0
- data/rbi/stripe/services/webhook_endpoint_service.rbi +129 -0
- data/stripe.gemspec +1 -4
- metadata +325 -169
- data/lib/stripe/events/v2_core_account_closed_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_created_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_link_returned_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_payout_method_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_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 -22
- 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/billing/meter_usage.rb +0 -23
- data/lib/stripe/resources/billing/meter_usage_row.rb +0 -28
- 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 -186
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
- data/lib/stripe/resources/issuing/settlement.rb +0 -53
- data/lib/stripe/resources/margin.rb +0 -115
- data/lib/stripe/resources/order.rb +0 -2958
- data/lib/stripe/resources/payment_attempt_record.rb +0 -1101
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -72
- data/lib/stripe/resources/payment_record.rb +0 -1630
- 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 -680
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -371
- data/lib/stripe/resources/tax/association.rb +0 -66
- data/lib/stripe/resources/tax/form.rb +0 -211
- data/lib/stripe/resources/terminal/onboarding_link.rb +0 -84
- data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
- data/lib/stripe/resources/v2/core/account.rb +0 -1930
- data/lib/stripe/resources/v2/core/account_link.rb +0 -72
- data/lib/stripe/resources/v2/core/person.rb +0 -276
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -74
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -39
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -20
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -22
- data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -51
- data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -77
- data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -68
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -94
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -129
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -82
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -45
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -117
- data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -77
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -49
- data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -122
- data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -84
- data/lib/stripe/resources/v2/money_management/transaction.rb +0 -78
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -68
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +0 -89
- data/lib/stripe/services/account_notice_service.rb +0 -101
- data/lib/stripe/services/balance_settings_service.rb +0 -96
- data/lib/stripe/services/billing/meter_usage_service.rb +0 -76
- data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
- data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
- data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
- data/lib/stripe/services/capital_service.rb +0 -15
- data/lib/stripe/services/fx_quote_service.rb +0 -123
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
- data/lib/stripe/services/margin_service.rb +0 -119
- data/lib/stripe/services/order_service.rb +0 -2388
- data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
- data/lib/stripe/services/payment_record_service.rb +0 -542
- data/lib/stripe/services/privacy/redaction_job_service.rb +0 -240
- data/lib/stripe/services/privacy_service.rb +0 -13
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
- data/lib/stripe/services/tax/association_service.rb +0 -31
- data/lib/stripe/services/tax/form_service.rb +0 -100
- data/lib/stripe/services/terminal/onboarding_link_service.rb +0 -56
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
- data/lib/stripe/services/v2/core/account_link_service.rb +0 -114
- data/lib/stripe/services/v2/core/account_service.rb +0 -4522
- data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1045
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -130
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -107
- data/lib/stripe/services/v2/core/vault_service.rb +0 -18
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -74
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -116
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -82
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -125
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -95
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -199
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -235
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -172
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -90
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -70
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -43
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -69
- data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -73
- data/lib/stripe/services/v2/money_management_service.rb +0 -31
- data/lib/stripe/services/v2/payment_service.rb +0 -15
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +0 -152
- data/lib/stripe/services/v2/test_helper_service.rb +0 -15
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -53
- data/rbi/stripe.rbi +0 -199016
@@ -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
|
@@ -257,48 +253,55 @@ module Stripe
|
|
257
253
|
class Phase < Stripe::RequestParams
|
258
254
|
class AddInvoiceItem < Stripe::RequestParams
|
259
255
|
class Discount < Stripe::RequestParams
|
260
|
-
class DiscountEnd < Stripe::RequestParams
|
261
|
-
class Duration < Stripe::RequestParams
|
262
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
263
|
-
attr_accessor :interval
|
264
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
265
|
-
attr_accessor :interval_count
|
266
|
-
|
267
|
-
def initialize(interval: nil, interval_count: nil)
|
268
|
-
@interval = interval
|
269
|
-
@interval_count = interval_count
|
270
|
-
end
|
271
|
-
end
|
272
|
-
# Time span for the redeemed discount.
|
273
|
-
attr_accessor :duration
|
274
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
275
|
-
attr_accessor :timestamp
|
276
|
-
# The type of calculation made to determine when the discount ends.
|
277
|
-
attr_accessor :type
|
278
|
-
|
279
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
280
|
-
@duration = duration
|
281
|
-
@timestamp = timestamp
|
282
|
-
@type = type
|
283
|
-
end
|
284
|
-
end
|
285
256
|
# ID of the coupon to create a new discount for.
|
286
257
|
attr_accessor :coupon
|
287
258
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
288
259
|
attr_accessor :discount
|
289
|
-
# Details to determine how long the discount should be applied for.
|
290
|
-
attr_accessor :discount_end
|
291
260
|
# ID of the promotion code to create a new discount for.
|
292
261
|
attr_accessor :promotion_code
|
293
262
|
|
294
|
-
def initialize(coupon: nil, discount: nil,
|
263
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
295
264
|
@coupon = coupon
|
296
265
|
@discount = discount
|
297
|
-
@discount_end = discount_end
|
298
266
|
@promotion_code = promotion_code
|
299
267
|
end
|
300
268
|
end
|
301
269
|
|
270
|
+
class Period < Stripe::RequestParams
|
271
|
+
class End < Stripe::RequestParams
|
272
|
+
# A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
|
273
|
+
attr_accessor :timestamp
|
274
|
+
# Select how to calculate the end of the invoice item period.
|
275
|
+
attr_accessor :type
|
276
|
+
|
277
|
+
def initialize(timestamp: nil, type: nil)
|
278
|
+
@timestamp = timestamp
|
279
|
+
@type = type
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
class Start < Stripe::RequestParams
|
284
|
+
# A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
|
285
|
+
attr_accessor :timestamp
|
286
|
+
# Select how to calculate the start of the invoice item period.
|
287
|
+
attr_accessor :type
|
288
|
+
|
289
|
+
def initialize(timestamp: nil, type: nil)
|
290
|
+
@timestamp = timestamp
|
291
|
+
@type = type
|
292
|
+
end
|
293
|
+
end
|
294
|
+
# End of the invoice item period.
|
295
|
+
attr_accessor :end
|
296
|
+
# Start of the invoice item period.
|
297
|
+
attr_accessor :start
|
298
|
+
|
299
|
+
def initialize(end_: nil, start: nil)
|
300
|
+
@end = end_
|
301
|
+
@start = start
|
302
|
+
end
|
303
|
+
end
|
304
|
+
|
302
305
|
class PriceData < Stripe::RequestParams
|
303
306
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
304
307
|
attr_accessor :currency
|
@@ -327,6 +330,10 @@ module Stripe
|
|
327
330
|
end
|
328
331
|
# The coupons to redeem into discounts for the item.
|
329
332
|
attr_accessor :discounts
|
333
|
+
# 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`.
|
334
|
+
attr_accessor :metadata
|
335
|
+
# The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
|
336
|
+
attr_accessor :period
|
330
337
|
# The ID of the price object. One of `price` or `price_data` is required.
|
331
338
|
attr_accessor :price
|
332
339
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
@@ -336,8 +343,18 @@ module Stripe
|
|
336
343
|
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
337
344
|
attr_accessor :tax_rates
|
338
345
|
|
339
|
-
def initialize(
|
346
|
+
def initialize(
|
347
|
+
discounts: nil,
|
348
|
+
metadata: nil,
|
349
|
+
period: nil,
|
350
|
+
price: nil,
|
351
|
+
price_data: nil,
|
352
|
+
quantity: nil,
|
353
|
+
tax_rates: nil
|
354
|
+
)
|
340
355
|
@discounts = discounts
|
356
|
+
@metadata = metadata
|
357
|
+
@period = period
|
341
358
|
@price = price
|
342
359
|
@price_data = price_data
|
343
360
|
@quantity = quantity
|
@@ -381,44 +398,16 @@ module Stripe
|
|
381
398
|
end
|
382
399
|
|
383
400
|
class Discount < Stripe::RequestParams
|
384
|
-
class DiscountEnd < Stripe::RequestParams
|
385
|
-
class Duration < Stripe::RequestParams
|
386
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
387
|
-
attr_accessor :interval
|
388
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
389
|
-
attr_accessor :interval_count
|
390
|
-
|
391
|
-
def initialize(interval: nil, interval_count: nil)
|
392
|
-
@interval = interval
|
393
|
-
@interval_count = interval_count
|
394
|
-
end
|
395
|
-
end
|
396
|
-
# Time span for the redeemed discount.
|
397
|
-
attr_accessor :duration
|
398
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
399
|
-
attr_accessor :timestamp
|
400
|
-
# The type of calculation made to determine when the discount ends.
|
401
|
-
attr_accessor :type
|
402
|
-
|
403
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
404
|
-
@duration = duration
|
405
|
-
@timestamp = timestamp
|
406
|
-
@type = type
|
407
|
-
end
|
408
|
-
end
|
409
401
|
# ID of the coupon to create a new discount for.
|
410
402
|
attr_accessor :coupon
|
411
403
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
412
404
|
attr_accessor :discount
|
413
|
-
# Details to determine how long the discount should be applied for.
|
414
|
-
attr_accessor :discount_end
|
415
405
|
# ID of the promotion code to create a new discount for.
|
416
406
|
attr_accessor :promotion_code
|
417
407
|
|
418
|
-
def initialize(coupon: nil, discount: nil,
|
408
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
419
409
|
@coupon = coupon
|
420
410
|
@discount = discount
|
421
|
-
@discount_end = discount_end
|
422
411
|
@promotion_code = promotion_code
|
423
412
|
end
|
424
413
|
end
|
@@ -472,44 +461,16 @@ module Stripe
|
|
472
461
|
end
|
473
462
|
|
474
463
|
class Discount < Stripe::RequestParams
|
475
|
-
class DiscountEnd < Stripe::RequestParams
|
476
|
-
class Duration < Stripe::RequestParams
|
477
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
478
|
-
attr_accessor :interval
|
479
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
480
|
-
attr_accessor :interval_count
|
481
|
-
|
482
|
-
def initialize(interval: nil, interval_count: nil)
|
483
|
-
@interval = interval
|
484
|
-
@interval_count = interval_count
|
485
|
-
end
|
486
|
-
end
|
487
|
-
# Time span for the redeemed discount.
|
488
|
-
attr_accessor :duration
|
489
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
490
|
-
attr_accessor :timestamp
|
491
|
-
# The type of calculation made to determine when the discount ends.
|
492
|
-
attr_accessor :type
|
493
|
-
|
494
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
495
|
-
@duration = duration
|
496
|
-
@timestamp = timestamp
|
497
|
-
@type = type
|
498
|
-
end
|
499
|
-
end
|
500
464
|
# ID of the coupon to create a new discount for.
|
501
465
|
attr_accessor :coupon
|
502
466
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
503
467
|
attr_accessor :discount
|
504
|
-
# Details to determine how long the discount should be applied for.
|
505
|
-
attr_accessor :discount_end
|
506
468
|
# ID of the promotion code to create a new discount for.
|
507
469
|
attr_accessor :promotion_code
|
508
470
|
|
509
|
-
def initialize(coupon: nil, discount: nil,
|
471
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
510
472
|
@coupon = coupon
|
511
473
|
@discount = discount
|
512
|
-
@discount_end = discount_end
|
513
474
|
@promotion_code = promotion_code
|
514
475
|
end
|
515
476
|
end
|
@@ -555,18 +516,6 @@ module Stripe
|
|
555
516
|
@unit_amount_decimal = unit_amount_decimal
|
556
517
|
end
|
557
518
|
end
|
558
|
-
|
559
|
-
class Trial < Stripe::RequestParams
|
560
|
-
# 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.
|
561
|
-
attr_accessor :converts_to
|
562
|
-
# Determines the type of trial for this item.
|
563
|
-
attr_accessor :type
|
564
|
-
|
565
|
-
def initialize(converts_to: nil, type: nil)
|
566
|
-
@converts_to = converts_to
|
567
|
-
@type = type
|
568
|
-
end
|
569
|
-
end
|
570
519
|
# 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.
|
571
520
|
attr_accessor :billing_thresholds
|
572
521
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -583,8 +532,6 @@ module Stripe
|
|
583
532
|
attr_accessor :quantity
|
584
533
|
# 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.
|
585
534
|
attr_accessor :tax_rates
|
586
|
-
# Options that configure the trial on the subscription item.
|
587
|
-
attr_accessor :trial
|
588
535
|
|
589
536
|
def initialize(
|
590
537
|
billing_thresholds: nil,
|
@@ -594,8 +541,7 @@ module Stripe
|
|
594
541
|
price: nil,
|
595
542
|
price_data: nil,
|
596
543
|
quantity: nil,
|
597
|
-
tax_rates: nil
|
598
|
-
trial: nil
|
544
|
+
tax_rates: nil
|
599
545
|
)
|
600
546
|
@billing_thresholds = billing_thresholds
|
601
547
|
@discounts = discounts
|
@@ -605,16 +551,6 @@ module Stripe
|
|
605
551
|
@price_data = price_data
|
606
552
|
@quantity = quantity
|
607
553
|
@tax_rates = tax_rates
|
608
|
-
@trial = trial
|
609
|
-
end
|
610
|
-
end
|
611
|
-
|
612
|
-
class PauseCollection < Stripe::RequestParams
|
613
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
614
|
-
attr_accessor :behavior
|
615
|
-
|
616
|
-
def initialize(behavior: nil)
|
617
|
-
@behavior = behavior
|
618
554
|
end
|
619
555
|
end
|
620
556
|
|
@@ -629,23 +565,6 @@ module Stripe
|
|
629
565
|
@destination = destination
|
630
566
|
end
|
631
567
|
end
|
632
|
-
|
633
|
-
class TrialSettings < Stripe::RequestParams
|
634
|
-
class EndBehavior < Stripe::RequestParams
|
635
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
636
|
-
attr_accessor :prorate_up_front
|
637
|
-
|
638
|
-
def initialize(prorate_up_front: nil)
|
639
|
-
@prorate_up_front = prorate_up_front
|
640
|
-
end
|
641
|
-
end
|
642
|
-
# Defines how the subscription should behave when a trial ends.
|
643
|
-
attr_accessor :end_behavior
|
644
|
-
|
645
|
-
def initialize(end_behavior: nil)
|
646
|
-
@end_behavior = end_behavior
|
647
|
-
end
|
648
|
-
end
|
649
568
|
# 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.
|
650
569
|
attr_accessor :add_invoice_items
|
651
570
|
# 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).
|
@@ -682,20 +601,14 @@ module Stripe
|
|
682
601
|
attr_accessor :metadata
|
683
602
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
684
603
|
attr_accessor :on_behalf_of
|
685
|
-
# 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).
|
686
|
-
attr_accessor :pause_collection
|
687
604
|
# 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.
|
688
605
|
attr_accessor :proration_behavior
|
689
606
|
# The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
690
607
|
attr_accessor :transfer_data
|
691
608
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
692
609
|
attr_accessor :trial
|
693
|
-
# Specify trial behavior when crossing phase boundaries
|
694
|
-
attr_accessor :trial_continuation
|
695
610
|
# 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`
|
696
611
|
attr_accessor :trial_end
|
697
|
-
# Settings related to subscription trials.
|
698
|
-
attr_accessor :trial_settings
|
699
612
|
|
700
613
|
def initialize(
|
701
614
|
add_invoice_items: nil,
|
@@ -716,13 +629,10 @@ module Stripe
|
|
716
629
|
iterations: nil,
|
717
630
|
metadata: nil,
|
718
631
|
on_behalf_of: nil,
|
719
|
-
pause_collection: nil,
|
720
632
|
proration_behavior: nil,
|
721
633
|
transfer_data: nil,
|
722
634
|
trial: nil,
|
723
|
-
|
724
|
-
trial_end: nil,
|
725
|
-
trial_settings: nil
|
635
|
+
trial_end: nil
|
726
636
|
)
|
727
637
|
@add_invoice_items = add_invoice_items
|
728
638
|
@application_fee_percent = application_fee_percent
|
@@ -742,35 +652,16 @@ module Stripe
|
|
742
652
|
@iterations = iterations
|
743
653
|
@metadata = metadata
|
744
654
|
@on_behalf_of = on_behalf_of
|
745
|
-
@pause_collection = pause_collection
|
746
655
|
@proration_behavior = proration_behavior
|
747
656
|
@transfer_data = transfer_data
|
748
657
|
@trial = trial
|
749
|
-
@trial_continuation = trial_continuation
|
750
658
|
@trial_end = trial_end
|
751
|
-
@trial_settings = trial_settings
|
752
|
-
end
|
753
|
-
end
|
754
|
-
|
755
|
-
class Prebilling < Stripe::RequestParams
|
756
|
-
# This is used to determine the number of billing cycles to prebill.
|
757
|
-
attr_accessor :iterations
|
758
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
759
|
-
attr_accessor :update_behavior
|
760
|
-
|
761
|
-
def initialize(iterations: nil, update_behavior: nil)
|
762
|
-
@iterations = iterations
|
763
|
-
@update_behavior = update_behavior
|
764
659
|
end
|
765
660
|
end
|
766
|
-
# 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.
|
767
|
-
attr_accessor :billing_behavior
|
768
661
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
769
662
|
attr_accessor :billing_mode
|
770
663
|
# The identifier of the customer to create the subscription schedule for.
|
771
664
|
attr_accessor :customer
|
772
|
-
# The identifier of the account to create the subscription schedule for.
|
773
|
-
attr_accessor :customer_account
|
774
665
|
# Object representing the subscription schedule's default settings.
|
775
666
|
attr_accessor :default_settings
|
776
667
|
# 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.
|
@@ -783,36 +674,28 @@ module Stripe
|
|
783
674
|
attr_accessor :metadata
|
784
675
|
# 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.
|
785
676
|
attr_accessor :phases
|
786
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
787
|
-
attr_accessor :prebilling
|
788
677
|
# 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.
|
789
678
|
attr_accessor :start_date
|
790
679
|
|
791
680
|
def initialize(
|
792
|
-
billing_behavior: nil,
|
793
681
|
billing_mode: nil,
|
794
682
|
customer: nil,
|
795
|
-
customer_account: nil,
|
796
683
|
default_settings: nil,
|
797
684
|
end_behavior: nil,
|
798
685
|
expand: nil,
|
799
686
|
from_subscription: nil,
|
800
687
|
metadata: nil,
|
801
688
|
phases: nil,
|
802
|
-
prebilling: nil,
|
803
689
|
start_date: nil
|
804
690
|
)
|
805
|
-
@billing_behavior = billing_behavior
|
806
691
|
@billing_mode = billing_mode
|
807
692
|
@customer = customer
|
808
|
-
@customer_account = customer_account
|
809
693
|
@default_settings = default_settings
|
810
694
|
@end_behavior = end_behavior
|
811
695
|
@expand = expand
|
812
696
|
@from_subscription = from_subscription
|
813
697
|
@metadata = metadata
|
814
698
|
@phases = phases
|
815
|
-
@prebilling = prebilling
|
816
699
|
@start_date = start_date
|
817
700
|
end
|
818
701
|
end
|
@@ -949,48 +832,55 @@ module Stripe
|
|
949
832
|
class Phase < Stripe::RequestParams
|
950
833
|
class AddInvoiceItem < Stripe::RequestParams
|
951
834
|
class Discount < Stripe::RequestParams
|
952
|
-
class DiscountEnd < Stripe::RequestParams
|
953
|
-
class Duration < Stripe::RequestParams
|
954
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
955
|
-
attr_accessor :interval
|
956
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
957
|
-
attr_accessor :interval_count
|
958
|
-
|
959
|
-
def initialize(interval: nil, interval_count: nil)
|
960
|
-
@interval = interval
|
961
|
-
@interval_count = interval_count
|
962
|
-
end
|
963
|
-
end
|
964
|
-
# Time span for the redeemed discount.
|
965
|
-
attr_accessor :duration
|
966
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
967
|
-
attr_accessor :timestamp
|
968
|
-
# The type of calculation made to determine when the discount ends.
|
969
|
-
attr_accessor :type
|
970
|
-
|
971
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
972
|
-
@duration = duration
|
973
|
-
@timestamp = timestamp
|
974
|
-
@type = type
|
975
|
-
end
|
976
|
-
end
|
977
835
|
# ID of the coupon to create a new discount for.
|
978
836
|
attr_accessor :coupon
|
979
837
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
980
838
|
attr_accessor :discount
|
981
|
-
# Details to determine how long the discount should be applied for.
|
982
|
-
attr_accessor :discount_end
|
983
839
|
# ID of the promotion code to create a new discount for.
|
984
840
|
attr_accessor :promotion_code
|
985
841
|
|
986
|
-
def initialize(coupon: nil, discount: nil,
|
842
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
987
843
|
@coupon = coupon
|
988
844
|
@discount = discount
|
989
|
-
@discount_end = discount_end
|
990
845
|
@promotion_code = promotion_code
|
991
846
|
end
|
992
847
|
end
|
993
848
|
|
849
|
+
class Period < Stripe::RequestParams
|
850
|
+
class End < Stripe::RequestParams
|
851
|
+
# A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
|
852
|
+
attr_accessor :timestamp
|
853
|
+
# Select how to calculate the end of the invoice item period.
|
854
|
+
attr_accessor :type
|
855
|
+
|
856
|
+
def initialize(timestamp: nil, type: nil)
|
857
|
+
@timestamp = timestamp
|
858
|
+
@type = type
|
859
|
+
end
|
860
|
+
end
|
861
|
+
|
862
|
+
class Start < Stripe::RequestParams
|
863
|
+
# A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
|
864
|
+
attr_accessor :timestamp
|
865
|
+
# Select how to calculate the start of the invoice item period.
|
866
|
+
attr_accessor :type
|
867
|
+
|
868
|
+
def initialize(timestamp: nil, type: nil)
|
869
|
+
@timestamp = timestamp
|
870
|
+
@type = type
|
871
|
+
end
|
872
|
+
end
|
873
|
+
# End of the invoice item period.
|
874
|
+
attr_accessor :end
|
875
|
+
# Start of the invoice item period.
|
876
|
+
attr_accessor :start
|
877
|
+
|
878
|
+
def initialize(end_: nil, start: nil)
|
879
|
+
@end = end_
|
880
|
+
@start = start
|
881
|
+
end
|
882
|
+
end
|
883
|
+
|
994
884
|
class PriceData < Stripe::RequestParams
|
995
885
|
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
996
886
|
attr_accessor :currency
|
@@ -1019,6 +909,10 @@ module Stripe
|
|
1019
909
|
end
|
1020
910
|
# The coupons to redeem into discounts for the item.
|
1021
911
|
attr_accessor :discounts
|
912
|
+
# 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`.
|
913
|
+
attr_accessor :metadata
|
914
|
+
# The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
|
915
|
+
attr_accessor :period
|
1022
916
|
# The ID of the price object. One of `price` or `price_data` is required.
|
1023
917
|
attr_accessor :price
|
1024
918
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
@@ -1028,8 +922,18 @@ module Stripe
|
|
1028
922
|
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
1029
923
|
attr_accessor :tax_rates
|
1030
924
|
|
1031
|
-
def initialize(
|
925
|
+
def initialize(
|
926
|
+
discounts: nil,
|
927
|
+
metadata: nil,
|
928
|
+
period: nil,
|
929
|
+
price: nil,
|
930
|
+
price_data: nil,
|
931
|
+
quantity: nil,
|
932
|
+
tax_rates: nil
|
933
|
+
)
|
1032
934
|
@discounts = discounts
|
935
|
+
@metadata = metadata
|
936
|
+
@period = period
|
1033
937
|
@price = price
|
1034
938
|
@price_data = price_data
|
1035
939
|
@quantity = quantity
|
@@ -1073,44 +977,16 @@ module Stripe
|
|
1073
977
|
end
|
1074
978
|
|
1075
979
|
class Discount < Stripe::RequestParams
|
1076
|
-
class DiscountEnd < Stripe::RequestParams
|
1077
|
-
class Duration < Stripe::RequestParams
|
1078
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1079
|
-
attr_accessor :interval
|
1080
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1081
|
-
attr_accessor :interval_count
|
1082
|
-
|
1083
|
-
def initialize(interval: nil, interval_count: nil)
|
1084
|
-
@interval = interval
|
1085
|
-
@interval_count = interval_count
|
1086
|
-
end
|
1087
|
-
end
|
1088
|
-
# Time span for the redeemed discount.
|
1089
|
-
attr_accessor :duration
|
1090
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1091
|
-
attr_accessor :timestamp
|
1092
|
-
# The type of calculation made to determine when the discount ends.
|
1093
|
-
attr_accessor :type
|
1094
|
-
|
1095
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1096
|
-
@duration = duration
|
1097
|
-
@timestamp = timestamp
|
1098
|
-
@type = type
|
1099
|
-
end
|
1100
|
-
end
|
1101
980
|
# ID of the coupon to create a new discount for.
|
1102
981
|
attr_accessor :coupon
|
1103
982
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1104
983
|
attr_accessor :discount
|
1105
|
-
# Details to determine how long the discount should be applied for.
|
1106
|
-
attr_accessor :discount_end
|
1107
984
|
# ID of the promotion code to create a new discount for.
|
1108
985
|
attr_accessor :promotion_code
|
1109
986
|
|
1110
|
-
def initialize(coupon: nil, discount: nil,
|
987
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1111
988
|
@coupon = coupon
|
1112
989
|
@discount = discount
|
1113
|
-
@discount_end = discount_end
|
1114
990
|
@promotion_code = promotion_code
|
1115
991
|
end
|
1116
992
|
end
|
@@ -1164,44 +1040,16 @@ module Stripe
|
|
1164
1040
|
end
|
1165
1041
|
|
1166
1042
|
class Discount < Stripe::RequestParams
|
1167
|
-
class DiscountEnd < Stripe::RequestParams
|
1168
|
-
class Duration < Stripe::RequestParams
|
1169
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1170
|
-
attr_accessor :interval
|
1171
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1172
|
-
attr_accessor :interval_count
|
1173
|
-
|
1174
|
-
def initialize(interval: nil, interval_count: nil)
|
1175
|
-
@interval = interval
|
1176
|
-
@interval_count = interval_count
|
1177
|
-
end
|
1178
|
-
end
|
1179
|
-
# Time span for the redeemed discount.
|
1180
|
-
attr_accessor :duration
|
1181
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1182
|
-
attr_accessor :timestamp
|
1183
|
-
# The type of calculation made to determine when the discount ends.
|
1184
|
-
attr_accessor :type
|
1185
|
-
|
1186
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1187
|
-
@duration = duration
|
1188
|
-
@timestamp = timestamp
|
1189
|
-
@type = type
|
1190
|
-
end
|
1191
|
-
end
|
1192
1043
|
# ID of the coupon to create a new discount for.
|
1193
1044
|
attr_accessor :coupon
|
1194
1045
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1195
1046
|
attr_accessor :discount
|
1196
|
-
# Details to determine how long the discount should be applied for.
|
1197
|
-
attr_accessor :discount_end
|
1198
1047
|
# ID of the promotion code to create a new discount for.
|
1199
1048
|
attr_accessor :promotion_code
|
1200
1049
|
|
1201
|
-
def initialize(coupon: nil, discount: nil,
|
1050
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1202
1051
|
@coupon = coupon
|
1203
1052
|
@discount = discount
|
1204
|
-
@discount_end = discount_end
|
1205
1053
|
@promotion_code = promotion_code
|
1206
1054
|
end
|
1207
1055
|
end
|
@@ -1247,18 +1095,6 @@ module Stripe
|
|
1247
1095
|
@unit_amount_decimal = unit_amount_decimal
|
1248
1096
|
end
|
1249
1097
|
end
|
1250
|
-
|
1251
|
-
class Trial < Stripe::RequestParams
|
1252
|
-
# 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.
|
1253
|
-
attr_accessor :converts_to
|
1254
|
-
# Determines the type of trial for this item.
|
1255
|
-
attr_accessor :type
|
1256
|
-
|
1257
|
-
def initialize(converts_to: nil, type: nil)
|
1258
|
-
@converts_to = converts_to
|
1259
|
-
@type = type
|
1260
|
-
end
|
1261
|
-
end
|
1262
1098
|
# 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.
|
1263
1099
|
attr_accessor :billing_thresholds
|
1264
1100
|
# The coupons to redeem into discounts for the subscription item.
|
@@ -1275,8 +1111,6 @@ module Stripe
|
|
1275
1111
|
attr_accessor :quantity
|
1276
1112
|
# 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.
|
1277
1113
|
attr_accessor :tax_rates
|
1278
|
-
# Options that configure the trial on the subscription item.
|
1279
|
-
attr_accessor :trial
|
1280
1114
|
|
1281
1115
|
def initialize(
|
1282
1116
|
billing_thresholds: nil,
|
@@ -1286,8 +1120,7 @@ module Stripe
|
|
1286
1120
|
price: nil,
|
1287
1121
|
price_data: nil,
|
1288
1122
|
quantity: nil,
|
1289
|
-
tax_rates: nil
|
1290
|
-
trial: nil
|
1123
|
+
tax_rates: nil
|
1291
1124
|
)
|
1292
1125
|
@billing_thresholds = billing_thresholds
|
1293
1126
|
@discounts = discounts
|
@@ -1297,16 +1130,6 @@ module Stripe
|
|
1297
1130
|
@price_data = price_data
|
1298
1131
|
@quantity = quantity
|
1299
1132
|
@tax_rates = tax_rates
|
1300
|
-
@trial = trial
|
1301
|
-
end
|
1302
|
-
end
|
1303
|
-
|
1304
|
-
class PauseCollection < Stripe::RequestParams
|
1305
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1306
|
-
attr_accessor :behavior
|
1307
|
-
|
1308
|
-
def initialize(behavior: nil)
|
1309
|
-
@behavior = behavior
|
1310
1133
|
end
|
1311
1134
|
end
|
1312
1135
|
|
@@ -1321,23 +1144,6 @@ module Stripe
|
|
1321
1144
|
@destination = destination
|
1322
1145
|
end
|
1323
1146
|
end
|
1324
|
-
|
1325
|
-
class TrialSettings < Stripe::RequestParams
|
1326
|
-
class EndBehavior < Stripe::RequestParams
|
1327
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1328
|
-
attr_accessor :prorate_up_front
|
1329
|
-
|
1330
|
-
def initialize(prorate_up_front: nil)
|
1331
|
-
@prorate_up_front = prorate_up_front
|
1332
|
-
end
|
1333
|
-
end
|
1334
|
-
# Defines how the subscription should behave when a trial ends.
|
1335
|
-
attr_accessor :end_behavior
|
1336
|
-
|
1337
|
-
def initialize(end_behavior: nil)
|
1338
|
-
@end_behavior = end_behavior
|
1339
|
-
end
|
1340
|
-
end
|
1341
1147
|
# 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.
|
1342
1148
|
attr_accessor :add_invoice_items
|
1343
1149
|
# 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).
|
@@ -1374,8 +1180,6 @@ module Stripe
|
|
1374
1180
|
attr_accessor :metadata
|
1375
1181
|
# The account on behalf of which to charge, for each of the associated subscription's invoices.
|
1376
1182
|
attr_accessor :on_behalf_of
|
1377
|
-
# 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).
|
1378
|
-
attr_accessor :pause_collection
|
1379
1183
|
# 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.
|
1380
1184
|
attr_accessor :proration_behavior
|
1381
1185
|
# The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
@@ -1384,12 +1188,8 @@ module Stripe
|
|
1384
1188
|
attr_accessor :transfer_data
|
1385
1189
|
# If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
1386
1190
|
attr_accessor :trial
|
1387
|
-
# Specify trial behavior when crossing phase boundaries
|
1388
|
-
attr_accessor :trial_continuation
|
1389
1191
|
# 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`
|
1390
1192
|
attr_accessor :trial_end
|
1391
|
-
# Settings related to subscription trials.
|
1392
|
-
attr_accessor :trial_settings
|
1393
1193
|
|
1394
1194
|
def initialize(
|
1395
1195
|
add_invoice_items: nil,
|
@@ -1410,14 +1210,11 @@ module Stripe
|
|
1410
1210
|
iterations: nil,
|
1411
1211
|
metadata: nil,
|
1412
1212
|
on_behalf_of: nil,
|
1413
|
-
pause_collection: nil,
|
1414
1213
|
proration_behavior: nil,
|
1415
1214
|
start_date: nil,
|
1416
1215
|
transfer_data: nil,
|
1417
1216
|
trial: nil,
|
1418
|
-
|
1419
|
-
trial_end: nil,
|
1420
|
-
trial_settings: nil
|
1217
|
+
trial_end: nil
|
1421
1218
|
)
|
1422
1219
|
@add_invoice_items = add_invoice_items
|
1423
1220
|
@application_fee_percent = application_fee_percent
|
@@ -1437,30 +1234,13 @@ module Stripe
|
|
1437
1234
|
@iterations = iterations
|
1438
1235
|
@metadata = metadata
|
1439
1236
|
@on_behalf_of = on_behalf_of
|
1440
|
-
@pause_collection = pause_collection
|
1441
1237
|
@proration_behavior = proration_behavior
|
1442
1238
|
@start_date = start_date
|
1443
1239
|
@transfer_data = transfer_data
|
1444
1240
|
@trial = trial
|
1445
|
-
@trial_continuation = trial_continuation
|
1446
1241
|
@trial_end = trial_end
|
1447
|
-
@trial_settings = trial_settings
|
1448
1242
|
end
|
1449
1243
|
end
|
1450
|
-
|
1451
|
-
class Prebilling < Stripe::RequestParams
|
1452
|
-
# This is used to determine the number of billing cycles to prebill.
|
1453
|
-
attr_accessor :iterations
|
1454
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
1455
|
-
attr_accessor :update_behavior
|
1456
|
-
|
1457
|
-
def initialize(iterations: nil, update_behavior: nil)
|
1458
|
-
@iterations = iterations
|
1459
|
-
@update_behavior = update_behavior
|
1460
|
-
end
|
1461
|
-
end
|
1462
|
-
# 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.
|
1463
|
-
attr_accessor :billing_behavior
|
1464
1244
|
# Object representing the subscription schedule's default settings.
|
1465
1245
|
attr_accessor :default_settings
|
1466
1246
|
# 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.
|
@@ -1471,598 +1251,26 @@ module Stripe
|
|
1471
1251
|
attr_accessor :metadata
|
1472
1252
|
# 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.
|
1473
1253
|
attr_accessor :phases
|
1474
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed now.
|
1475
|
-
attr_accessor :prebilling
|
1476
1254
|
# 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`.
|
1477
1255
|
attr_accessor :proration_behavior
|
1478
1256
|
|
1479
1257
|
def initialize(
|
1480
|
-
billing_behavior: nil,
|
1481
1258
|
default_settings: nil,
|
1482
1259
|
end_behavior: nil,
|
1483
1260
|
expand: nil,
|
1484
1261
|
metadata: nil,
|
1485
1262
|
phases: nil,
|
1486
|
-
prebilling: nil,
|
1487
1263
|
proration_behavior: nil
|
1488
1264
|
)
|
1489
|
-
@billing_behavior = billing_behavior
|
1490
1265
|
@default_settings = default_settings
|
1491
1266
|
@end_behavior = end_behavior
|
1492
1267
|
@expand = expand
|
1493
1268
|
@metadata = metadata
|
1494
1269
|
@phases = phases
|
1495
|
-
@prebilling = prebilling
|
1496
1270
|
@proration_behavior = proration_behavior
|
1497
1271
|
end
|
1498
1272
|
end
|
1499
1273
|
|
1500
|
-
class AmendParams < Stripe::RequestParams
|
1501
|
-
class Amendment < Stripe::RequestParams
|
1502
|
-
class AmendmentEnd < Stripe::RequestParams
|
1503
|
-
class DiscountEnd < Stripe::RequestParams
|
1504
|
-
# The ID of a specific discount.
|
1505
|
-
attr_accessor :discount
|
1506
|
-
|
1507
|
-
def initialize(discount: nil)
|
1508
|
-
@discount = discount
|
1509
|
-
end
|
1510
|
-
end
|
1511
|
-
|
1512
|
-
class Duration < Stripe::RequestParams
|
1513
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1514
|
-
attr_accessor :interval
|
1515
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1516
|
-
attr_accessor :interval_count
|
1517
|
-
|
1518
|
-
def initialize(interval: nil, interval_count: nil)
|
1519
|
-
@interval = interval
|
1520
|
-
@interval_count = interval_count
|
1521
|
-
end
|
1522
|
-
end
|
1523
|
-
# Use the `end` time of a given discount.
|
1524
|
-
attr_accessor :discount_end
|
1525
|
-
# Time span for the amendment starting from the `amendment_start`.
|
1526
|
-
attr_accessor :duration
|
1527
|
-
# A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
|
1528
|
-
attr_accessor :timestamp
|
1529
|
-
# Select one of three ways to pass the `amendment_end`.
|
1530
|
-
attr_accessor :type
|
1531
|
-
|
1532
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
1533
|
-
@discount_end = discount_end
|
1534
|
-
@duration = duration
|
1535
|
-
@timestamp = timestamp
|
1536
|
-
@type = type
|
1537
|
-
end
|
1538
|
-
end
|
1539
|
-
|
1540
|
-
class AmendmentStart < Stripe::RequestParams
|
1541
|
-
class AmendmentEnd < Stripe::RequestParams
|
1542
|
-
# 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.
|
1543
|
-
attr_accessor :index
|
1544
|
-
|
1545
|
-
def initialize(index: nil)
|
1546
|
-
@index = index
|
1547
|
-
end
|
1548
|
-
end
|
1549
|
-
|
1550
|
-
class DiscountEnd < Stripe::RequestParams
|
1551
|
-
# The ID of a specific discount.
|
1552
|
-
attr_accessor :discount
|
1553
|
-
|
1554
|
-
def initialize(discount: nil)
|
1555
|
-
@discount = discount
|
1556
|
-
end
|
1557
|
-
end
|
1558
|
-
# Details of another amendment in the same array, immediately after which this amendment should begin.
|
1559
|
-
attr_accessor :amendment_end
|
1560
|
-
# Use the `end` time of a given discount.
|
1561
|
-
attr_accessor :discount_end
|
1562
|
-
# A precise Unix timestamp for the amendment to start.
|
1563
|
-
attr_accessor :timestamp
|
1564
|
-
# Select one of three ways to pass the `amendment_start`.
|
1565
|
-
attr_accessor :type
|
1566
|
-
|
1567
|
-
def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
|
1568
|
-
@amendment_end = amendment_end
|
1569
|
-
@discount_end = discount_end
|
1570
|
-
@timestamp = timestamp
|
1571
|
-
@type = type
|
1572
|
-
end
|
1573
|
-
end
|
1574
|
-
|
1575
|
-
class DiscountAction < Stripe::RequestParams
|
1576
|
-
class Add < Stripe::RequestParams
|
1577
|
-
class DiscountEnd < Stripe::RequestParams
|
1578
|
-
# The type of calculation made to determine when the discount ends.
|
1579
|
-
attr_accessor :type
|
1580
|
-
|
1581
|
-
def initialize(type: nil)
|
1582
|
-
@type = type
|
1583
|
-
end
|
1584
|
-
end
|
1585
|
-
# The coupon code to redeem.
|
1586
|
-
attr_accessor :coupon
|
1587
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
1588
|
-
attr_accessor :discount
|
1589
|
-
# Details to determine how long the discount should be applied for.
|
1590
|
-
attr_accessor :discount_end
|
1591
|
-
# 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.
|
1592
|
-
attr_accessor :index
|
1593
|
-
# The promotion code to redeem.
|
1594
|
-
attr_accessor :promotion_code
|
1595
|
-
|
1596
|
-
def initialize(
|
1597
|
-
coupon: nil,
|
1598
|
-
discount: nil,
|
1599
|
-
discount_end: nil,
|
1600
|
-
index: nil,
|
1601
|
-
promotion_code: nil
|
1602
|
-
)
|
1603
|
-
@coupon = coupon
|
1604
|
-
@discount = discount
|
1605
|
-
@discount_end = discount_end
|
1606
|
-
@index = index
|
1607
|
-
@promotion_code = promotion_code
|
1608
|
-
end
|
1609
|
-
end
|
1610
|
-
|
1611
|
-
class Remove < Stripe::RequestParams
|
1612
|
-
# The coupon code to remove from the `discounts` array.
|
1613
|
-
attr_accessor :coupon
|
1614
|
-
# The ID of a discount to remove from the `discounts` array.
|
1615
|
-
attr_accessor :discount
|
1616
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
1617
|
-
attr_accessor :promotion_code
|
1618
|
-
|
1619
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1620
|
-
@coupon = coupon
|
1621
|
-
@discount = discount
|
1622
|
-
@promotion_code = promotion_code
|
1623
|
-
end
|
1624
|
-
end
|
1625
|
-
|
1626
|
-
class Set < Stripe::RequestParams
|
1627
|
-
# The coupon code to replace the `discounts` array with.
|
1628
|
-
attr_accessor :coupon
|
1629
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
1630
|
-
attr_accessor :discount
|
1631
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
1632
|
-
attr_accessor :promotion_code
|
1633
|
-
|
1634
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1635
|
-
@coupon = coupon
|
1636
|
-
@discount = discount
|
1637
|
-
@promotion_code = promotion_code
|
1638
|
-
end
|
1639
|
-
end
|
1640
|
-
# Details of the discount to add.
|
1641
|
-
attr_accessor :add
|
1642
|
-
# Details of the discount to remove.
|
1643
|
-
attr_accessor :remove
|
1644
|
-
# Details of the discount to replace the existing discounts with.
|
1645
|
-
attr_accessor :set
|
1646
|
-
# Determines the type of discount action.
|
1647
|
-
attr_accessor :type
|
1648
|
-
|
1649
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1650
|
-
@add = add
|
1651
|
-
@remove = remove
|
1652
|
-
@set = set
|
1653
|
-
@type = type
|
1654
|
-
end
|
1655
|
-
end
|
1656
|
-
|
1657
|
-
class ItemAction < Stripe::RequestParams
|
1658
|
-
class Add < Stripe::RequestParams
|
1659
|
-
class Discount < Stripe::RequestParams
|
1660
|
-
class DiscountEnd < Stripe::RequestParams
|
1661
|
-
class Duration < Stripe::RequestParams
|
1662
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1663
|
-
attr_accessor :interval
|
1664
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1665
|
-
attr_accessor :interval_count
|
1666
|
-
|
1667
|
-
def initialize(interval: nil, interval_count: nil)
|
1668
|
-
@interval = interval
|
1669
|
-
@interval_count = interval_count
|
1670
|
-
end
|
1671
|
-
end
|
1672
|
-
# Time span for the redeemed discount.
|
1673
|
-
attr_accessor :duration
|
1674
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1675
|
-
attr_accessor :timestamp
|
1676
|
-
# The type of calculation made to determine when the discount ends.
|
1677
|
-
attr_accessor :type
|
1678
|
-
|
1679
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1680
|
-
@duration = duration
|
1681
|
-
@timestamp = timestamp
|
1682
|
-
@type = type
|
1683
|
-
end
|
1684
|
-
end
|
1685
|
-
# ID of the coupon to create a new discount for.
|
1686
|
-
attr_accessor :coupon
|
1687
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1688
|
-
attr_accessor :discount
|
1689
|
-
# Details to determine how long the discount should be applied for.
|
1690
|
-
attr_accessor :discount_end
|
1691
|
-
# ID of the promotion code to create a new discount for.
|
1692
|
-
attr_accessor :promotion_code
|
1693
|
-
|
1694
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1695
|
-
@coupon = coupon
|
1696
|
-
@discount = discount
|
1697
|
-
@discount_end = discount_end
|
1698
|
-
@promotion_code = promotion_code
|
1699
|
-
end
|
1700
|
-
end
|
1701
|
-
|
1702
|
-
class Trial < Stripe::RequestParams
|
1703
|
-
# 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.
|
1704
|
-
attr_accessor :converts_to
|
1705
|
-
# Determines the type of trial for this item.
|
1706
|
-
attr_accessor :type
|
1707
|
-
|
1708
|
-
def initialize(converts_to: nil, type: nil)
|
1709
|
-
@converts_to = converts_to
|
1710
|
-
@type = type
|
1711
|
-
end
|
1712
|
-
end
|
1713
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
1714
|
-
attr_accessor :discounts
|
1715
|
-
# 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`.
|
1716
|
-
attr_accessor :metadata
|
1717
|
-
# The ID of the price object.
|
1718
|
-
attr_accessor :price
|
1719
|
-
# Quantity for this item.
|
1720
|
-
attr_accessor :quantity
|
1721
|
-
# 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`.
|
1722
|
-
attr_accessor :tax_rates
|
1723
|
-
# Options that configure the trial on the subscription item.
|
1724
|
-
attr_accessor :trial
|
1725
|
-
|
1726
|
-
def initialize(
|
1727
|
-
discounts: nil,
|
1728
|
-
metadata: nil,
|
1729
|
-
price: nil,
|
1730
|
-
quantity: nil,
|
1731
|
-
tax_rates: nil,
|
1732
|
-
trial: nil
|
1733
|
-
)
|
1734
|
-
@discounts = discounts
|
1735
|
-
@metadata = metadata
|
1736
|
-
@price = price
|
1737
|
-
@quantity = quantity
|
1738
|
-
@tax_rates = tax_rates
|
1739
|
-
@trial = trial
|
1740
|
-
end
|
1741
|
-
end
|
1742
|
-
|
1743
|
-
class Remove < Stripe::RequestParams
|
1744
|
-
# ID of a price to remove.
|
1745
|
-
attr_accessor :price
|
1746
|
-
|
1747
|
-
def initialize(price: nil)
|
1748
|
-
@price = price
|
1749
|
-
end
|
1750
|
-
end
|
1751
|
-
|
1752
|
-
class Set < Stripe::RequestParams
|
1753
|
-
class Discount < Stripe::RequestParams
|
1754
|
-
class DiscountEnd < Stripe::RequestParams
|
1755
|
-
class Duration < Stripe::RequestParams
|
1756
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1757
|
-
attr_accessor :interval
|
1758
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1759
|
-
attr_accessor :interval_count
|
1760
|
-
|
1761
|
-
def initialize(interval: nil, interval_count: nil)
|
1762
|
-
@interval = interval
|
1763
|
-
@interval_count = interval_count
|
1764
|
-
end
|
1765
|
-
end
|
1766
|
-
# Time span for the redeemed discount.
|
1767
|
-
attr_accessor :duration
|
1768
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1769
|
-
attr_accessor :timestamp
|
1770
|
-
# The type of calculation made to determine when the discount ends.
|
1771
|
-
attr_accessor :type
|
1772
|
-
|
1773
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1774
|
-
@duration = duration
|
1775
|
-
@timestamp = timestamp
|
1776
|
-
@type = type
|
1777
|
-
end
|
1778
|
-
end
|
1779
|
-
# ID of the coupon to create a new discount for.
|
1780
|
-
attr_accessor :coupon
|
1781
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1782
|
-
attr_accessor :discount
|
1783
|
-
# Details to determine how long the discount should be applied for.
|
1784
|
-
attr_accessor :discount_end
|
1785
|
-
# ID of the promotion code to create a new discount for.
|
1786
|
-
attr_accessor :promotion_code
|
1787
|
-
|
1788
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1789
|
-
@coupon = coupon
|
1790
|
-
@discount = discount
|
1791
|
-
@discount_end = discount_end
|
1792
|
-
@promotion_code = promotion_code
|
1793
|
-
end
|
1794
|
-
end
|
1795
|
-
|
1796
|
-
class Trial < Stripe::RequestParams
|
1797
|
-
# 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.
|
1798
|
-
attr_accessor :converts_to
|
1799
|
-
# Determines the type of trial for this item.
|
1800
|
-
attr_accessor :type
|
1801
|
-
|
1802
|
-
def initialize(converts_to: nil, type: nil)
|
1803
|
-
@converts_to = converts_to
|
1804
|
-
@type = type
|
1805
|
-
end
|
1806
|
-
end
|
1807
|
-
# 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`.
|
1808
|
-
attr_accessor :discounts
|
1809
|
-
# 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`.
|
1810
|
-
attr_accessor :metadata
|
1811
|
-
# The ID of the price object.
|
1812
|
-
attr_accessor :price
|
1813
|
-
# 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`.
|
1814
|
-
attr_accessor :quantity
|
1815
|
-
# 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`.
|
1816
|
-
attr_accessor :tax_rates
|
1817
|
-
# 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`.
|
1818
|
-
attr_accessor :trial
|
1819
|
-
|
1820
|
-
def initialize(
|
1821
|
-
discounts: nil,
|
1822
|
-
metadata: nil,
|
1823
|
-
price: nil,
|
1824
|
-
quantity: nil,
|
1825
|
-
tax_rates: nil,
|
1826
|
-
trial: nil
|
1827
|
-
)
|
1828
|
-
@discounts = discounts
|
1829
|
-
@metadata = metadata
|
1830
|
-
@price = price
|
1831
|
-
@quantity = quantity
|
1832
|
-
@tax_rates = tax_rates
|
1833
|
-
@trial = trial
|
1834
|
-
end
|
1835
|
-
end
|
1836
|
-
# 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.
|
1837
|
-
attr_accessor :add
|
1838
|
-
# Details of the subscription item to remove.
|
1839
|
-
attr_accessor :remove
|
1840
|
-
# 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.
|
1841
|
-
attr_accessor :set
|
1842
|
-
# Determines the type of item action.
|
1843
|
-
attr_accessor :type
|
1844
|
-
|
1845
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1846
|
-
@add = add
|
1847
|
-
@remove = remove
|
1848
|
-
@set = set
|
1849
|
-
@type = type
|
1850
|
-
end
|
1851
|
-
end
|
1852
|
-
|
1853
|
-
class MetadataAction < Stripe::RequestParams
|
1854
|
-
# Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
|
1855
|
-
attr_accessor :add
|
1856
|
-
# Keys to remove from schedule phase metadata.
|
1857
|
-
attr_accessor :remove
|
1858
|
-
# Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
|
1859
|
-
attr_accessor :set
|
1860
|
-
# Select one of three ways to update phase-level `metadata` on subscription schedules.
|
1861
|
-
attr_accessor :type
|
1862
|
-
|
1863
|
-
def initialize(add: nil, remove: nil, set: nil, type: nil)
|
1864
|
-
@add = add
|
1865
|
-
@remove = remove
|
1866
|
-
@set = set
|
1867
|
-
@type = type
|
1868
|
-
end
|
1869
|
-
end
|
1870
|
-
|
1871
|
-
class SetPauseCollection < Stripe::RequestParams
|
1872
|
-
class Set < Stripe::RequestParams
|
1873
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1874
|
-
attr_accessor :behavior
|
1875
|
-
|
1876
|
-
def initialize(behavior: nil)
|
1877
|
-
@behavior = behavior
|
1878
|
-
end
|
1879
|
-
end
|
1880
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
1881
|
-
attr_accessor :set
|
1882
|
-
# Determines the type of the pause_collection amendment.
|
1883
|
-
attr_accessor :type
|
1884
|
-
|
1885
|
-
def initialize(set: nil, type: nil)
|
1886
|
-
@set = set
|
1887
|
-
@type = type
|
1888
|
-
end
|
1889
|
-
end
|
1890
|
-
|
1891
|
-
class TrialSettings < Stripe::RequestParams
|
1892
|
-
class EndBehavior < Stripe::RequestParams
|
1893
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1894
|
-
attr_accessor :prorate_up_front
|
1895
|
-
|
1896
|
-
def initialize(prorate_up_front: nil)
|
1897
|
-
@prorate_up_front = prorate_up_front
|
1898
|
-
end
|
1899
|
-
end
|
1900
|
-
# Defines how the subscription should behave when a trial ends.
|
1901
|
-
attr_accessor :end_behavior
|
1902
|
-
|
1903
|
-
def initialize(end_behavior: nil)
|
1904
|
-
@end_behavior = end_behavior
|
1905
|
-
end
|
1906
|
-
end
|
1907
|
-
# 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.
|
1908
|
-
attr_accessor :amendment_end
|
1909
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
1910
|
-
attr_accessor :amendment_start
|
1911
|
-
# 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.
|
1912
|
-
attr_accessor :billing_cycle_anchor
|
1913
|
-
# Changes to the coupons being redeemed or discounts being applied during the amendment time span.
|
1914
|
-
attr_accessor :discount_actions
|
1915
|
-
# Changes to the subscription items during the amendment time span.
|
1916
|
-
attr_accessor :item_actions
|
1917
|
-
# Instructions for how to modify phase metadata
|
1918
|
-
attr_accessor :metadata_actions
|
1919
|
-
# 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`.
|
1920
|
-
attr_accessor :proration_behavior
|
1921
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
1922
|
-
attr_accessor :set_pause_collection
|
1923
|
-
# Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
|
1924
|
-
attr_accessor :set_schedule_end
|
1925
|
-
# Settings related to subscription trials.
|
1926
|
-
attr_accessor :trial_settings
|
1927
|
-
|
1928
|
-
def initialize(
|
1929
|
-
amendment_end: nil,
|
1930
|
-
amendment_start: nil,
|
1931
|
-
billing_cycle_anchor: nil,
|
1932
|
-
discount_actions: nil,
|
1933
|
-
item_actions: nil,
|
1934
|
-
metadata_actions: nil,
|
1935
|
-
proration_behavior: nil,
|
1936
|
-
set_pause_collection: nil,
|
1937
|
-
set_schedule_end: nil,
|
1938
|
-
trial_settings: nil
|
1939
|
-
)
|
1940
|
-
@amendment_end = amendment_end
|
1941
|
-
@amendment_start = amendment_start
|
1942
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
1943
|
-
@discount_actions = discount_actions
|
1944
|
-
@item_actions = item_actions
|
1945
|
-
@metadata_actions = metadata_actions
|
1946
|
-
@proration_behavior = proration_behavior
|
1947
|
-
@set_pause_collection = set_pause_collection
|
1948
|
-
@set_schedule_end = set_schedule_end
|
1949
|
-
@trial_settings = trial_settings
|
1950
|
-
end
|
1951
|
-
end
|
1952
|
-
|
1953
|
-
class Prebilling < Stripe::RequestParams
|
1954
|
-
class BillFrom < Stripe::RequestParams
|
1955
|
-
class AmendmentStart < Stripe::RequestParams
|
1956
|
-
# 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.
|
1957
|
-
attr_accessor :index
|
1958
|
-
|
1959
|
-
def initialize(index: nil)
|
1960
|
-
@index = index
|
1961
|
-
end
|
1962
|
-
end
|
1963
|
-
# Start the prebilled period when a specified amendment begins.
|
1964
|
-
attr_accessor :amendment_start
|
1965
|
-
# Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
1966
|
-
attr_accessor :timestamp
|
1967
|
-
# Select one of several ways to pass the `bill_from` value.
|
1968
|
-
attr_accessor :type
|
1969
|
-
|
1970
|
-
def initialize(amendment_start: nil, timestamp: nil, type: nil)
|
1971
|
-
@amendment_start = amendment_start
|
1972
|
-
@timestamp = timestamp
|
1973
|
-
@type = type
|
1974
|
-
end
|
1975
|
-
end
|
1976
|
-
|
1977
|
-
class BillUntil < Stripe::RequestParams
|
1978
|
-
class AmendmentEnd < Stripe::RequestParams
|
1979
|
-
# 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.
|
1980
|
-
attr_accessor :index
|
1981
|
-
|
1982
|
-
def initialize(index: nil)
|
1983
|
-
@index = index
|
1984
|
-
end
|
1985
|
-
end
|
1986
|
-
|
1987
|
-
class Duration < Stripe::RequestParams
|
1988
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1989
|
-
attr_accessor :interval
|
1990
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1991
|
-
attr_accessor :interval_count
|
1992
|
-
|
1993
|
-
def initialize(interval: nil, interval_count: nil)
|
1994
|
-
@interval = interval
|
1995
|
-
@interval_count = interval_count
|
1996
|
-
end
|
1997
|
-
end
|
1998
|
-
# End the prebilled period when a specified amendment ends.
|
1999
|
-
attr_accessor :amendment_end
|
2000
|
-
# Time span for prebilling, starting from `bill_from`.
|
2001
|
-
attr_accessor :duration
|
2002
|
-
# End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
|
2003
|
-
attr_accessor :timestamp
|
2004
|
-
# Select one of several ways to pass the `bill_until` value.
|
2005
|
-
attr_accessor :type
|
2006
|
-
|
2007
|
-
def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
|
2008
|
-
@amendment_end = amendment_end
|
2009
|
-
@duration = duration
|
2010
|
-
@timestamp = timestamp
|
2011
|
-
@type = type
|
2012
|
-
end
|
2013
|
-
end
|
2014
|
-
# The beginning of the prebilled time period. The default value is `now`.
|
2015
|
-
attr_accessor :bill_from
|
2016
|
-
# The end of the prebilled time period.
|
2017
|
-
attr_accessor :bill_until
|
2018
|
-
# When the prebilling invoice should be created. The default value is `now`.
|
2019
|
-
attr_accessor :invoice_at
|
2020
|
-
# Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
|
2021
|
-
attr_accessor :update_behavior
|
2022
|
-
|
2023
|
-
def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
|
2024
|
-
@bill_from = bill_from
|
2025
|
-
@bill_until = bill_until
|
2026
|
-
@invoice_at = invoice_at
|
2027
|
-
@update_behavior = update_behavior
|
2028
|
-
end
|
2029
|
-
end
|
2030
|
-
|
2031
|
-
class ScheduleSettings < Stripe::RequestParams
|
2032
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2033
|
-
attr_accessor :end_behavior
|
2034
|
-
|
2035
|
-
def initialize(end_behavior: nil)
|
2036
|
-
@end_behavior = end_behavior
|
2037
|
-
end
|
2038
|
-
end
|
2039
|
-
# Changes to apply to the phases of the subscription schedule, in the order provided.
|
2040
|
-
attr_accessor :amendments
|
2041
|
-
# Specifies which fields in the response should be expanded.
|
2042
|
-
attr_accessor :expand
|
2043
|
-
# Provide any time periods to bill in advance.
|
2044
|
-
attr_accessor :prebilling
|
2045
|
-
# In cases where the amendment changes the currently active phase,
|
2046
|
-
# specifies if and how to prorate at the time of the request.
|
2047
|
-
attr_accessor :proration_behavior
|
2048
|
-
# Changes to apply to the subscription schedule.
|
2049
|
-
attr_accessor :schedule_settings
|
2050
|
-
|
2051
|
-
def initialize(
|
2052
|
-
amendments: nil,
|
2053
|
-
expand: nil,
|
2054
|
-
prebilling: nil,
|
2055
|
-
proration_behavior: nil,
|
2056
|
-
schedule_settings: nil
|
2057
|
-
)
|
2058
|
-
@amendments = amendments
|
2059
|
-
@expand = expand
|
2060
|
-
@prebilling = prebilling
|
2061
|
-
@proration_behavior = proration_behavior
|
2062
|
-
@schedule_settings = schedule_settings
|
2063
|
-
end
|
2064
|
-
end
|
2065
|
-
|
2066
1274
|
class CancelParams < Stripe::RequestParams
|
2067
1275
|
# Specifies which fields in the response should be expanded.
|
2068
1276
|
attr_accessor :expand
|
@@ -2090,17 +1298,6 @@ module Stripe
|
|
2090
1298
|
end
|
2091
1299
|
end
|
2092
1300
|
|
2093
|
-
# Amends an existing subscription schedule.
|
2094
|
-
def amend(schedule, params = {}, opts = {})
|
2095
|
-
request(
|
2096
|
-
method: :post,
|
2097
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
2098
|
-
params: params,
|
2099
|
-
opts: opts,
|
2100
|
-
base_address: :api
|
2101
|
-
)
|
2102
|
-
end
|
2103
|
-
|
2104
1301
|
# 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.
|
2105
1302
|
def cancel(schedule, params = {}, opts = {})
|
2106
1303
|
request(
|