stripe 14.1.0.pre.beta.1 → 15.0.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/CHANGELOG.md +689 -1512
- data/OPENAPI_VERSION +1 -1
- data/README.md +3 -3
- data/VERSION +1 -1
- data/lib/stripe/api_operations/save.rb +2 -1
- data/lib/stripe/api_operations/singleton_save.rb +2 -1
- data/lib/stripe/api_requestor.rb +3 -29
- data/lib/stripe/api_resource.rb +10 -3
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/errors.rb +0 -54
- data/lib/stripe/event_types.rb +0 -75
- data/lib/stripe/object_types.rb +0 -48
- data/lib/stripe/request_options.rb +2 -1
- data/lib/stripe/resources/account.rb +1 -653
- data/lib/stripe/resources/account_session.rb +1 -247
- data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -2
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -4
- data/lib/stripe/resources/billing/credit_grant.rb +0 -10
- data/lib/stripe/resources/billing_portal/session.rb +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 +0 -1454
- data/lib/stripe/resources/checkout/session.rb +4 -260
- data/lib/stripe/resources/confirmation_token.rb +0 -234
- data/lib/stripe/resources/coupon.rb +1 -1
- data/lib/stripe/resources/credit_note.rb +0 -10
- data/lib/stripe/resources/credit_note_line_item.rb +0 -9
- data/lib/stripe/resources/customer.rb +0 -2
- data/lib/stripe/resources/customer_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -2
- data/lib/stripe/resources/customer_session.rb +1 -6
- data/lib/stripe/resources/discount.rb +0 -2
- data/lib/stripe/resources/event.rb +0 -33
- data/lib/stripe/resources/financial_connections/account.rb +1 -20
- 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 +16 -1176
- data/lib/stripe/resources/invoice_item.rb +2 -78
- data/lib/stripe/resources/invoice_line_item.rb +1 -55
- data/lib/stripe/resources/invoice_payment.rb +53 -2
- data/lib/stripe/resources/issuing/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 +307 -5109
- data/lib/stripe/resources/payment_method.rb +1 -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/product.rb +0 -59
- data/lib/stripe/resources/promotion_code.rb +0 -10
- data/lib/stripe/resources/quote.rb +6 -2042
- data/lib/stripe/resources/refund.rb +0 -9
- data/lib/stripe/resources/setup_attempt.rb +0 -21
- data/lib/stripe/resources/setup_intent.rb +9 -596
- data/lib/stripe/resources/source.rb +1 -30
- data/lib/stripe/resources/subscription.rb +9 -292
- data/lib/stripe/resources/subscription_item.rb +3 -84
- data/lib/stripe/resources/subscription_schedule.rb +10 -1007
- data/lib/stripe/resources/tax_id.rb +2 -12
- data/lib/stripe/resources/terminal/reader.rb +0 -406
- 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 -85
- data/lib/stripe/services/account_service.rb +1 -562
- data/lib/stripe/services/account_session_service.rb +1 -217
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
- data/lib/stripe/services/billing/credit_grant_service.rb +0 -8
- data/lib/stripe/services/billing_portal/session_service.rb +0 -4
- data/lib/stripe/services/charge_service.rb +0 -1334
- data/lib/stripe/services/checkout/session_service.rb +2 -172
- 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 +2 -74
- data/lib/stripe/services/invoice_line_item_service.rb +1 -33
- data/lib/stripe/services/invoice_payment_service.rb +33 -5
- data/lib/stripe/services/invoice_service.rb +17 -1088
- 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 +264 -4637
- data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
- data/lib/stripe/services/payment_method_service.rb +1 -126
- data/lib/stripe/services/payout_service.rb +0 -4
- data/lib/stripe/services/price_service.rb +0 -19
- data/lib/stripe/services/product_service.rb +0 -38
- data/lib/stripe/services/promotion_code_service.rb +0 -8
- data/lib/stripe/services/quote_service.rb +7 -1726
- data/lib/stripe/services/setup_intent_service.rb +9 -556
- data/lib/stripe/services/subscription_item_service.rb +3 -75
- data/lib/stripe/services/subscription_schedule_service.rb +10 -911
- data/lib/stripe/services/subscription_service.rb +9 -253
- data/lib/stripe/services/tax_id_service.rb +2 -8
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/reader_service.rb +0 -180
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -148
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -43
- 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/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 -10
- data/lib/stripe/services/v2/core/event_service.rb +5 -3
- data/lib/stripe/services/v2/core_service.rb +1 -4
- data/lib/stripe/services/v2_services.rb +2 -4
- data/lib/stripe/services.rb +0 -49
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/stripe_object.rb +14 -4
- data/lib/stripe/util.rb +12 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -55
- data/rbi/stripe/resources/account.rbi +4840 -0
- data/rbi/stripe/resources/account_link.rbi +74 -0
- data/rbi/stripe/resources/account_session.rbi +894 -0
- data/rbi/stripe/resources/apple_pay_domain.rbi +90 -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 +180 -0
- data/rbi/stripe/resources/balance_transaction.rbi +144 -0
- data/rbi/stripe/resources/bank_account.rbi +127 -0
- data/rbi/stripe/resources/billing/alert.rbi +201 -0
- data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
- data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
- data/rbi/stripe/resources/billing/meter.rbi +226 -0
- data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
- data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
- data/rbi/stripe/resources/billing_portal/configuration.rbi +645 -0
- data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
- data/rbi/stripe/resources/capability.rbi +125 -0
- data/rbi/stripe/resources/card.rbi +125 -0
- data/rbi/stripe/resources/cash_balance.rbi +32 -0
- data/rbi/stripe/resources/charge.rbi +2054 -0
- data/rbi/stripe/resources/checkout/session.rbi +3951 -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 +1793 -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 +252 -0
- data/rbi/stripe/resources/credit_note.rbi +747 -0
- data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
- data/rbi/stripe/resources/customer.rbi +1009 -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 +146 -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 +351 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +517 -0
- data/rbi/stripe/resources/invoice.rbi +3733 -0
- data/rbi/stripe/resources/invoice_item.rbi +475 -0
- data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
- data/rbi/stripe/resources/invoice_payment.rbi +114 -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 +18 -0
- data/rbi/stripe/resources/mandate.rbi +187 -0
- data/rbi/stripe/resources/payment_intent.rbi +9731 -0
- data/rbi/stripe/resources/payment_link.rbi +1801 -0
- data/rbi/stripe/resources/payment_method.rbi +1822 -0
- data/rbi/stripe/resources/payment_method_configuration.rbi +3154 -0
- data/rbi/stripe/resources/payment_method_domain.rbi +212 -0
- data/rbi/stripe/resources/payout.rbi +300 -0
- data/rbi/stripe/resources/person.rbi +371 -0
- data/rbi/stripe/resources/plan.rbi +373 -0
- data/rbi/stripe/resources/price.rbi +694 -0
- data/rbi/stripe/resources/product.rbi +557 -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 +1123 -0
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
- data/rbi/stripe/resources/radar/value_list.rbi +170 -0
- data/rbi/stripe/resources/radar/value_list_item.rbi +131 -0
- data/rbi/stripe/resources/refund.rbi +516 -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 +3860 -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 +1964 -0
- data/rbi/stripe/resources/subscription_item.rbi +370 -0
- data/rbi/stripe/resources/subscription_schedule.rbi +1495 -0
- data/rbi/stripe/resources/tax/calculation.rbi +474 -0
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +88 -0
- data/rbi/stripe/resources/tax/registration.rbi +2485 -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 +167 -0
- data/rbi/stripe/resources/tax_rate.rbi +239 -0
- data/rbi/stripe/resources/terminal/configuration.rbi +1388 -0
- data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
- data/rbi/stripe/resources/terminal/location.rbi +224 -0
- data/rbi/stripe/resources/terminal/reader.rbi +587 -0
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +134 -0
- data/rbi/stripe/resources/token.rbi +1217 -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 +865 -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 +170 -0
- data/rbi/stripe/services/account_capability_service.rbi +51 -0
- data/rbi/stripe/services/account_external_account_service.rbi +306 -0
- data/rbi/stripe/services/account_link_service.rbi +58 -0
- data/rbi/stripe/services/account_login_link_service.rbi +22 -0
- data/rbi/stripe/services/account_person_service.rbi +923 -0
- data/rbi/stripe/services/account_service.rbi +4143 -0
- data/rbi/stripe/services/account_session_service.rbi +572 -0
- data/rbi/stripe/services/apple_pay_domain_service.rbi +78 -0
- data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
- data/rbi/stripe/services/application_fee_service.rbi +78 -0
- data/rbi/stripe/services/apps/secret_service.rbi +151 -0
- data/rbi/stripe/services/apps_service.rbi +9 -0
- data/rbi/stripe/services/balance_service.rbi +21 -0
- data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
- data/rbi/stripe/services/billing/alert_service.rbi +152 -0
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
- data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
- data/rbi/stripe/services/billing/meter_service.rbi +163 -0
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +511 -0
- data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
- data/rbi/stripe/services/billing_portal_service.rbi +10 -0
- data/rbi/stripe/services/billing_service.rbi +15 -0
- data/rbi/stripe/services/charge_service.rbi +448 -0
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
- data/rbi/stripe/services/checkout/session_service.rbi +2585 -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 +196 -0
- data/{lib/stripe/services/quote_preview_subscription_schedule_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 +416 -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 +651 -0
- data/rbi/stripe/services/customer_session_service.rbi +116 -0
- data/rbi/stripe/services/customer_tax_id_service.rbi +72 -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 +323 -0
- data/rbi/stripe/services/identity_service.rbi +10 -0
- data/rbi/stripe/services/invoice_item_service.rbi +368 -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 +2920 -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 +7759 -0
- data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
- data/rbi/stripe/services/payment_link_service.rbi +1352 -0
- data/rbi/stripe/services/payment_method_configuration_service.rbi +2211 -0
- data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
- data/rbi/stripe/services/payment_method_service.rbi +840 -0
- data/rbi/stripe/services/payout_service.rbi +205 -0
- data/rbi/stripe/services/plan_service.rbi +284 -0
- data/rbi/stripe/services/price_service.rbi +546 -0
- data/rbi/stripe/services/product_feature_service.rbi +69 -0
- data/rbi/stripe/services/product_service.rbi +479 -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 +686 -0
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
- data/rbi/stripe/services/radar/value_list_item_service.rbi +111 -0
- data/rbi/stripe/services/radar/value_list_service.rbi +143 -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 +3596 -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_preview_invoice_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
- data/rbi/stripe/services/subscription_item_service.rbi +324 -0
- data/rbi/stripe/services/subscription_schedule_service.rbi +1192 -0
- data/rbi/stripe/services/subscription_service.rbi +1596 -0
- data/rbi/stripe/services/tax/calculation_line_item_service.rbi +33 -0
- data/rbi/stripe/services/tax/calculation_service.rbi +230 -0
- data/rbi/stripe/services/tax/registration_service.rbi +1689 -0
- data/rbi/stripe/services/tax/settings_service.rbi +93 -0
- data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
- data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
- data/rbi/stripe/services/tax_code_service.rbi +44 -0
- data/rbi/stripe/services/tax_id_service.rbi +112 -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 +1120 -0
- data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
- data/rbi/stripe/services/terminal/location_service.rbi +184 -0
- data/rbi/stripe/services/terminal/reader_service.rbi +344 -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 +62 -0
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +92 -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 +1189 -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 +562 -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 +20 -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 +200 -0
- data/rbi/stripe/services/v2/core/event_service.rbi +38 -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 +131 -0
- data/stripe.gemspec +1 -4
- metadata +324 -140
- 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_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_money_management_financial_account_created_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_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_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/request_signing_authenticator.rb +0 -79
- data/lib/stripe/resources/account_notice.rb +0 -123
- data/lib/stripe/resources/balance_settings.rb +0 -101
- data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
- 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 -90
- data/lib/stripe/resources/gift_cards/card.rb +0 -208
- data/lib/stripe/resources/gift_cards/transaction.rb +0 -272
- 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 -2859
- data/lib/stripe/resources/payment_attempt_record.rb +0 -1078
- data/lib/stripe/resources/payment_record.rb +0 -1607
- 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 -337
- data/lib/stripe/resources/tax/association.rb +0 -89
- 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 -1715
- data/lib/stripe/resources/v2/core/account_link.rb +0 -54
- data/lib/stripe/resources/v2/core/person.rb +0 -272
- data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -72
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -37
- data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -18
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -20
- data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -49
- data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -56
- data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -66
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -92
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -127
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -74
- data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -43
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -115
- data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -73
- data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -47
- data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -134
- data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -106
- data/lib/stripe/resources/v2/money_management/transaction.rb +0 -76
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -66
- 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/external_account_service.rb +0 -206
- data/lib/stripe/services/gift_cards/card_service.rb +0 -170
- data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
- data/lib/stripe/services/gift_cards_service.rb +0 -14
- 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 -2268
- 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/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 -4130
- data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1040
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -135
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -109
- data/lib/stripe/services/v2/core/vault_service.rb +0 -18
- data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -75
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -44
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -81
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -126
- data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -80
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -202
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -237
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -174
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -95
- 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 -71
- data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -44
- data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -70
- data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -74
- data/lib/stripe/services/v2/money_management_service.rb +0 -31
- data/lib/stripe/services/v2/test_helper_service.rb +0 -15
- data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -50
- data/rbi/stripe.rbi +0 -189274
@@ -3,14 +3,10 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
class QuoteService < StripeService
|
6
|
-
attr_reader :
|
6
|
+
attr_reader :line_items, :computed_upfront_line_items
|
7
7
|
|
8
8
|
def initialize(requestor)
|
9
9
|
super(requestor)
|
10
|
-
@preview_invoices = Stripe::QuotePreviewInvoiceService.new(@requestor)
|
11
|
-
@preview_subscription_schedules = Stripe::QuotePreviewSubscriptionScheduleService
|
12
|
-
.new(@requestor)
|
13
|
-
@lines = Stripe::QuoteLineService.new(@requestor)
|
14
10
|
@line_items = Stripe::QuoteLineItemService.new(@requestor)
|
15
11
|
@computed_upfront_line_items = Stripe::QuoteComputedUpfrontLineItemsService.new(@requestor)
|
16
12
|
end
|
@@ -18,14 +14,10 @@ module Stripe
|
|
18
14
|
class ListParams < Stripe::RequestParams
|
19
15
|
# The ID of the customer whose quotes will be retrieved.
|
20
16
|
attr_accessor :customer
|
21
|
-
# The ID of the account whose quotes will be retrieved.
|
22
|
-
attr_accessor :customer_account
|
23
17
|
# 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.
|
24
18
|
attr_accessor :ending_before
|
25
19
|
# Specifies which fields in the response should be expanded.
|
26
20
|
attr_accessor :expand
|
27
|
-
# The subscription which the quote updates.
|
28
|
-
attr_accessor :from_subscription
|
29
21
|
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
30
22
|
attr_accessor :limit
|
31
23
|
# 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.
|
@@ -37,20 +29,16 @@ module Stripe
|
|
37
29
|
|
38
30
|
def initialize(
|
39
31
|
customer: nil,
|
40
|
-
customer_account: nil,
|
41
32
|
ending_before: nil,
|
42
33
|
expand: nil,
|
43
|
-
from_subscription: nil,
|
44
34
|
limit: nil,
|
45
35
|
starting_after: nil,
|
46
36
|
status: nil,
|
47
37
|
test_clock: nil
|
48
38
|
)
|
49
39
|
@customer = customer
|
50
|
-
@customer_account = customer_account
|
51
40
|
@ending_before = ending_before
|
52
41
|
@expand = expand
|
53
|
-
@from_subscription = from_subscription
|
54
42
|
@limit = limit
|
55
43
|
@starting_after = starting_after
|
56
44
|
@status = status
|
@@ -83,44 +71,16 @@ module Stripe
|
|
83
71
|
end
|
84
72
|
|
85
73
|
class Discount < Stripe::RequestParams
|
86
|
-
class DiscountEnd < Stripe::RequestParams
|
87
|
-
class Duration < Stripe::RequestParams
|
88
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
89
|
-
attr_accessor :interval
|
90
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
91
|
-
attr_accessor :interval_count
|
92
|
-
|
93
|
-
def initialize(interval: nil, interval_count: nil)
|
94
|
-
@interval = interval
|
95
|
-
@interval_count = interval_count
|
96
|
-
end
|
97
|
-
end
|
98
|
-
# Time span for the redeemed discount.
|
99
|
-
attr_accessor :duration
|
100
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
101
|
-
attr_accessor :timestamp
|
102
|
-
# The type of calculation made to determine when the discount ends.
|
103
|
-
attr_accessor :type
|
104
|
-
|
105
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
106
|
-
@duration = duration
|
107
|
-
@timestamp = timestamp
|
108
|
-
@type = type
|
109
|
-
end
|
110
|
-
end
|
111
74
|
# ID of the coupon to create a new discount for.
|
112
75
|
attr_accessor :coupon
|
113
76
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
114
77
|
attr_accessor :discount
|
115
|
-
# Details to determine how long the discount should be applied for.
|
116
|
-
attr_accessor :discount_end
|
117
78
|
# ID of the promotion code to create a new discount for.
|
118
79
|
attr_accessor :promotion_code
|
119
80
|
|
120
|
-
def initialize(coupon: nil, discount: nil,
|
81
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
121
82
|
@coupon = coupon
|
122
83
|
@discount = discount
|
123
|
-
@discount_end = discount_end
|
124
84
|
@promotion_code = promotion_code
|
125
85
|
end
|
126
86
|
end
|
@@ -160,522 +120,18 @@ module Stripe
|
|
160
120
|
end
|
161
121
|
end
|
162
122
|
|
163
|
-
class Line < Stripe::RequestParams
|
164
|
-
class Action < Stripe::RequestParams
|
165
|
-
class AddDiscount < Stripe::RequestParams
|
166
|
-
class DiscountEnd < Stripe::RequestParams
|
167
|
-
# The type of calculation made to determine when the discount ends.
|
168
|
-
attr_accessor :type
|
169
|
-
|
170
|
-
def initialize(type: nil)
|
171
|
-
@type = type
|
172
|
-
end
|
173
|
-
end
|
174
|
-
# The coupon code to redeem.
|
175
|
-
attr_accessor :coupon
|
176
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
177
|
-
attr_accessor :discount
|
178
|
-
# Details to determine how long the discount should be applied for.
|
179
|
-
attr_accessor :discount_end
|
180
|
-
# 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.
|
181
|
-
attr_accessor :index
|
182
|
-
# The promotion code to redeem.
|
183
|
-
attr_accessor :promotion_code
|
184
|
-
|
185
|
-
def initialize(
|
186
|
-
coupon: nil,
|
187
|
-
discount: nil,
|
188
|
-
discount_end: nil,
|
189
|
-
index: nil,
|
190
|
-
promotion_code: nil
|
191
|
-
)
|
192
|
-
@coupon = coupon
|
193
|
-
@discount = discount
|
194
|
-
@discount_end = discount_end
|
195
|
-
@index = index
|
196
|
-
@promotion_code = promotion_code
|
197
|
-
end
|
198
|
-
end
|
199
|
-
|
200
|
-
class AddItem < Stripe::RequestParams
|
201
|
-
class Discount < Stripe::RequestParams
|
202
|
-
class DiscountEnd < Stripe::RequestParams
|
203
|
-
class Duration < Stripe::RequestParams
|
204
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
205
|
-
attr_accessor :interval
|
206
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
207
|
-
attr_accessor :interval_count
|
208
|
-
|
209
|
-
def initialize(interval: nil, interval_count: nil)
|
210
|
-
@interval = interval
|
211
|
-
@interval_count = interval_count
|
212
|
-
end
|
213
|
-
end
|
214
|
-
# Time span for the redeemed discount.
|
215
|
-
attr_accessor :duration
|
216
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
217
|
-
attr_accessor :timestamp
|
218
|
-
# The type of calculation made to determine when the discount ends.
|
219
|
-
attr_accessor :type
|
220
|
-
|
221
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
222
|
-
@duration = duration
|
223
|
-
@timestamp = timestamp
|
224
|
-
@type = type
|
225
|
-
end
|
226
|
-
end
|
227
|
-
# ID of the coupon to create a new discount for.
|
228
|
-
attr_accessor :coupon
|
229
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
230
|
-
attr_accessor :discount
|
231
|
-
# Details to determine how long the discount should be applied for.
|
232
|
-
attr_accessor :discount_end
|
233
|
-
# ID of the promotion code to create a new discount for.
|
234
|
-
attr_accessor :promotion_code
|
235
|
-
|
236
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
237
|
-
@coupon = coupon
|
238
|
-
@discount = discount
|
239
|
-
@discount_end = discount_end
|
240
|
-
@promotion_code = promotion_code
|
241
|
-
end
|
242
|
-
end
|
243
|
-
|
244
|
-
class Trial < Stripe::RequestParams
|
245
|
-
# 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.
|
246
|
-
attr_accessor :converts_to
|
247
|
-
# Determines the type of trial for this item.
|
248
|
-
attr_accessor :type
|
249
|
-
|
250
|
-
def initialize(converts_to: nil, type: nil)
|
251
|
-
@converts_to = converts_to
|
252
|
-
@type = type
|
253
|
-
end
|
254
|
-
end
|
255
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
256
|
-
attr_accessor :discounts
|
257
|
-
# 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`.
|
258
|
-
attr_accessor :metadata
|
259
|
-
# The ID of the price object.
|
260
|
-
attr_accessor :price
|
261
|
-
# Quantity for this item.
|
262
|
-
attr_accessor :quantity
|
263
|
-
# 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`.
|
264
|
-
attr_accessor :tax_rates
|
265
|
-
# Options that configure the trial on the subscription item.
|
266
|
-
attr_accessor :trial
|
267
|
-
|
268
|
-
def initialize(
|
269
|
-
discounts: nil,
|
270
|
-
metadata: nil,
|
271
|
-
price: nil,
|
272
|
-
quantity: nil,
|
273
|
-
tax_rates: nil,
|
274
|
-
trial: nil
|
275
|
-
)
|
276
|
-
@discounts = discounts
|
277
|
-
@metadata = metadata
|
278
|
-
@price = price
|
279
|
-
@quantity = quantity
|
280
|
-
@tax_rates = tax_rates
|
281
|
-
@trial = trial
|
282
|
-
end
|
283
|
-
end
|
284
|
-
|
285
|
-
class RemoveDiscount < Stripe::RequestParams
|
286
|
-
# The coupon code to remove from the `discounts` array.
|
287
|
-
attr_accessor :coupon
|
288
|
-
# The ID of a discount to remove from the `discounts` array.
|
289
|
-
attr_accessor :discount
|
290
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
291
|
-
attr_accessor :promotion_code
|
292
|
-
|
293
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
294
|
-
@coupon = coupon
|
295
|
-
@discount = discount
|
296
|
-
@promotion_code = promotion_code
|
297
|
-
end
|
298
|
-
end
|
299
|
-
|
300
|
-
class RemoveItem < Stripe::RequestParams
|
301
|
-
# ID of a price to remove.
|
302
|
-
attr_accessor :price
|
303
|
-
|
304
|
-
def initialize(price: nil)
|
305
|
-
@price = price
|
306
|
-
end
|
307
|
-
end
|
308
|
-
|
309
|
-
class SetDiscount < Stripe::RequestParams
|
310
|
-
# The coupon code to replace the `discounts` array with.
|
311
|
-
attr_accessor :coupon
|
312
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
313
|
-
attr_accessor :discount
|
314
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
315
|
-
attr_accessor :promotion_code
|
316
|
-
|
317
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
318
|
-
@coupon = coupon
|
319
|
-
@discount = discount
|
320
|
-
@promotion_code = promotion_code
|
321
|
-
end
|
322
|
-
end
|
323
|
-
|
324
|
-
class SetItem < Stripe::RequestParams
|
325
|
-
class Discount < Stripe::RequestParams
|
326
|
-
class DiscountEnd < Stripe::RequestParams
|
327
|
-
class Duration < Stripe::RequestParams
|
328
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
329
|
-
attr_accessor :interval
|
330
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
331
|
-
attr_accessor :interval_count
|
332
|
-
|
333
|
-
def initialize(interval: nil, interval_count: nil)
|
334
|
-
@interval = interval
|
335
|
-
@interval_count = interval_count
|
336
|
-
end
|
337
|
-
end
|
338
|
-
# Time span for the redeemed discount.
|
339
|
-
attr_accessor :duration
|
340
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
341
|
-
attr_accessor :timestamp
|
342
|
-
# The type of calculation made to determine when the discount ends.
|
343
|
-
attr_accessor :type
|
344
|
-
|
345
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
346
|
-
@duration = duration
|
347
|
-
@timestamp = timestamp
|
348
|
-
@type = type
|
349
|
-
end
|
350
|
-
end
|
351
|
-
# ID of the coupon to create a new discount for.
|
352
|
-
attr_accessor :coupon
|
353
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
354
|
-
attr_accessor :discount
|
355
|
-
# Details to determine how long the discount should be applied for.
|
356
|
-
attr_accessor :discount_end
|
357
|
-
# ID of the promotion code to create a new discount for.
|
358
|
-
attr_accessor :promotion_code
|
359
|
-
|
360
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
361
|
-
@coupon = coupon
|
362
|
-
@discount = discount
|
363
|
-
@discount_end = discount_end
|
364
|
-
@promotion_code = promotion_code
|
365
|
-
end
|
366
|
-
end
|
367
|
-
|
368
|
-
class Trial < Stripe::RequestParams
|
369
|
-
# 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.
|
370
|
-
attr_accessor :converts_to
|
371
|
-
# Determines the type of trial for this item.
|
372
|
-
attr_accessor :type
|
373
|
-
|
374
|
-
def initialize(converts_to: nil, type: nil)
|
375
|
-
@converts_to = converts_to
|
376
|
-
@type = type
|
377
|
-
end
|
378
|
-
end
|
379
|
-
# 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`.
|
380
|
-
attr_accessor :discounts
|
381
|
-
# 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`.
|
382
|
-
attr_accessor :metadata
|
383
|
-
# The ID of the price object.
|
384
|
-
attr_accessor :price
|
385
|
-
# 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`.
|
386
|
-
attr_accessor :quantity
|
387
|
-
# 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`.
|
388
|
-
attr_accessor :tax_rates
|
389
|
-
# 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`.
|
390
|
-
attr_accessor :trial
|
391
|
-
|
392
|
-
def initialize(
|
393
|
-
discounts: nil,
|
394
|
-
metadata: nil,
|
395
|
-
price: nil,
|
396
|
-
quantity: nil,
|
397
|
-
tax_rates: nil,
|
398
|
-
trial: nil
|
399
|
-
)
|
400
|
-
@discounts = discounts
|
401
|
-
@metadata = metadata
|
402
|
-
@price = price
|
403
|
-
@quantity = quantity
|
404
|
-
@tax_rates = tax_rates
|
405
|
-
@trial = trial
|
406
|
-
end
|
407
|
-
end
|
408
|
-
# Details for the `add_discount` type.
|
409
|
-
attr_accessor :add_discount
|
410
|
-
# Details for the `add_item` type.
|
411
|
-
attr_accessor :add_item
|
412
|
-
# Details for the `add_metadata` type: specify a hash of key-value pairs.
|
413
|
-
attr_accessor :add_metadata
|
414
|
-
# Details for the `remove_discount` type.
|
415
|
-
attr_accessor :remove_discount
|
416
|
-
# Details for the `remove_item` type.
|
417
|
-
attr_accessor :remove_item
|
418
|
-
# Details for the `remove_metadata` type: specify an array of metadata keys.
|
419
|
-
attr_accessor :remove_metadata
|
420
|
-
# Details for the `set_discounts` type.
|
421
|
-
attr_accessor :set_discounts
|
422
|
-
# Details for the `set_items` type.
|
423
|
-
attr_accessor :set_items
|
424
|
-
# Details for the `set_metadata` type: specify an array of key-value pairs.
|
425
|
-
attr_accessor :set_metadata
|
426
|
-
# The type of action the quote line performs.
|
427
|
-
attr_accessor :type
|
428
|
-
|
429
|
-
def initialize(
|
430
|
-
add_discount: nil,
|
431
|
-
add_item: nil,
|
432
|
-
add_metadata: nil,
|
433
|
-
remove_discount: nil,
|
434
|
-
remove_item: nil,
|
435
|
-
remove_metadata: nil,
|
436
|
-
set_discounts: nil,
|
437
|
-
set_items: nil,
|
438
|
-
set_metadata: nil,
|
439
|
-
type: nil
|
440
|
-
)
|
441
|
-
@add_discount = add_discount
|
442
|
-
@add_item = add_item
|
443
|
-
@add_metadata = add_metadata
|
444
|
-
@remove_discount = remove_discount
|
445
|
-
@remove_item = remove_item
|
446
|
-
@remove_metadata = remove_metadata
|
447
|
-
@set_discounts = set_discounts
|
448
|
-
@set_items = set_items
|
449
|
-
@set_metadata = set_metadata
|
450
|
-
@type = type
|
451
|
-
end
|
452
|
-
end
|
453
|
-
|
454
|
-
class AppliesTo < Stripe::RequestParams
|
455
|
-
# 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.
|
456
|
-
attr_accessor :new_reference
|
457
|
-
# The ID of the schedule the line applies to.
|
458
|
-
attr_accessor :subscription_schedule
|
459
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
460
|
-
attr_accessor :type
|
461
|
-
|
462
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
463
|
-
@new_reference = new_reference
|
464
|
-
@subscription_schedule = subscription_schedule
|
465
|
-
@type = type
|
466
|
-
end
|
467
|
-
end
|
468
|
-
|
469
|
-
class CancelSubscriptionSchedule < Stripe::RequestParams
|
470
|
-
# Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
471
|
-
attr_accessor :cancel_at
|
472
|
-
# 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`.
|
473
|
-
attr_accessor :invoice_now
|
474
|
-
# If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
475
|
-
attr_accessor :prorate
|
476
|
-
|
477
|
-
def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
|
478
|
-
@cancel_at = cancel_at
|
479
|
-
@invoice_now = invoice_now
|
480
|
-
@prorate = prorate
|
481
|
-
end
|
482
|
-
end
|
483
|
-
|
484
|
-
class EndsAt < Stripe::RequestParams
|
485
|
-
class DiscountEnd < Stripe::RequestParams
|
486
|
-
# The ID of a specific discount.
|
487
|
-
attr_accessor :discount
|
488
|
-
|
489
|
-
def initialize(discount: nil)
|
490
|
-
@discount = discount
|
491
|
-
end
|
492
|
-
end
|
493
|
-
|
494
|
-
class Duration < Stripe::RequestParams
|
495
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
496
|
-
attr_accessor :interval
|
497
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
498
|
-
attr_accessor :interval_count
|
499
|
-
|
500
|
-
def initialize(interval: nil, interval_count: nil)
|
501
|
-
@interval = interval
|
502
|
-
@interval_count = interval_count
|
503
|
-
end
|
504
|
-
end
|
505
|
-
# Use the `end` time of a given discount.
|
506
|
-
attr_accessor :discount_end
|
507
|
-
# Time span for the quote line starting from the `starts_at` date.
|
508
|
-
attr_accessor :duration
|
509
|
-
# A precise Unix timestamp.
|
510
|
-
attr_accessor :timestamp
|
511
|
-
# Select a way to pass in `ends_at`.
|
512
|
-
attr_accessor :type
|
513
|
-
|
514
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
515
|
-
@discount_end = discount_end
|
516
|
-
@duration = duration
|
517
|
-
@timestamp = timestamp
|
518
|
-
@type = type
|
519
|
-
end
|
520
|
-
end
|
521
|
-
|
522
|
-
class SetPauseCollection < Stripe::RequestParams
|
523
|
-
class Set < Stripe::RequestParams
|
524
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
525
|
-
attr_accessor :behavior
|
526
|
-
|
527
|
-
def initialize(behavior: nil)
|
528
|
-
@behavior = behavior
|
529
|
-
end
|
530
|
-
end
|
531
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
532
|
-
attr_accessor :set
|
533
|
-
# Determines the type of the pause_collection amendment.
|
534
|
-
attr_accessor :type
|
535
|
-
|
536
|
-
def initialize(set: nil, type: nil)
|
537
|
-
@set = set
|
538
|
-
@type = type
|
539
|
-
end
|
540
|
-
end
|
541
|
-
|
542
|
-
class StartsAt < Stripe::RequestParams
|
543
|
-
class DiscountEnd < Stripe::RequestParams
|
544
|
-
# The ID of a specific discount.
|
545
|
-
attr_accessor :discount
|
546
|
-
|
547
|
-
def initialize(discount: nil)
|
548
|
-
@discount = discount
|
549
|
-
end
|
550
|
-
end
|
551
|
-
|
552
|
-
class LineEndsAt < Stripe::RequestParams
|
553
|
-
# 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.
|
554
|
-
attr_accessor :index
|
555
|
-
|
556
|
-
def initialize(index: nil)
|
557
|
-
@index = index
|
558
|
-
end
|
559
|
-
end
|
560
|
-
# Use the `end` time of a given discount.
|
561
|
-
attr_accessor :discount_end
|
562
|
-
# The timestamp the given line ends at.
|
563
|
-
attr_accessor :line_ends_at
|
564
|
-
# A precise Unix timestamp.
|
565
|
-
attr_accessor :timestamp
|
566
|
-
# Select a way to pass in `starts_at`.
|
567
|
-
attr_accessor :type
|
568
|
-
|
569
|
-
def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
570
|
-
@discount_end = discount_end
|
571
|
-
@line_ends_at = line_ends_at
|
572
|
-
@timestamp = timestamp
|
573
|
-
@type = type
|
574
|
-
end
|
575
|
-
end
|
576
|
-
|
577
|
-
class TrialSettings < Stripe::RequestParams
|
578
|
-
class EndBehavior < Stripe::RequestParams
|
579
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
580
|
-
attr_accessor :prorate_up_front
|
581
|
-
|
582
|
-
def initialize(prorate_up_front: nil)
|
583
|
-
@prorate_up_front = prorate_up_front
|
584
|
-
end
|
585
|
-
end
|
586
|
-
# Defines how the subscription should behave when a trial ends.
|
587
|
-
attr_accessor :end_behavior
|
588
|
-
|
589
|
-
def initialize(end_behavior: nil)
|
590
|
-
@end_behavior = end_behavior
|
591
|
-
end
|
592
|
-
end
|
593
|
-
# An array of operations the quote line performs.
|
594
|
-
attr_accessor :actions
|
595
|
-
# Details to identify the subscription schedule the quote line applies to.
|
596
|
-
attr_accessor :applies_to
|
597
|
-
# 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.
|
598
|
-
attr_accessor :billing_cycle_anchor
|
599
|
-
# 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.
|
600
|
-
attr_accessor :cancel_subscription_schedule
|
601
|
-
# 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.
|
602
|
-
attr_accessor :ends_at
|
603
|
-
# 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.
|
604
|
-
attr_accessor :proration_behavior
|
605
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
606
|
-
attr_accessor :set_pause_collection
|
607
|
-
# Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
608
|
-
attr_accessor :set_schedule_end
|
609
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
610
|
-
attr_accessor :starts_at
|
611
|
-
# Settings related to subscription trials.
|
612
|
-
attr_accessor :trial_settings
|
613
|
-
|
614
|
-
def initialize(
|
615
|
-
actions: nil,
|
616
|
-
applies_to: nil,
|
617
|
-
billing_cycle_anchor: nil,
|
618
|
-
cancel_subscription_schedule: nil,
|
619
|
-
ends_at: nil,
|
620
|
-
proration_behavior: nil,
|
621
|
-
set_pause_collection: nil,
|
622
|
-
set_schedule_end: nil,
|
623
|
-
starts_at: nil,
|
624
|
-
trial_settings: nil
|
625
|
-
)
|
626
|
-
@actions = actions
|
627
|
-
@applies_to = applies_to
|
628
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
629
|
-
@cancel_subscription_schedule = cancel_subscription_schedule
|
630
|
-
@ends_at = ends_at
|
631
|
-
@proration_behavior = proration_behavior
|
632
|
-
@set_pause_collection = set_pause_collection
|
633
|
-
@set_schedule_end = set_schedule_end
|
634
|
-
@starts_at = starts_at
|
635
|
-
@trial_settings = trial_settings
|
636
|
-
end
|
637
|
-
end
|
638
|
-
|
639
123
|
class LineItem < Stripe::RequestParams
|
640
124
|
class Discount < Stripe::RequestParams
|
641
|
-
class DiscountEnd < Stripe::RequestParams
|
642
|
-
class Duration < Stripe::RequestParams
|
643
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
644
|
-
attr_accessor :interval
|
645
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
646
|
-
attr_accessor :interval_count
|
647
|
-
|
648
|
-
def initialize(interval: nil, interval_count: nil)
|
649
|
-
@interval = interval
|
650
|
-
@interval_count = interval_count
|
651
|
-
end
|
652
|
-
end
|
653
|
-
# Time span for the redeemed discount.
|
654
|
-
attr_accessor :duration
|
655
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
656
|
-
attr_accessor :timestamp
|
657
|
-
# The type of calculation made to determine when the discount ends.
|
658
|
-
attr_accessor :type
|
659
|
-
|
660
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
661
|
-
@duration = duration
|
662
|
-
@timestamp = timestamp
|
663
|
-
@type = type
|
664
|
-
end
|
665
|
-
end
|
666
125
|
# ID of the coupon to create a new discount for.
|
667
126
|
attr_accessor :coupon
|
668
127
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
669
128
|
attr_accessor :discount
|
670
|
-
# Details to determine how long the discount should be applied for.
|
671
|
-
attr_accessor :discount_end
|
672
129
|
# ID of the promotion code to create a new discount for.
|
673
130
|
attr_accessor :promotion_code
|
674
131
|
|
675
|
-
def initialize(coupon: nil, discount: nil,
|
132
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
676
133
|
@coupon = coupon
|
677
134
|
@discount = discount
|
678
|
-
@discount_end = discount_end
|
679
135
|
@promotion_code = promotion_code
|
680
136
|
end
|
681
137
|
end
|
@@ -742,281 +198,23 @@ module Stripe
|
|
742
198
|
end
|
743
199
|
|
744
200
|
class SubscriptionData < Stripe::RequestParams
|
745
|
-
class BillOnAcceptance < Stripe::RequestParams
|
746
|
-
class BillFrom < Stripe::RequestParams
|
747
|
-
class LineStartsAt < Stripe::RequestParams
|
748
|
-
# The ID of a quote line.
|
749
|
-
attr_accessor :id
|
750
|
-
# 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.
|
751
|
-
attr_accessor :index
|
752
|
-
|
753
|
-
def initialize(id: nil, index: nil)
|
754
|
-
@id = id
|
755
|
-
@index = index
|
756
|
-
end
|
757
|
-
end
|
758
|
-
# Details of a Quote line to start the bill period from.
|
759
|
-
attr_accessor :line_starts_at
|
760
|
-
# A precise Unix timestamp.
|
761
|
-
attr_accessor :timestamp
|
762
|
-
# The type of method to specify the `bill_from` time.
|
763
|
-
attr_accessor :type
|
764
|
-
|
765
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
766
|
-
@line_starts_at = line_starts_at
|
767
|
-
@timestamp = timestamp
|
768
|
-
@type = type
|
769
|
-
end
|
770
|
-
end
|
771
|
-
|
772
|
-
class BillUntil < Stripe::RequestParams
|
773
|
-
class Duration < Stripe::RequestParams
|
774
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
775
|
-
attr_accessor :interval
|
776
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
777
|
-
attr_accessor :interval_count
|
778
|
-
|
779
|
-
def initialize(interval: nil, interval_count: nil)
|
780
|
-
@interval = interval
|
781
|
-
@interval_count = interval_count
|
782
|
-
end
|
783
|
-
end
|
784
|
-
|
785
|
-
class LineEndsAt < Stripe::RequestParams
|
786
|
-
# The ID of a quote line.
|
787
|
-
attr_accessor :id
|
788
|
-
# 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.
|
789
|
-
attr_accessor :index
|
790
|
-
|
791
|
-
def initialize(id: nil, index: nil)
|
792
|
-
@id = id
|
793
|
-
@index = index
|
794
|
-
end
|
795
|
-
end
|
796
|
-
# Details of the duration over which to bill.
|
797
|
-
attr_accessor :duration
|
798
|
-
# Details of a Quote line item from which to bill until.
|
799
|
-
attr_accessor :line_ends_at
|
800
|
-
# A precise Unix timestamp.
|
801
|
-
attr_accessor :timestamp
|
802
|
-
# The type of method to specify the `bill_until` time.
|
803
|
-
attr_accessor :type
|
804
|
-
|
805
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
806
|
-
@duration = duration
|
807
|
-
@line_ends_at = line_ends_at
|
808
|
-
@timestamp = timestamp
|
809
|
-
@type = type
|
810
|
-
end
|
811
|
-
end
|
812
|
-
# The start of the period to bill from when the Quote is accepted.
|
813
|
-
attr_accessor :bill_from
|
814
|
-
# The end of the period to bill until when the Quote is accepted.
|
815
|
-
attr_accessor :bill_until
|
816
|
-
|
817
|
-
def initialize(bill_from: nil, bill_until: nil)
|
818
|
-
@bill_from = bill_from
|
819
|
-
@bill_until = bill_until
|
820
|
-
end
|
821
|
-
end
|
822
|
-
|
823
|
-
class Prebilling < Stripe::RequestParams
|
824
|
-
# This is used to determine the number of billing cycles to prebill.
|
825
|
-
attr_accessor :iterations
|
826
|
-
|
827
|
-
def initialize(iterations: nil)
|
828
|
-
@iterations = iterations
|
829
|
-
end
|
830
|
-
end
|
831
|
-
# Describes the period to bill for upon accepting the quote.
|
832
|
-
attr_accessor :bill_on_acceptance
|
833
|
-
# 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.
|
834
|
-
attr_accessor :billing_behavior
|
835
|
-
# When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
836
|
-
attr_accessor :billing_cycle_anchor
|
837
201
|
# 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.
|
838
202
|
attr_accessor :description
|
839
203
|
# When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
840
204
|
attr_accessor :effective_date
|
841
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
842
|
-
attr_accessor :end_behavior
|
843
|
-
# 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.
|
844
|
-
attr_accessor :from_subscription
|
845
205
|
# 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.
|
846
206
|
attr_accessor :metadata
|
847
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
848
|
-
attr_accessor :prebilling
|
849
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
850
|
-
#
|
851
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
852
|
-
#
|
853
|
-
# 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`.
|
854
|
-
#
|
855
|
-
# Prorations can be disabled by passing `none`.
|
856
|
-
attr_accessor :proration_behavior
|
857
207
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
858
208
|
attr_accessor :trial_period_days
|
859
209
|
|
860
|
-
def initialize(
|
861
|
-
bill_on_acceptance: nil,
|
862
|
-
billing_behavior: nil,
|
863
|
-
billing_cycle_anchor: nil,
|
864
|
-
description: nil,
|
865
|
-
effective_date: nil,
|
866
|
-
end_behavior: nil,
|
867
|
-
from_subscription: nil,
|
868
|
-
metadata: nil,
|
869
|
-
prebilling: nil,
|
870
|
-
proration_behavior: nil,
|
871
|
-
trial_period_days: nil
|
872
|
-
)
|
873
|
-
@bill_on_acceptance = bill_on_acceptance
|
874
|
-
@billing_behavior = billing_behavior
|
875
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
210
|
+
def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil)
|
876
211
|
@description = description
|
877
212
|
@effective_date = effective_date
|
878
|
-
@end_behavior = end_behavior
|
879
|
-
@from_subscription = from_subscription
|
880
213
|
@metadata = metadata
|
881
|
-
@prebilling = prebilling
|
882
|
-
@proration_behavior = proration_behavior
|
883
214
|
@trial_period_days = trial_period_days
|
884
215
|
end
|
885
216
|
end
|
886
217
|
|
887
|
-
class SubscriptionDataOverride < Stripe::RequestParams
|
888
|
-
class AppliesTo < Stripe::RequestParams
|
889
|
-
# 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.
|
890
|
-
attr_accessor :new_reference
|
891
|
-
# The ID of the schedule the line applies to.
|
892
|
-
attr_accessor :subscription_schedule
|
893
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
894
|
-
attr_accessor :type
|
895
|
-
|
896
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
897
|
-
@new_reference = new_reference
|
898
|
-
@subscription_schedule = subscription_schedule
|
899
|
-
@type = type
|
900
|
-
end
|
901
|
-
end
|
902
|
-
|
903
|
-
class BillOnAcceptance < Stripe::RequestParams
|
904
|
-
class BillFrom < Stripe::RequestParams
|
905
|
-
class LineStartsAt < Stripe::RequestParams
|
906
|
-
# The ID of a quote line.
|
907
|
-
attr_accessor :id
|
908
|
-
# 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.
|
909
|
-
attr_accessor :index
|
910
|
-
|
911
|
-
def initialize(id: nil, index: nil)
|
912
|
-
@id = id
|
913
|
-
@index = index
|
914
|
-
end
|
915
|
-
end
|
916
|
-
# Details of a Quote line to start the bill period from.
|
917
|
-
attr_accessor :line_starts_at
|
918
|
-
# A precise Unix timestamp.
|
919
|
-
attr_accessor :timestamp
|
920
|
-
# The type of method to specify the `bill_from` time.
|
921
|
-
attr_accessor :type
|
922
|
-
|
923
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
924
|
-
@line_starts_at = line_starts_at
|
925
|
-
@timestamp = timestamp
|
926
|
-
@type = type
|
927
|
-
end
|
928
|
-
end
|
929
|
-
|
930
|
-
class BillUntil < Stripe::RequestParams
|
931
|
-
class Duration < Stripe::RequestParams
|
932
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
933
|
-
attr_accessor :interval
|
934
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
935
|
-
attr_accessor :interval_count
|
936
|
-
|
937
|
-
def initialize(interval: nil, interval_count: nil)
|
938
|
-
@interval = interval
|
939
|
-
@interval_count = interval_count
|
940
|
-
end
|
941
|
-
end
|
942
|
-
|
943
|
-
class LineEndsAt < Stripe::RequestParams
|
944
|
-
# The ID of a quote line.
|
945
|
-
attr_accessor :id
|
946
|
-
# 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.
|
947
|
-
attr_accessor :index
|
948
|
-
|
949
|
-
def initialize(id: nil, index: nil)
|
950
|
-
@id = id
|
951
|
-
@index = index
|
952
|
-
end
|
953
|
-
end
|
954
|
-
# Details of the duration over which to bill.
|
955
|
-
attr_accessor :duration
|
956
|
-
# Details of a Quote line item from which to bill until.
|
957
|
-
attr_accessor :line_ends_at
|
958
|
-
# A precise Unix timestamp.
|
959
|
-
attr_accessor :timestamp
|
960
|
-
# The type of method to specify the `bill_until` time.
|
961
|
-
attr_accessor :type
|
962
|
-
|
963
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
964
|
-
@duration = duration
|
965
|
-
@line_ends_at = line_ends_at
|
966
|
-
@timestamp = timestamp
|
967
|
-
@type = type
|
968
|
-
end
|
969
|
-
end
|
970
|
-
# The start of the period to bill from when the Quote is accepted.
|
971
|
-
attr_accessor :bill_from
|
972
|
-
# The end of the period to bill until when the Quote is accepted.
|
973
|
-
attr_accessor :bill_until
|
974
|
-
|
975
|
-
def initialize(bill_from: nil, bill_until: nil)
|
976
|
-
@bill_from = bill_from
|
977
|
-
@bill_until = bill_until
|
978
|
-
end
|
979
|
-
end
|
980
|
-
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
981
|
-
attr_accessor :applies_to
|
982
|
-
# Describes the period to bill for upon accepting the quote.
|
983
|
-
attr_accessor :bill_on_acceptance
|
984
|
-
# 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.
|
985
|
-
attr_accessor :billing_behavior
|
986
|
-
# The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
|
987
|
-
attr_accessor :customer
|
988
|
-
# 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.
|
989
|
-
attr_accessor :description
|
990
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
991
|
-
attr_accessor :end_behavior
|
992
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
993
|
-
#
|
994
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
995
|
-
#
|
996
|
-
# 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`.
|
997
|
-
#
|
998
|
-
# Prorations can be disabled by passing `none`.
|
999
|
-
attr_accessor :proration_behavior
|
1000
|
-
|
1001
|
-
def initialize(
|
1002
|
-
applies_to: nil,
|
1003
|
-
bill_on_acceptance: nil,
|
1004
|
-
billing_behavior: nil,
|
1005
|
-
customer: nil,
|
1006
|
-
description: nil,
|
1007
|
-
end_behavior: nil,
|
1008
|
-
proration_behavior: nil
|
1009
|
-
)
|
1010
|
-
@applies_to = applies_to
|
1011
|
-
@bill_on_acceptance = bill_on_acceptance
|
1012
|
-
@billing_behavior = billing_behavior
|
1013
|
-
@customer = customer
|
1014
|
-
@description = description
|
1015
|
-
@end_behavior = end_behavior
|
1016
|
-
@proration_behavior = proration_behavior
|
1017
|
-
end
|
1018
|
-
end
|
1019
|
-
|
1020
218
|
class TransferData < Stripe::RequestParams
|
1021
219
|
# 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.
|
1022
220
|
attr_accessor :amount
|
@@ -1031,8 +229,6 @@ module Stripe
|
|
1031
229
|
@destination = destination
|
1032
230
|
end
|
1033
231
|
end
|
1034
|
-
# Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
1035
|
-
attr_accessor :allow_backdated_lines
|
1036
232
|
# 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.
|
1037
233
|
attr_accessor :application_fee_amount
|
1038
234
|
# 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.
|
@@ -1043,8 +239,6 @@ module Stripe
|
|
1043
239
|
attr_accessor :collection_method
|
1044
240
|
# The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
1045
241
|
attr_accessor :customer
|
1046
|
-
# The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
|
1047
|
-
attr_accessor :customer_account
|
1048
242
|
# The tax rates that will apply to any line item that does not have `tax_rates` set.
|
1049
243
|
attr_accessor :default_tax_rates
|
1050
244
|
# 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.
|
@@ -1065,29 +259,23 @@ module Stripe
|
|
1065
259
|
attr_accessor :invoice_settings
|
1066
260
|
# 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.
|
1067
261
|
attr_accessor :line_items
|
1068
|
-
# 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.
|
1069
|
-
attr_accessor :lines
|
1070
262
|
# 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`.
|
1071
263
|
attr_accessor :metadata
|
1072
264
|
# The account on behalf of which to charge.
|
1073
265
|
attr_accessor :on_behalf_of
|
1074
266
|
# 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.
|
1075
267
|
attr_accessor :subscription_data
|
1076
|
-
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
1077
|
-
attr_accessor :subscription_data_overrides
|
1078
268
|
# ID of the test clock to attach to the quote.
|
1079
269
|
attr_accessor :test_clock
|
1080
270
|
# The data with which to automatically create a Transfer for each of the invoices.
|
1081
271
|
attr_accessor :transfer_data
|
1082
272
|
|
1083
273
|
def initialize(
|
1084
|
-
allow_backdated_lines: nil,
|
1085
274
|
application_fee_amount: nil,
|
1086
275
|
application_fee_percent: nil,
|
1087
276
|
automatic_tax: nil,
|
1088
277
|
collection_method: nil,
|
1089
278
|
customer: nil,
|
1090
|
-
customer_account: nil,
|
1091
279
|
default_tax_rates: nil,
|
1092
280
|
description: nil,
|
1093
281
|
discounts: nil,
|
@@ -1098,21 +286,17 @@ module Stripe
|
|
1098
286
|
header: nil,
|
1099
287
|
invoice_settings: nil,
|
1100
288
|
line_items: nil,
|
1101
|
-
lines: nil,
|
1102
289
|
metadata: nil,
|
1103
290
|
on_behalf_of: nil,
|
1104
291
|
subscription_data: nil,
|
1105
|
-
subscription_data_overrides: nil,
|
1106
292
|
test_clock: nil,
|
1107
293
|
transfer_data: nil
|
1108
294
|
)
|
1109
|
-
@allow_backdated_lines = allow_backdated_lines
|
1110
295
|
@application_fee_amount = application_fee_amount
|
1111
296
|
@application_fee_percent = application_fee_percent
|
1112
297
|
@automatic_tax = automatic_tax
|
1113
298
|
@collection_method = collection_method
|
1114
299
|
@customer = customer
|
1115
|
-
@customer_account = customer_account
|
1116
300
|
@default_tax_rates = default_tax_rates
|
1117
301
|
@description = description
|
1118
302
|
@discounts = discounts
|
@@ -1123,11 +307,9 @@ module Stripe
|
|
1123
307
|
@header = header
|
1124
308
|
@invoice_settings = invoice_settings
|
1125
309
|
@line_items = line_items
|
1126
|
-
@lines = lines
|
1127
310
|
@metadata = metadata
|
1128
311
|
@on_behalf_of = on_behalf_of
|
1129
312
|
@subscription_data = subscription_data
|
1130
|
-
@subscription_data_overrides = subscription_data_overrides
|
1131
313
|
@test_clock = test_clock
|
1132
314
|
@transfer_data = transfer_data
|
1133
315
|
end
|
@@ -1167,44 +349,16 @@ module Stripe
|
|
1167
349
|
end
|
1168
350
|
|
1169
351
|
class Discount < Stripe::RequestParams
|
1170
|
-
class DiscountEnd < Stripe::RequestParams
|
1171
|
-
class Duration < Stripe::RequestParams
|
1172
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1173
|
-
attr_accessor :interval
|
1174
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1175
|
-
attr_accessor :interval_count
|
1176
|
-
|
1177
|
-
def initialize(interval: nil, interval_count: nil)
|
1178
|
-
@interval = interval
|
1179
|
-
@interval_count = interval_count
|
1180
|
-
end
|
1181
|
-
end
|
1182
|
-
# Time span for the redeemed discount.
|
1183
|
-
attr_accessor :duration
|
1184
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1185
|
-
attr_accessor :timestamp
|
1186
|
-
# The type of calculation made to determine when the discount ends.
|
1187
|
-
attr_accessor :type
|
1188
|
-
|
1189
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1190
|
-
@duration = duration
|
1191
|
-
@timestamp = timestamp
|
1192
|
-
@type = type
|
1193
|
-
end
|
1194
|
-
end
|
1195
352
|
# ID of the coupon to create a new discount for.
|
1196
353
|
attr_accessor :coupon
|
1197
354
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1198
355
|
attr_accessor :discount
|
1199
|
-
# Details to determine how long the discount should be applied for.
|
1200
|
-
attr_accessor :discount_end
|
1201
356
|
# ID of the promotion code to create a new discount for.
|
1202
357
|
attr_accessor :promotion_code
|
1203
358
|
|
1204
|
-
def initialize(coupon: nil, discount: nil,
|
359
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1205
360
|
@coupon = coupon
|
1206
361
|
@discount = discount
|
1207
|
-
@discount_end = discount_end
|
1208
362
|
@promotion_code = promotion_code
|
1209
363
|
end
|
1210
364
|
end
|
@@ -1232,529 +386,18 @@ module Stripe
|
|
1232
386
|
end
|
1233
387
|
end
|
1234
388
|
|
1235
|
-
class Line < Stripe::RequestParams
|
1236
|
-
class Action < Stripe::RequestParams
|
1237
|
-
class AddDiscount < Stripe::RequestParams
|
1238
|
-
class DiscountEnd < Stripe::RequestParams
|
1239
|
-
# The type of calculation made to determine when the discount ends.
|
1240
|
-
attr_accessor :type
|
1241
|
-
|
1242
|
-
def initialize(type: nil)
|
1243
|
-
@type = type
|
1244
|
-
end
|
1245
|
-
end
|
1246
|
-
# The coupon code to redeem.
|
1247
|
-
attr_accessor :coupon
|
1248
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
1249
|
-
attr_accessor :discount
|
1250
|
-
# Details to determine how long the discount should be applied for.
|
1251
|
-
attr_accessor :discount_end
|
1252
|
-
# 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.
|
1253
|
-
attr_accessor :index
|
1254
|
-
# The promotion code to redeem.
|
1255
|
-
attr_accessor :promotion_code
|
1256
|
-
|
1257
|
-
def initialize(
|
1258
|
-
coupon: nil,
|
1259
|
-
discount: nil,
|
1260
|
-
discount_end: nil,
|
1261
|
-
index: nil,
|
1262
|
-
promotion_code: nil
|
1263
|
-
)
|
1264
|
-
@coupon = coupon
|
1265
|
-
@discount = discount
|
1266
|
-
@discount_end = discount_end
|
1267
|
-
@index = index
|
1268
|
-
@promotion_code = promotion_code
|
1269
|
-
end
|
1270
|
-
end
|
1271
|
-
|
1272
|
-
class AddItem < Stripe::RequestParams
|
1273
|
-
class Discount < Stripe::RequestParams
|
1274
|
-
class DiscountEnd < Stripe::RequestParams
|
1275
|
-
class Duration < Stripe::RequestParams
|
1276
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1277
|
-
attr_accessor :interval
|
1278
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1279
|
-
attr_accessor :interval_count
|
1280
|
-
|
1281
|
-
def initialize(interval: nil, interval_count: nil)
|
1282
|
-
@interval = interval
|
1283
|
-
@interval_count = interval_count
|
1284
|
-
end
|
1285
|
-
end
|
1286
|
-
# Time span for the redeemed discount.
|
1287
|
-
attr_accessor :duration
|
1288
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1289
|
-
attr_accessor :timestamp
|
1290
|
-
# The type of calculation made to determine when the discount ends.
|
1291
|
-
attr_accessor :type
|
1292
|
-
|
1293
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1294
|
-
@duration = duration
|
1295
|
-
@timestamp = timestamp
|
1296
|
-
@type = type
|
1297
|
-
end
|
1298
|
-
end
|
1299
|
-
# ID of the coupon to create a new discount for.
|
1300
|
-
attr_accessor :coupon
|
1301
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1302
|
-
attr_accessor :discount
|
1303
|
-
# Details to determine how long the discount should be applied for.
|
1304
|
-
attr_accessor :discount_end
|
1305
|
-
# ID of the promotion code to create a new discount for.
|
1306
|
-
attr_accessor :promotion_code
|
1307
|
-
|
1308
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1309
|
-
@coupon = coupon
|
1310
|
-
@discount = discount
|
1311
|
-
@discount_end = discount_end
|
1312
|
-
@promotion_code = promotion_code
|
1313
|
-
end
|
1314
|
-
end
|
1315
|
-
|
1316
|
-
class Trial < Stripe::RequestParams
|
1317
|
-
# 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.
|
1318
|
-
attr_accessor :converts_to
|
1319
|
-
# Determines the type of trial for this item.
|
1320
|
-
attr_accessor :type
|
1321
|
-
|
1322
|
-
def initialize(converts_to: nil, type: nil)
|
1323
|
-
@converts_to = converts_to
|
1324
|
-
@type = type
|
1325
|
-
end
|
1326
|
-
end
|
1327
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
1328
|
-
attr_accessor :discounts
|
1329
|
-
# 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`.
|
1330
|
-
attr_accessor :metadata
|
1331
|
-
# The ID of the price object.
|
1332
|
-
attr_accessor :price
|
1333
|
-
# Quantity for this item.
|
1334
|
-
attr_accessor :quantity
|
1335
|
-
# 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`.
|
1336
|
-
attr_accessor :tax_rates
|
1337
|
-
# Options that configure the trial on the subscription item.
|
1338
|
-
attr_accessor :trial
|
1339
|
-
|
1340
|
-
def initialize(
|
1341
|
-
discounts: nil,
|
1342
|
-
metadata: nil,
|
1343
|
-
price: nil,
|
1344
|
-
quantity: nil,
|
1345
|
-
tax_rates: nil,
|
1346
|
-
trial: nil
|
1347
|
-
)
|
1348
|
-
@discounts = discounts
|
1349
|
-
@metadata = metadata
|
1350
|
-
@price = price
|
1351
|
-
@quantity = quantity
|
1352
|
-
@tax_rates = tax_rates
|
1353
|
-
@trial = trial
|
1354
|
-
end
|
1355
|
-
end
|
1356
|
-
|
1357
|
-
class RemoveDiscount < Stripe::RequestParams
|
1358
|
-
# The coupon code to remove from the `discounts` array.
|
1359
|
-
attr_accessor :coupon
|
1360
|
-
# The ID of a discount to remove from the `discounts` array.
|
1361
|
-
attr_accessor :discount
|
1362
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
1363
|
-
attr_accessor :promotion_code
|
1364
|
-
|
1365
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1366
|
-
@coupon = coupon
|
1367
|
-
@discount = discount
|
1368
|
-
@promotion_code = promotion_code
|
1369
|
-
end
|
1370
|
-
end
|
1371
|
-
|
1372
|
-
class RemoveItem < Stripe::RequestParams
|
1373
|
-
# ID of a price to remove.
|
1374
|
-
attr_accessor :price
|
1375
|
-
|
1376
|
-
def initialize(price: nil)
|
1377
|
-
@price = price
|
1378
|
-
end
|
1379
|
-
end
|
1380
|
-
|
1381
|
-
class SetDiscount < Stripe::RequestParams
|
1382
|
-
# The coupon code to replace the `discounts` array with.
|
1383
|
-
attr_accessor :coupon
|
1384
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
1385
|
-
attr_accessor :discount
|
1386
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
1387
|
-
attr_accessor :promotion_code
|
1388
|
-
|
1389
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1390
|
-
@coupon = coupon
|
1391
|
-
@discount = discount
|
1392
|
-
@promotion_code = promotion_code
|
1393
|
-
end
|
1394
|
-
end
|
1395
|
-
|
1396
|
-
class SetItem < Stripe::RequestParams
|
1397
|
-
class Discount < Stripe::RequestParams
|
1398
|
-
class DiscountEnd < Stripe::RequestParams
|
1399
|
-
class Duration < Stripe::RequestParams
|
1400
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1401
|
-
attr_accessor :interval
|
1402
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1403
|
-
attr_accessor :interval_count
|
1404
|
-
|
1405
|
-
def initialize(interval: nil, interval_count: nil)
|
1406
|
-
@interval = interval
|
1407
|
-
@interval_count = interval_count
|
1408
|
-
end
|
1409
|
-
end
|
1410
|
-
# Time span for the redeemed discount.
|
1411
|
-
attr_accessor :duration
|
1412
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1413
|
-
attr_accessor :timestamp
|
1414
|
-
# The type of calculation made to determine when the discount ends.
|
1415
|
-
attr_accessor :type
|
1416
|
-
|
1417
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1418
|
-
@duration = duration
|
1419
|
-
@timestamp = timestamp
|
1420
|
-
@type = type
|
1421
|
-
end
|
1422
|
-
end
|
1423
|
-
# ID of the coupon to create a new discount for.
|
1424
|
-
attr_accessor :coupon
|
1425
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1426
|
-
attr_accessor :discount
|
1427
|
-
# Details to determine how long the discount should be applied for.
|
1428
|
-
attr_accessor :discount_end
|
1429
|
-
# ID of the promotion code to create a new discount for.
|
1430
|
-
attr_accessor :promotion_code
|
1431
|
-
|
1432
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1433
|
-
@coupon = coupon
|
1434
|
-
@discount = discount
|
1435
|
-
@discount_end = discount_end
|
1436
|
-
@promotion_code = promotion_code
|
1437
|
-
end
|
1438
|
-
end
|
1439
|
-
|
1440
|
-
class Trial < Stripe::RequestParams
|
1441
|
-
# 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.
|
1442
|
-
attr_accessor :converts_to
|
1443
|
-
# Determines the type of trial for this item.
|
1444
|
-
attr_accessor :type
|
1445
|
-
|
1446
|
-
def initialize(converts_to: nil, type: nil)
|
1447
|
-
@converts_to = converts_to
|
1448
|
-
@type = type
|
1449
|
-
end
|
1450
|
-
end
|
1451
|
-
# 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`.
|
1452
|
-
attr_accessor :discounts
|
1453
|
-
# 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`.
|
1454
|
-
attr_accessor :metadata
|
1455
|
-
# The ID of the price object.
|
1456
|
-
attr_accessor :price
|
1457
|
-
# 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`.
|
1458
|
-
attr_accessor :quantity
|
1459
|
-
# 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`.
|
1460
|
-
attr_accessor :tax_rates
|
1461
|
-
# 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`.
|
1462
|
-
attr_accessor :trial
|
1463
|
-
|
1464
|
-
def initialize(
|
1465
|
-
discounts: nil,
|
1466
|
-
metadata: nil,
|
1467
|
-
price: nil,
|
1468
|
-
quantity: nil,
|
1469
|
-
tax_rates: nil,
|
1470
|
-
trial: nil
|
1471
|
-
)
|
1472
|
-
@discounts = discounts
|
1473
|
-
@metadata = metadata
|
1474
|
-
@price = price
|
1475
|
-
@quantity = quantity
|
1476
|
-
@tax_rates = tax_rates
|
1477
|
-
@trial = trial
|
1478
|
-
end
|
1479
|
-
end
|
1480
|
-
# Details for the `add_discount` type.
|
1481
|
-
attr_accessor :add_discount
|
1482
|
-
# Details for the `add_item` type.
|
1483
|
-
attr_accessor :add_item
|
1484
|
-
# Details for the `add_metadata` type: specify a hash of key-value pairs.
|
1485
|
-
attr_accessor :add_metadata
|
1486
|
-
# Details for the `remove_discount` type.
|
1487
|
-
attr_accessor :remove_discount
|
1488
|
-
# Details for the `remove_item` type.
|
1489
|
-
attr_accessor :remove_item
|
1490
|
-
# Details for the `remove_metadata` type: specify an array of metadata keys.
|
1491
|
-
attr_accessor :remove_metadata
|
1492
|
-
# Details for the `set_discounts` type.
|
1493
|
-
attr_accessor :set_discounts
|
1494
|
-
# Details for the `set_items` type.
|
1495
|
-
attr_accessor :set_items
|
1496
|
-
# Details for the `set_metadata` type: specify an array of key-value pairs.
|
1497
|
-
attr_accessor :set_metadata
|
1498
|
-
# The type of action the quote line performs.
|
1499
|
-
attr_accessor :type
|
1500
|
-
|
1501
|
-
def initialize(
|
1502
|
-
add_discount: nil,
|
1503
|
-
add_item: nil,
|
1504
|
-
add_metadata: nil,
|
1505
|
-
remove_discount: nil,
|
1506
|
-
remove_item: nil,
|
1507
|
-
remove_metadata: nil,
|
1508
|
-
set_discounts: nil,
|
1509
|
-
set_items: nil,
|
1510
|
-
set_metadata: nil,
|
1511
|
-
type: nil
|
1512
|
-
)
|
1513
|
-
@add_discount = add_discount
|
1514
|
-
@add_item = add_item
|
1515
|
-
@add_metadata = add_metadata
|
1516
|
-
@remove_discount = remove_discount
|
1517
|
-
@remove_item = remove_item
|
1518
|
-
@remove_metadata = remove_metadata
|
1519
|
-
@set_discounts = set_discounts
|
1520
|
-
@set_items = set_items
|
1521
|
-
@set_metadata = set_metadata
|
1522
|
-
@type = type
|
1523
|
-
end
|
1524
|
-
end
|
1525
|
-
|
1526
|
-
class AppliesTo < Stripe::RequestParams
|
1527
|
-
# 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.
|
1528
|
-
attr_accessor :new_reference
|
1529
|
-
# The ID of the schedule the line applies to.
|
1530
|
-
attr_accessor :subscription_schedule
|
1531
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
1532
|
-
attr_accessor :type
|
1533
|
-
|
1534
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
1535
|
-
@new_reference = new_reference
|
1536
|
-
@subscription_schedule = subscription_schedule
|
1537
|
-
@type = type
|
1538
|
-
end
|
1539
|
-
end
|
1540
|
-
|
1541
|
-
class CancelSubscriptionSchedule < Stripe::RequestParams
|
1542
|
-
# Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
1543
|
-
attr_accessor :cancel_at
|
1544
|
-
# 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`.
|
1545
|
-
attr_accessor :invoice_now
|
1546
|
-
# If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
1547
|
-
attr_accessor :prorate
|
1548
|
-
|
1549
|
-
def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
|
1550
|
-
@cancel_at = cancel_at
|
1551
|
-
@invoice_now = invoice_now
|
1552
|
-
@prorate = prorate
|
1553
|
-
end
|
1554
|
-
end
|
1555
|
-
|
1556
|
-
class EndsAt < Stripe::RequestParams
|
1557
|
-
class DiscountEnd < Stripe::RequestParams
|
1558
|
-
# The ID of a specific discount.
|
1559
|
-
attr_accessor :discount
|
1560
|
-
|
1561
|
-
def initialize(discount: nil)
|
1562
|
-
@discount = discount
|
1563
|
-
end
|
1564
|
-
end
|
1565
|
-
|
1566
|
-
class Duration < Stripe::RequestParams
|
1567
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1568
|
-
attr_accessor :interval
|
1569
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1570
|
-
attr_accessor :interval_count
|
1571
|
-
|
1572
|
-
def initialize(interval: nil, interval_count: nil)
|
1573
|
-
@interval = interval
|
1574
|
-
@interval_count = interval_count
|
1575
|
-
end
|
1576
|
-
end
|
1577
|
-
# Use the `end` time of a given discount.
|
1578
|
-
attr_accessor :discount_end
|
1579
|
-
# Time span for the quote line starting from the `starts_at` date.
|
1580
|
-
attr_accessor :duration
|
1581
|
-
# A precise Unix timestamp.
|
1582
|
-
attr_accessor :timestamp
|
1583
|
-
# Select a way to pass in `ends_at`.
|
1584
|
-
attr_accessor :type
|
1585
|
-
|
1586
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
1587
|
-
@discount_end = discount_end
|
1588
|
-
@duration = duration
|
1589
|
-
@timestamp = timestamp
|
1590
|
-
@type = type
|
1591
|
-
end
|
1592
|
-
end
|
1593
|
-
|
1594
|
-
class SetPauseCollection < Stripe::RequestParams
|
1595
|
-
class Set < Stripe::RequestParams
|
1596
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1597
|
-
attr_accessor :behavior
|
1598
|
-
|
1599
|
-
def initialize(behavior: nil)
|
1600
|
-
@behavior = behavior
|
1601
|
-
end
|
1602
|
-
end
|
1603
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
1604
|
-
attr_accessor :set
|
1605
|
-
# Determines the type of the pause_collection amendment.
|
1606
|
-
attr_accessor :type
|
1607
|
-
|
1608
|
-
def initialize(set: nil, type: nil)
|
1609
|
-
@set = set
|
1610
|
-
@type = type
|
1611
|
-
end
|
1612
|
-
end
|
1613
|
-
|
1614
|
-
class StartsAt < Stripe::RequestParams
|
1615
|
-
class DiscountEnd < Stripe::RequestParams
|
1616
|
-
# The ID of a specific discount.
|
1617
|
-
attr_accessor :discount
|
1618
|
-
|
1619
|
-
def initialize(discount: nil)
|
1620
|
-
@discount = discount
|
1621
|
-
end
|
1622
|
-
end
|
1623
|
-
|
1624
|
-
class LineEndsAt < Stripe::RequestParams
|
1625
|
-
# The ID of a quote line.
|
1626
|
-
attr_accessor :id
|
1627
|
-
# 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.
|
1628
|
-
attr_accessor :index
|
1629
|
-
|
1630
|
-
def initialize(id: nil, index: nil)
|
1631
|
-
@id = id
|
1632
|
-
@index = index
|
1633
|
-
end
|
1634
|
-
end
|
1635
|
-
# Use the `end` time of a given discount.
|
1636
|
-
attr_accessor :discount_end
|
1637
|
-
# The timestamp the given line ends at.
|
1638
|
-
attr_accessor :line_ends_at
|
1639
|
-
# A precise Unix timestamp.
|
1640
|
-
attr_accessor :timestamp
|
1641
|
-
# Select a way to pass in `starts_at`.
|
1642
|
-
attr_accessor :type
|
1643
|
-
|
1644
|
-
def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
1645
|
-
@discount_end = discount_end
|
1646
|
-
@line_ends_at = line_ends_at
|
1647
|
-
@timestamp = timestamp
|
1648
|
-
@type = type
|
1649
|
-
end
|
1650
|
-
end
|
1651
|
-
|
1652
|
-
class TrialSettings < Stripe::RequestParams
|
1653
|
-
class EndBehavior < Stripe::RequestParams
|
1654
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1655
|
-
attr_accessor :prorate_up_front
|
1656
|
-
|
1657
|
-
def initialize(prorate_up_front: nil)
|
1658
|
-
@prorate_up_front = prorate_up_front
|
1659
|
-
end
|
1660
|
-
end
|
1661
|
-
# Defines how the subscription should behave when a trial ends.
|
1662
|
-
attr_accessor :end_behavior
|
1663
|
-
|
1664
|
-
def initialize(end_behavior: nil)
|
1665
|
-
@end_behavior = end_behavior
|
1666
|
-
end
|
1667
|
-
end
|
1668
|
-
# An array of operations the quote line performs.
|
1669
|
-
attr_accessor :actions
|
1670
|
-
# Details to identify the subscription schedule the quote line applies to.
|
1671
|
-
attr_accessor :applies_to
|
1672
|
-
# 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.
|
1673
|
-
attr_accessor :billing_cycle_anchor
|
1674
|
-
# 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.
|
1675
|
-
attr_accessor :cancel_subscription_schedule
|
1676
|
-
# 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.
|
1677
|
-
attr_accessor :ends_at
|
1678
|
-
# The ID of an existing line on the quote.
|
1679
|
-
attr_accessor :id
|
1680
|
-
# 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.
|
1681
|
-
attr_accessor :proration_behavior
|
1682
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
1683
|
-
attr_accessor :set_pause_collection
|
1684
|
-
# Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
1685
|
-
attr_accessor :set_schedule_end
|
1686
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
1687
|
-
attr_accessor :starts_at
|
1688
|
-
# Settings related to subscription trials.
|
1689
|
-
attr_accessor :trial_settings
|
1690
|
-
|
1691
|
-
def initialize(
|
1692
|
-
actions: nil,
|
1693
|
-
applies_to: nil,
|
1694
|
-
billing_cycle_anchor: nil,
|
1695
|
-
cancel_subscription_schedule: nil,
|
1696
|
-
ends_at: nil,
|
1697
|
-
id: nil,
|
1698
|
-
proration_behavior: nil,
|
1699
|
-
set_pause_collection: nil,
|
1700
|
-
set_schedule_end: nil,
|
1701
|
-
starts_at: nil,
|
1702
|
-
trial_settings: nil
|
1703
|
-
)
|
1704
|
-
@actions = actions
|
1705
|
-
@applies_to = applies_to
|
1706
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
1707
|
-
@cancel_subscription_schedule = cancel_subscription_schedule
|
1708
|
-
@ends_at = ends_at
|
1709
|
-
@id = id
|
1710
|
-
@proration_behavior = proration_behavior
|
1711
|
-
@set_pause_collection = set_pause_collection
|
1712
|
-
@set_schedule_end = set_schedule_end
|
1713
|
-
@starts_at = starts_at
|
1714
|
-
@trial_settings = trial_settings
|
1715
|
-
end
|
1716
|
-
end
|
1717
|
-
|
1718
389
|
class LineItem < Stripe::RequestParams
|
1719
390
|
class Discount < Stripe::RequestParams
|
1720
|
-
class DiscountEnd < Stripe::RequestParams
|
1721
|
-
class Duration < Stripe::RequestParams
|
1722
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1723
|
-
attr_accessor :interval
|
1724
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1725
|
-
attr_accessor :interval_count
|
1726
|
-
|
1727
|
-
def initialize(interval: nil, interval_count: nil)
|
1728
|
-
@interval = interval
|
1729
|
-
@interval_count = interval_count
|
1730
|
-
end
|
1731
|
-
end
|
1732
|
-
# Time span for the redeemed discount.
|
1733
|
-
attr_accessor :duration
|
1734
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1735
|
-
attr_accessor :timestamp
|
1736
|
-
# The type of calculation made to determine when the discount ends.
|
1737
|
-
attr_accessor :type
|
1738
|
-
|
1739
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1740
|
-
@duration = duration
|
1741
|
-
@timestamp = timestamp
|
1742
|
-
@type = type
|
1743
|
-
end
|
1744
|
-
end
|
1745
391
|
# ID of the coupon to create a new discount for.
|
1746
392
|
attr_accessor :coupon
|
1747
393
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1748
394
|
attr_accessor :discount
|
1749
|
-
# Details to determine how long the discount should be applied for.
|
1750
|
-
attr_accessor :discount_end
|
1751
395
|
# ID of the promotion code to create a new discount for.
|
1752
396
|
attr_accessor :promotion_code
|
1753
397
|
|
1754
|
-
def initialize(coupon: nil, discount: nil,
|
398
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1755
399
|
@coupon = coupon
|
1756
400
|
@discount = discount
|
1757
|
-
@discount_end = discount_end
|
1758
401
|
@promotion_code = promotion_code
|
1759
402
|
end
|
1760
403
|
end
|
@@ -1831,277 +474,23 @@ module Stripe
|
|
1831
474
|
end
|
1832
475
|
|
1833
476
|
class SubscriptionData < Stripe::RequestParams
|
1834
|
-
class BillOnAcceptance < Stripe::RequestParams
|
1835
|
-
class BillFrom < Stripe::RequestParams
|
1836
|
-
class LineStartsAt < Stripe::RequestParams
|
1837
|
-
# The ID of a quote line.
|
1838
|
-
attr_accessor :id
|
1839
|
-
# 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.
|
1840
|
-
attr_accessor :index
|
1841
|
-
|
1842
|
-
def initialize(id: nil, index: nil)
|
1843
|
-
@id = id
|
1844
|
-
@index = index
|
1845
|
-
end
|
1846
|
-
end
|
1847
|
-
# Details of a Quote line to start the bill period from.
|
1848
|
-
attr_accessor :line_starts_at
|
1849
|
-
# A precise Unix timestamp.
|
1850
|
-
attr_accessor :timestamp
|
1851
|
-
# The type of method to specify the `bill_from` time.
|
1852
|
-
attr_accessor :type
|
1853
|
-
|
1854
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
1855
|
-
@line_starts_at = line_starts_at
|
1856
|
-
@timestamp = timestamp
|
1857
|
-
@type = type
|
1858
|
-
end
|
1859
|
-
end
|
1860
|
-
|
1861
|
-
class BillUntil < Stripe::RequestParams
|
1862
|
-
class Duration < Stripe::RequestParams
|
1863
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1864
|
-
attr_accessor :interval
|
1865
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1866
|
-
attr_accessor :interval_count
|
1867
|
-
|
1868
|
-
def initialize(interval: nil, interval_count: nil)
|
1869
|
-
@interval = interval
|
1870
|
-
@interval_count = interval_count
|
1871
|
-
end
|
1872
|
-
end
|
1873
|
-
|
1874
|
-
class LineEndsAt < Stripe::RequestParams
|
1875
|
-
# The ID of a quote line.
|
1876
|
-
attr_accessor :id
|
1877
|
-
# 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.
|
1878
|
-
attr_accessor :index
|
1879
|
-
|
1880
|
-
def initialize(id: nil, index: nil)
|
1881
|
-
@id = id
|
1882
|
-
@index = index
|
1883
|
-
end
|
1884
|
-
end
|
1885
|
-
# Details of the duration over which to bill.
|
1886
|
-
attr_accessor :duration
|
1887
|
-
# Details of a Quote line item from which to bill until.
|
1888
|
-
attr_accessor :line_ends_at
|
1889
|
-
# A precise Unix timestamp.
|
1890
|
-
attr_accessor :timestamp
|
1891
|
-
# The type of method to specify the `bill_until` time.
|
1892
|
-
attr_accessor :type
|
1893
|
-
|
1894
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
1895
|
-
@duration = duration
|
1896
|
-
@line_ends_at = line_ends_at
|
1897
|
-
@timestamp = timestamp
|
1898
|
-
@type = type
|
1899
|
-
end
|
1900
|
-
end
|
1901
|
-
# The start of the period to bill from when the Quote is accepted.
|
1902
|
-
attr_accessor :bill_from
|
1903
|
-
# The end of the period to bill until when the Quote is accepted.
|
1904
|
-
attr_accessor :bill_until
|
1905
|
-
|
1906
|
-
def initialize(bill_from: nil, bill_until: nil)
|
1907
|
-
@bill_from = bill_from
|
1908
|
-
@bill_until = bill_until
|
1909
|
-
end
|
1910
|
-
end
|
1911
|
-
|
1912
|
-
class Prebilling < Stripe::RequestParams
|
1913
|
-
# This is used to determine the number of billing cycles to prebill.
|
1914
|
-
attr_accessor :iterations
|
1915
|
-
|
1916
|
-
def initialize(iterations: nil)
|
1917
|
-
@iterations = iterations
|
1918
|
-
end
|
1919
|
-
end
|
1920
|
-
# Describes the period to bill for upon accepting the quote.
|
1921
|
-
attr_accessor :bill_on_acceptance
|
1922
|
-
# 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.
|
1923
|
-
attr_accessor :billing_behavior
|
1924
|
-
# When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
1925
|
-
attr_accessor :billing_cycle_anchor
|
1926
477
|
# 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.
|
1927
478
|
attr_accessor :description
|
1928
479
|
# When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
1929
480
|
attr_accessor :effective_date
|
1930
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
1931
|
-
attr_accessor :end_behavior
|
1932
481
|
# 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.
|
1933
482
|
attr_accessor :metadata
|
1934
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
1935
|
-
attr_accessor :prebilling
|
1936
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
1937
|
-
#
|
1938
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
1939
|
-
#
|
1940
|
-
# 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`.
|
1941
|
-
#
|
1942
|
-
# Prorations can be disabled by passing `none`.
|
1943
|
-
attr_accessor :proration_behavior
|
1944
483
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
1945
484
|
attr_accessor :trial_period_days
|
1946
485
|
|
1947
|
-
def initialize(
|
1948
|
-
bill_on_acceptance: nil,
|
1949
|
-
billing_behavior: nil,
|
1950
|
-
billing_cycle_anchor: nil,
|
1951
|
-
description: nil,
|
1952
|
-
effective_date: nil,
|
1953
|
-
end_behavior: nil,
|
1954
|
-
metadata: nil,
|
1955
|
-
prebilling: nil,
|
1956
|
-
proration_behavior: nil,
|
1957
|
-
trial_period_days: nil
|
1958
|
-
)
|
1959
|
-
@bill_on_acceptance = bill_on_acceptance
|
1960
|
-
@billing_behavior = billing_behavior
|
1961
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
486
|
+
def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil)
|
1962
487
|
@description = description
|
1963
488
|
@effective_date = effective_date
|
1964
|
-
@end_behavior = end_behavior
|
1965
489
|
@metadata = metadata
|
1966
|
-
@prebilling = prebilling
|
1967
|
-
@proration_behavior = proration_behavior
|
1968
490
|
@trial_period_days = trial_period_days
|
1969
491
|
end
|
1970
492
|
end
|
1971
493
|
|
1972
|
-
class SubscriptionDataOverride < Stripe::RequestParams
|
1973
|
-
class AppliesTo < Stripe::RequestParams
|
1974
|
-
# 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.
|
1975
|
-
attr_accessor :new_reference
|
1976
|
-
# The ID of the schedule the line applies to.
|
1977
|
-
attr_accessor :subscription_schedule
|
1978
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
1979
|
-
attr_accessor :type
|
1980
|
-
|
1981
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
1982
|
-
@new_reference = new_reference
|
1983
|
-
@subscription_schedule = subscription_schedule
|
1984
|
-
@type = type
|
1985
|
-
end
|
1986
|
-
end
|
1987
|
-
|
1988
|
-
class BillOnAcceptance < Stripe::RequestParams
|
1989
|
-
class BillFrom < Stripe::RequestParams
|
1990
|
-
class LineStartsAt < Stripe::RequestParams
|
1991
|
-
# The ID of a quote line.
|
1992
|
-
attr_accessor :id
|
1993
|
-
# 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.
|
1994
|
-
attr_accessor :index
|
1995
|
-
|
1996
|
-
def initialize(id: nil, index: nil)
|
1997
|
-
@id = id
|
1998
|
-
@index = index
|
1999
|
-
end
|
2000
|
-
end
|
2001
|
-
# Details of a Quote line to start the bill period from.
|
2002
|
-
attr_accessor :line_starts_at
|
2003
|
-
# A precise Unix timestamp.
|
2004
|
-
attr_accessor :timestamp
|
2005
|
-
# The type of method to specify the `bill_from` time.
|
2006
|
-
attr_accessor :type
|
2007
|
-
|
2008
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
2009
|
-
@line_starts_at = line_starts_at
|
2010
|
-
@timestamp = timestamp
|
2011
|
-
@type = type
|
2012
|
-
end
|
2013
|
-
end
|
2014
|
-
|
2015
|
-
class BillUntil < Stripe::RequestParams
|
2016
|
-
class Duration < Stripe::RequestParams
|
2017
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2018
|
-
attr_accessor :interval
|
2019
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2020
|
-
attr_accessor :interval_count
|
2021
|
-
|
2022
|
-
def initialize(interval: nil, interval_count: nil)
|
2023
|
-
@interval = interval
|
2024
|
-
@interval_count = interval_count
|
2025
|
-
end
|
2026
|
-
end
|
2027
|
-
|
2028
|
-
class LineEndsAt < Stripe::RequestParams
|
2029
|
-
# The ID of a quote line.
|
2030
|
-
attr_accessor :id
|
2031
|
-
# 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.
|
2032
|
-
attr_accessor :index
|
2033
|
-
|
2034
|
-
def initialize(id: nil, index: nil)
|
2035
|
-
@id = id
|
2036
|
-
@index = index
|
2037
|
-
end
|
2038
|
-
end
|
2039
|
-
# Details of the duration over which to bill.
|
2040
|
-
attr_accessor :duration
|
2041
|
-
# Details of a Quote line item from which to bill until.
|
2042
|
-
attr_accessor :line_ends_at
|
2043
|
-
# A precise Unix timestamp.
|
2044
|
-
attr_accessor :timestamp
|
2045
|
-
# The type of method to specify the `bill_until` time.
|
2046
|
-
attr_accessor :type
|
2047
|
-
|
2048
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
2049
|
-
@duration = duration
|
2050
|
-
@line_ends_at = line_ends_at
|
2051
|
-
@timestamp = timestamp
|
2052
|
-
@type = type
|
2053
|
-
end
|
2054
|
-
end
|
2055
|
-
# The start of the period to bill from when the Quote is accepted.
|
2056
|
-
attr_accessor :bill_from
|
2057
|
-
# The end of the period to bill until when the Quote is accepted.
|
2058
|
-
attr_accessor :bill_until
|
2059
|
-
|
2060
|
-
def initialize(bill_from: nil, bill_until: nil)
|
2061
|
-
@bill_from = bill_from
|
2062
|
-
@bill_until = bill_until
|
2063
|
-
end
|
2064
|
-
end
|
2065
|
-
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
2066
|
-
attr_accessor :applies_to
|
2067
|
-
# Describes the period to bill for upon accepting the quote.
|
2068
|
-
attr_accessor :bill_on_acceptance
|
2069
|
-
# 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.
|
2070
|
-
attr_accessor :billing_behavior
|
2071
|
-
# The customer the Subscription Data override applies to.
|
2072
|
-
attr_accessor :customer
|
2073
|
-
# 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.
|
2074
|
-
attr_accessor :description
|
2075
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2076
|
-
attr_accessor :end_behavior
|
2077
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
2078
|
-
#
|
2079
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
2080
|
-
#
|
2081
|
-
# 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`.
|
2082
|
-
#
|
2083
|
-
# Prorations can be disabled by passing `none`.
|
2084
|
-
attr_accessor :proration_behavior
|
2085
|
-
|
2086
|
-
def initialize(
|
2087
|
-
applies_to: nil,
|
2088
|
-
bill_on_acceptance: nil,
|
2089
|
-
billing_behavior: nil,
|
2090
|
-
customer: nil,
|
2091
|
-
description: nil,
|
2092
|
-
end_behavior: nil,
|
2093
|
-
proration_behavior: nil
|
2094
|
-
)
|
2095
|
-
@applies_to = applies_to
|
2096
|
-
@bill_on_acceptance = bill_on_acceptance
|
2097
|
-
@billing_behavior = billing_behavior
|
2098
|
-
@customer = customer
|
2099
|
-
@description = description
|
2100
|
-
@end_behavior = end_behavior
|
2101
|
-
@proration_behavior = proration_behavior
|
2102
|
-
end
|
2103
|
-
end
|
2104
|
-
|
2105
494
|
class TransferData < Stripe::RequestParams
|
2106
495
|
# 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.
|
2107
496
|
attr_accessor :amount
|
@@ -2116,8 +505,6 @@ module Stripe
|
|
2116
505
|
@destination = destination
|
2117
506
|
end
|
2118
507
|
end
|
2119
|
-
# Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
2120
|
-
attr_accessor :allow_backdated_lines
|
2121
508
|
# 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.
|
2122
509
|
attr_accessor :application_fee_amount
|
2123
510
|
# 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.
|
@@ -2128,8 +515,6 @@ module Stripe
|
|
2128
515
|
attr_accessor :collection_method
|
2129
516
|
# The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
2130
517
|
attr_accessor :customer
|
2131
|
-
# The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
|
2132
|
-
attr_accessor :customer_account
|
2133
518
|
# The tax rates that will apply to any line item that does not have `tax_rates` set.
|
2134
519
|
attr_accessor :default_tax_rates
|
2135
520
|
# A description that will be displayed on the quote PDF.
|
@@ -2148,27 +533,21 @@ module Stripe
|
|
2148
533
|
attr_accessor :invoice_settings
|
2149
534
|
# 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.
|
2150
535
|
attr_accessor :line_items
|
2151
|
-
# 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.
|
2152
|
-
attr_accessor :lines
|
2153
536
|
# 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`.
|
2154
537
|
attr_accessor :metadata
|
2155
538
|
# The account on behalf of which to charge.
|
2156
539
|
attr_accessor :on_behalf_of
|
2157
540
|
# 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.
|
2158
541
|
attr_accessor :subscription_data
|
2159
|
-
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
2160
|
-
attr_accessor :subscription_data_overrides
|
2161
542
|
# The data with which to automatically create a Transfer for each of the invoices.
|
2162
543
|
attr_accessor :transfer_data
|
2163
544
|
|
2164
545
|
def initialize(
|
2165
|
-
allow_backdated_lines: nil,
|
2166
546
|
application_fee_amount: nil,
|
2167
547
|
application_fee_percent: nil,
|
2168
548
|
automatic_tax: nil,
|
2169
549
|
collection_method: nil,
|
2170
550
|
customer: nil,
|
2171
|
-
customer_account: nil,
|
2172
551
|
default_tax_rates: nil,
|
2173
552
|
description: nil,
|
2174
553
|
discounts: nil,
|
@@ -2178,20 +557,16 @@ module Stripe
|
|
2178
557
|
header: nil,
|
2179
558
|
invoice_settings: nil,
|
2180
559
|
line_items: nil,
|
2181
|
-
lines: nil,
|
2182
560
|
metadata: nil,
|
2183
561
|
on_behalf_of: nil,
|
2184
562
|
subscription_data: nil,
|
2185
|
-
subscription_data_overrides: nil,
|
2186
563
|
transfer_data: nil
|
2187
564
|
)
|
2188
|
-
@allow_backdated_lines = allow_backdated_lines
|
2189
565
|
@application_fee_amount = application_fee_amount
|
2190
566
|
@application_fee_percent = application_fee_percent
|
2191
567
|
@automatic_tax = automatic_tax
|
2192
568
|
@collection_method = collection_method
|
2193
569
|
@customer = customer
|
2194
|
-
@customer_account = customer_account
|
2195
570
|
@default_tax_rates = default_tax_rates
|
2196
571
|
@description = description
|
2197
572
|
@discounts = discounts
|
@@ -2201,11 +576,9 @@ module Stripe
|
|
2201
576
|
@header = header
|
2202
577
|
@invoice_settings = invoice_settings
|
2203
578
|
@line_items = line_items
|
2204
|
-
@lines = lines
|
2205
579
|
@metadata = metadata
|
2206
580
|
@on_behalf_of = on_behalf_of
|
2207
581
|
@subscription_data = subscription_data
|
2208
|
-
@subscription_data_overrides = subscription_data_overrides
|
2209
582
|
@transfer_data = transfer_data
|
2210
583
|
end
|
2211
584
|
end
|
@@ -2240,36 +613,6 @@ module Stripe
|
|
2240
613
|
end
|
2241
614
|
end
|
2242
615
|
|
2243
|
-
class MarkDraftParams < Stripe::RequestParams
|
2244
|
-
# Specifies which fields in the response should be expanded.
|
2245
|
-
attr_accessor :expand
|
2246
|
-
|
2247
|
-
def initialize(expand: nil)
|
2248
|
-
@expand = expand
|
2249
|
-
end
|
2250
|
-
end
|
2251
|
-
|
2252
|
-
class MarkStaleParams < Stripe::RequestParams
|
2253
|
-
# Specifies which fields in the response should be expanded.
|
2254
|
-
attr_accessor :expand
|
2255
|
-
# Reason the Quote is being marked stale.
|
2256
|
-
attr_accessor :reason
|
2257
|
-
|
2258
|
-
def initialize(expand: nil, reason: nil)
|
2259
|
-
@expand = expand
|
2260
|
-
@reason = reason
|
2261
|
-
end
|
2262
|
-
end
|
2263
|
-
|
2264
|
-
class ReestimateParams < Stripe::RequestParams
|
2265
|
-
# Specifies which fields in the response should be expanded.
|
2266
|
-
attr_accessor :expand
|
2267
|
-
|
2268
|
-
def initialize(expand: nil)
|
2269
|
-
@expand = expand
|
2270
|
-
end
|
2271
|
-
end
|
2272
|
-
|
2273
616
|
class PdfParams < Stripe::RequestParams
|
2274
617
|
# Specifies which fields in the response should be expanded.
|
2275
618
|
attr_accessor :expand
|
@@ -2279,24 +622,6 @@ module Stripe
|
|
2279
622
|
end
|
2280
623
|
end
|
2281
624
|
|
2282
|
-
class ListPreviewInvoiceLinesParams < Stripe::RequestParams
|
2283
|
-
# 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.
|
2284
|
-
attr_accessor :ending_before
|
2285
|
-
# Specifies which fields in the response should be expanded.
|
2286
|
-
attr_accessor :expand
|
2287
|
-
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
2288
|
-
attr_accessor :limit
|
2289
|
-
# 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.
|
2290
|
-
attr_accessor :starting_after
|
2291
|
-
|
2292
|
-
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
2293
|
-
@ending_before = ending_before
|
2294
|
-
@expand = expand
|
2295
|
-
@limit = limit
|
2296
|
-
@starting_after = starting_after
|
2297
|
-
end
|
2298
|
-
end
|
2299
|
-
|
2300
625
|
# Accepts the specified quote.
|
2301
626
|
def accept(quote, params = {}, opts = {})
|
2302
627
|
request(
|
@@ -2340,39 +665,6 @@ module Stripe
|
|
2340
665
|
request(method: :get, path: "/v1/quotes", params: params, opts: opts, base_address: :api)
|
2341
666
|
end
|
2342
667
|
|
2343
|
-
# Preview the invoice line items that would be generated by accepting the quote.
|
2344
|
-
def list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {})
|
2345
|
-
request(
|
2346
|
-
method: :get,
|
2347
|
-
path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(quote), preview_invoice: CGI.escape(preview_invoice) }),
|
2348
|
-
params: params,
|
2349
|
-
opts: opts,
|
2350
|
-
base_address: :api
|
2351
|
-
)
|
2352
|
-
end
|
2353
|
-
|
2354
|
-
# Converts a stale quote to draft.
|
2355
|
-
def mark_draft(quote, params = {}, opts = {})
|
2356
|
-
request(
|
2357
|
-
method: :post,
|
2358
|
-
path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(quote) }),
|
2359
|
-
params: params,
|
2360
|
-
opts: opts,
|
2361
|
-
base_address: :api
|
2362
|
-
)
|
2363
|
-
end
|
2364
|
-
|
2365
|
-
# Converts a draft or open quote to stale.
|
2366
|
-
def mark_stale(quote, params = {}, opts = {})
|
2367
|
-
request(
|
2368
|
-
method: :post,
|
2369
|
-
path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(quote) }),
|
2370
|
-
params: params,
|
2371
|
-
opts: opts,
|
2372
|
-
base_address: :api
|
2373
|
-
)
|
2374
|
-
end
|
2375
|
-
|
2376
668
|
# Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
|
2377
669
|
def pdf(quote, params = {}, opts = {}, &read_body_chunk_block)
|
2378
670
|
opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
|
@@ -2386,17 +678,6 @@ module Stripe
|
|
2386
678
|
)
|
2387
679
|
end
|
2388
680
|
|
2389
|
-
# Recompute the upcoming invoice estimate for the quote.
|
2390
|
-
def reestimate(quote, params = {}, opts = {})
|
2391
|
-
request(
|
2392
|
-
method: :post,
|
2393
|
-
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(quote) }),
|
2394
|
-
params: params,
|
2395
|
-
opts: opts,
|
2396
|
-
base_address: :api
|
2397
|
-
)
|
2398
|
-
end
|
2399
|
-
|
2400
681
|
# Retrieves the quote with the given ID.
|
2401
682
|
def retrieve(quote, params = {}, opts = {})
|
2402
683
|
request(
|