stripe 15.4.0.pre.beta.1 → 15.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/API_VERSION +1 -1
- data/CHANGELOG.md +686 -1593
- data/OPENAPI_VERSION +1 -1
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +0 -28
- data/lib/stripe/api_version.rb +2 -1
- data/lib/stripe/errors.rb +0 -54
- data/lib/stripe/event_types.rb +0 -98
- data/lib/stripe/object_types.rb +0 -50
- data/lib/stripe/resources/account.rb +6 -658
- data/lib/stripe/resources/account_link.rb +3 -1
- data/lib/stripe/resources/account_session.rb +52 -256
- data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -2
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -4
- data/lib/stripe/resources/billing/credit_grant.rb +1 -11
- data/lib/stripe/resources/billing_portal/configuration.rb +46 -2
- data/lib/stripe/resources/billing_portal/session.rb +0 -6
- data/lib/stripe/resources/card.rb +0 -2
- data/lib/stripe/resources/cash_balance.rb +0 -2
- data/lib/stripe/resources/charge.rb +7 -1543
- data/lib/stripe/resources/checkout/session.rb +24 -320
- data/lib/stripe/resources/confirmation_token.rb +3 -173
- data/lib/stripe/resources/coupon.rb +1 -30
- data/lib/stripe/resources/credit_note.rb +0 -6
- data/lib/stripe/resources/credit_note_line_item.rb +0 -9
- data/lib/stripe/resources/customer.rb +1 -3
- data/lib/stripe/resources/customer_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_session.rb +1 -6
- data/lib/stripe/resources/discount.rb +0 -2
- data/lib/stripe/resources/dispute.rb +1 -3
- data/lib/stripe/resources/event.rb +14 -57
- data/lib/stripe/resources/financial_connections/account.rb +1 -22
- data/lib/stripe/resources/financial_connections/session.rb +2 -62
- data/lib/stripe/resources/identity/verification_session.rb +0 -10
- data/lib/stripe/resources/invoice.rb +40 -1071
- data/lib/stripe/resources/invoice_item.rb +3 -79
- data/lib/stripe/resources/invoice_line_item.rb +1 -55
- data/lib/stripe/resources/invoice_payment.rb +53 -2
- data/lib/stripe/resources/issuing/cardholder.rb +1 -2
- data/lib/stripe/resources/issuing/transaction.rb +0 -6
- data/lib/stripe/resources/line_item.rb +0 -37
- data/lib/stripe/resources/mandate.rb +0 -24
- data/lib/stripe/resources/payment_intent.rb +297 -5243
- data/lib/stripe/resources/payment_link.rb +83 -5
- data/lib/stripe/resources/payment_method.rb +5 -196
- data/lib/stripe/resources/payment_method_configuration.rb +0 -295
- data/lib/stripe/resources/payout.rb +0 -6
- data/lib/stripe/resources/price.rb +0 -30
- data/lib/stripe/resources/promotion_code.rb +0 -10
- data/lib/stripe/resources/quote.rb +8 -2039
- data/lib/stripe/resources/radar/value_list.rb +2 -2
- data/lib/stripe/resources/refund.rb +1 -10
- data/lib/stripe/resources/review.rb +2 -2
- data/lib/stripe/resources/setup_attempt.rb +1 -22
- data/lib/stripe/resources/setup_intent.rb +9 -578
- data/lib/stripe/resources/source.rb +0 -29
- data/lib/stripe/resources/subscription.rb +11 -290
- data/lib/stripe/resources/subscription_item.rb +5 -86
- data/lib/stripe/resources/subscription_schedule.rb +45 -1010
- data/lib/stripe/resources/tax/registration.rb +408 -30
- data/lib/stripe/resources/tax_id.rb +2 -12
- data/lib/stripe/resources/terminal/configuration.rb +196 -0
- data/lib/stripe/resources/terminal/reader.rb +0 -8
- data/lib/stripe/resources/transfer.rb +0 -6
- data/lib/stripe/resources/treasury/financial_account.rb +3 -22
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
- data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
- data/lib/stripe/resources/treasury/received_credit.rb +1 -38
- data/lib/stripe/resources/treasury/received_debit.rb +1 -40
- data/lib/stripe/resources.rb +0 -104
- data/lib/stripe/services/account_link_service.rb +3 -1
- data/lib/stripe/services/account_service.rb +4 -565
- data/lib/stripe/services/account_session_service.rb +35 -226
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
- data/lib/stripe/services/billing/credit_grant_service.rb +1 -9
- data/lib/stripe/services/billing_portal/configuration_service.rb +36 -2
- data/lib/stripe/services/billing_portal/session_service.rb +0 -4
- data/lib/stripe/services/charge_service.rb +0 -1418
- data/lib/stripe/services/checkout/session_service.rb +16 -241
- data/lib/stripe/services/coupon_service.rb +1 -17
- data/lib/stripe/services/credit_note_service.rb +0 -4
- data/lib/stripe/services/customer_session_service.rb +1 -4
- data/lib/stripe/services/financial_connections/account_service.rb +2 -7
- data/lib/stripe/services/financial_connections/session_service.rb +2 -34
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/identity/verification_session_service.rb +0 -8
- data/lib/stripe/services/invoice_item_service.rb +3 -75
- data/lib/stripe/services/invoice_line_item_service.rb +1 -33
- data/lib/stripe/services/invoice_payment_service.rb +83 -0
- data/lib/stripe/services/invoice_service.rb +40 -1022
- data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
- data/lib/stripe/services/issuing/transaction_service.rb +0 -4
- data/lib/stripe/services/issuing_service.rb +1 -5
- data/lib/stripe/services/payment_intent_service.rb +399 -4882
- data/lib/stripe/services/payment_link_service.rb +81 -5
- data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
- data/lib/stripe/services/payment_method_service.rb +2 -121
- data/lib/stripe/services/payout_service.rb +0 -4
- data/lib/stripe/services/price_service.rb +0 -19
- data/lib/stripe/services/promotion_code_service.rb +0 -8
- data/lib/stripe/services/quote_service.rb +9 -1724
- data/lib/stripe/services/radar/value_list_service.rb +1 -1
- data/lib/stripe/services/setup_intent_service.rb +9 -538
- data/lib/stripe/services/subscription_item_service.rb +5 -77
- data/lib/stripe/services/subscription_schedule_service.rb +45 -914
- data/lib/stripe/services/subscription_service.rb +11 -251
- data/lib/stripe/services/tax/registration_service.rb +360 -30
- data/lib/stripe/services/tax_id_service.rb +2 -8
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/configuration_service.rb +152 -0
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -97
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
- data/lib/stripe/services/transfer_service.rb +0 -4
- data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
- data/lib/stripe/services/treasury/financial_account_service.rb +2 -16
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
- data/lib/stripe/services/v1_services.rb +2 -11
- data/lib/stripe/services/v2/core_service.rb +1 -4
- data/lib/stripe/services/v2_services.rb +1 -4
- data/lib/stripe/services.rb +1 -53
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/util.rb +1 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -53
- data/rbi/stripe/resources/account.rbi +4995 -0
- data/rbi/stripe/resources/account_link.rbi +76 -0
- data/rbi/stripe/resources/account_session.rbi +1074 -0
- data/rbi/stripe/resources/apple_pay_domain.rbi +88 -0
- data/rbi/stripe/resources/application.rbi +20 -0
- data/rbi/stripe/resources/application_fee.rbi +118 -0
- data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
- data/rbi/stripe/resources/apps/secret.rbi +195 -0
- data/rbi/stripe/resources/balance.rbi +235 -0
- data/rbi/stripe/resources/balance_transaction.rbi +147 -0
- data/rbi/stripe/resources/bank_account.rbi +127 -0
- data/rbi/stripe/resources/billing/alert.rbi +201 -0
- data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
- data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
- data/rbi/stripe/resources/billing/meter.rbi +226 -0
- data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
- data/rbi/stripe/resources/billing_portal/configuration.rbi +703 -0
- data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
- data/rbi/stripe/resources/capability.rbi +125 -0
- data/rbi/stripe/resources/card.rbi +125 -0
- data/rbi/stripe/resources/cash_balance.rbi +32 -0
- data/rbi/stripe/resources/charge.rbi +2089 -0
- data/rbi/stripe/resources/checkout/session.rbi +4095 -0
- data/rbi/stripe/resources/climate/order.rbi +245 -0
- data/rbi/stripe/resources/climate/product.rbi +75 -0
- data/rbi/stripe/resources/climate/supplier.rbi +72 -0
- data/rbi/stripe/resources/confirmation_token.rbi +1818 -0
- data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
- data/rbi/stripe/resources/country_spec.rbi +85 -0
- data/rbi/stripe/resources/coupon.rbi +250 -0
- data/rbi/stripe/resources/credit_note.rbi +752 -0
- data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
- data/rbi/stripe/resources/customer.rbi +1005 -0
- data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
- data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
- data/rbi/stripe/resources/customer_session.rbi +200 -0
- data/rbi/stripe/resources/discount.rbi +53 -0
- data/rbi/stripe/resources/dispute.rbi +761 -0
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
- data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
- data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
- data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
- data/rbi/stripe/resources/event.rbi +137 -0
- data/rbi/stripe/resources/exchange_rate.rbi +66 -0
- data/rbi/stripe/resources/file.rbi +143 -0
- data/rbi/stripe/resources/file_link.rbi +141 -0
- data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
- data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
- data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
- data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
- data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
- data/rbi/stripe/resources/forwarding/request.rbi +216 -0
- data/rbi/stripe/resources/funding_instructions.rbi +437 -0
- data/rbi/stripe/resources/identity/verification_report.rbi +360 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +564 -0
- data/rbi/stripe/resources/invoice.rbi +3858 -0
- data/rbi/stripe/resources/invoice_item.rbi +470 -0
- data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
- data/rbi/stripe/resources/invoice_payment.rbi +121 -0
- data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
- data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
- data/rbi/stripe/resources/issuing/card.rbi +741 -0
- data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
- data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
- data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
- data/rbi/stripe/resources/issuing/token.rbi +226 -0
- data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
- data/rbi/stripe/resources/line_item.rbi +72 -0
- data/rbi/stripe/resources/login_link.rbi +19 -0
- data/rbi/stripe/resources/mandate.rbi +191 -0
- data/rbi/stripe/resources/payment_intent.rbi +9997 -0
- data/rbi/stripe/resources/payment_link.rbi +1893 -0
- data/rbi/stripe/resources/payment_method.rbi +1770 -0
- data/rbi/stripe/resources/payment_method_configuration.rbi +3550 -0
- data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
- data/rbi/stripe/resources/payout.rbi +300 -0
- data/rbi/stripe/resources/person.rbi +401 -0
- data/rbi/stripe/resources/plan.rbi +371 -0
- data/rbi/stripe/resources/price.rbi +694 -0
- data/rbi/stripe/resources/product.rbi +555 -0
- data/rbi/stripe/resources/product_feature.rbi +26 -0
- data/rbi/stripe/resources/promotion_code.rbi +261 -0
- data/rbi/stripe/resources/quote.rbi +1145 -0
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
- data/rbi/stripe/resources/radar/value_list.rbi +168 -0
- data/rbi/stripe/resources/radar/value_list_item.rbi +129 -0
- data/rbi/stripe/resources/refund.rbi +523 -0
- data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
- data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
- data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
- data/rbi/stripe/resources/reversal.rbi +51 -0
- data/rbi/stripe/resources/review.rbi +154 -0
- data/rbi/stripe/resources/setup_attempt.rbi +477 -0
- data/rbi/stripe/resources/setup_intent.rbi +3978 -0
- data/rbi/stripe/resources/shipping_rate.rbi +305 -0
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
- data/rbi/stripe/resources/source.rbi +1496 -0
- data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
- data/rbi/stripe/resources/source_transaction.rbi +127 -0
- data/rbi/stripe/resources/subscription.rbi +2080 -0
- data/rbi/stripe/resources/subscription_item.rbi +404 -0
- data/rbi/stripe/resources/subscription_schedule.rbi +1673 -0
- data/rbi/stripe/resources/tax/calculation.rbi +478 -0
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +91 -0
- data/rbi/stripe/resources/tax/registration.rbi +3216 -0
- data/rbi/stripe/resources/tax/settings.rbi +141 -0
- data/rbi/stripe/resources/tax/transaction.rbi +351 -0
- data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
- data/rbi/stripe/resources/tax_code.rbi +44 -0
- data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
- data/rbi/stripe/resources/tax_id.rbi +165 -0
- data/rbi/stripe/resources/tax_rate.rbi +239 -0
- data/rbi/stripe/resources/terminal/configuration.rbi +1595 -0
- data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
- data/rbi/stripe/resources/terminal/location.rbi +222 -0
- data/rbi/stripe/resources/terminal/reader.rbi +994 -0
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +132 -0
- data/rbi/stripe/resources/token.rbi +1283 -0
- data/rbi/stripe/resources/topup.rbi +222 -0
- data/rbi/stripe/resources/transfer.rbi +199 -0
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
- data/rbi/stripe/resources/treasury/financial_account.rbi +869 -0
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
- data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
- data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
- data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
- data/rbi/stripe/resources/v2/amount.rbi +14 -0
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
- data/rbi/stripe/resources/v2/event.rbi +48 -0
- data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
- data/rbi/stripe/resources/webhook_endpoint.rbi +168 -0
- data/rbi/stripe/services/account_capability_service.rbi +51 -0
- data/{lib/stripe/services/external_account_service.rb → rbi/stripe/services/account_external_account_service.rbi} +122 -135
- data/rbi/stripe/services/account_link_service.rbi +60 -0
- data/rbi/stripe/services/account_login_link_service.rbi +22 -0
- data/rbi/stripe/services/account_person_service.rbi +1011 -0
- data/rbi/stripe/services/account_service.rbi +4281 -0
- data/rbi/stripe/services/account_session_service.rbi +685 -0
- data/rbi/stripe/services/apple_pay_domain_service.rbi +76 -0
- data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
- data/rbi/stripe/services/application_fee_service.rbi +78 -0
- data/rbi/stripe/services/apps/secret_service.rbi +151 -0
- data/rbi/stripe/services/apps_service.rbi +9 -0
- data/rbi/stripe/services/balance_service.rbi +21 -0
- data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
- data/rbi/stripe/services/billing/alert_service.rbi +152 -0
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
- data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
- data/rbi/stripe/services/billing/meter_service.rbi +163 -0
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +555 -0
- data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
- data/rbi/stripe/services/billing_portal_service.rbi +10 -0
- data/rbi/stripe/services/billing_service.rbi +15 -0
- data/rbi/stripe/services/charge_service.rbi +448 -0
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
- data/rbi/stripe/services/checkout/session_service.rbi +2690 -0
- data/rbi/stripe/services/checkout_service.rbi +9 -0
- data/rbi/stripe/services/climate/order_service.rbi +142 -0
- data/rbi/stripe/services/climate/product_service.rbi +46 -0
- data/{lib/stripe/services/financial_connections/institution_service.rb → rbi/stripe/services/climate/supplier_service.rbi} +25 -36
- data/rbi/stripe/services/climate_service.rbi +11 -0
- data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
- data/rbi/stripe/services/country_spec_service.rbi +44 -0
- data/rbi/stripe/services/coupon_service.rbi +194 -0
- data/{lib/stripe/services/quote_preview_invoice_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
- data/rbi/stripe/services/credit_note_service.rbi +415 -0
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
- data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
- data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
- data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
- data/rbi/stripe/services/customer_service.rbi +647 -0
- data/rbi/stripe/services/customer_session_service.rbi +116 -0
- data/rbi/stripe/services/customer_tax_id_service.rbi +70 -0
- data/rbi/stripe/services/dispute_service.rbi +424 -0
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
- data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
- data/rbi/stripe/services/entitlements_service.rbi +10 -0
- data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
- data/rbi/stripe/services/event_service.rbi +83 -0
- data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
- data/rbi/stripe/services/file_link_service.rbi +124 -0
- data/rbi/stripe/services/file_service.rbi +116 -0
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
- data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
- data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
- data/rbi/stripe/services/financial_connections_service.rbi +11 -0
- data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
- data/rbi/stripe/services/forwarding_service.rbi +9 -0
- data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
- data/rbi/stripe/services/identity/verification_session_service.rbi +339 -0
- data/rbi/stripe/services/identity_service.rbi +10 -0
- data/rbi/stripe/services/invoice_item_service.rbi +366 -0
- data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
- data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
- data/rbi/stripe/services/invoice_service.rbi +3027 -0
- data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
- data/rbi/stripe/services/issuing/card_service.rbi +495 -0
- data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
- data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
- data/rbi/stripe/services/issuing/token_service.rbi +99 -0
- data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
- data/rbi/stripe/services/issuing_service.rbi +16 -0
- data/rbi/stripe/services/mandate_service.rbi +20 -0
- data/rbi/stripe/services/payment_intent_service.rbi +7994 -0
- data/{lib/stripe/services/payment_intent_amount_details_line_item_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/payment_link_service.rbi +1441 -0
- data/rbi/stripe/services/payment_method_configuration_service.rbi +2487 -0
- data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
- data/rbi/stripe/services/payment_method_service.rbi +781 -0
- data/rbi/stripe/services/payout_service.rbi +205 -0
- data/rbi/stripe/services/plan_service.rbi +282 -0
- data/rbi/stripe/services/price_service.rbi +546 -0
- data/rbi/stripe/services/product_feature_service.rbi +67 -0
- data/rbi/stripe/services/product_service.rbi +477 -0
- data/rbi/stripe/services/promotion_code_service.rbi +214 -0
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
- data/{lib/stripe/services/order_line_item_service.rb → rbi/stripe/services/quote_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/quote_service.rbi +699 -0
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
- data/rbi/stripe/services/radar/value_list_item_service.rbi +109 -0
- data/rbi/stripe/services/radar/value_list_service.rbi +141 -0
- data/rbi/stripe/services/radar_service.rbi +11 -0
- data/rbi/stripe/services/refund_service.rbi +185 -0
- data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
- data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
- data/rbi/stripe/services/reporting_service.rbi +10 -0
- data/rbi/stripe/services/review_service.rbi +84 -0
- data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
- data/rbi/stripe/services/setup_intent_service.rbi +3709 -0
- data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
- data/rbi/stripe/services/sigma_service.rbi +9 -0
- data/rbi/stripe/services/source_service.rbi +663 -0
- data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
- data/rbi/stripe/services/subscription_item_service.rbi +350 -0
- data/rbi/stripe/services/subscription_schedule_service.rbi +1333 -0
- data/rbi/stripe/services/subscription_service.rbi +1684 -0
- data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/calculation_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/calculation_service.rbi +234 -0
- data/rbi/stripe/services/tax/registration_service.rbi +2278 -0
- data/rbi/stripe/services/tax/settings_service.rbi +93 -0
- data/{lib/stripe/services/privacy/redaction_job_validation_error_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
- data/rbi/stripe/services/tax_code_service.rbi +44 -0
- data/rbi/stripe/services/tax_id_service.rbi +110 -0
- data/rbi/stripe/services/tax_rate_service.rbi +185 -0
- data/rbi/stripe/services/tax_service.rbi +12 -0
- data/rbi/stripe/services/terminal/configuration_service.rbi +1286 -0
- data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
- data/rbi/stripe/services/terminal/location_service.rbi +182 -0
- data/rbi/stripe/services/terminal/reader_service.rbi +540 -0
- data/rbi/stripe/services/terminal_service.rbi +12 -0
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +746 -0
- data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
- data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
- data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +93 -0
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
- data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
- data/rbi/stripe/services/test_helpers_service.rbi +15 -0
- data/rbi/stripe/services/token_service.rbi +1257 -0
- data/rbi/stripe/services/topup_service.rbi +176 -0
- data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
- data/rbi/stripe/services/transfer_service.rbi +152 -0
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
- data/rbi/stripe/services/treasury/financial_account_service.rbi +566 -0
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
- data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
- data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
- data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
- data/rbi/stripe/services/treasury_service.rbi +18 -0
- data/rbi/stripe/services/v1_services.rbi +77 -0
- data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +18 -0
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
- data/rbi/stripe/services/v2/billing_service.rbi +14 -0
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +192 -0
- data/rbi/stripe/services/v2/core/event_service.rbi +36 -0
- data/rbi/stripe/services/v2/core_service.rbi +12 -0
- data/rbi/stripe/services/v2_services.rbi +10 -0
- data/rbi/stripe/services/webhook_endpoint_service.rbi +129 -0
- data/stripe.gemspec +1 -4
- metadata +325 -162
- data/lib/stripe/events/v2_core_account_closed_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_created_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
- data/lib/stripe/events/v2_core_account_link_completed_event.rb +0 -13
- data/lib/stripe/events/v2_core_account_person_created_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_person_deleted_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_person_updated_event.rb +0 -23
- data/lib/stripe/events/v2_core_account_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
- data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_transaction_created_event.rb +0 -21
- data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +0 -21
- data/lib/stripe/events/v2_off_session_payment_requires_capture_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +0 -21
- data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +0 -21
- data/lib/stripe/resources/account_notice.rb +0 -123
- data/lib/stripe/resources/balance_settings.rb +0 -105
- data/lib/stripe/resources/capital/financing_offer.rb +0 -179
- data/lib/stripe/resources/capital/financing_summary.rb +0 -55
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -114
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
- data/lib/stripe/resources/financial_connections/institution.rb +0 -92
- data/lib/stripe/resources/fx_quote.rb +0 -184
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
- data/lib/stripe/resources/issuing/settlement.rb +0 -53
- data/lib/stripe/resources/margin.rb +0 -115
- data/lib/stripe/resources/order.rb +0 -2958
- data/lib/stripe/resources/payment_attempt_record.rb +0 -1099
- data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -72
- data/lib/stripe/resources/payment_record.rb +0 -1628
- data/lib/stripe/resources/privacy/redaction_job.rb +0 -298
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -33
- data/lib/stripe/resources/quote_line.rb +0 -274
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -663
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -371
- data/lib/stripe/resources/tax/association.rb +0 -66
- data/lib/stripe/resources/tax/form.rb +0 -211
- data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
- data/lib/stripe/resources/v2/core/account.rb +0 -1755
- data/lib/stripe/resources/v2/core/account_link.rb +0 -56
- data/lib/stripe/resources/v2/core/person.rb +0 -276
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -74
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -39
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -20
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -22
- data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -51
- data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -58
- data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -68
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -94
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -129
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -82
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -45
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -117
- data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -75
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -49
- data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -122
- data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -84
- data/lib/stripe/resources/v2/money_management/transaction.rb +0 -78
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -68
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +0 -72
- data/lib/stripe/services/account_notice_service.rb +0 -101
- data/lib/stripe/services/balance_settings_service.rb +0 -96
- data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
- data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
- data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
- data/lib/stripe/services/capital_service.rb +0 -15
- data/lib/stripe/services/fx_quote_service.rb +0 -123
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
- data/lib/stripe/services/margin_service.rb +0 -119
- data/lib/stripe/services/order_service.rb +0 -2388
- data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
- data/lib/stripe/services/payment_record_service.rb +0 -542
- data/lib/stripe/services/privacy/redaction_job_service.rb +0 -240
- data/lib/stripe/services/privacy_service.rb +0 -13
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
- data/lib/stripe/services/tax/association_service.rb +0 -31
- data/lib/stripe/services/tax/form_service.rb +0 -100
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
- data/lib/stripe/services/v2/core/account_link_service.rb +0 -76
- data/lib/stripe/services/v2/core/account_service.rb +0 -4170
- data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1045
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -130
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -107
- data/lib/stripe/services/v2/core/vault_service.rb +0 -18
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -74
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -43
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -82
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -125
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -95
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -199
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -235
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -172
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -90
- data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
- data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -70
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -43
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -69
- data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -73
- data/lib/stripe/services/v2/money_management_service.rb +0 -31
- data/lib/stripe/services/v2/payment_service.rb +0 -15
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +0 -137
- data/lib/stripe/services/v2/test_helper_service.rb +0 -15
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -49
- data/rbi/stripe.rbi +0 -193855
@@ -7,7 +7,6 @@ module Stripe
|
|
7
7
|
class Quote < APIResource
|
8
8
|
extend Stripe::APIOperations::Create
|
9
9
|
extend Stripe::APIOperations::List
|
10
|
-
extend Stripe::APIOperations::NestedResource
|
11
10
|
include Stripe::APIOperations::Save
|
12
11
|
|
13
12
|
OBJECT_NAME = "quote"
|
@@ -15,9 +14,6 @@ module Stripe
|
|
15
14
|
"quote"
|
16
15
|
end
|
17
16
|
|
18
|
-
nested_resource_class_methods :preview_invoice, operations: %i[list]
|
19
|
-
nested_resource_class_methods :preview_subscription_schedule, operations: %i[list]
|
20
|
-
|
21
17
|
class AutomaticTax < Stripe::StripeObject
|
22
18
|
class Liability < Stripe::StripeObject
|
23
19
|
# The connected account being referenced when `type` is `account`.
|
@@ -36,21 +32,6 @@ module Stripe
|
|
36
32
|
end
|
37
33
|
|
38
34
|
class Computed < Stripe::StripeObject
|
39
|
-
class LastReestimationDetails < Stripe::StripeObject
|
40
|
-
class Failed < Stripe::StripeObject
|
41
|
-
# The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field.
|
42
|
-
attr_reader :failure_code
|
43
|
-
# Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID".
|
44
|
-
attr_reader :message
|
45
|
-
# The reason the reestimation failed.
|
46
|
-
attr_reader :reason
|
47
|
-
end
|
48
|
-
# When `status` is `failed`, provides details about the quote reestimation failure.
|
49
|
-
attr_reader :failed
|
50
|
-
# Latest status of the reestimation.
|
51
|
-
attr_reader :status
|
52
|
-
end
|
53
|
-
|
54
35
|
class Recurring < Stripe::StripeObject
|
55
36
|
class TotalDetails < Stripe::StripeObject
|
56
37
|
class Breakdown < Stripe::StripeObject
|
@@ -150,12 +131,8 @@ module Stripe
|
|
150
131
|
# Attribute for field total_details
|
151
132
|
attr_reader :total_details
|
152
133
|
end
|
153
|
-
# Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation.
|
154
|
-
attr_reader :last_reestimation_details
|
155
134
|
# The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
|
156
135
|
attr_reader :recurring
|
157
|
-
# The time at which the quote's estimated schedules and upcoming invoices were generated.
|
158
|
-
attr_reader :updated_at
|
159
136
|
# Attribute for field upfront
|
160
137
|
attr_reader :upfront
|
161
138
|
end
|
@@ -180,68 +157,6 @@ module Stripe
|
|
180
157
|
attr_reader :issuer
|
181
158
|
end
|
182
159
|
|
183
|
-
class StatusDetails < Stripe::StripeObject
|
184
|
-
class Canceled < Stripe::StripeObject
|
185
|
-
# The reason this quote was marked as canceled.
|
186
|
-
attr_reader :reason
|
187
|
-
# Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch.
|
188
|
-
attr_reader :transitioned_at
|
189
|
-
end
|
190
|
-
|
191
|
-
class Stale < Stripe::StripeObject
|
192
|
-
class LastReason < Stripe::StripeObject
|
193
|
-
class LinesInvalid < Stripe::StripeObject
|
194
|
-
# The timestamp at which the lines were marked as invalid.
|
195
|
-
attr_reader :invalid_at
|
196
|
-
# The list of lines that became invalid at the given timestamp.
|
197
|
-
attr_reader :lines
|
198
|
-
end
|
199
|
-
|
200
|
-
class SubscriptionChanged < Stripe::StripeObject
|
201
|
-
# The subscription's state before the quote was marked as stale.
|
202
|
-
attr_reader :previous_subscription
|
203
|
-
end
|
204
|
-
|
205
|
-
class SubscriptionScheduleChanged < Stripe::StripeObject
|
206
|
-
# The subscription schedule's state before the quote was marked as stale.
|
207
|
-
attr_reader :previous_subscription_schedule
|
208
|
-
end
|
209
|
-
# The ID of the line that is invalid if the stale reason type is `line_invalid`.
|
210
|
-
attr_reader :line_invalid
|
211
|
-
# The IDs of the lines that are invalid if the stale reason type is `lines_invalid`.
|
212
|
-
attr_reader :lines_invalid
|
213
|
-
# The user supplied mark stale reason.
|
214
|
-
attr_reader :marked_stale
|
215
|
-
# The ID of the subscription that was canceled.
|
216
|
-
attr_reader :subscription_canceled
|
217
|
-
# Attribute for field subscription_changed
|
218
|
-
attr_reader :subscription_changed
|
219
|
-
# The ID of the subscription that was expired.
|
220
|
-
attr_reader :subscription_expired
|
221
|
-
# The ID of the subscription schedule that was canceled.
|
222
|
-
attr_reader :subscription_schedule_canceled
|
223
|
-
# Attribute for field subscription_schedule_changed
|
224
|
-
attr_reader :subscription_schedule_changed
|
225
|
-
# The ID of the subscription schedule that was released.
|
226
|
-
attr_reader :subscription_schedule_released
|
227
|
-
# The reason the quote was marked as stale.
|
228
|
-
attr_reader :type
|
229
|
-
end
|
230
|
-
# Time at which the quote expires. Measured in seconds since the Unix epoch.
|
231
|
-
attr_reader :expires_at
|
232
|
-
# The most recent reason this quote was marked as stale.
|
233
|
-
attr_reader :last_reason
|
234
|
-
# Time at which the stale reason was updated. Measured in seconds since the Unix epoch.
|
235
|
-
attr_reader :last_updated_at
|
236
|
-
# Time at which the quote was marked as stale. Measured in seconds since the Unix epoch.
|
237
|
-
attr_reader :transitioned_at
|
238
|
-
end
|
239
|
-
# Attribute for field canceled
|
240
|
-
attr_reader :canceled
|
241
|
-
# Attribute for field stale
|
242
|
-
attr_reader :stale
|
243
|
-
end
|
244
|
-
|
245
160
|
class StatusTransitions < Stripe::StripeObject
|
246
161
|
# The time that the quote was accepted. Measured in seconds since Unix epoch.
|
247
162
|
attr_reader :accepted_at
|
@@ -252,171 +167,22 @@ module Stripe
|
|
252
167
|
end
|
253
168
|
|
254
169
|
class SubscriptionData < Stripe::StripeObject
|
255
|
-
class BillOnAcceptance < Stripe::StripeObject
|
256
|
-
class BillFrom < Stripe::StripeObject
|
257
|
-
class LineStartsAt < Stripe::StripeObject
|
258
|
-
# Unique identifier for the object.
|
259
|
-
attr_reader :id
|
260
|
-
end
|
261
|
-
# The materialized time.
|
262
|
-
attr_reader :computed
|
263
|
-
# The timestamp the given line starts at.
|
264
|
-
attr_reader :line_starts_at
|
265
|
-
# A precise Unix timestamp.
|
266
|
-
attr_reader :timestamp
|
267
|
-
# The type of method to specify the `bill_from` time.
|
268
|
-
attr_reader :type
|
269
|
-
end
|
270
|
-
|
271
|
-
class BillUntil < Stripe::StripeObject
|
272
|
-
class Duration < Stripe::StripeObject
|
273
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
274
|
-
attr_reader :interval
|
275
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
276
|
-
attr_reader :interval_count
|
277
|
-
end
|
278
|
-
|
279
|
-
class LineEndsAt < Stripe::StripeObject
|
280
|
-
# Unique identifier for the object.
|
281
|
-
attr_reader :id
|
282
|
-
end
|
283
|
-
# The materialized time.
|
284
|
-
attr_reader :computed
|
285
|
-
# Time span for the quote line starting from the `starts_at` date.
|
286
|
-
attr_reader :duration
|
287
|
-
# The timestamp the given line ends at.
|
288
|
-
attr_reader :line_ends_at
|
289
|
-
# A precise Unix timestamp.
|
290
|
-
attr_reader :timestamp
|
291
|
-
# The type of method to specify the `bill_until` time.
|
292
|
-
attr_reader :type
|
293
|
-
end
|
294
|
-
# The start of the period to bill from when the Quote is accepted.
|
295
|
-
attr_reader :bill_from
|
296
|
-
# The end of the period to bill until when the Quote is accepted.
|
297
|
-
attr_reader :bill_until
|
298
|
-
end
|
299
|
-
|
300
170
|
class BillingMode < Stripe::StripeObject
|
301
171
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
302
172
|
attr_reader :type
|
303
173
|
end
|
304
|
-
|
305
|
-
class Prebilling < Stripe::StripeObject
|
306
|
-
# Attribute for field iterations
|
307
|
-
attr_reader :iterations
|
308
|
-
end
|
309
|
-
# Describes the period to bill for upon accepting the quote.
|
310
|
-
attr_reader :bill_on_acceptance
|
311
|
-
# 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.
|
312
|
-
attr_reader :billing_behavior
|
313
|
-
# Whether the subscription will always start a new billing period when the quote is accepted.
|
314
|
-
attr_reader :billing_cycle_anchor
|
315
174
|
# The billing mode of the quote.
|
316
175
|
attr_reader :billing_mode
|
317
176
|
# The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
318
177
|
attr_reader :description
|
319
178
|
# When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
|
320
179
|
attr_reader :effective_date
|
321
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
322
|
-
attr_reader :end_behavior
|
323
|
-
# The id of the subscription that will be updated when the quote is accepted.
|
324
|
-
attr_reader :from_subscription
|
325
180
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
|
326
181
|
attr_reader :metadata
|
327
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
328
|
-
attr_reader :prebilling
|
329
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
330
|
-
attr_reader :proration_behavior
|
331
182
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
332
183
|
attr_reader :trial_period_days
|
333
184
|
end
|
334
185
|
|
335
|
-
class SubscriptionDataOverride < Stripe::StripeObject
|
336
|
-
class AppliesTo < Stripe::StripeObject
|
337
|
-
# A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
338
|
-
attr_reader :new_reference
|
339
|
-
# The ID of the schedule the line applies to.
|
340
|
-
attr_reader :subscription_schedule
|
341
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
342
|
-
attr_reader :type
|
343
|
-
end
|
344
|
-
|
345
|
-
class BillOnAcceptance < Stripe::StripeObject
|
346
|
-
class BillFrom < Stripe::StripeObject
|
347
|
-
class LineStartsAt < Stripe::StripeObject
|
348
|
-
# Unique identifier for the object.
|
349
|
-
attr_reader :id
|
350
|
-
end
|
351
|
-
# The materialized time.
|
352
|
-
attr_reader :computed
|
353
|
-
# The timestamp the given line starts at.
|
354
|
-
attr_reader :line_starts_at
|
355
|
-
# A precise Unix timestamp.
|
356
|
-
attr_reader :timestamp
|
357
|
-
# The type of method to specify the `bill_from` time.
|
358
|
-
attr_reader :type
|
359
|
-
end
|
360
|
-
|
361
|
-
class BillUntil < Stripe::StripeObject
|
362
|
-
class Duration < Stripe::StripeObject
|
363
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
364
|
-
attr_reader :interval
|
365
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
366
|
-
attr_reader :interval_count
|
367
|
-
end
|
368
|
-
|
369
|
-
class LineEndsAt < Stripe::StripeObject
|
370
|
-
# Unique identifier for the object.
|
371
|
-
attr_reader :id
|
372
|
-
end
|
373
|
-
# The materialized time.
|
374
|
-
attr_reader :computed
|
375
|
-
# Time span for the quote line starting from the `starts_at` date.
|
376
|
-
attr_reader :duration
|
377
|
-
# The timestamp the given line ends at.
|
378
|
-
attr_reader :line_ends_at
|
379
|
-
# A precise Unix timestamp.
|
380
|
-
attr_reader :timestamp
|
381
|
-
# The type of method to specify the `bill_until` time.
|
382
|
-
attr_reader :type
|
383
|
-
end
|
384
|
-
# The start of the period to bill from when the Quote is accepted.
|
385
|
-
attr_reader :bill_from
|
386
|
-
# The end of the period to bill until when the Quote is accepted.
|
387
|
-
attr_reader :bill_until
|
388
|
-
end
|
389
|
-
# Attribute for field applies_to
|
390
|
-
attr_reader :applies_to
|
391
|
-
# Describes the period to bill for upon accepting the quote.
|
392
|
-
attr_reader :bill_on_acceptance
|
393
|
-
# 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.
|
394
|
-
attr_reader :billing_behavior
|
395
|
-
# The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
396
|
-
attr_reader :customer
|
397
|
-
# The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
398
|
-
attr_reader :description
|
399
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
400
|
-
attr_reader :end_behavior
|
401
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
402
|
-
attr_reader :proration_behavior
|
403
|
-
end
|
404
|
-
|
405
|
-
class SubscriptionSchedule < Stripe::StripeObject
|
406
|
-
class AppliesTo < Stripe::StripeObject
|
407
|
-
# A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
408
|
-
attr_reader :new_reference
|
409
|
-
# The ID of the schedule the line applies to.
|
410
|
-
attr_reader :subscription_schedule
|
411
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
412
|
-
attr_reader :type
|
413
|
-
end
|
414
|
-
# Attribute for field applies_to
|
415
|
-
attr_reader :applies_to
|
416
|
-
# The subscription schedule that was created or updated from this quote.
|
417
|
-
attr_reader :subscription_schedule
|
418
|
-
end
|
419
|
-
|
420
186
|
class TotalDetails < Stripe::StripeObject
|
421
187
|
class Breakdown < Stripe::StripeObject
|
422
188
|
class Discount < Stripe::StripeObject
|
@@ -468,14 +234,10 @@ module Stripe
|
|
468
234
|
class ListParams < Stripe::RequestParams
|
469
235
|
# The ID of the customer whose quotes will be retrieved.
|
470
236
|
attr_accessor :customer
|
471
|
-
# The ID of the account whose quotes will be retrieved.
|
472
|
-
attr_accessor :customer_account
|
473
237
|
# 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.
|
474
238
|
attr_accessor :ending_before
|
475
239
|
# Specifies which fields in the response should be expanded.
|
476
240
|
attr_accessor :expand
|
477
|
-
# The subscription which the quote updates.
|
478
|
-
attr_accessor :from_subscription
|
479
241
|
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
480
242
|
attr_accessor :limit
|
481
243
|
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
@@ -487,20 +249,16 @@ module Stripe
|
|
487
249
|
|
488
250
|
def initialize(
|
489
251
|
customer: nil,
|
490
|
-
customer_account: nil,
|
491
252
|
ending_before: nil,
|
492
253
|
expand: nil,
|
493
|
-
from_subscription: nil,
|
494
254
|
limit: nil,
|
495
255
|
starting_after: nil,
|
496
256
|
status: nil,
|
497
257
|
test_clock: nil
|
498
258
|
)
|
499
259
|
@customer = customer
|
500
|
-
@customer_account = customer_account
|
501
260
|
@ending_before = ending_before
|
502
261
|
@expand = expand
|
503
|
-
@from_subscription = from_subscription
|
504
262
|
@limit = limit
|
505
263
|
@starting_after = starting_after
|
506
264
|
@status = status
|
@@ -533,44 +291,16 @@ module Stripe
|
|
533
291
|
end
|
534
292
|
|
535
293
|
class Discount < Stripe::RequestParams
|
536
|
-
class DiscountEnd < Stripe::RequestParams
|
537
|
-
class Duration < Stripe::RequestParams
|
538
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
539
|
-
attr_accessor :interval
|
540
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
541
|
-
attr_accessor :interval_count
|
542
|
-
|
543
|
-
def initialize(interval: nil, interval_count: nil)
|
544
|
-
@interval = interval
|
545
|
-
@interval_count = interval_count
|
546
|
-
end
|
547
|
-
end
|
548
|
-
# Time span for the redeemed discount.
|
549
|
-
attr_accessor :duration
|
550
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
551
|
-
attr_accessor :timestamp
|
552
|
-
# The type of calculation made to determine when the discount ends.
|
553
|
-
attr_accessor :type
|
554
|
-
|
555
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
556
|
-
@duration = duration
|
557
|
-
@timestamp = timestamp
|
558
|
-
@type = type
|
559
|
-
end
|
560
|
-
end
|
561
294
|
# ID of the coupon to create a new discount for.
|
562
295
|
attr_accessor :coupon
|
563
296
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
564
297
|
attr_accessor :discount
|
565
|
-
# Details to determine how long the discount should be applied for.
|
566
|
-
attr_accessor :discount_end
|
567
298
|
# ID of the promotion code to create a new discount for.
|
568
299
|
attr_accessor :promotion_code
|
569
300
|
|
570
|
-
def initialize(coupon: nil, discount: nil,
|
301
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
571
302
|
@coupon = coupon
|
572
303
|
@discount = discount
|
573
|
-
@discount_end = discount_end
|
574
304
|
@promotion_code = promotion_code
|
575
305
|
end
|
576
306
|
end
|
@@ -610,522 +340,18 @@ module Stripe
|
|
610
340
|
end
|
611
341
|
end
|
612
342
|
|
613
|
-
class Line < Stripe::RequestParams
|
614
|
-
class Action < Stripe::RequestParams
|
615
|
-
class AddDiscount < Stripe::RequestParams
|
616
|
-
class DiscountEnd < Stripe::RequestParams
|
617
|
-
# The type of calculation made to determine when the discount ends.
|
618
|
-
attr_accessor :type
|
619
|
-
|
620
|
-
def initialize(type: nil)
|
621
|
-
@type = type
|
622
|
-
end
|
623
|
-
end
|
624
|
-
# The coupon code to redeem.
|
625
|
-
attr_accessor :coupon
|
626
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
627
|
-
attr_accessor :discount
|
628
|
-
# Details to determine how long the discount should be applied for.
|
629
|
-
attr_accessor :discount_end
|
630
|
-
# 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.
|
631
|
-
attr_accessor :index
|
632
|
-
# The promotion code to redeem.
|
633
|
-
attr_accessor :promotion_code
|
634
|
-
|
635
|
-
def initialize(
|
636
|
-
coupon: nil,
|
637
|
-
discount: nil,
|
638
|
-
discount_end: nil,
|
639
|
-
index: nil,
|
640
|
-
promotion_code: nil
|
641
|
-
)
|
642
|
-
@coupon = coupon
|
643
|
-
@discount = discount
|
644
|
-
@discount_end = discount_end
|
645
|
-
@index = index
|
646
|
-
@promotion_code = promotion_code
|
647
|
-
end
|
648
|
-
end
|
649
|
-
|
650
|
-
class AddItem < Stripe::RequestParams
|
651
|
-
class Discount < Stripe::RequestParams
|
652
|
-
class DiscountEnd < Stripe::RequestParams
|
653
|
-
class Duration < Stripe::RequestParams
|
654
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
655
|
-
attr_accessor :interval
|
656
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
657
|
-
attr_accessor :interval_count
|
658
|
-
|
659
|
-
def initialize(interval: nil, interval_count: nil)
|
660
|
-
@interval = interval
|
661
|
-
@interval_count = interval_count
|
662
|
-
end
|
663
|
-
end
|
664
|
-
# Time span for the redeemed discount.
|
665
|
-
attr_accessor :duration
|
666
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
667
|
-
attr_accessor :timestamp
|
668
|
-
# The type of calculation made to determine when the discount ends.
|
669
|
-
attr_accessor :type
|
670
|
-
|
671
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
672
|
-
@duration = duration
|
673
|
-
@timestamp = timestamp
|
674
|
-
@type = type
|
675
|
-
end
|
676
|
-
end
|
677
|
-
# ID of the coupon to create a new discount for.
|
678
|
-
attr_accessor :coupon
|
679
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
680
|
-
attr_accessor :discount
|
681
|
-
# Details to determine how long the discount should be applied for.
|
682
|
-
attr_accessor :discount_end
|
683
|
-
# ID of the promotion code to create a new discount for.
|
684
|
-
attr_accessor :promotion_code
|
685
|
-
|
686
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
687
|
-
@coupon = coupon
|
688
|
-
@discount = discount
|
689
|
-
@discount_end = discount_end
|
690
|
-
@promotion_code = promotion_code
|
691
|
-
end
|
692
|
-
end
|
693
|
-
|
694
|
-
class Trial < Stripe::RequestParams
|
695
|
-
# 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.
|
696
|
-
attr_accessor :converts_to
|
697
|
-
# Determines the type of trial for this item.
|
698
|
-
attr_accessor :type
|
699
|
-
|
700
|
-
def initialize(converts_to: nil, type: nil)
|
701
|
-
@converts_to = converts_to
|
702
|
-
@type = type
|
703
|
-
end
|
704
|
-
end
|
705
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
706
|
-
attr_accessor :discounts
|
707
|
-
# 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`.
|
708
|
-
attr_accessor :metadata
|
709
|
-
# The ID of the price object.
|
710
|
-
attr_accessor :price
|
711
|
-
# Quantity for this item.
|
712
|
-
attr_accessor :quantity
|
713
|
-
# 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`.
|
714
|
-
attr_accessor :tax_rates
|
715
|
-
# Options that configure the trial on the subscription item.
|
716
|
-
attr_accessor :trial
|
717
|
-
|
718
|
-
def initialize(
|
719
|
-
discounts: nil,
|
720
|
-
metadata: nil,
|
721
|
-
price: nil,
|
722
|
-
quantity: nil,
|
723
|
-
tax_rates: nil,
|
724
|
-
trial: nil
|
725
|
-
)
|
726
|
-
@discounts = discounts
|
727
|
-
@metadata = metadata
|
728
|
-
@price = price
|
729
|
-
@quantity = quantity
|
730
|
-
@tax_rates = tax_rates
|
731
|
-
@trial = trial
|
732
|
-
end
|
733
|
-
end
|
734
|
-
|
735
|
-
class RemoveDiscount < Stripe::RequestParams
|
736
|
-
# The coupon code to remove from the `discounts` array.
|
737
|
-
attr_accessor :coupon
|
738
|
-
# The ID of a discount to remove from the `discounts` array.
|
739
|
-
attr_accessor :discount
|
740
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
741
|
-
attr_accessor :promotion_code
|
742
|
-
|
743
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
744
|
-
@coupon = coupon
|
745
|
-
@discount = discount
|
746
|
-
@promotion_code = promotion_code
|
747
|
-
end
|
748
|
-
end
|
749
|
-
|
750
|
-
class RemoveItem < Stripe::RequestParams
|
751
|
-
# ID of a price to remove.
|
752
|
-
attr_accessor :price
|
753
|
-
|
754
|
-
def initialize(price: nil)
|
755
|
-
@price = price
|
756
|
-
end
|
757
|
-
end
|
758
|
-
|
759
|
-
class SetDiscount < Stripe::RequestParams
|
760
|
-
# The coupon code to replace the `discounts` array with.
|
761
|
-
attr_accessor :coupon
|
762
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
763
|
-
attr_accessor :discount
|
764
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
765
|
-
attr_accessor :promotion_code
|
766
|
-
|
767
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
768
|
-
@coupon = coupon
|
769
|
-
@discount = discount
|
770
|
-
@promotion_code = promotion_code
|
771
|
-
end
|
772
|
-
end
|
773
|
-
|
774
|
-
class SetItem < Stripe::RequestParams
|
775
|
-
class Discount < Stripe::RequestParams
|
776
|
-
class DiscountEnd < Stripe::RequestParams
|
777
|
-
class Duration < Stripe::RequestParams
|
778
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
779
|
-
attr_accessor :interval
|
780
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
781
|
-
attr_accessor :interval_count
|
782
|
-
|
783
|
-
def initialize(interval: nil, interval_count: nil)
|
784
|
-
@interval = interval
|
785
|
-
@interval_count = interval_count
|
786
|
-
end
|
787
|
-
end
|
788
|
-
# Time span for the redeemed discount.
|
789
|
-
attr_accessor :duration
|
790
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
791
|
-
attr_accessor :timestamp
|
792
|
-
# The type of calculation made to determine when the discount ends.
|
793
|
-
attr_accessor :type
|
794
|
-
|
795
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
796
|
-
@duration = duration
|
797
|
-
@timestamp = timestamp
|
798
|
-
@type = type
|
799
|
-
end
|
800
|
-
end
|
801
|
-
# ID of the coupon to create a new discount for.
|
802
|
-
attr_accessor :coupon
|
803
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
804
|
-
attr_accessor :discount
|
805
|
-
# Details to determine how long the discount should be applied for.
|
806
|
-
attr_accessor :discount_end
|
807
|
-
# ID of the promotion code to create a new discount for.
|
808
|
-
attr_accessor :promotion_code
|
809
|
-
|
810
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
811
|
-
@coupon = coupon
|
812
|
-
@discount = discount
|
813
|
-
@discount_end = discount_end
|
814
|
-
@promotion_code = promotion_code
|
815
|
-
end
|
816
|
-
end
|
817
|
-
|
818
|
-
class Trial < Stripe::RequestParams
|
819
|
-
# 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.
|
820
|
-
attr_accessor :converts_to
|
821
|
-
# Determines the type of trial for this item.
|
822
|
-
attr_accessor :type
|
823
|
-
|
824
|
-
def initialize(converts_to: nil, type: nil)
|
825
|
-
@converts_to = converts_to
|
826
|
-
@type = type
|
827
|
-
end
|
828
|
-
end
|
829
|
-
# 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`.
|
830
|
-
attr_accessor :discounts
|
831
|
-
# 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`.
|
832
|
-
attr_accessor :metadata
|
833
|
-
# The ID of the price object.
|
834
|
-
attr_accessor :price
|
835
|
-
# 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`.
|
836
|
-
attr_accessor :quantity
|
837
|
-
# 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`.
|
838
|
-
attr_accessor :tax_rates
|
839
|
-
# 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`.
|
840
|
-
attr_accessor :trial
|
841
|
-
|
842
|
-
def initialize(
|
843
|
-
discounts: nil,
|
844
|
-
metadata: nil,
|
845
|
-
price: nil,
|
846
|
-
quantity: nil,
|
847
|
-
tax_rates: nil,
|
848
|
-
trial: nil
|
849
|
-
)
|
850
|
-
@discounts = discounts
|
851
|
-
@metadata = metadata
|
852
|
-
@price = price
|
853
|
-
@quantity = quantity
|
854
|
-
@tax_rates = tax_rates
|
855
|
-
@trial = trial
|
856
|
-
end
|
857
|
-
end
|
858
|
-
# Details for the `add_discount` type.
|
859
|
-
attr_accessor :add_discount
|
860
|
-
# Details for the `add_item` type.
|
861
|
-
attr_accessor :add_item
|
862
|
-
# Details for the `add_metadata` type: specify a hash of key-value pairs.
|
863
|
-
attr_accessor :add_metadata
|
864
|
-
# Details for the `remove_discount` type.
|
865
|
-
attr_accessor :remove_discount
|
866
|
-
# Details for the `remove_item` type.
|
867
|
-
attr_accessor :remove_item
|
868
|
-
# Details for the `remove_metadata` type: specify an array of metadata keys.
|
869
|
-
attr_accessor :remove_metadata
|
870
|
-
# Details for the `set_discounts` type.
|
871
|
-
attr_accessor :set_discounts
|
872
|
-
# Details for the `set_items` type.
|
873
|
-
attr_accessor :set_items
|
874
|
-
# Details for the `set_metadata` type: specify an array of key-value pairs.
|
875
|
-
attr_accessor :set_metadata
|
876
|
-
# The type of action the quote line performs.
|
877
|
-
attr_accessor :type
|
878
|
-
|
879
|
-
def initialize(
|
880
|
-
add_discount: nil,
|
881
|
-
add_item: nil,
|
882
|
-
add_metadata: nil,
|
883
|
-
remove_discount: nil,
|
884
|
-
remove_item: nil,
|
885
|
-
remove_metadata: nil,
|
886
|
-
set_discounts: nil,
|
887
|
-
set_items: nil,
|
888
|
-
set_metadata: nil,
|
889
|
-
type: nil
|
890
|
-
)
|
891
|
-
@add_discount = add_discount
|
892
|
-
@add_item = add_item
|
893
|
-
@add_metadata = add_metadata
|
894
|
-
@remove_discount = remove_discount
|
895
|
-
@remove_item = remove_item
|
896
|
-
@remove_metadata = remove_metadata
|
897
|
-
@set_discounts = set_discounts
|
898
|
-
@set_items = set_items
|
899
|
-
@set_metadata = set_metadata
|
900
|
-
@type = type
|
901
|
-
end
|
902
|
-
end
|
903
|
-
|
904
|
-
class AppliesTo < Stripe::RequestParams
|
905
|
-
# A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
906
|
-
attr_accessor :new_reference
|
907
|
-
# The ID of the schedule the line applies to.
|
908
|
-
attr_accessor :subscription_schedule
|
909
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
910
|
-
attr_accessor :type
|
911
|
-
|
912
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
913
|
-
@new_reference = new_reference
|
914
|
-
@subscription_schedule = subscription_schedule
|
915
|
-
@type = type
|
916
|
-
end
|
917
|
-
end
|
918
|
-
|
919
|
-
class CancelSubscriptionSchedule < Stripe::RequestParams
|
920
|
-
# Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
921
|
-
attr_accessor :cancel_at
|
922
|
-
# If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
|
923
|
-
attr_accessor :invoice_now
|
924
|
-
# If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
925
|
-
attr_accessor :prorate
|
926
|
-
|
927
|
-
def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
|
928
|
-
@cancel_at = cancel_at
|
929
|
-
@invoice_now = invoice_now
|
930
|
-
@prorate = prorate
|
931
|
-
end
|
932
|
-
end
|
933
|
-
|
934
|
-
class EndsAt < Stripe::RequestParams
|
935
|
-
class DiscountEnd < Stripe::RequestParams
|
936
|
-
# The ID of a specific discount.
|
937
|
-
attr_accessor :discount
|
938
|
-
|
939
|
-
def initialize(discount: nil)
|
940
|
-
@discount = discount
|
941
|
-
end
|
942
|
-
end
|
943
|
-
|
944
|
-
class Duration < Stripe::RequestParams
|
945
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
946
|
-
attr_accessor :interval
|
947
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
948
|
-
attr_accessor :interval_count
|
949
|
-
|
950
|
-
def initialize(interval: nil, interval_count: nil)
|
951
|
-
@interval = interval
|
952
|
-
@interval_count = interval_count
|
953
|
-
end
|
954
|
-
end
|
955
|
-
# Use the `end` time of a given discount.
|
956
|
-
attr_accessor :discount_end
|
957
|
-
# Time span for the quote line starting from the `starts_at` date.
|
958
|
-
attr_accessor :duration
|
959
|
-
# A precise Unix timestamp.
|
960
|
-
attr_accessor :timestamp
|
961
|
-
# Select a way to pass in `ends_at`.
|
962
|
-
attr_accessor :type
|
963
|
-
|
964
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
965
|
-
@discount_end = discount_end
|
966
|
-
@duration = duration
|
967
|
-
@timestamp = timestamp
|
968
|
-
@type = type
|
969
|
-
end
|
970
|
-
end
|
971
|
-
|
972
|
-
class SetPauseCollection < Stripe::RequestParams
|
973
|
-
class Set < Stripe::RequestParams
|
974
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
975
|
-
attr_accessor :behavior
|
976
|
-
|
977
|
-
def initialize(behavior: nil)
|
978
|
-
@behavior = behavior
|
979
|
-
end
|
980
|
-
end
|
981
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
982
|
-
attr_accessor :set
|
983
|
-
# Determines the type of the pause_collection amendment.
|
984
|
-
attr_accessor :type
|
985
|
-
|
986
|
-
def initialize(set: nil, type: nil)
|
987
|
-
@set = set
|
988
|
-
@type = type
|
989
|
-
end
|
990
|
-
end
|
991
|
-
|
992
|
-
class StartsAt < Stripe::RequestParams
|
993
|
-
class DiscountEnd < Stripe::RequestParams
|
994
|
-
# The ID of a specific discount.
|
995
|
-
attr_accessor :discount
|
996
|
-
|
997
|
-
def initialize(discount: nil)
|
998
|
-
@discount = discount
|
999
|
-
end
|
1000
|
-
end
|
1001
|
-
|
1002
|
-
class LineEndsAt < Stripe::RequestParams
|
1003
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
1004
|
-
attr_accessor :index
|
1005
|
-
|
1006
|
-
def initialize(index: nil)
|
1007
|
-
@index = index
|
1008
|
-
end
|
1009
|
-
end
|
1010
|
-
# Use the `end` time of a given discount.
|
1011
|
-
attr_accessor :discount_end
|
1012
|
-
# The timestamp the given line ends at.
|
1013
|
-
attr_accessor :line_ends_at
|
1014
|
-
# A precise Unix timestamp.
|
1015
|
-
attr_accessor :timestamp
|
1016
|
-
# Select a way to pass in `starts_at`.
|
1017
|
-
attr_accessor :type
|
1018
|
-
|
1019
|
-
def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
1020
|
-
@discount_end = discount_end
|
1021
|
-
@line_ends_at = line_ends_at
|
1022
|
-
@timestamp = timestamp
|
1023
|
-
@type = type
|
1024
|
-
end
|
1025
|
-
end
|
1026
|
-
|
1027
|
-
class TrialSettings < Stripe::RequestParams
|
1028
|
-
class EndBehavior < Stripe::RequestParams
|
1029
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1030
|
-
attr_accessor :prorate_up_front
|
1031
|
-
|
1032
|
-
def initialize(prorate_up_front: nil)
|
1033
|
-
@prorate_up_front = prorate_up_front
|
1034
|
-
end
|
1035
|
-
end
|
1036
|
-
# Defines how the subscription should behave when a trial ends.
|
1037
|
-
attr_accessor :end_behavior
|
1038
|
-
|
1039
|
-
def initialize(end_behavior: nil)
|
1040
|
-
@end_behavior = end_behavior
|
1041
|
-
end
|
1042
|
-
end
|
1043
|
-
# An array of operations the quote line performs.
|
1044
|
-
attr_accessor :actions
|
1045
|
-
# Details to identify the subscription schedule the quote line applies to.
|
1046
|
-
attr_accessor :applies_to
|
1047
|
-
# For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
|
1048
|
-
attr_accessor :billing_cycle_anchor
|
1049
|
-
# A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
|
1050
|
-
attr_accessor :cancel_subscription_schedule
|
1051
|
-
# Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
|
1052
|
-
attr_accessor :ends_at
|
1053
|
-
# Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
|
1054
|
-
attr_accessor :proration_behavior
|
1055
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
1056
|
-
attr_accessor :set_pause_collection
|
1057
|
-
# Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
1058
|
-
attr_accessor :set_schedule_end
|
1059
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
1060
|
-
attr_accessor :starts_at
|
1061
|
-
# Settings related to subscription trials.
|
1062
|
-
attr_accessor :trial_settings
|
1063
|
-
|
1064
|
-
def initialize(
|
1065
|
-
actions: nil,
|
1066
|
-
applies_to: nil,
|
1067
|
-
billing_cycle_anchor: nil,
|
1068
|
-
cancel_subscription_schedule: nil,
|
1069
|
-
ends_at: nil,
|
1070
|
-
proration_behavior: nil,
|
1071
|
-
set_pause_collection: nil,
|
1072
|
-
set_schedule_end: nil,
|
1073
|
-
starts_at: nil,
|
1074
|
-
trial_settings: nil
|
1075
|
-
)
|
1076
|
-
@actions = actions
|
1077
|
-
@applies_to = applies_to
|
1078
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
1079
|
-
@cancel_subscription_schedule = cancel_subscription_schedule
|
1080
|
-
@ends_at = ends_at
|
1081
|
-
@proration_behavior = proration_behavior
|
1082
|
-
@set_pause_collection = set_pause_collection
|
1083
|
-
@set_schedule_end = set_schedule_end
|
1084
|
-
@starts_at = starts_at
|
1085
|
-
@trial_settings = trial_settings
|
1086
|
-
end
|
1087
|
-
end
|
1088
|
-
|
1089
343
|
class LineItem < Stripe::RequestParams
|
1090
344
|
class Discount < Stripe::RequestParams
|
1091
|
-
class DiscountEnd < Stripe::RequestParams
|
1092
|
-
class Duration < Stripe::RequestParams
|
1093
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1094
|
-
attr_accessor :interval
|
1095
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1096
|
-
attr_accessor :interval_count
|
1097
|
-
|
1098
|
-
def initialize(interval: nil, interval_count: nil)
|
1099
|
-
@interval = interval
|
1100
|
-
@interval_count = interval_count
|
1101
|
-
end
|
1102
|
-
end
|
1103
|
-
# Time span for the redeemed discount.
|
1104
|
-
attr_accessor :duration
|
1105
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1106
|
-
attr_accessor :timestamp
|
1107
|
-
# The type of calculation made to determine when the discount ends.
|
1108
|
-
attr_accessor :type
|
1109
|
-
|
1110
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1111
|
-
@duration = duration
|
1112
|
-
@timestamp = timestamp
|
1113
|
-
@type = type
|
1114
|
-
end
|
1115
|
-
end
|
1116
345
|
# ID of the coupon to create a new discount for.
|
1117
346
|
attr_accessor :coupon
|
1118
347
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1119
348
|
attr_accessor :discount
|
1120
|
-
# Details to determine how long the discount should be applied for.
|
1121
|
-
attr_accessor :discount_end
|
1122
349
|
# ID of the promotion code to create a new discount for.
|
1123
350
|
attr_accessor :promotion_code
|
1124
351
|
|
1125
|
-
def initialize(coupon: nil, discount: nil,
|
352
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1126
353
|
@coupon = coupon
|
1127
354
|
@discount = discount
|
1128
|
-
@discount_end = discount_end
|
1129
355
|
@promotion_code = promotion_code
|
1130
356
|
end
|
1131
357
|
end
|
@@ -1192,294 +418,40 @@ module Stripe
|
|
1192
418
|
end
|
1193
419
|
|
1194
420
|
class SubscriptionData < Stripe::RequestParams
|
1195
|
-
class BillOnAcceptance < Stripe::RequestParams
|
1196
|
-
class BillFrom < Stripe::RequestParams
|
1197
|
-
class LineStartsAt < Stripe::RequestParams
|
1198
|
-
# The ID of a quote line.
|
1199
|
-
attr_accessor :id
|
1200
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
1201
|
-
attr_accessor :index
|
1202
|
-
|
1203
|
-
def initialize(id: nil, index: nil)
|
1204
|
-
@id = id
|
1205
|
-
@index = index
|
1206
|
-
end
|
1207
|
-
end
|
1208
|
-
# Details of a Quote line to start the bill period from.
|
1209
|
-
attr_accessor :line_starts_at
|
1210
|
-
# A precise Unix timestamp.
|
1211
|
-
attr_accessor :timestamp
|
1212
|
-
# The type of method to specify the `bill_from` time.
|
1213
|
-
attr_accessor :type
|
1214
|
-
|
1215
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
1216
|
-
@line_starts_at = line_starts_at
|
1217
|
-
@timestamp = timestamp
|
1218
|
-
@type = type
|
1219
|
-
end
|
1220
|
-
end
|
1221
|
-
|
1222
|
-
class BillUntil < Stripe::RequestParams
|
1223
|
-
class Duration < Stripe::RequestParams
|
1224
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1225
|
-
attr_accessor :interval
|
1226
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1227
|
-
attr_accessor :interval_count
|
1228
|
-
|
1229
|
-
def initialize(interval: nil, interval_count: nil)
|
1230
|
-
@interval = interval
|
1231
|
-
@interval_count = interval_count
|
1232
|
-
end
|
1233
|
-
end
|
1234
|
-
|
1235
|
-
class LineEndsAt < Stripe::RequestParams
|
1236
|
-
# The ID of a quote line.
|
1237
|
-
attr_accessor :id
|
1238
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
1239
|
-
attr_accessor :index
|
1240
|
-
|
1241
|
-
def initialize(id: nil, index: nil)
|
1242
|
-
@id = id
|
1243
|
-
@index = index
|
1244
|
-
end
|
1245
|
-
end
|
1246
|
-
# Details of the duration over which to bill.
|
1247
|
-
attr_accessor :duration
|
1248
|
-
# Details of a Quote line item from which to bill until.
|
1249
|
-
attr_accessor :line_ends_at
|
1250
|
-
# A precise Unix timestamp.
|
1251
|
-
attr_accessor :timestamp
|
1252
|
-
# The type of method to specify the `bill_until` time.
|
1253
|
-
attr_accessor :type
|
1254
|
-
|
1255
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
1256
|
-
@duration = duration
|
1257
|
-
@line_ends_at = line_ends_at
|
1258
|
-
@timestamp = timestamp
|
1259
|
-
@type = type
|
1260
|
-
end
|
1261
|
-
end
|
1262
|
-
# The start of the period to bill from when the Quote is accepted.
|
1263
|
-
attr_accessor :bill_from
|
1264
|
-
# The end of the period to bill until when the Quote is accepted.
|
1265
|
-
attr_accessor :bill_until
|
1266
|
-
|
1267
|
-
def initialize(bill_from: nil, bill_until: nil)
|
1268
|
-
@bill_from = bill_from
|
1269
|
-
@bill_until = bill_until
|
1270
|
-
end
|
1271
|
-
end
|
1272
|
-
|
1273
421
|
class BillingMode < Stripe::RequestParams
|
1274
|
-
#
|
422
|
+
# Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
1275
423
|
attr_accessor :type
|
1276
424
|
|
1277
425
|
def initialize(type: nil)
|
1278
426
|
@type = type
|
1279
427
|
end
|
1280
428
|
end
|
1281
|
-
|
1282
|
-
class Prebilling < Stripe::RequestParams
|
1283
|
-
# This is used to determine the number of billing cycles to prebill.
|
1284
|
-
attr_accessor :iterations
|
1285
|
-
|
1286
|
-
def initialize(iterations: nil)
|
1287
|
-
@iterations = iterations
|
1288
|
-
end
|
1289
|
-
end
|
1290
|
-
# Describes the period to bill for upon accepting the quote.
|
1291
|
-
attr_accessor :bill_on_acceptance
|
1292
|
-
# 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.
|
1293
|
-
attr_accessor :billing_behavior
|
1294
|
-
# When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
1295
|
-
attr_accessor :billing_cycle_anchor
|
1296
429
|
# Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
1297
430
|
attr_accessor :billing_mode
|
1298
431
|
# The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
1299
432
|
attr_accessor :description
|
1300
|
-
# When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted.
|
433
|
+
# When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
1301
434
|
attr_accessor :effective_date
|
1302
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
1303
|
-
attr_accessor :end_behavior
|
1304
|
-
# The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden.
|
1305
|
-
attr_accessor :from_subscription
|
1306
435
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
|
1307
436
|
attr_accessor :metadata
|
1308
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
1309
|
-
attr_accessor :prebilling
|
1310
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
1311
|
-
#
|
1312
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
1313
|
-
#
|
1314
|
-
# Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
1315
|
-
#
|
1316
|
-
# Prorations can be disabled by passing `none`.
|
1317
|
-
attr_accessor :proration_behavior
|
1318
437
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
1319
438
|
attr_accessor :trial_period_days
|
1320
439
|
|
1321
440
|
def initialize(
|
1322
|
-
bill_on_acceptance: nil,
|
1323
|
-
billing_behavior: nil,
|
1324
|
-
billing_cycle_anchor: nil,
|
1325
441
|
billing_mode: nil,
|
1326
442
|
description: nil,
|
1327
443
|
effective_date: nil,
|
1328
|
-
end_behavior: nil,
|
1329
|
-
from_subscription: nil,
|
1330
444
|
metadata: nil,
|
1331
|
-
prebilling: nil,
|
1332
|
-
proration_behavior: nil,
|
1333
445
|
trial_period_days: nil
|
1334
446
|
)
|
1335
|
-
@bill_on_acceptance = bill_on_acceptance
|
1336
|
-
@billing_behavior = billing_behavior
|
1337
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
1338
447
|
@billing_mode = billing_mode
|
1339
448
|
@description = description
|
1340
449
|
@effective_date = effective_date
|
1341
|
-
@end_behavior = end_behavior
|
1342
|
-
@from_subscription = from_subscription
|
1343
450
|
@metadata = metadata
|
1344
|
-
@prebilling = prebilling
|
1345
|
-
@proration_behavior = proration_behavior
|
1346
451
|
@trial_period_days = trial_period_days
|
1347
452
|
end
|
1348
453
|
end
|
1349
454
|
|
1350
|
-
class SubscriptionDataOverride < Stripe::RequestParams
|
1351
|
-
class AppliesTo < Stripe::RequestParams
|
1352
|
-
# A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
1353
|
-
attr_accessor :new_reference
|
1354
|
-
# The ID of the schedule the line applies to.
|
1355
|
-
attr_accessor :subscription_schedule
|
1356
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
1357
|
-
attr_accessor :type
|
1358
|
-
|
1359
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
1360
|
-
@new_reference = new_reference
|
1361
|
-
@subscription_schedule = subscription_schedule
|
1362
|
-
@type = type
|
1363
|
-
end
|
1364
|
-
end
|
1365
|
-
|
1366
|
-
class BillOnAcceptance < Stripe::RequestParams
|
1367
|
-
class BillFrom < Stripe::RequestParams
|
1368
|
-
class LineStartsAt < Stripe::RequestParams
|
1369
|
-
# The ID of a quote line.
|
1370
|
-
attr_accessor :id
|
1371
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
1372
|
-
attr_accessor :index
|
1373
|
-
|
1374
|
-
def initialize(id: nil, index: nil)
|
1375
|
-
@id = id
|
1376
|
-
@index = index
|
1377
|
-
end
|
1378
|
-
end
|
1379
|
-
# Details of a Quote line to start the bill period from.
|
1380
|
-
attr_accessor :line_starts_at
|
1381
|
-
# A precise Unix timestamp.
|
1382
|
-
attr_accessor :timestamp
|
1383
|
-
# The type of method to specify the `bill_from` time.
|
1384
|
-
attr_accessor :type
|
1385
|
-
|
1386
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
1387
|
-
@line_starts_at = line_starts_at
|
1388
|
-
@timestamp = timestamp
|
1389
|
-
@type = type
|
1390
|
-
end
|
1391
|
-
end
|
1392
|
-
|
1393
|
-
class BillUntil < Stripe::RequestParams
|
1394
|
-
class Duration < Stripe::RequestParams
|
1395
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1396
|
-
attr_accessor :interval
|
1397
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1398
|
-
attr_accessor :interval_count
|
1399
|
-
|
1400
|
-
def initialize(interval: nil, interval_count: nil)
|
1401
|
-
@interval = interval
|
1402
|
-
@interval_count = interval_count
|
1403
|
-
end
|
1404
|
-
end
|
1405
|
-
|
1406
|
-
class LineEndsAt < Stripe::RequestParams
|
1407
|
-
# The ID of a quote line.
|
1408
|
-
attr_accessor :id
|
1409
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
1410
|
-
attr_accessor :index
|
1411
|
-
|
1412
|
-
def initialize(id: nil, index: nil)
|
1413
|
-
@id = id
|
1414
|
-
@index = index
|
1415
|
-
end
|
1416
|
-
end
|
1417
|
-
# Details of the duration over which to bill.
|
1418
|
-
attr_accessor :duration
|
1419
|
-
# Details of a Quote line item from which to bill until.
|
1420
|
-
attr_accessor :line_ends_at
|
1421
|
-
# A precise Unix timestamp.
|
1422
|
-
attr_accessor :timestamp
|
1423
|
-
# The type of method to specify the `bill_until` time.
|
1424
|
-
attr_accessor :type
|
1425
|
-
|
1426
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
1427
|
-
@duration = duration
|
1428
|
-
@line_ends_at = line_ends_at
|
1429
|
-
@timestamp = timestamp
|
1430
|
-
@type = type
|
1431
|
-
end
|
1432
|
-
end
|
1433
|
-
# The start of the period to bill from when the Quote is accepted.
|
1434
|
-
attr_accessor :bill_from
|
1435
|
-
# The end of the period to bill until when the Quote is accepted.
|
1436
|
-
attr_accessor :bill_until
|
1437
|
-
|
1438
|
-
def initialize(bill_from: nil, bill_until: nil)
|
1439
|
-
@bill_from = bill_from
|
1440
|
-
@bill_until = bill_until
|
1441
|
-
end
|
1442
|
-
end
|
1443
|
-
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
1444
|
-
attr_accessor :applies_to
|
1445
|
-
# Describes the period to bill for upon accepting the quote.
|
1446
|
-
attr_accessor :bill_on_acceptance
|
1447
|
-
# 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.
|
1448
|
-
attr_accessor :billing_behavior
|
1449
|
-
# The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
|
1450
|
-
attr_accessor :customer
|
1451
|
-
# The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
1452
|
-
attr_accessor :description
|
1453
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
1454
|
-
attr_accessor :end_behavior
|
1455
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
1456
|
-
#
|
1457
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
1458
|
-
#
|
1459
|
-
# Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
1460
|
-
#
|
1461
|
-
# Prorations can be disabled by passing `none`.
|
1462
|
-
attr_accessor :proration_behavior
|
1463
|
-
|
1464
|
-
def initialize(
|
1465
|
-
applies_to: nil,
|
1466
|
-
bill_on_acceptance: nil,
|
1467
|
-
billing_behavior: nil,
|
1468
|
-
customer: nil,
|
1469
|
-
description: nil,
|
1470
|
-
end_behavior: nil,
|
1471
|
-
proration_behavior: nil
|
1472
|
-
)
|
1473
|
-
@applies_to = applies_to
|
1474
|
-
@bill_on_acceptance = bill_on_acceptance
|
1475
|
-
@billing_behavior = billing_behavior
|
1476
|
-
@customer = customer
|
1477
|
-
@description = description
|
1478
|
-
@end_behavior = end_behavior
|
1479
|
-
@proration_behavior = proration_behavior
|
1480
|
-
end
|
1481
|
-
end
|
1482
|
-
|
1483
455
|
class TransferData < Stripe::RequestParams
|
1484
456
|
# The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
|
1485
457
|
attr_accessor :amount
|
@@ -1494,8 +466,6 @@ module Stripe
|
|
1494
466
|
@destination = destination
|
1495
467
|
end
|
1496
468
|
end
|
1497
|
-
# Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
1498
|
-
attr_accessor :allow_backdated_lines
|
1499
469
|
# The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
|
1500
470
|
attr_accessor :application_fee_amount
|
1501
471
|
# 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. There must be at least 1 line item with a recurring price to use this field.
|
@@ -1506,8 +476,6 @@ module Stripe
|
|
1506
476
|
attr_accessor :collection_method
|
1507
477
|
# The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
1508
478
|
attr_accessor :customer
|
1509
|
-
# The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
|
1510
|
-
attr_accessor :customer_account
|
1511
479
|
# The tax rates that will apply to any line item that does not have `tax_rates` set.
|
1512
480
|
attr_accessor :default_tax_rates
|
1513
481
|
# A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
|
@@ -1528,29 +496,23 @@ module Stripe
|
|
1528
496
|
attr_accessor :invoice_settings
|
1529
497
|
# A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
|
1530
498
|
attr_accessor :line_items
|
1531
|
-
# A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
1532
|
-
attr_accessor :lines
|
1533
499
|
# 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`.
|
1534
500
|
attr_accessor :metadata
|
1535
501
|
# The account on behalf of which to charge.
|
1536
502
|
attr_accessor :on_behalf_of
|
1537
503
|
# When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
|
1538
504
|
attr_accessor :subscription_data
|
1539
|
-
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
1540
|
-
attr_accessor :subscription_data_overrides
|
1541
505
|
# ID of the test clock to attach to the quote.
|
1542
506
|
attr_accessor :test_clock
|
1543
507
|
# The data with which to automatically create a Transfer for each of the invoices.
|
1544
508
|
attr_accessor :transfer_data
|
1545
509
|
|
1546
510
|
def initialize(
|
1547
|
-
allow_backdated_lines: nil,
|
1548
511
|
application_fee_amount: nil,
|
1549
512
|
application_fee_percent: nil,
|
1550
513
|
automatic_tax: nil,
|
1551
514
|
collection_method: nil,
|
1552
515
|
customer: nil,
|
1553
|
-
customer_account: nil,
|
1554
516
|
default_tax_rates: nil,
|
1555
517
|
description: nil,
|
1556
518
|
discounts: nil,
|
@@ -1561,21 +523,17 @@ module Stripe
|
|
1561
523
|
header: nil,
|
1562
524
|
invoice_settings: nil,
|
1563
525
|
line_items: nil,
|
1564
|
-
lines: nil,
|
1565
526
|
metadata: nil,
|
1566
527
|
on_behalf_of: nil,
|
1567
528
|
subscription_data: nil,
|
1568
|
-
subscription_data_overrides: nil,
|
1569
529
|
test_clock: nil,
|
1570
530
|
transfer_data: nil
|
1571
531
|
)
|
1572
|
-
@allow_backdated_lines = allow_backdated_lines
|
1573
532
|
@application_fee_amount = application_fee_amount
|
1574
533
|
@application_fee_percent = application_fee_percent
|
1575
534
|
@automatic_tax = automatic_tax
|
1576
535
|
@collection_method = collection_method
|
1577
536
|
@customer = customer
|
1578
|
-
@customer_account = customer_account
|
1579
537
|
@default_tax_rates = default_tax_rates
|
1580
538
|
@description = description
|
1581
539
|
@discounts = discounts
|
@@ -1586,11 +544,9 @@ module Stripe
|
|
1586
544
|
@header = header
|
1587
545
|
@invoice_settings = invoice_settings
|
1588
546
|
@line_items = line_items
|
1589
|
-
@lines = lines
|
1590
547
|
@metadata = metadata
|
1591
548
|
@on_behalf_of = on_behalf_of
|
1592
549
|
@subscription_data = subscription_data
|
1593
|
-
@subscription_data_overrides = subscription_data_overrides
|
1594
550
|
@test_clock = test_clock
|
1595
551
|
@transfer_data = transfer_data
|
1596
552
|
end
|
@@ -1621,44 +577,16 @@ module Stripe
|
|
1621
577
|
end
|
1622
578
|
|
1623
579
|
class Discount < Stripe::RequestParams
|
1624
|
-
class DiscountEnd < Stripe::RequestParams
|
1625
|
-
class Duration < Stripe::RequestParams
|
1626
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1627
|
-
attr_accessor :interval
|
1628
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1629
|
-
attr_accessor :interval_count
|
1630
|
-
|
1631
|
-
def initialize(interval: nil, interval_count: nil)
|
1632
|
-
@interval = interval
|
1633
|
-
@interval_count = interval_count
|
1634
|
-
end
|
1635
|
-
end
|
1636
|
-
# Time span for the redeemed discount.
|
1637
|
-
attr_accessor :duration
|
1638
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1639
|
-
attr_accessor :timestamp
|
1640
|
-
# The type of calculation made to determine when the discount ends.
|
1641
|
-
attr_accessor :type
|
1642
|
-
|
1643
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1644
|
-
@duration = duration
|
1645
|
-
@timestamp = timestamp
|
1646
|
-
@type = type
|
1647
|
-
end
|
1648
|
-
end
|
1649
580
|
# ID of the coupon to create a new discount for.
|
1650
581
|
attr_accessor :coupon
|
1651
582
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1652
583
|
attr_accessor :discount
|
1653
|
-
# Details to determine how long the discount should be applied for.
|
1654
|
-
attr_accessor :discount_end
|
1655
584
|
# ID of the promotion code to create a new discount for.
|
1656
585
|
attr_accessor :promotion_code
|
1657
586
|
|
1658
|
-
def initialize(coupon: nil, discount: nil,
|
587
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1659
588
|
@coupon = coupon
|
1660
589
|
@discount = discount
|
1661
|
-
@discount_end = discount_end
|
1662
590
|
@promotion_code = promotion_code
|
1663
591
|
end
|
1664
592
|
end
|
@@ -1686,529 +614,18 @@ module Stripe
|
|
1686
614
|
end
|
1687
615
|
end
|
1688
616
|
|
1689
|
-
class Line < Stripe::RequestParams
|
1690
|
-
class Action < Stripe::RequestParams
|
1691
|
-
class AddDiscount < Stripe::RequestParams
|
1692
|
-
class DiscountEnd < Stripe::RequestParams
|
1693
|
-
# The type of calculation made to determine when the discount ends.
|
1694
|
-
attr_accessor :type
|
1695
|
-
|
1696
|
-
def initialize(type: nil)
|
1697
|
-
@type = type
|
1698
|
-
end
|
1699
|
-
end
|
1700
|
-
# The coupon code to redeem.
|
1701
|
-
attr_accessor :coupon
|
1702
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
1703
|
-
attr_accessor :discount
|
1704
|
-
# Details to determine how long the discount should be applied for.
|
1705
|
-
attr_accessor :discount_end
|
1706
|
-
# 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.
|
1707
|
-
attr_accessor :index
|
1708
|
-
# The promotion code to redeem.
|
1709
|
-
attr_accessor :promotion_code
|
1710
|
-
|
1711
|
-
def initialize(
|
1712
|
-
coupon: nil,
|
1713
|
-
discount: nil,
|
1714
|
-
discount_end: nil,
|
1715
|
-
index: nil,
|
1716
|
-
promotion_code: nil
|
1717
|
-
)
|
1718
|
-
@coupon = coupon
|
1719
|
-
@discount = discount
|
1720
|
-
@discount_end = discount_end
|
1721
|
-
@index = index
|
1722
|
-
@promotion_code = promotion_code
|
1723
|
-
end
|
1724
|
-
end
|
1725
|
-
|
1726
|
-
class AddItem < Stripe::RequestParams
|
1727
|
-
class Discount < Stripe::RequestParams
|
1728
|
-
class DiscountEnd < Stripe::RequestParams
|
1729
|
-
class Duration < Stripe::RequestParams
|
1730
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1731
|
-
attr_accessor :interval
|
1732
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1733
|
-
attr_accessor :interval_count
|
1734
|
-
|
1735
|
-
def initialize(interval: nil, interval_count: nil)
|
1736
|
-
@interval = interval
|
1737
|
-
@interval_count = interval_count
|
1738
|
-
end
|
1739
|
-
end
|
1740
|
-
# Time span for the redeemed discount.
|
1741
|
-
attr_accessor :duration
|
1742
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1743
|
-
attr_accessor :timestamp
|
1744
|
-
# The type of calculation made to determine when the discount ends.
|
1745
|
-
attr_accessor :type
|
1746
|
-
|
1747
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1748
|
-
@duration = duration
|
1749
|
-
@timestamp = timestamp
|
1750
|
-
@type = type
|
1751
|
-
end
|
1752
|
-
end
|
1753
|
-
# ID of the coupon to create a new discount for.
|
1754
|
-
attr_accessor :coupon
|
1755
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1756
|
-
attr_accessor :discount
|
1757
|
-
# Details to determine how long the discount should be applied for.
|
1758
|
-
attr_accessor :discount_end
|
1759
|
-
# ID of the promotion code to create a new discount for.
|
1760
|
-
attr_accessor :promotion_code
|
1761
|
-
|
1762
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1763
|
-
@coupon = coupon
|
1764
|
-
@discount = discount
|
1765
|
-
@discount_end = discount_end
|
1766
|
-
@promotion_code = promotion_code
|
1767
|
-
end
|
1768
|
-
end
|
1769
|
-
|
1770
|
-
class Trial < Stripe::RequestParams
|
1771
|
-
# 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.
|
1772
|
-
attr_accessor :converts_to
|
1773
|
-
# Determines the type of trial for this item.
|
1774
|
-
attr_accessor :type
|
1775
|
-
|
1776
|
-
def initialize(converts_to: nil, type: nil)
|
1777
|
-
@converts_to = converts_to
|
1778
|
-
@type = type
|
1779
|
-
end
|
1780
|
-
end
|
1781
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
1782
|
-
attr_accessor :discounts
|
1783
|
-
# 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`.
|
1784
|
-
attr_accessor :metadata
|
1785
|
-
# The ID of the price object.
|
1786
|
-
attr_accessor :price
|
1787
|
-
# Quantity for this item.
|
1788
|
-
attr_accessor :quantity
|
1789
|
-
# 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`.
|
1790
|
-
attr_accessor :tax_rates
|
1791
|
-
# Options that configure the trial on the subscription item.
|
1792
|
-
attr_accessor :trial
|
1793
|
-
|
1794
|
-
def initialize(
|
1795
|
-
discounts: nil,
|
1796
|
-
metadata: nil,
|
1797
|
-
price: nil,
|
1798
|
-
quantity: nil,
|
1799
|
-
tax_rates: nil,
|
1800
|
-
trial: nil
|
1801
|
-
)
|
1802
|
-
@discounts = discounts
|
1803
|
-
@metadata = metadata
|
1804
|
-
@price = price
|
1805
|
-
@quantity = quantity
|
1806
|
-
@tax_rates = tax_rates
|
1807
|
-
@trial = trial
|
1808
|
-
end
|
1809
|
-
end
|
1810
|
-
|
1811
|
-
class RemoveDiscount < Stripe::RequestParams
|
1812
|
-
# The coupon code to remove from the `discounts` array.
|
1813
|
-
attr_accessor :coupon
|
1814
|
-
# The ID of a discount to remove from the `discounts` array.
|
1815
|
-
attr_accessor :discount
|
1816
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
1817
|
-
attr_accessor :promotion_code
|
1818
|
-
|
1819
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1820
|
-
@coupon = coupon
|
1821
|
-
@discount = discount
|
1822
|
-
@promotion_code = promotion_code
|
1823
|
-
end
|
1824
|
-
end
|
1825
|
-
|
1826
|
-
class RemoveItem < Stripe::RequestParams
|
1827
|
-
# ID of a price to remove.
|
1828
|
-
attr_accessor :price
|
1829
|
-
|
1830
|
-
def initialize(price: nil)
|
1831
|
-
@price = price
|
1832
|
-
end
|
1833
|
-
end
|
1834
|
-
|
1835
|
-
class SetDiscount < Stripe::RequestParams
|
1836
|
-
# The coupon code to replace the `discounts` array with.
|
1837
|
-
attr_accessor :coupon
|
1838
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
1839
|
-
attr_accessor :discount
|
1840
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
1841
|
-
attr_accessor :promotion_code
|
1842
|
-
|
1843
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1844
|
-
@coupon = coupon
|
1845
|
-
@discount = discount
|
1846
|
-
@promotion_code = promotion_code
|
1847
|
-
end
|
1848
|
-
end
|
1849
|
-
|
1850
|
-
class SetItem < Stripe::RequestParams
|
1851
|
-
class Discount < Stripe::RequestParams
|
1852
|
-
class DiscountEnd < Stripe::RequestParams
|
1853
|
-
class Duration < Stripe::RequestParams
|
1854
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1855
|
-
attr_accessor :interval
|
1856
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1857
|
-
attr_accessor :interval_count
|
1858
|
-
|
1859
|
-
def initialize(interval: nil, interval_count: nil)
|
1860
|
-
@interval = interval
|
1861
|
-
@interval_count = interval_count
|
1862
|
-
end
|
1863
|
-
end
|
1864
|
-
# Time span for the redeemed discount.
|
1865
|
-
attr_accessor :duration
|
1866
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1867
|
-
attr_accessor :timestamp
|
1868
|
-
# The type of calculation made to determine when the discount ends.
|
1869
|
-
attr_accessor :type
|
1870
|
-
|
1871
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1872
|
-
@duration = duration
|
1873
|
-
@timestamp = timestamp
|
1874
|
-
@type = type
|
1875
|
-
end
|
1876
|
-
end
|
1877
|
-
# ID of the coupon to create a new discount for.
|
1878
|
-
attr_accessor :coupon
|
1879
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1880
|
-
attr_accessor :discount
|
1881
|
-
# Details to determine how long the discount should be applied for.
|
1882
|
-
attr_accessor :discount_end
|
1883
|
-
# ID of the promotion code to create a new discount for.
|
1884
|
-
attr_accessor :promotion_code
|
1885
|
-
|
1886
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1887
|
-
@coupon = coupon
|
1888
|
-
@discount = discount
|
1889
|
-
@discount_end = discount_end
|
1890
|
-
@promotion_code = promotion_code
|
1891
|
-
end
|
1892
|
-
end
|
1893
|
-
|
1894
|
-
class Trial < Stripe::RequestParams
|
1895
|
-
# 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.
|
1896
|
-
attr_accessor :converts_to
|
1897
|
-
# Determines the type of trial for this item.
|
1898
|
-
attr_accessor :type
|
1899
|
-
|
1900
|
-
def initialize(converts_to: nil, type: nil)
|
1901
|
-
@converts_to = converts_to
|
1902
|
-
@type = type
|
1903
|
-
end
|
1904
|
-
end
|
1905
|
-
# 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`.
|
1906
|
-
attr_accessor :discounts
|
1907
|
-
# 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`.
|
1908
|
-
attr_accessor :metadata
|
1909
|
-
# The ID of the price object.
|
1910
|
-
attr_accessor :price
|
1911
|
-
# 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`.
|
1912
|
-
attr_accessor :quantity
|
1913
|
-
# 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`.
|
1914
|
-
attr_accessor :tax_rates
|
1915
|
-
# 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`.
|
1916
|
-
attr_accessor :trial
|
1917
|
-
|
1918
|
-
def initialize(
|
1919
|
-
discounts: nil,
|
1920
|
-
metadata: nil,
|
1921
|
-
price: nil,
|
1922
|
-
quantity: nil,
|
1923
|
-
tax_rates: nil,
|
1924
|
-
trial: nil
|
1925
|
-
)
|
1926
|
-
@discounts = discounts
|
1927
|
-
@metadata = metadata
|
1928
|
-
@price = price
|
1929
|
-
@quantity = quantity
|
1930
|
-
@tax_rates = tax_rates
|
1931
|
-
@trial = trial
|
1932
|
-
end
|
1933
|
-
end
|
1934
|
-
# Details for the `add_discount` type.
|
1935
|
-
attr_accessor :add_discount
|
1936
|
-
# Details for the `add_item` type.
|
1937
|
-
attr_accessor :add_item
|
1938
|
-
# Details for the `add_metadata` type: specify a hash of key-value pairs.
|
1939
|
-
attr_accessor :add_metadata
|
1940
|
-
# Details for the `remove_discount` type.
|
1941
|
-
attr_accessor :remove_discount
|
1942
|
-
# Details for the `remove_item` type.
|
1943
|
-
attr_accessor :remove_item
|
1944
|
-
# Details for the `remove_metadata` type: specify an array of metadata keys.
|
1945
|
-
attr_accessor :remove_metadata
|
1946
|
-
# Details for the `set_discounts` type.
|
1947
|
-
attr_accessor :set_discounts
|
1948
|
-
# Details for the `set_items` type.
|
1949
|
-
attr_accessor :set_items
|
1950
|
-
# Details for the `set_metadata` type: specify an array of key-value pairs.
|
1951
|
-
attr_accessor :set_metadata
|
1952
|
-
# The type of action the quote line performs.
|
1953
|
-
attr_accessor :type
|
1954
|
-
|
1955
|
-
def initialize(
|
1956
|
-
add_discount: nil,
|
1957
|
-
add_item: nil,
|
1958
|
-
add_metadata: nil,
|
1959
|
-
remove_discount: nil,
|
1960
|
-
remove_item: nil,
|
1961
|
-
remove_metadata: nil,
|
1962
|
-
set_discounts: nil,
|
1963
|
-
set_items: nil,
|
1964
|
-
set_metadata: nil,
|
1965
|
-
type: nil
|
1966
|
-
)
|
1967
|
-
@add_discount = add_discount
|
1968
|
-
@add_item = add_item
|
1969
|
-
@add_metadata = add_metadata
|
1970
|
-
@remove_discount = remove_discount
|
1971
|
-
@remove_item = remove_item
|
1972
|
-
@remove_metadata = remove_metadata
|
1973
|
-
@set_discounts = set_discounts
|
1974
|
-
@set_items = set_items
|
1975
|
-
@set_metadata = set_metadata
|
1976
|
-
@type = type
|
1977
|
-
end
|
1978
|
-
end
|
1979
|
-
|
1980
|
-
class AppliesTo < Stripe::RequestParams
|
1981
|
-
# A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
1982
|
-
attr_accessor :new_reference
|
1983
|
-
# The ID of the schedule the line applies to.
|
1984
|
-
attr_accessor :subscription_schedule
|
1985
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
1986
|
-
attr_accessor :type
|
1987
|
-
|
1988
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
1989
|
-
@new_reference = new_reference
|
1990
|
-
@subscription_schedule = subscription_schedule
|
1991
|
-
@type = type
|
1992
|
-
end
|
1993
|
-
end
|
1994
|
-
|
1995
|
-
class CancelSubscriptionSchedule < Stripe::RequestParams
|
1996
|
-
# Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
1997
|
-
attr_accessor :cancel_at
|
1998
|
-
# If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
|
1999
|
-
attr_accessor :invoice_now
|
2000
|
-
# If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
2001
|
-
attr_accessor :prorate
|
2002
|
-
|
2003
|
-
def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
|
2004
|
-
@cancel_at = cancel_at
|
2005
|
-
@invoice_now = invoice_now
|
2006
|
-
@prorate = prorate
|
2007
|
-
end
|
2008
|
-
end
|
2009
|
-
|
2010
|
-
class EndsAt < Stripe::RequestParams
|
2011
|
-
class DiscountEnd < Stripe::RequestParams
|
2012
|
-
# The ID of a specific discount.
|
2013
|
-
attr_accessor :discount
|
2014
|
-
|
2015
|
-
def initialize(discount: nil)
|
2016
|
-
@discount = discount
|
2017
|
-
end
|
2018
|
-
end
|
2019
|
-
|
2020
|
-
class Duration < Stripe::RequestParams
|
2021
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2022
|
-
attr_accessor :interval
|
2023
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2024
|
-
attr_accessor :interval_count
|
2025
|
-
|
2026
|
-
def initialize(interval: nil, interval_count: nil)
|
2027
|
-
@interval = interval
|
2028
|
-
@interval_count = interval_count
|
2029
|
-
end
|
2030
|
-
end
|
2031
|
-
# Use the `end` time of a given discount.
|
2032
|
-
attr_accessor :discount_end
|
2033
|
-
# Time span for the quote line starting from the `starts_at` date.
|
2034
|
-
attr_accessor :duration
|
2035
|
-
# A precise Unix timestamp.
|
2036
|
-
attr_accessor :timestamp
|
2037
|
-
# Select a way to pass in `ends_at`.
|
2038
|
-
attr_accessor :type
|
2039
|
-
|
2040
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
2041
|
-
@discount_end = discount_end
|
2042
|
-
@duration = duration
|
2043
|
-
@timestamp = timestamp
|
2044
|
-
@type = type
|
2045
|
-
end
|
2046
|
-
end
|
2047
|
-
|
2048
|
-
class SetPauseCollection < Stripe::RequestParams
|
2049
|
-
class Set < Stripe::RequestParams
|
2050
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2051
|
-
attr_accessor :behavior
|
2052
|
-
|
2053
|
-
def initialize(behavior: nil)
|
2054
|
-
@behavior = behavior
|
2055
|
-
end
|
2056
|
-
end
|
2057
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
2058
|
-
attr_accessor :set
|
2059
|
-
# Determines the type of the pause_collection amendment.
|
2060
|
-
attr_accessor :type
|
2061
|
-
|
2062
|
-
def initialize(set: nil, type: nil)
|
2063
|
-
@set = set
|
2064
|
-
@type = type
|
2065
|
-
end
|
2066
|
-
end
|
2067
|
-
|
2068
|
-
class StartsAt < Stripe::RequestParams
|
2069
|
-
class DiscountEnd < Stripe::RequestParams
|
2070
|
-
# The ID of a specific discount.
|
2071
|
-
attr_accessor :discount
|
2072
|
-
|
2073
|
-
def initialize(discount: nil)
|
2074
|
-
@discount = discount
|
2075
|
-
end
|
2076
|
-
end
|
2077
|
-
|
2078
|
-
class LineEndsAt < Stripe::RequestParams
|
2079
|
-
# The ID of a quote line.
|
2080
|
-
attr_accessor :id
|
2081
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
2082
|
-
attr_accessor :index
|
2083
|
-
|
2084
|
-
def initialize(id: nil, index: nil)
|
2085
|
-
@id = id
|
2086
|
-
@index = index
|
2087
|
-
end
|
2088
|
-
end
|
2089
|
-
# Use the `end` time of a given discount.
|
2090
|
-
attr_accessor :discount_end
|
2091
|
-
# The timestamp the given line ends at.
|
2092
|
-
attr_accessor :line_ends_at
|
2093
|
-
# A precise Unix timestamp.
|
2094
|
-
attr_accessor :timestamp
|
2095
|
-
# Select a way to pass in `starts_at`.
|
2096
|
-
attr_accessor :type
|
2097
|
-
|
2098
|
-
def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
2099
|
-
@discount_end = discount_end
|
2100
|
-
@line_ends_at = line_ends_at
|
2101
|
-
@timestamp = timestamp
|
2102
|
-
@type = type
|
2103
|
-
end
|
2104
|
-
end
|
2105
|
-
|
2106
|
-
class TrialSettings < Stripe::RequestParams
|
2107
|
-
class EndBehavior < Stripe::RequestParams
|
2108
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2109
|
-
attr_accessor :prorate_up_front
|
2110
|
-
|
2111
|
-
def initialize(prorate_up_front: nil)
|
2112
|
-
@prorate_up_front = prorate_up_front
|
2113
|
-
end
|
2114
|
-
end
|
2115
|
-
# Defines how the subscription should behave when a trial ends.
|
2116
|
-
attr_accessor :end_behavior
|
2117
|
-
|
2118
|
-
def initialize(end_behavior: nil)
|
2119
|
-
@end_behavior = end_behavior
|
2120
|
-
end
|
2121
|
-
end
|
2122
|
-
# An array of operations the quote line performs.
|
2123
|
-
attr_accessor :actions
|
2124
|
-
# Details to identify the subscription schedule the quote line applies to.
|
2125
|
-
attr_accessor :applies_to
|
2126
|
-
# For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
|
2127
|
-
attr_accessor :billing_cycle_anchor
|
2128
|
-
# A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
|
2129
|
-
attr_accessor :cancel_subscription_schedule
|
2130
|
-
# Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
|
2131
|
-
attr_accessor :ends_at
|
2132
|
-
# The ID of an existing line on the quote.
|
2133
|
-
attr_accessor :id
|
2134
|
-
# Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
|
2135
|
-
attr_accessor :proration_behavior
|
2136
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2137
|
-
attr_accessor :set_pause_collection
|
2138
|
-
# Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
2139
|
-
attr_accessor :set_schedule_end
|
2140
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2141
|
-
attr_accessor :starts_at
|
2142
|
-
# Settings related to subscription trials.
|
2143
|
-
attr_accessor :trial_settings
|
2144
|
-
|
2145
|
-
def initialize(
|
2146
|
-
actions: nil,
|
2147
|
-
applies_to: nil,
|
2148
|
-
billing_cycle_anchor: nil,
|
2149
|
-
cancel_subscription_schedule: nil,
|
2150
|
-
ends_at: nil,
|
2151
|
-
id: nil,
|
2152
|
-
proration_behavior: nil,
|
2153
|
-
set_pause_collection: nil,
|
2154
|
-
set_schedule_end: nil,
|
2155
|
-
starts_at: nil,
|
2156
|
-
trial_settings: nil
|
2157
|
-
)
|
2158
|
-
@actions = actions
|
2159
|
-
@applies_to = applies_to
|
2160
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
2161
|
-
@cancel_subscription_schedule = cancel_subscription_schedule
|
2162
|
-
@ends_at = ends_at
|
2163
|
-
@id = id
|
2164
|
-
@proration_behavior = proration_behavior
|
2165
|
-
@set_pause_collection = set_pause_collection
|
2166
|
-
@set_schedule_end = set_schedule_end
|
2167
|
-
@starts_at = starts_at
|
2168
|
-
@trial_settings = trial_settings
|
2169
|
-
end
|
2170
|
-
end
|
2171
|
-
|
2172
617
|
class LineItem < Stripe::RequestParams
|
2173
618
|
class Discount < Stripe::RequestParams
|
2174
|
-
class DiscountEnd < Stripe::RequestParams
|
2175
|
-
class Duration < Stripe::RequestParams
|
2176
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2177
|
-
attr_accessor :interval
|
2178
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2179
|
-
attr_accessor :interval_count
|
2180
|
-
|
2181
|
-
def initialize(interval: nil, interval_count: nil)
|
2182
|
-
@interval = interval
|
2183
|
-
@interval_count = interval_count
|
2184
|
-
end
|
2185
|
-
end
|
2186
|
-
# Time span for the redeemed discount.
|
2187
|
-
attr_accessor :duration
|
2188
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2189
|
-
attr_accessor :timestamp
|
2190
|
-
# The type of calculation made to determine when the discount ends.
|
2191
|
-
attr_accessor :type
|
2192
|
-
|
2193
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
2194
|
-
@duration = duration
|
2195
|
-
@timestamp = timestamp
|
2196
|
-
@type = type
|
2197
|
-
end
|
2198
|
-
end
|
2199
619
|
# ID of the coupon to create a new discount for.
|
2200
620
|
attr_accessor :coupon
|
2201
621
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2202
622
|
attr_accessor :discount
|
2203
|
-
# Details to determine how long the discount should be applied for.
|
2204
|
-
attr_accessor :discount_end
|
2205
623
|
# ID of the promotion code to create a new discount for.
|
2206
624
|
attr_accessor :promotion_code
|
2207
625
|
|
2208
|
-
def initialize(coupon: nil, discount: nil,
|
626
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2209
627
|
@coupon = coupon
|
2210
628
|
@discount = discount
|
2211
|
-
@discount_end = discount_end
|
2212
629
|
@promotion_code = promotion_code
|
2213
630
|
end
|
2214
631
|
end
|
@@ -2285,277 +702,23 @@ module Stripe
|
|
2285
702
|
end
|
2286
703
|
|
2287
704
|
class SubscriptionData < Stripe::RequestParams
|
2288
|
-
class BillOnAcceptance < Stripe::RequestParams
|
2289
|
-
class BillFrom < Stripe::RequestParams
|
2290
|
-
class LineStartsAt < Stripe::RequestParams
|
2291
|
-
# The ID of a quote line.
|
2292
|
-
attr_accessor :id
|
2293
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
2294
|
-
attr_accessor :index
|
2295
|
-
|
2296
|
-
def initialize(id: nil, index: nil)
|
2297
|
-
@id = id
|
2298
|
-
@index = index
|
2299
|
-
end
|
2300
|
-
end
|
2301
|
-
# Details of a Quote line to start the bill period from.
|
2302
|
-
attr_accessor :line_starts_at
|
2303
|
-
# A precise Unix timestamp.
|
2304
|
-
attr_accessor :timestamp
|
2305
|
-
# The type of method to specify the `bill_from` time.
|
2306
|
-
attr_accessor :type
|
2307
|
-
|
2308
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
2309
|
-
@line_starts_at = line_starts_at
|
2310
|
-
@timestamp = timestamp
|
2311
|
-
@type = type
|
2312
|
-
end
|
2313
|
-
end
|
2314
|
-
|
2315
|
-
class BillUntil < Stripe::RequestParams
|
2316
|
-
class Duration < Stripe::RequestParams
|
2317
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2318
|
-
attr_accessor :interval
|
2319
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2320
|
-
attr_accessor :interval_count
|
2321
|
-
|
2322
|
-
def initialize(interval: nil, interval_count: nil)
|
2323
|
-
@interval = interval
|
2324
|
-
@interval_count = interval_count
|
2325
|
-
end
|
2326
|
-
end
|
2327
|
-
|
2328
|
-
class LineEndsAt < Stripe::RequestParams
|
2329
|
-
# The ID of a quote line.
|
2330
|
-
attr_accessor :id
|
2331
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
2332
|
-
attr_accessor :index
|
2333
|
-
|
2334
|
-
def initialize(id: nil, index: nil)
|
2335
|
-
@id = id
|
2336
|
-
@index = index
|
2337
|
-
end
|
2338
|
-
end
|
2339
|
-
# Details of the duration over which to bill.
|
2340
|
-
attr_accessor :duration
|
2341
|
-
# Details of a Quote line item from which to bill until.
|
2342
|
-
attr_accessor :line_ends_at
|
2343
|
-
# A precise Unix timestamp.
|
2344
|
-
attr_accessor :timestamp
|
2345
|
-
# The type of method to specify the `bill_until` time.
|
2346
|
-
attr_accessor :type
|
2347
|
-
|
2348
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
2349
|
-
@duration = duration
|
2350
|
-
@line_ends_at = line_ends_at
|
2351
|
-
@timestamp = timestamp
|
2352
|
-
@type = type
|
2353
|
-
end
|
2354
|
-
end
|
2355
|
-
# The start of the period to bill from when the Quote is accepted.
|
2356
|
-
attr_accessor :bill_from
|
2357
|
-
# The end of the period to bill until when the Quote is accepted.
|
2358
|
-
attr_accessor :bill_until
|
2359
|
-
|
2360
|
-
def initialize(bill_from: nil, bill_until: nil)
|
2361
|
-
@bill_from = bill_from
|
2362
|
-
@bill_until = bill_until
|
2363
|
-
end
|
2364
|
-
end
|
2365
|
-
|
2366
|
-
class Prebilling < Stripe::RequestParams
|
2367
|
-
# This is used to determine the number of billing cycles to prebill.
|
2368
|
-
attr_accessor :iterations
|
2369
|
-
|
2370
|
-
def initialize(iterations: nil)
|
2371
|
-
@iterations = iterations
|
2372
|
-
end
|
2373
|
-
end
|
2374
|
-
# Describes the period to bill for upon accepting the quote.
|
2375
|
-
attr_accessor :bill_on_acceptance
|
2376
|
-
# 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.
|
2377
|
-
attr_accessor :billing_behavior
|
2378
|
-
# When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
2379
|
-
attr_accessor :billing_cycle_anchor
|
2380
705
|
# The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
2381
706
|
attr_accessor :description
|
2382
|
-
# When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted.
|
707
|
+
# When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
2383
708
|
attr_accessor :effective_date
|
2384
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2385
|
-
attr_accessor :end_behavior
|
2386
709
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
|
2387
710
|
attr_accessor :metadata
|
2388
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
2389
|
-
attr_accessor :prebilling
|
2390
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
2391
|
-
#
|
2392
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
2393
|
-
#
|
2394
|
-
# Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
2395
|
-
#
|
2396
|
-
# Prorations can be disabled by passing `none`.
|
2397
|
-
attr_accessor :proration_behavior
|
2398
711
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
2399
712
|
attr_accessor :trial_period_days
|
2400
713
|
|
2401
|
-
def initialize(
|
2402
|
-
bill_on_acceptance: nil,
|
2403
|
-
billing_behavior: nil,
|
2404
|
-
billing_cycle_anchor: nil,
|
2405
|
-
description: nil,
|
2406
|
-
effective_date: nil,
|
2407
|
-
end_behavior: nil,
|
2408
|
-
metadata: nil,
|
2409
|
-
prebilling: nil,
|
2410
|
-
proration_behavior: nil,
|
2411
|
-
trial_period_days: nil
|
2412
|
-
)
|
2413
|
-
@bill_on_acceptance = bill_on_acceptance
|
2414
|
-
@billing_behavior = billing_behavior
|
2415
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
714
|
+
def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil)
|
2416
715
|
@description = description
|
2417
716
|
@effective_date = effective_date
|
2418
|
-
@end_behavior = end_behavior
|
2419
717
|
@metadata = metadata
|
2420
|
-
@prebilling = prebilling
|
2421
|
-
@proration_behavior = proration_behavior
|
2422
718
|
@trial_period_days = trial_period_days
|
2423
719
|
end
|
2424
720
|
end
|
2425
721
|
|
2426
|
-
class SubscriptionDataOverride < Stripe::RequestParams
|
2427
|
-
class AppliesTo < Stripe::RequestParams
|
2428
|
-
# A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
2429
|
-
attr_accessor :new_reference
|
2430
|
-
# The ID of the schedule the line applies to.
|
2431
|
-
attr_accessor :subscription_schedule
|
2432
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
2433
|
-
attr_accessor :type
|
2434
|
-
|
2435
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
2436
|
-
@new_reference = new_reference
|
2437
|
-
@subscription_schedule = subscription_schedule
|
2438
|
-
@type = type
|
2439
|
-
end
|
2440
|
-
end
|
2441
|
-
|
2442
|
-
class BillOnAcceptance < Stripe::RequestParams
|
2443
|
-
class BillFrom < Stripe::RequestParams
|
2444
|
-
class LineStartsAt < Stripe::RequestParams
|
2445
|
-
# The ID of a quote line.
|
2446
|
-
attr_accessor :id
|
2447
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
2448
|
-
attr_accessor :index
|
2449
|
-
|
2450
|
-
def initialize(id: nil, index: nil)
|
2451
|
-
@id = id
|
2452
|
-
@index = index
|
2453
|
-
end
|
2454
|
-
end
|
2455
|
-
# Details of a Quote line to start the bill period from.
|
2456
|
-
attr_accessor :line_starts_at
|
2457
|
-
# A precise Unix timestamp.
|
2458
|
-
attr_accessor :timestamp
|
2459
|
-
# The type of method to specify the `bill_from` time.
|
2460
|
-
attr_accessor :type
|
2461
|
-
|
2462
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
2463
|
-
@line_starts_at = line_starts_at
|
2464
|
-
@timestamp = timestamp
|
2465
|
-
@type = type
|
2466
|
-
end
|
2467
|
-
end
|
2468
|
-
|
2469
|
-
class BillUntil < Stripe::RequestParams
|
2470
|
-
class Duration < Stripe::RequestParams
|
2471
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2472
|
-
attr_accessor :interval
|
2473
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2474
|
-
attr_accessor :interval_count
|
2475
|
-
|
2476
|
-
def initialize(interval: nil, interval_count: nil)
|
2477
|
-
@interval = interval
|
2478
|
-
@interval_count = interval_count
|
2479
|
-
end
|
2480
|
-
end
|
2481
|
-
|
2482
|
-
class LineEndsAt < Stripe::RequestParams
|
2483
|
-
# The ID of a quote line.
|
2484
|
-
attr_accessor :id
|
2485
|
-
# The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
2486
|
-
attr_accessor :index
|
2487
|
-
|
2488
|
-
def initialize(id: nil, index: nil)
|
2489
|
-
@id = id
|
2490
|
-
@index = index
|
2491
|
-
end
|
2492
|
-
end
|
2493
|
-
# Details of the duration over which to bill.
|
2494
|
-
attr_accessor :duration
|
2495
|
-
# Details of a Quote line item from which to bill until.
|
2496
|
-
attr_accessor :line_ends_at
|
2497
|
-
# A precise Unix timestamp.
|
2498
|
-
attr_accessor :timestamp
|
2499
|
-
# The type of method to specify the `bill_until` time.
|
2500
|
-
attr_accessor :type
|
2501
|
-
|
2502
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
2503
|
-
@duration = duration
|
2504
|
-
@line_ends_at = line_ends_at
|
2505
|
-
@timestamp = timestamp
|
2506
|
-
@type = type
|
2507
|
-
end
|
2508
|
-
end
|
2509
|
-
# The start of the period to bill from when the Quote is accepted.
|
2510
|
-
attr_accessor :bill_from
|
2511
|
-
# The end of the period to bill until when the Quote is accepted.
|
2512
|
-
attr_accessor :bill_until
|
2513
|
-
|
2514
|
-
def initialize(bill_from: nil, bill_until: nil)
|
2515
|
-
@bill_from = bill_from
|
2516
|
-
@bill_until = bill_until
|
2517
|
-
end
|
2518
|
-
end
|
2519
|
-
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
2520
|
-
attr_accessor :applies_to
|
2521
|
-
# Describes the period to bill for upon accepting the quote.
|
2522
|
-
attr_accessor :bill_on_acceptance
|
2523
|
-
# 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.
|
2524
|
-
attr_accessor :billing_behavior
|
2525
|
-
# The customer the Subscription Data override applies to.
|
2526
|
-
attr_accessor :customer
|
2527
|
-
# The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
2528
|
-
attr_accessor :description
|
2529
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2530
|
-
attr_accessor :end_behavior
|
2531
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
2532
|
-
#
|
2533
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
2534
|
-
#
|
2535
|
-
# Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
2536
|
-
#
|
2537
|
-
# Prorations can be disabled by passing `none`.
|
2538
|
-
attr_accessor :proration_behavior
|
2539
|
-
|
2540
|
-
def initialize(
|
2541
|
-
applies_to: nil,
|
2542
|
-
bill_on_acceptance: nil,
|
2543
|
-
billing_behavior: nil,
|
2544
|
-
customer: nil,
|
2545
|
-
description: nil,
|
2546
|
-
end_behavior: nil,
|
2547
|
-
proration_behavior: nil
|
2548
|
-
)
|
2549
|
-
@applies_to = applies_to
|
2550
|
-
@bill_on_acceptance = bill_on_acceptance
|
2551
|
-
@billing_behavior = billing_behavior
|
2552
|
-
@customer = customer
|
2553
|
-
@description = description
|
2554
|
-
@end_behavior = end_behavior
|
2555
|
-
@proration_behavior = proration_behavior
|
2556
|
-
end
|
2557
|
-
end
|
2558
|
-
|
2559
722
|
class TransferData < Stripe::RequestParams
|
2560
723
|
# The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
|
2561
724
|
attr_accessor :amount
|
@@ -2570,8 +733,6 @@ module Stripe
|
|
2570
733
|
@destination = destination
|
2571
734
|
end
|
2572
735
|
end
|
2573
|
-
# Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
2574
|
-
attr_accessor :allow_backdated_lines
|
2575
736
|
# The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
|
2576
737
|
attr_accessor :application_fee_amount
|
2577
738
|
# 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. There must be at least 1 line item with a recurring price to use this field.
|
@@ -2582,8 +743,6 @@ module Stripe
|
|
2582
743
|
attr_accessor :collection_method
|
2583
744
|
# The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
2584
745
|
attr_accessor :customer
|
2585
|
-
# The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
|
2586
|
-
attr_accessor :customer_account
|
2587
746
|
# The tax rates that will apply to any line item that does not have `tax_rates` set.
|
2588
747
|
attr_accessor :default_tax_rates
|
2589
748
|
# A description that will be displayed on the quote PDF.
|
@@ -2602,27 +761,21 @@ module Stripe
|
|
2602
761
|
attr_accessor :invoice_settings
|
2603
762
|
# A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
|
2604
763
|
attr_accessor :line_items
|
2605
|
-
# A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
2606
|
-
attr_accessor :lines
|
2607
764
|
# 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`.
|
2608
765
|
attr_accessor :metadata
|
2609
766
|
# The account on behalf of which to charge.
|
2610
767
|
attr_accessor :on_behalf_of
|
2611
768
|
# When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
|
2612
769
|
attr_accessor :subscription_data
|
2613
|
-
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
2614
|
-
attr_accessor :subscription_data_overrides
|
2615
770
|
# The data with which to automatically create a Transfer for each of the invoices.
|
2616
771
|
attr_accessor :transfer_data
|
2617
772
|
|
2618
773
|
def initialize(
|
2619
|
-
allow_backdated_lines: nil,
|
2620
774
|
application_fee_amount: nil,
|
2621
775
|
application_fee_percent: nil,
|
2622
776
|
automatic_tax: nil,
|
2623
777
|
collection_method: nil,
|
2624
778
|
customer: nil,
|
2625
|
-
customer_account: nil,
|
2626
779
|
default_tax_rates: nil,
|
2627
780
|
description: nil,
|
2628
781
|
discounts: nil,
|
@@ -2632,20 +785,16 @@ module Stripe
|
|
2632
785
|
header: nil,
|
2633
786
|
invoice_settings: nil,
|
2634
787
|
line_items: nil,
|
2635
|
-
lines: nil,
|
2636
788
|
metadata: nil,
|
2637
789
|
on_behalf_of: nil,
|
2638
790
|
subscription_data: nil,
|
2639
|
-
subscription_data_overrides: nil,
|
2640
791
|
transfer_data: nil
|
2641
792
|
)
|
2642
|
-
@allow_backdated_lines = allow_backdated_lines
|
2643
793
|
@application_fee_amount = application_fee_amount
|
2644
794
|
@application_fee_percent = application_fee_percent
|
2645
795
|
@automatic_tax = automatic_tax
|
2646
796
|
@collection_method = collection_method
|
2647
797
|
@customer = customer
|
2648
|
-
@customer_account = customer_account
|
2649
798
|
@default_tax_rates = default_tax_rates
|
2650
799
|
@description = description
|
2651
800
|
@discounts = discounts
|
@@ -2655,11 +804,9 @@ module Stripe
|
|
2655
804
|
@header = header
|
2656
805
|
@invoice_settings = invoice_settings
|
2657
806
|
@line_items = line_items
|
2658
|
-
@lines = lines
|
2659
807
|
@metadata = metadata
|
2660
808
|
@on_behalf_of = on_behalf_of
|
2661
809
|
@subscription_data = subscription_data
|
2662
|
-
@subscription_data_overrides = subscription_data_overrides
|
2663
810
|
@transfer_data = transfer_data
|
2664
811
|
end
|
2665
812
|
end
|
@@ -2700,24 +847,6 @@ module Stripe
|
|
2700
847
|
end
|
2701
848
|
end
|
2702
849
|
|
2703
|
-
class ListLinesParams < Stripe::RequestParams
|
2704
|
-
# 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.
|
2705
|
-
attr_accessor :ending_before
|
2706
|
-
# Specifies which fields in the response should be expanded.
|
2707
|
-
attr_accessor :expand
|
2708
|
-
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
2709
|
-
attr_accessor :limit
|
2710
|
-
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
2711
|
-
attr_accessor :starting_after
|
2712
|
-
|
2713
|
-
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
2714
|
-
@ending_before = ending_before
|
2715
|
-
@expand = expand
|
2716
|
-
@limit = limit
|
2717
|
-
@starting_after = starting_after
|
2718
|
-
end
|
2719
|
-
end
|
2720
|
-
|
2721
850
|
class AcceptParams < Stripe::RequestParams
|
2722
851
|
# Specifies which fields in the response should be expanded.
|
2723
852
|
attr_accessor :expand
|
@@ -2748,36 +877,6 @@ module Stripe
|
|
2748
877
|
end
|
2749
878
|
end
|
2750
879
|
|
2751
|
-
class MarkDraftParams < Stripe::RequestParams
|
2752
|
-
# Specifies which fields in the response should be expanded.
|
2753
|
-
attr_accessor :expand
|
2754
|
-
|
2755
|
-
def initialize(expand: nil)
|
2756
|
-
@expand = expand
|
2757
|
-
end
|
2758
|
-
end
|
2759
|
-
|
2760
|
-
class MarkStaleParams < Stripe::RequestParams
|
2761
|
-
# Specifies which fields in the response should be expanded.
|
2762
|
-
attr_accessor :expand
|
2763
|
-
# Reason the Quote is being marked stale.
|
2764
|
-
attr_accessor :reason
|
2765
|
-
|
2766
|
-
def initialize(expand: nil, reason: nil)
|
2767
|
-
@expand = expand
|
2768
|
-
@reason = reason
|
2769
|
-
end
|
2770
|
-
end
|
2771
|
-
|
2772
|
-
class ReestimateParams < Stripe::RequestParams
|
2773
|
-
# Specifies which fields in the response should be expanded.
|
2774
|
-
attr_accessor :expand
|
2775
|
-
|
2776
|
-
def initialize(expand: nil)
|
2777
|
-
@expand = expand
|
2778
|
-
end
|
2779
|
-
end
|
2780
|
-
|
2781
880
|
class PdfParams < Stripe::RequestParams
|
2782
881
|
# Specifies which fields in the response should be expanded.
|
2783
882
|
attr_accessor :expand
|
@@ -2786,26 +885,6 @@ module Stripe
|
|
2786
885
|
@expand = expand
|
2787
886
|
end
|
2788
887
|
end
|
2789
|
-
|
2790
|
-
class ListPreviewInvoiceLinesParams < Stripe::RequestParams
|
2791
|
-
# 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.
|
2792
|
-
attr_accessor :ending_before
|
2793
|
-
# Specifies which fields in the response should be expanded.
|
2794
|
-
attr_accessor :expand
|
2795
|
-
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
2796
|
-
attr_accessor :limit
|
2797
|
-
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
2798
|
-
attr_accessor :starting_after
|
2799
|
-
|
2800
|
-
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
2801
|
-
@ending_before = ending_before
|
2802
|
-
@expand = expand
|
2803
|
-
@limit = limit
|
2804
|
-
@starting_after = starting_after
|
2805
|
-
end
|
2806
|
-
end
|
2807
|
-
# Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
2808
|
-
attr_reader :allow_backdated_lines
|
2809
888
|
# Total before any discounts or taxes are applied.
|
2810
889
|
attr_reader :amount_subtotal
|
2811
890
|
# Total after discounts and taxes are applied.
|
@@ -2828,8 +907,6 @@ module Stripe
|
|
2828
907
|
attr_reader :currency
|
2829
908
|
# The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
2830
909
|
attr_reader :customer
|
2831
|
-
# The account which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
|
2832
|
-
attr_reader :customer_account
|
2833
910
|
# The tax rates applied to this quote.
|
2834
911
|
attr_reader :default_tax_rates
|
2835
912
|
# A description that will be displayed on the quote PDF.
|
@@ -2852,8 +929,6 @@ module Stripe
|
|
2852
929
|
attr_reader :invoice_settings
|
2853
930
|
# A list of items the customer is being quoted for.
|
2854
931
|
attr_reader :line_items
|
2855
|
-
# A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
2856
|
-
attr_reader :lines
|
2857
932
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
2858
933
|
attr_reader :livemode
|
2859
934
|
# 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.
|
@@ -2866,20 +941,14 @@ module Stripe
|
|
2866
941
|
attr_reader :on_behalf_of
|
2867
942
|
# The status of the quote.
|
2868
943
|
attr_reader :status
|
2869
|
-
# Details on when and why a quote has been marked as stale or canceled.
|
2870
|
-
attr_reader :status_details
|
2871
944
|
# Attribute for field status_transitions
|
2872
945
|
attr_reader :status_transitions
|
2873
946
|
# The subscription that was created or updated from this quote.
|
2874
947
|
attr_reader :subscription
|
2875
948
|
# Attribute for field subscription_data
|
2876
949
|
attr_reader :subscription_data
|
2877
|
-
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
2878
|
-
attr_reader :subscription_data_overrides
|
2879
950
|
# The subscription schedule that was created or updated from this quote.
|
2880
951
|
attr_reader :subscription_schedule
|
2881
|
-
# The subscription schedules that were created or updated from this quote.
|
2882
|
-
attr_reader :subscription_schedules
|
2883
952
|
# ID of the test clock this quote belongs to.
|
2884
953
|
attr_reader :test_clock
|
2885
954
|
# Attribute for field total_details
|
@@ -2997,86 +1066,6 @@ module Stripe
|
|
2997
1066
|
)
|
2998
1067
|
end
|
2999
1068
|
|
3000
|
-
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
3001
|
-
def list_lines(params = {}, opts = {})
|
3002
|
-
request_stripe_object(
|
3003
|
-
method: :get,
|
3004
|
-
path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(self["id"]) }),
|
3005
|
-
params: params,
|
3006
|
-
opts: opts
|
3007
|
-
)
|
3008
|
-
end
|
3009
|
-
|
3010
|
-
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
3011
|
-
def self.list_lines(quote, params = {}, opts = {})
|
3012
|
-
request_stripe_object(
|
3013
|
-
method: :get,
|
3014
|
-
path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(quote) }),
|
3015
|
-
params: params,
|
3016
|
-
opts: opts
|
3017
|
-
)
|
3018
|
-
end
|
3019
|
-
|
3020
|
-
# Preview the invoice line items that would be generated by accepting the quote.
|
3021
|
-
def list_preview_invoice_lines(preview_invoice, params = {}, opts = {})
|
3022
|
-
request_stripe_object(
|
3023
|
-
method: :get,
|
3024
|
-
path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(self["id"]), preview_invoice: CGI.escape(preview_invoice) }),
|
3025
|
-
params: params,
|
3026
|
-
opts: opts
|
3027
|
-
)
|
3028
|
-
end
|
3029
|
-
|
3030
|
-
# Preview the invoice line items that would be generated by accepting the quote.
|
3031
|
-
def self.list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {})
|
3032
|
-
request_stripe_object(
|
3033
|
-
method: :get,
|
3034
|
-
path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(quote), preview_invoice: CGI.escape(preview_invoice) }),
|
3035
|
-
params: params,
|
3036
|
-
opts: opts
|
3037
|
-
)
|
3038
|
-
end
|
3039
|
-
|
3040
|
-
# Converts a stale quote to draft.
|
3041
|
-
def mark_draft(params = {}, opts = {})
|
3042
|
-
request_stripe_object(
|
3043
|
-
method: :post,
|
3044
|
-
path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(self["id"]) }),
|
3045
|
-
params: params,
|
3046
|
-
opts: opts
|
3047
|
-
)
|
3048
|
-
end
|
3049
|
-
|
3050
|
-
# Converts a stale quote to draft.
|
3051
|
-
def self.mark_draft(quote, params = {}, opts = {})
|
3052
|
-
request_stripe_object(
|
3053
|
-
method: :post,
|
3054
|
-
path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(quote) }),
|
3055
|
-
params: params,
|
3056
|
-
opts: opts
|
3057
|
-
)
|
3058
|
-
end
|
3059
|
-
|
3060
|
-
# Converts a draft or open quote to stale.
|
3061
|
-
def mark_stale(params = {}, opts = {})
|
3062
|
-
request_stripe_object(
|
3063
|
-
method: :post,
|
3064
|
-
path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(self["id"]) }),
|
3065
|
-
params: params,
|
3066
|
-
opts: opts
|
3067
|
-
)
|
3068
|
-
end
|
3069
|
-
|
3070
|
-
# Converts a draft or open quote to stale.
|
3071
|
-
def self.mark_stale(quote, params = {}, opts = {})
|
3072
|
-
request_stripe_object(
|
3073
|
-
method: :post,
|
3074
|
-
path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(quote) }),
|
3075
|
-
params: params,
|
3076
|
-
opts: opts
|
3077
|
-
)
|
3078
|
-
end
|
3079
|
-
|
3080
1069
|
# Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
|
3081
1070
|
def pdf(params = {}, opts = {}, &read_body_chunk_block)
|
3082
1071
|
opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
|
@@ -3103,26 +1092,6 @@ module Stripe
|
|
3103
1092
|
)
|
3104
1093
|
end
|
3105
1094
|
|
3106
|
-
# Recompute the upcoming invoice estimate for the quote.
|
3107
|
-
def reestimate(params = {}, opts = {})
|
3108
|
-
request_stripe_object(
|
3109
|
-
method: :post,
|
3110
|
-
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(self["id"]) }),
|
3111
|
-
params: params,
|
3112
|
-
opts: opts
|
3113
|
-
)
|
3114
|
-
end
|
3115
|
-
|
3116
|
-
# Recompute the upcoming invoice estimate for the quote.
|
3117
|
-
def self.reestimate(quote, params = {}, opts = {})
|
3118
|
-
request_stripe_object(
|
3119
|
-
method: :post,
|
3120
|
-
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(quote) }),
|
3121
|
-
params: params,
|
3122
|
-
opts: opts
|
3123
|
-
)
|
3124
|
-
end
|
3125
|
-
|
3126
1095
|
# A quote models prices and services for a customer.
|
3127
1096
|
def self.update(quote, params = {}, opts = {})
|
3128
1097
|
request_stripe_object(
|