stripe 13.3.0 → 13.4.0.pre.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1410 -650
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_operations/request.rb +1 -0
- data/lib/stripe/api_requestor.rb +1 -0
- data/lib/stripe/object_types.rb +32 -0
- data/lib/stripe/request_params.rb +24 -0
- data/lib/stripe/request_signing_authenticator.rb +79 -0
- data/lib/stripe/resources/account.rb +5793 -0
- data/lib/stripe/resources/account_link.rb +64 -0
- data/lib/stripe/resources/account_notice.rb +154 -0
- data/lib/stripe/resources/account_session.rb +1002 -0
- data/lib/stripe/resources/apple_pay_domain.rb +73 -0
- data/lib/stripe/resources/application.rb +23 -0
- data/lib/stripe/resources/application_fee.rb +120 -0
- data/lib/stripe/resources/application_fee_refund.rb +24 -0
- data/lib/stripe/resources/apps/secret.rb +166 -0
- data/lib/stripe/resources/balance.rb +162 -0
- data/lib/stripe/resources/balance_transaction.rb +141 -0
- data/lib/stripe/resources/bank_account.rb +113 -2
- data/lib/stripe/resources/billing/alert.rb +166 -0
- data/lib/stripe/resources/billing/alert_triggered.rb +31 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +89 -0
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +140 -0
- data/lib/stripe/resources/billing/credit_grant.rb +235 -0
- data/lib/stripe/resources/billing/meter.rb +203 -0
- data/lib/stripe/resources/billing/meter_error_report.rb +70 -0
- data/lib/stripe/resources/billing/meter_event.rb +45 -0
- data/lib/stripe/resources/billing/meter_event_adjustment.rb +51 -0
- data/lib/stripe/resources/billing/meter_event_summary.rb +21 -0
- data/lib/stripe/resources/billing_portal/configuration.rb +639 -0
- data/lib/stripe/resources/billing_portal/session.rb +313 -0
- data/lib/stripe/resources/capability.rb +111 -0
- data/lib/stripe/resources/capital/financing_offer.rb +221 -0
- data/lib/stripe/resources/capital/financing_summary.rb +77 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +147 -0
- data/lib/stripe/resources/card.rb +111 -0
- data/lib/stripe/resources/cash_balance.rb +22 -0
- data/lib/stripe/resources/charge.rb +3687 -0
- data/lib/stripe/resources/checkout/session.rb +4162 -0
- data/lib/stripe/resources/climate/order.rb +216 -0
- data/lib/stripe/resources/climate/product.rb +69 -0
- data/lib/stripe/resources/climate/supplier.rb +67 -0
- data/lib/stripe/resources/confirmation_token.rb +1855 -0
- data/lib/stripe/resources/connect_collection_transfer.rb +29 -0
- data/lib/stripe/resources/country_spec.rb +76 -0
- data/lib/stripe/resources/coupon.rb +237 -0
- data/lib/stripe/resources/credit_note.rb +798 -0
- data/lib/stripe/resources/credit_note_line_item.rb +89 -0
- data/lib/stripe/resources/customer.rb +995 -0
- data/lib/stripe/resources/customer_balance_transaction.rb +39 -0
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +136 -0
- data/lib/stripe/resources/customer_session.rb +183 -0
- data/lib/stripe/resources/discount.rb +41 -0
- data/lib/stripe/resources/dispute.rb +767 -0
- data/lib/stripe/resources/entitlements/active_entitlement.rb +54 -0
- data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +26 -0
- data/lib/stripe/resources/entitlements/feature.rb +107 -0
- data/lib/stripe/resources/ephemeral_key.rb +26 -0
- data/lib/stripe/resources/event.rb +157 -0
- data/lib/stripe/resources/exchange_rate.rb +38 -0
- data/lib/stripe/resources/file.rb +134 -0
- data/lib/stripe/resources/file_link.rb +134 -0
- data/lib/stripe/resources/financial_connections/account.rb +307 -0
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +30 -0
- data/lib/stripe/resources/financial_connections/account_owner.rb +24 -0
- data/lib/stripe/resources/financial_connections/account_ownership.rb +12 -0
- data/lib/stripe/resources/financial_connections/institution.rb +112 -0
- data/lib/stripe/resources/financial_connections/session.rb +187 -0
- data/lib/stripe/resources/financial_connections/transaction.rb +122 -0
- data/lib/stripe/resources/forwarding/request.rb +196 -0
- data/lib/stripe/resources/funding_instructions.rb +415 -0
- data/lib/stripe/resources/gift_cards/card.rb +245 -0
- data/lib/stripe/resources/gift_cards/transaction.rb +313 -0
- data/lib/stripe/resources/identity/verification_report.rb +335 -0
- data/lib/stripe/resources/identity/verification_session.rb +430 -0
- data/lib/stripe/resources/invoice.rb +9348 -0
- data/lib/stripe/resources/invoice_item.rb +536 -0
- data/lib/stripe/resources/invoice_line_item.rb +409 -0
- data/lib/stripe/resources/invoice_payment.rb +72 -0
- data/lib/stripe/resources/invoice_rendering_template.rb +79 -0
- data/lib/stripe/resources/issuing/authorization.rb +1316 -2
- data/lib/stripe/resources/issuing/card.rb +794 -0
- data/lib/stripe/resources/issuing/cardholder.rb +768 -0
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +693 -0
- data/lib/stripe/resources/issuing/dispute.rb +941 -0
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +98 -0
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +109 -0
- data/lib/stripe/resources/issuing/personalization_design.rb +333 -0
- data/lib/stripe/resources/issuing/physical_bundle.rb +76 -0
- data/lib/stripe/resources/issuing/settlement.rb +65 -0
- data/lib/stripe/resources/issuing/token.rb +221 -0
- data/lib/stripe/resources/issuing/transaction.rb +1098 -0
- data/lib/stripe/resources/line_item.rb +98 -0
- data/lib/stripe/resources/login_link.rb +9 -0
- data/lib/stripe/resources/mandate.rb +214 -0
- data/lib/stripe/resources/margin.rb +143 -0
- data/lib/stripe/resources/order.rb +3238 -0
- data/lib/stripe/resources/payment_attempt_record.rb +226 -0
- data/lib/stripe/resources/payment_intent.rb +14630 -0
- data/lib/stripe/resources/payment_link.rb +1761 -0
- data/lib/stripe/resources/payment_method.rb +1981 -0
- data/lib/stripe/resources/payment_method_configuration.rb +3137 -0
- data/lib/stripe/resources/payment_method_domain.rb +176 -0
- data/lib/stripe/resources/payment_record.rb +824 -0
- data/lib/stripe/resources/payout.rb +267 -0
- data/lib/stripe/resources/person.rb +353 -0
- data/lib/stripe/resources/plan.rb +386 -0
- data/lib/stripe/resources/price.rb +782 -0
- data/lib/stripe/resources/product.rb +636 -0
- data/lib/stripe/resources/product_feature.rb +16 -0
- data/lib/stripe/resources/promotion_code.rb +261 -0
- data/lib/stripe/resources/quote.rb +3404 -0
- data/lib/stripe/resources/quote_line.rb +340 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +833 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +463 -0
- data/lib/stripe/resources/radar/early_fraud_warning.rb +93 -0
- data/lib/stripe/resources/radar/value_list.rb +151 -0
- data/lib/stripe/resources/radar/value_list_item.rb +113 -0
- data/lib/stripe/resources/refund.rb +489 -0
- data/lib/stripe/resources/reporting/report_run.rb +182 -0
- data/lib/stripe/resources/reporting/report_type.rb +44 -0
- data/lib/stripe/resources/reserve_transaction.rb +26 -0
- data/lib/stripe/resources/reversal.rb +30 -0
- data/lib/stripe/resources/review.rb +135 -0
- data/lib/stripe/resources/setup_attempt.rb +474 -0
- data/lib/stripe/resources/setup_intent.rb +4371 -0
- data/lib/stripe/resources/shipping_rate.rb +303 -0
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +67 -0
- data/lib/stripe/resources/source.rb +1571 -0
- data/lib/stripe/resources/source_mandate_notification.rb +79 -0
- data/lib/stripe/resources/source_transaction.rb +114 -0
- data/lib/stripe/resources/subscription.rb +2395 -0
- data/lib/stripe/resources/subscription_item.rb +502 -0
- data/lib/stripe/resources/subscription_schedule.rb +2790 -0
- data/lib/stripe/resources/tax/association.rb +100 -0
- data/lib/stripe/resources/tax/calculation.rb +474 -0
- data/lib/stripe/resources/tax/calculation_line_item.rb +76 -0
- data/lib/stripe/resources/tax/form.rb +253 -0
- data/lib/stripe/resources/tax/registration.rb +2174 -0
- data/lib/stripe/resources/tax/settings.rb +146 -0
- data/lib/stripe/resources/tax/transaction.rb +332 -0
- data/lib/stripe/resources/tax/transaction_line_item.rb +43 -0
- data/lib/stripe/resources/tax_code.rb +41 -0
- data/lib/stripe/resources/tax_deducted_at_source.rb +26 -0
- data/lib/stripe/resources/tax_id.rb +147 -0
- data/lib/stripe/resources/tax_rate.rb +245 -0
- data/lib/stripe/resources/terminal/configuration.rb +1175 -0
- data/lib/stripe/resources/terminal/connection_token.rb +21 -0
- data/lib/stripe/resources/terminal/location.rb +208 -0
- data/lib/stripe/resources/terminal/reader.rb +911 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +45 -0
- data/lib/stripe/resources/test_helpers/test_clock.rb +101 -0
- data/lib/stripe/resources/token.rb +1337 -0
- data/lib/stripe/resources/topup.rb +210 -0
- data/lib/stripe/resources/transfer.rb +188 -0
- data/lib/stripe/resources/treasury/credit_reversal.rb +113 -0
- data/lib/stripe/resources/treasury/debit_reversal.rb +126 -0
- data/lib/stripe/resources/treasury/financial_account.rb +766 -0
- data/lib/stripe/resources/treasury/financial_account_features.rb +237 -0
- data/lib/stripe/resources/treasury/inbound_transfer.rb +285 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +587 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +428 -0
- data/lib/stripe/resources/treasury/received_credit.rb +335 -0
- data/lib/stripe/resources/treasury/received_debit.rb +298 -0
- data/lib/stripe/resources/treasury/transaction.rb +215 -0
- data/lib/stripe/resources/treasury/transaction_entry.rb +193 -0
- data/lib/stripe/resources/usage_record.rb +18 -0
- data/lib/stripe/resources/usage_record_summary.rb +28 -0
- data/lib/stripe/resources/v2/amount.rb +9 -0
- data/lib/stripe/resources/v2/billing/meter_event.rb +24 -0
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +28 -0
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +19 -0
- data/lib/stripe/resources/v2/event.rb +35 -0
- data/lib/stripe/resources/v2/event_destination.rb +78 -0
- data/lib/stripe/resources/webhook_endpoint.rb +148 -0
- data/lib/stripe/resources.rb +31 -0
- data/lib/stripe/services/account_capability_service.rb +33 -0
- data/lib/stripe/services/account_external_account_service.rb +293 -0
- data/lib/stripe/services/account_link_service.rb +53 -0
- data/lib/stripe/services/account_login_link_service.rb +9 -0
- data/lib/stripe/services/account_notice_service.rb +110 -0
- data/lib/stripe/services/account_person_service.rb +1014 -0
- data/lib/stripe/services/account_service.rb +4862 -0
- data/lib/stripe/services/account_session_service.rb +740 -0
- data/lib/stripe/services/apple_pay_domain_service.rb +56 -0
- data/lib/stripe/services/application_fee_refund_service.rb +60 -0
- data/lib/stripe/services/application_fee_service.rb +65 -0
- data/lib/stripe/services/apps/secret_service.rb +132 -0
- data/lib/stripe/services/balance_service.rb +9 -0
- data/lib/stripe/services/balance_transaction_service.rb +80 -0
- data/lib/stripe/services/billing/alert_service.rb +125 -0
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +41 -0
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +45 -0
- data/lib/stripe/services/billing/credit_grant_service.rb +167 -0
- data/lib/stripe/services/billing/meter_event_adjustment_service.rb +29 -0
- data/lib/stripe/services/billing/meter_event_service.rb +25 -0
- data/lib/stripe/services/billing/meter_event_summary_service.rb +46 -0
- data/lib/stripe/services/billing/meter_service.rb +142 -0
- data/lib/stripe/services/billing_portal/configuration_service.rb +492 -0
- data/lib/stripe/services/billing_portal/session_service.rb +192 -0
- data/lib/stripe/services/capital/financing_offer_service.rb +121 -0
- data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
- data/lib/stripe/services/capital/financing_transaction_service.rb +86 -0
- data/lib/stripe/services/capital_service.rb +15 -0
- data/lib/stripe/services/charge_service.rb +2010 -0
- data/lib/stripe/services/checkout/session_line_item_service.rb +21 -0
- data/lib/stripe/services/checkout/session_service.rb +2736 -0
- data/lib/stripe/services/climate/order_service.rb +113 -0
- data/lib/stripe/services/climate/product_service.rb +30 -0
- data/lib/stripe/services/climate/supplier_service.rb +30 -0
- data/lib/stripe/services/confirmation_token_service.rb +9 -0
- data/lib/stripe/services/country_spec_service.rb +30 -0
- data/lib/stripe/services/coupon_service.rb +174 -0
- data/lib/stripe/services/credit_note_line_item_service.rb +21 -0
- data/lib/stripe/services/credit_note_preview_lines_service.rb +184 -0
- data/lib/stripe/services/credit_note_service.rb +434 -0
- data/lib/stripe/services/customer_balance_transaction_service.rb +72 -0
- data/lib/stripe/services/customer_cash_balance_service.rb +30 -0
- data/lib/stripe/services/customer_cash_balance_transaction_service.rb +30 -0
- data/lib/stripe/services/customer_funding_instructions_service.rb +47 -0
- data/lib/stripe/services/customer_payment_method_service.rb +45 -0
- data/lib/stripe/services/customer_payment_source_service.rb +208 -0
- data/lib/stripe/services/customer_service.rb +684 -0
- data/lib/stripe/services/customer_session_service.rb +106 -0
- data/lib/stripe/services/customer_tax_id_service.rb +50 -0
- data/lib/stripe/services/dispute_service.rb +439 -0
- data/lib/stripe/services/entitlements/active_entitlement_service.rb +40 -0
- data/lib/stripe/services/entitlements/feature_service.rb +87 -0
- data/lib/stripe/services/ephemeral_key_service.rb +40 -0
- data/lib/stripe/services/event_service.rb +75 -0
- data/lib/stripe/services/exchange_rate_service.rb +30 -0
- data/lib/stripe/services/file_link_service.rb +108 -0
- data/lib/stripe/services/file_service.rb +102 -0
- data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +40 -0
- data/lib/stripe/services/financial_connections/account_owner_service.rb +31 -0
- data/lib/stripe/services/financial_connections/account_service.rb +108 -1
- data/lib/stripe/services/financial_connections/institution_service.rb +60 -0
- data/lib/stripe/services/financial_connections/session_service.rb +108 -0
- data/lib/stripe/services/financial_connections/transaction_service.rb +79 -0
- data/lib/stripe/services/financial_connections_service.rb +2 -1
- data/lib/stripe/services/forwarding/request_service.rb +120 -0
- data/lib/stripe/services/gift_cards/card_service.rb +183 -0
- data/lib/stripe/services/gift_cards/transaction_service.rb +225 -0
- data/lib/stripe/services/gift_cards_service.rb +14 -0
- data/lib/stripe/services/identity/verification_report_service.rb +75 -0
- data/lib/stripe/services/identity/verification_session_service.rb +261 -0
- data/lib/stripe/services/invoice_item_service.rb +454 -0
- data/lib/stripe/services/invoice_line_item_service.rb +277 -0
- data/lib/stripe/services/invoice_payment_service.rb +58 -0
- data/lib/stripe/services/invoice_rendering_template_service.rb +56 -0
- data/lib/stripe/services/invoice_service.rb +6375 -1
- data/lib/stripe/services/invoice_upcoming_lines_service.rb +2142 -0
- data/lib/stripe/services/issuing/authorization_service.rb +118 -0
- data/lib/stripe/services/issuing/card_service.rb +525 -0
- data/lib/stripe/services/issuing/cardholder_service.rb +599 -0
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +560 -0
- data/lib/stripe/services/issuing/dispute_service.rb +731 -0
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +70 -0
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +90 -0
- data/lib/stripe/services/issuing/personalization_design_service.rb +222 -0
- data/lib/stripe/services/issuing/physical_bundle_service.rb +45 -0
- data/lib/stripe/services/issuing/token_service.rb +83 -0
- data/lib/stripe/services/issuing/transaction_service.rb +93 -0
- data/lib/stripe/services/issuing_service.rb +5 -1
- data/lib/stripe/services/mandate_service.rb +9 -0
- data/lib/stripe/services/margin_service.rb +130 -0
- data/lib/stripe/services/order_line_item_service.rb +38 -0
- data/lib/stripe/services/order_service.rb +2518 -0
- data/lib/stripe/services/payment_attempt_record_service.rb +50 -0
- data/lib/stripe/services/payment_intent_service.rb +12203 -0
- data/lib/stripe/services/payment_link_line_item_service.rb +21 -0
- data/lib/stripe/services/payment_link_service.rb +1343 -0
- data/lib/stripe/services/payment_method_configuration_service.rb +2148 -0
- data/lib/stripe/services/payment_method_domain_service.rb +84 -0
- data/lib/stripe/services/payment_method_service.rb +977 -0
- data/lib/stripe/services/payment_record_service.rb +610 -0
- data/lib/stripe/services/payout_service.rb +182 -0
- data/lib/stripe/services/plan_service.rb +296 -0
- data/lib/stripe/services/price_service.rb +603 -0
- data/lib/stripe/services/product_feature_service.rb +46 -0
- data/lib/stripe/services/product_service.rb +533 -0
- data/lib/stripe/services/promotion_code_service.rb +203 -0
- data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +21 -0
- data/lib/stripe/services/quote_line_item_service.rb +21 -0
- data/lib/stripe/services/quote_line_service.rb +38 -0
- data/lib/stripe/services/quote_preview_invoice_service.rb +38 -0
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +38 -0
- data/lib/stripe/services/quote_service.rb +2628 -1
- data/lib/stripe/services/radar/early_fraud_warning_service.rb +70 -0
- data/lib/stripe/services/radar/value_list_item_service.rb +90 -0
- data/lib/stripe/services/radar/value_list_service.rb +119 -0
- data/lib/stripe/services/refund_service.rb +158 -0
- data/lib/stripe/services/reporting/report_run_service.rb +122 -0
- data/lib/stripe/services/reporting/report_type_service.rb +18 -0
- data/lib/stripe/services/review_service.rb +63 -0
- data/lib/stripe/services/setup_attempt_service.rb +59 -0
- data/lib/stripe/services/setup_intent_service.rb +3923 -0
- data/lib/stripe/services/shipping_rate_service.rb +227 -0
- data/lib/stripe/services/sigma/scheduled_query_run_service.rb +30 -0
- data/lib/stripe/services/source_service.rb +693 -0
- data/lib/stripe/services/source_transaction_service.rb +21 -0
- data/lib/stripe/services/subscription_item_service.rb +439 -0
- data/lib/stripe/services/subscription_item_usage_record_service.rb +21 -0
- data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +21 -0
- data/lib/stripe/services/subscription_schedule_service.rb +2343 -0
- data/lib/stripe/services/subscription_service.rb +1967 -0
- data/lib/stripe/services/tax/association_service.rb +32 -0
- data/lib/stripe/services/tax/calculation_line_item_service.rb +21 -0
- data/lib/stripe/services/tax/calculation_service.rb +235 -0
- data/lib/stripe/services/tax/form_service.rb +107 -0
- data/lib/stripe/services/tax/registration_service.rb +1398 -0
- data/lib/stripe/services/tax/settings_service.rb +82 -0
- data/lib/stripe/services/tax/transaction_line_item_service.rb +21 -0
- data/lib/stripe/services/tax/transaction_service.rb +128 -0
- data/lib/stripe/services/tax_code_service.rb +30 -0
- data/lib/stripe/services/tax_id_service.rb +90 -0
- data/lib/stripe/services/tax_rate_service.rb +182 -0
- data/lib/stripe/services/tax_service.rb +3 -1
- data/lib/stripe/services/terminal/configuration_service.rb +901 -0
- data/lib/stripe/services/terminal/connection_token_service.rb +13 -0
- data/lib/stripe/services/terminal/location_service.rb +165 -0
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
- data/lib/stripe/services/terminal/reader_service.rb +496 -0
- data/lib/stripe/services/terminal_service.rb +2 -1
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +762 -0
- data/lib/stripe/services/test_helpers/customer_service.rb +21 -0
- data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +844 -0
- data/lib/stripe/services/test_helpers/issuing/card_service.rb +45 -0
- data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +43 -0
- data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +723 -0
- data/lib/stripe/services/test_helpers/refund_service.rb +9 -0
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +48 -0
- data/lib/stripe/services/test_helpers/test_clock_service.rb +63 -0
- data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +39 -0
- data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +93 -0
- data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +93 -0
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +95 -0
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +95 -0
- data/lib/stripe/services/token_service.rb +1301 -0
- data/lib/stripe/services/topup_service.rb +163 -0
- data/lib/stripe/services/transfer_reversal_service.rb +74 -0
- data/lib/stripe/services/transfer_service.rb +138 -0
- data/lib/stripe/services/treasury/credit_reversal_service.rb +67 -0
- data/lib/stripe/services/treasury/debit_reversal_service.rb +72 -0
- data/lib/stripe/services/treasury/financial_account_features_service.rb +179 -0
- data/lib/stripe/services/treasury/financial_account_service.rb +481 -0
- data/lib/stripe/services/treasury/inbound_transfer_service.rb +100 -0
- data/lib/stripe/services/treasury/outbound_payment_service.rb +296 -0
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +147 -0
- data/lib/stripe/services/treasury/received_credit_service.rb +58 -0
- data/lib/stripe/services/treasury/received_debit_service.rb +45 -0
- data/lib/stripe/services/treasury/transaction_entry_service.rb +101 -0
- data/lib/stripe/services/treasury/transaction_service.rb +109 -0
- data/lib/stripe/services/v1_services.rb +8 -1
- data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +25 -0
- data/lib/stripe/services/v2/billing/meter_event_service.rb +28 -0
- data/lib/stripe/services/v2/billing/meter_event_session_service.rb +3 -0
- data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +36 -0
- data/lib/stripe/services/v2/core/event_destination_service.rb +164 -0
- data/lib/stripe/services/v2/core/event_service.rb +20 -0
- data/lib/stripe/services/webhook_endpoint_service.rb +110 -0
- data/lib/stripe/services.rb +25 -0
- data/lib/stripe/stripe_client.rb +2 -2
- data/lib/stripe/stripe_configuration.rb +3 -1
- data/lib/stripe/stripe_object.rb +8 -3
- data/lib/stripe/util.rb +8 -2
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +46 -0
- data/rbi/stripe/resources/account.rbi +6072 -0
- data/rbi/stripe/resources/account_link.rbi +87 -0
- data/rbi/stripe/resources/account_notice.rbi +166 -0
- data/rbi/stripe/resources/account_session.rbi +1173 -0
- data/rbi/stripe/resources/apple_pay_domain.rbi +111 -0
- data/rbi/stripe/resources/application.rbi +23 -0
- data/rbi/stripe/resources/application_fee.rbi +151 -0
- data/rbi/stripe/resources/application_fee_refund.rbi +44 -0
- data/rbi/stripe/resources/apps/secret.rbi +229 -0
- data/rbi/stripe/resources/balance.rbi +220 -0
- data/rbi/stripe/resources/balance_transaction.rbi +182 -0
- data/rbi/stripe/resources/bank_account.rbi +156 -0
- data/rbi/stripe/resources/billing/alert.rbi +237 -0
- data/rbi/stripe/resources/billing/alert_triggered.rbi +33 -0
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +118 -0
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +181 -0
- data/rbi/stripe/resources/billing/credit_grant.rbi +312 -0
- data/rbi/stripe/resources/billing/meter.rbi +268 -0
- data/rbi/stripe/resources/billing/meter_error_report.rbi +82 -0
- data/rbi/stripe/resources/billing/meter_event.rbi +76 -0
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +75 -0
- data/rbi/stripe/resources/billing/meter_event_summary.rbi +39 -0
- data/rbi/stripe/resources/billing_portal/configuration.rbi +746 -0
- data/rbi/stripe/resources/billing_portal/session.rbi +396 -0
- data/rbi/stripe/resources/capability.rbi +152 -0
- data/rbi/stripe/resources/capital/financing_offer.rbi +228 -0
- data/rbi/stripe/resources/capital/financing_summary.rbi +89 -0
- data/rbi/stripe/resources/capital/financing_transaction.rbi +157 -0
- data/rbi/stripe/resources/card.rbi +159 -0
- data/rbi/stripe/resources/cash_balance.rbi +37 -0
- data/rbi/stripe/resources/charge.rbi +4216 -0
- data/rbi/stripe/resources/checkout/session.rbi +4627 -0
- data/rbi/stripe/resources/climate/order.rbi +298 -0
- data/rbi/stripe/resources/climate/product.rbi +98 -0
- data/rbi/stripe/resources/climate/supplier.rbi +95 -0
- data/rbi/stripe/resources/confirmation_token.rbi +2137 -0
- data/rbi/stripe/resources/connect_collection_transfer.rbi +31 -0
- data/rbi/stripe/resources/country_spec.rbi +108 -0
- data/rbi/stripe/resources/coupon.rbi +305 -0
- data/rbi/stripe/resources/credit_note.rbi +918 -0
- data/rbi/stripe/resources/credit_note_line_item.rbi +123 -0
- data/rbi/stripe/resources/customer.rbi +1188 -0
- data/rbi/stripe/resources/customer_balance_transaction.rbi +65 -0
- data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +178 -0
- data/rbi/stripe/resources/customer_session.rbi +227 -0
- data/rbi/stripe/resources/discount.rbi +65 -0
- data/rbi/stripe/resources/dispute.rbi +926 -0
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +76 -0
- data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +26 -0
- data/rbi/stripe/resources/entitlements/feature.rbi +146 -0
- data/rbi/stripe/resources/ephemeral_key.rbi +51 -0
- data/rbi/stripe/resources/event.rbi +221 -0
- data/rbi/stripe/resources/exchange_rate.rbi +81 -0
- data/rbi/stripe/resources/file.rbi +177 -0
- data/rbi/stripe/resources/file_link.rbi +174 -0
- data/rbi/stripe/resources/financial_connections/account.rbi +414 -0
- data/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +30 -0
- data/rbi/stripe/resources/financial_connections/account_owner.rbi +42 -0
- data/rbi/stripe/resources/financial_connections/account_ownership.rbi +26 -0
- data/rbi/stripe/resources/financial_connections/institution.rbi +115 -0
- data/rbi/stripe/resources/financial_connections/session.rbi +221 -0
- data/rbi/stripe/resources/financial_connections/transaction.rbi +153 -0
- data/rbi/stripe/resources/forwarding/request.rbi +257 -0
- data/rbi/stripe/resources/funding_instructions.rbi +544 -0
- data/rbi/stripe/resources/gift_cards/card.rbi +242 -0
- data/rbi/stripe/resources/gift_cards/transaction.rbi +298 -0
- data/rbi/stripe/resources/identity/verification_report.rbi +427 -0
- data/rbi/stripe/resources/identity/verification_session.rbi +601 -0
- data/rbi/stripe/resources/invoice.rbi +10584 -0
- data/rbi/stripe/resources/invoice_item.rbi +621 -0
- data/rbi/stripe/resources/invoice_line_item.rbi +486 -0
- data/rbi/stripe/resources/invoice_payment.rbi +86 -0
- data/rbi/stripe/resources/invoice_rendering_template.rbi +131 -0
- data/rbi/stripe/resources/issuing/authorization.rbi +1511 -0
- data/rbi/stripe/resources/issuing/card.rbi +891 -0
- data/rbi/stripe/resources/issuing/cardholder.rbi +870 -0
- data/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +731 -0
- data/rbi/stripe/resources/issuing/dispute.rbi +1077 -0
- data/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +100 -0
- data/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +108 -0
- data/rbi/stripe/resources/issuing/personalization_design.rbi +395 -0
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +102 -0
- data/rbi/stripe/resources/issuing/settlement.rbi +78 -0
- data/rbi/stripe/resources/issuing/token.rbi +282 -0
- data/rbi/stripe/resources/issuing/transaction.rbi +1262 -0
- data/rbi/stripe/resources/line_item.rbi +131 -0
- data/rbi/stripe/resources/login_link.rbi +20 -0
- data/rbi/stripe/resources/mandate.rbi +266 -0
- data/rbi/stripe/resources/margin.rbi +151 -0
- data/rbi/stripe/resources/order.rbi +3505 -0
- data/rbi/stripe/resources/payment_attempt_record.rbi +260 -0
- data/rbi/stripe/resources/payment_intent.rbi +16064 -0
- data/rbi/stripe/resources/payment_link.rbi +1943 -0
- data/rbi/stripe/resources/payment_method.rbi +2287 -0
- data/rbi/stripe/resources/payment_method_configuration.rbi +3657 -0
- data/rbi/stripe/resources/payment_method_domain.rbi +246 -0
- data/rbi/stripe/resources/payment_record.rbi +856 -0
- data/rbi/stripe/resources/payout.rbi +357 -0
- data/rbi/stripe/resources/person.rbi +461 -0
- data/rbi/stripe/resources/plan.rbi +463 -0
- data/rbi/stripe/resources/price.rbi +884 -0
- data/rbi/stripe/resources/product.rbi +735 -0
- data/rbi/stripe/resources/product_feature.rbi +30 -0
- data/rbi/stripe/resources/promotion_code.rbi +316 -0
- data/rbi/stripe/resources/quote.rbi +3779 -0
- data/rbi/stripe/resources/quote_line.rbi +416 -0
- data/rbi/stripe/resources/quote_preview_invoice.rbi +1030 -0
- data/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +575 -0
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +121 -0
- data/rbi/stripe/resources/radar/value_list.rbi +207 -0
- data/rbi/stripe/resources/radar/value_list_item.rbi +157 -0
- data/rbi/stripe/resources/refund.rbi +615 -0
- data/rbi/stripe/resources/reporting/report_run.rbi +232 -0
- data/rbi/stripe/resources/reporting/report_type.rbi +75 -0
- data/rbi/stripe/resources/reserve_transaction.rbi +27 -0
- data/rbi/stripe/resources/reversal.rbi +60 -0
- data/rbi/stripe/resources/review.rbi +191 -0
- data/rbi/stripe/resources/setup_attempt.rbi +587 -0
- data/rbi/stripe/resources/setup_intent.rbi +4726 -0
- data/rbi/stripe/resources/shipping_rate.rbi +367 -0
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +98 -0
- data/rbi/stripe/resources/source.rbi +1899 -0
- data/rbi/stripe/resources/source_mandate_notification.rbi +90 -0
- data/rbi/stripe/resources/source_transaction.rbi +156 -0
- data/rbi/stripe/resources/subscription.rbi +2739 -0
- data/rbi/stripe/resources/subscription_item.rbi +566 -0
- data/rbi/stripe/resources/subscription_schedule.rbi +3157 -0
- data/rbi/stripe/resources/tax/association.rbi +107 -0
- data/rbi/stripe/resources/tax/calculation.rbi +577 -0
- data/rbi/stripe/resources/tax/calculation_line_item.rbi +108 -0
- data/rbi/stripe/resources/tax/form.rbi +262 -0
- data/rbi/stripe/resources/tax/registration.rbi +2354 -0
- data/rbi/stripe/resources/tax/settings.rbi +174 -0
- data/rbi/stripe/resources/tax/transaction.rbi +428 -0
- data/rbi/stripe/resources/tax/transaction_line_item.rbi +66 -0
- data/rbi/stripe/resources/tax_code.rbi +60 -0
- data/rbi/stripe/resources/tax_deducted_at_source.rbi +27 -0
- data/rbi/stripe/resources/tax_id.rbi +206 -0
- data/rbi/stripe/resources/tax_rate.rbi +295 -0
- data/rbi/stripe/resources/terminal/configuration.rbi +1302 -0
- data/rbi/stripe/resources/terminal/connection_token.rbi +42 -0
- data/rbi/stripe/resources/terminal/location.rbi +271 -0
- data/rbi/stripe/resources/terminal/reader.rbi +1110 -0
- data/rbi/stripe/resources/terminal/reader_collected_data.rbi +48 -0
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +159 -0
- data/rbi/stripe/resources/token.rbi +1405 -0
- data/rbi/stripe/resources/topup.rbi +269 -0
- data/rbi/stripe/resources/transfer.rbi +245 -0
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +151 -0
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +165 -0
- data/rbi/stripe/resources/treasury/financial_account.rbi +924 -0
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +309 -0
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +361 -0
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +702 -0
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +529 -0
- data/rbi/stripe/resources/treasury/received_credit.rbi +408 -0
- data/rbi/stripe/resources/treasury/received_debit.rbi +367 -0
- data/rbi/stripe/resources/treasury/transaction.rbi +261 -0
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +234 -0
- data/rbi/stripe/resources/usage_record.rbi +37 -0
- data/rbi/stripe/resources/usage_record_summary.rbi +45 -0
- data/rbi/stripe/resources/v2/amount.rbi +14 -0
- data/rbi/stripe/resources/v2/billing/meter_event.rbi +43 -0
- data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +48 -0
- data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +36 -0
- data/rbi/stripe/resources/v2/event.rbi +55 -0
- data/rbi/stripe/resources/v2/event_destination.rbi +109 -0
- data/rbi/stripe/resources/webhook_endpoint.rbi +208 -0
- data/rbi/stripe/services/account_capability_service.rbi +55 -0
- data/rbi/stripe/services/account_external_account_service.rbi +358 -0
- data/rbi/stripe/services/account_link_service.rbi +67 -0
- data/rbi/stripe/services/account_login_link_service.rbi +23 -0
- data/rbi/stripe/services/account_notice_service.rbi +103 -0
- data/rbi/stripe/services/account_person_service.rbi +1077 -0
- data/rbi/stripe/services/account_service.rbi +4948 -0
- data/rbi/stripe/services/account_session_service.rbi +873 -0
- data/rbi/stripe/services/apple_pay_domain_service.rbi +86 -0
- data/rbi/stripe/services/application_fee_refund_service.rbi +101 -0
- data/rbi/stripe/services/application_fee_service.rbi +85 -0
- data/rbi/stripe/services/apps/secret_service.rbi +175 -0
- data/rbi/stripe/services/apps_service.rbi +9 -0
- data/rbi/stripe/services/balance_service.rbi +22 -0
- data/rbi/stripe/services/balance_transaction_service.rbi +103 -0
- data/rbi/stripe/services/billing/alert_service.rbi +172 -0
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +61 -0
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +66 -0
- data/rbi/stripe/services/billing/credit_grant_service.rbi +217 -0
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +45 -0
- data/rbi/stripe/services/billing/meter_event_service.rbi +47 -0
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +62 -0
- data/rbi/stripe/services/billing/meter_service.rbi +184 -0
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +573 -0
- data/rbi/stripe/services/billing_portal/session_service.rbi +233 -0
- data/rbi/stripe/services/billing_portal_service.rbi +10 -0
- data/rbi/stripe/services/billing_service.rbi +15 -0
- data/rbi/stripe/services/capital/financing_offer_service.rbi +108 -0
- data/rbi/stripe/services/capital/financing_summary_service.rbi +23 -0
- data/rbi/stripe/services/capital/financing_transaction_service.rbi +77 -0
- data/rbi/stripe/services/capital_service.rbi +11 -0
- data/rbi/stripe/services/charge_service.rbi +2162 -0
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +37 -0
- data/rbi/stripe/services/checkout/session_service.rbi +2975 -0
- data/rbi/stripe/services/checkout_service.rbi +9 -0
- data/rbi/stripe/services/climate/order_service.rbi +158 -0
- data/rbi/stripe/services/climate/product_service.rbi +51 -0
- data/rbi/stripe/services/climate/supplier_service.rbi +51 -0
- data/rbi/stripe/services/climate_service.rbi +11 -0
- data/rbi/stripe/services/confirmation_token_service.rbi +21 -0
- data/rbi/stripe/services/country_spec_service.rbi +49 -0
- data/rbi/stripe/services/coupon_service.rbi +220 -0
- data/rbi/stripe/services/credit_note_line_item_service.rbi +35 -0
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +200 -0
- data/rbi/stripe/services/credit_note_service.rbi +496 -0
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +105 -0
- data/rbi/stripe/services/customer_cash_balance_service.rbi +49 -0
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +49 -0
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +67 -0
- data/rbi/stripe/services/customer_payment_method_service.rbi +64 -0
- data/rbi/stripe/services/customer_payment_source_service.rbi +265 -0
- data/rbi/stripe/services/customer_service.rbi +763 -0
- data/rbi/stripe/services/customer_session_service.rbi +126 -0
- data/rbi/stripe/services/customer_tax_id_service.rbi +80 -0
- data/rbi/stripe/services/dispute_service.rbi +500 -0
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +61 -0
- data/rbi/stripe/services/entitlements/feature_service.rbi +122 -0
- data/rbi/stripe/services/entitlements_service.rbi +10 -0
- data/rbi/stripe/services/ephemeral_key_service.rbi +59 -0
- data/rbi/stripe/services/event_service.rbi +94 -0
- data/rbi/stripe/services/exchange_rate_service.rbi +49 -0
- data/rbi/stripe/services/file_link_service.rbi +141 -0
- data/rbi/stripe/services/file_service.rbi +132 -0
- data/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi +37 -0
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +47 -0
- data/rbi/stripe/services/financial_connections/account_service.rbi +148 -0
- data/rbi/stripe/services/financial_connections/institution_service.rbi +51 -0
- data/rbi/stripe/services/financial_connections/session_service.rbi +128 -0
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +103 -0
- data/rbi/stripe/services/financial_connections_service.rbi +12 -0
- data/rbi/stripe/services/forwarding/request_service.rbi +152 -0
- data/rbi/stripe/services/forwarding_service.rbi +9 -0
- data/rbi/stripe/services/gift_cards/card_service.rbi +162 -0
- data/rbi/stripe/services/gift_cards/transaction_service.rbi +198 -0
- data/rbi/stripe/services/gift_cards_service.rbi +10 -0
- data/rbi/stripe/services/identity/verification_report_service.rbi +98 -0
- data/rbi/stripe/services/identity/verification_session_service.rbi +360 -0
- data/rbi/stripe/services/identity_service.rbi +10 -0
- data/rbi/stripe/services/invoice_item_service.rbi +505 -0
- data/rbi/stripe/services/invoice_line_item_service.rbi +320 -0
- data/rbi/stripe/services/invoice_payment_service.rbi +49 -0
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +91 -0
- data/rbi/stripe/services/invoice_service.rbi +7138 -0
- data/rbi/stripe/services/invoice_upcoming_lines_service.rbi +2397 -0
- data/rbi/stripe/services/issuing/authorization_service.rbi +160 -0
- data/rbi/stripe/services/issuing/card_service.rbi +568 -0
- data/rbi/stripe/services/issuing/cardholder_service.rbi +668 -0
- data/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi +580 -0
- data/rbi/stripe/services/issuing/dispute_service.rbi +824 -0
- data/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi +61 -0
- data/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi +83 -0
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +271 -0
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +66 -0
- data/rbi/stripe/services/issuing/token_service.rbi +109 -0
- data/rbi/stripe/services/issuing/transaction_service.rbi +119 -0
- data/rbi/stripe/services/issuing_service.rbi +19 -0
- data/rbi/stripe/services/mandate_service.rbi +21 -0
- data/rbi/stripe/services/margin_service.rbi +119 -0
- data/rbi/stripe/services/order_line_item_service.rbi +35 -0
- data/rbi/stripe/services/order_service.rbi +2669 -0
- data/rbi/stripe/services/payment_attempt_record_service.rbi +39 -0
- data/rbi/stripe/services/payment_intent_service.rbi +13193 -0
- data/rbi/stripe/services/payment_link_line_item_service.rbi +35 -0
- data/rbi/stripe/services/payment_link_service.rbi +1447 -0
- data/rbi/stripe/services/payment_method_configuration_service.rbi +2465 -0
- data/rbi/stripe/services/payment_method_domain_service.rbi +123 -0
- data/rbi/stripe/services/payment_method_service.rbi +1032 -0
- data/rbi/stripe/services/payment_record_service.rbi +613 -0
- data/rbi/stripe/services/payout_service.rbi +228 -0
- data/rbi/stripe/services/plan_service.rbi +337 -0
- data/rbi/stripe/services/price_service.rbi +657 -0
- data/rbi/stripe/services/product_feature_service.rbi +76 -0
- data/rbi/stripe/services/product_service.rbi +596 -0
- data/rbi/stripe/services/promotion_code_service.rbi +244 -0
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +35 -0
- data/rbi/stripe/services/quote_line_item_service.rbi +35 -0
- data/rbi/stripe/services/quote_line_service.rbi +35 -0
- data/rbi/stripe/services/quote_preview_invoice_service.rbi +35 -0
- data/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi +35 -0
- data/rbi/stripe/services/quote_service.rbi +2830 -0
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +95 -0
- data/rbi/stripe/services/radar/value_list_item_service.rbi +122 -0
- data/rbi/stripe/services/radar/value_list_service.rbi +160 -0
- data/rbi/stripe/services/radar_service.rbi +11 -0
- data/rbi/stripe/services/refund_service.rbi +208 -0
- data/rbi/stripe/services/reporting/report_run_service.rbi +152 -0
- data/rbi/stripe/services/reporting/report_type_service.rbi +37 -0
- data/rbi/stripe/services/reporting_service.rbi +10 -0
- data/rbi/stripe/services/review_service.rbi +93 -0
- data/rbi/stripe/services/setup_attempt_service.rbi +73 -0
- data/rbi/stripe/services/setup_intent_service.rbi +4204 -0
- data/rbi/stripe/services/shipping_rate_service.rbi +274 -0
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +51 -0
- data/rbi/stripe/services/sigma_service.rbi +9 -0
- data/rbi/stripe/services/source_service.rbi +766 -0
- data/rbi/stripe/services/source_transaction_service.rbi +35 -0
- data/rbi/stripe/services/subscription_item_service.rbi +496 -0
- data/rbi/stripe/services/subscription_item_usage_record_service.rbi +41 -0
- data/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi +37 -0
- data/rbi/stripe/services/subscription_schedule_service.rbi +2613 -0
- data/rbi/stripe/services/subscription_service.rbi +2207 -0
- data/rbi/stripe/services/tax/association_service.rbi +27 -0
- data/rbi/stripe/services/tax/calculation_line_item_service.rbi +37 -0
- data/rbi/stripe/services/tax/calculation_service.rbi +267 -0
- data/rbi/stripe/services/tax/form_service.rbi +96 -0
- data/rbi/stripe/services/tax/registration_service.rbi +1495 -0
- data/rbi/stripe/services/tax/settings_service.rbi +106 -0
- data/rbi/stripe/services/tax/transaction_line_item_service.rbi +37 -0
- data/rbi/stripe/services/tax/transaction_service.rbi +164 -0
- data/rbi/stripe/services/tax_code_service.rbi +49 -0
- data/rbi/stripe/services/tax_id_service.rbi +128 -0
- data/rbi/stripe/services/tax_rate_service.rbi +215 -0
- data/rbi/stripe/services/tax_service.rbi +14 -0
- data/rbi/stripe/services/terminal/configuration_service.rbi +976 -0
- data/rbi/stripe/services/terminal/connection_token_service.rbi +27 -0
- data/rbi/stripe/services/terminal/location_service.rbi +211 -0
- data/rbi/stripe/services/terminal/reader_collected_data_service.rbi +23 -0
- data/rbi/stripe/services/terminal/reader_service.rbi +591 -0
- data/rbi/stripe/services/terminal_service.rbi +13 -0
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +892 -0
- data/rbi/stripe/services/test_helpers/customer_service.rbi +37 -0
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +974 -0
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +81 -0
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +73 -0
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +825 -0
- data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
- data/rbi/stripe/services/test_helpers/refund_service.rbi +23 -0
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +69 -0
- data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +100 -0
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +69 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +137 -0
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +137 -0
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +130 -0
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +130 -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 +1357 -0
- data/rbi/stripe/services/topup_service.rbi +200 -0
- data/rbi/stripe/services/transfer_reversal_service.rbi +111 -0
- data/rbi/stripe/services/transfer_service.rbi +174 -0
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +95 -0
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +100 -0
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +226 -0
- data/rbi/stripe/services/treasury/financial_account_service.rbi +577 -0
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +133 -0
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +350 -0
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +189 -0
- data/rbi/stripe/services/treasury/received_credit_service.rbi +79 -0
- data/rbi/stripe/services/treasury/received_debit_service.rbi +66 -0
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +125 -0
- data/rbi/stripe/services/treasury/transaction_service.rbi +133 -0
- data/rbi/stripe/services/treasury_service.rbi +18 -0
- data/rbi/stripe/services/v1_services.rbi +83 -0
- data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +43 -0
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +46 -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 +60 -0
- data/rbi/stripe/services/v2/billing_service.rbi +14 -0
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +228 -0
- data/rbi/stripe/services/v2/core/event_service.rbi +42 -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 +149 -0
- metadata +435 -4
@@ -7,6 +7,7 @@ module Stripe
|
|
7
7
|
class Quote < APIResource
|
8
8
|
extend Stripe::APIOperations::Create
|
9
9
|
extend Stripe::APIOperations::List
|
10
|
+
extend Stripe::APIOperations::NestedResource
|
10
11
|
include Stripe::APIOperations::Save
|
11
12
|
|
12
13
|
OBJECT_NAME = "quote"
|
@@ -14,6 +15,3309 @@ module Stripe
|
|
14
15
|
"quote"
|
15
16
|
end
|
16
17
|
|
18
|
+
nested_resource_class_methods :preview_invoice, operations: %i[list]
|
19
|
+
nested_resource_class_methods :preview_subscription_schedule, operations: %i[list]
|
20
|
+
|
21
|
+
class AutomaticTax < Stripe::StripeObject
|
22
|
+
class Liability < Stripe::StripeObject
|
23
|
+
# The connected account being referenced when `type` is `account`.
|
24
|
+
attr_reader :account
|
25
|
+
|
26
|
+
# Type of the account referenced.
|
27
|
+
attr_reader :type
|
28
|
+
end
|
29
|
+
# Automatically calculate taxes
|
30
|
+
attr_reader :enabled
|
31
|
+
|
32
|
+
# The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
33
|
+
attr_reader :liability
|
34
|
+
|
35
|
+
# The status of the most recent automated tax calculation for this quote.
|
36
|
+
attr_reader :status
|
37
|
+
end
|
38
|
+
|
39
|
+
class Computed < Stripe::StripeObject
|
40
|
+
class LastReestimationDetails < Stripe::StripeObject
|
41
|
+
class Failed < Stripe::StripeObject
|
42
|
+
# The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field.
|
43
|
+
attr_reader :failure_code
|
44
|
+
|
45
|
+
# Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID".
|
46
|
+
attr_reader :message
|
47
|
+
|
48
|
+
# The reason the reestimation failed.
|
49
|
+
attr_reader :reason
|
50
|
+
end
|
51
|
+
# When `status` is `failed`, provides details about the quote reestimation failure.
|
52
|
+
attr_reader :failed
|
53
|
+
|
54
|
+
# Latest status of the reestimation.
|
55
|
+
attr_reader :status
|
56
|
+
end
|
57
|
+
|
58
|
+
class Recurring < Stripe::StripeObject
|
59
|
+
class TotalDetails < Stripe::StripeObject
|
60
|
+
class Breakdown < Stripe::StripeObject
|
61
|
+
class Discount < Stripe::StripeObject
|
62
|
+
# The amount discounted.
|
63
|
+
attr_reader :amount
|
64
|
+
|
65
|
+
# A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
|
66
|
+
# It contains information about when the discount began, when it will end, and what it is applied to.
|
67
|
+
#
|
68
|
+
# Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
|
69
|
+
attr_reader :discount
|
70
|
+
end
|
71
|
+
|
72
|
+
class Tax < Stripe::StripeObject
|
73
|
+
# Amount of tax applied for this rate.
|
74
|
+
attr_reader :amount
|
75
|
+
|
76
|
+
# Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
|
77
|
+
#
|
78
|
+
# Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
|
79
|
+
attr_reader :rate
|
80
|
+
|
81
|
+
# The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
|
82
|
+
attr_reader :taxability_reason
|
83
|
+
|
84
|
+
# The amount on which tax is calculated, in cents (or local equivalent).
|
85
|
+
attr_reader :taxable_amount
|
86
|
+
end
|
87
|
+
# The aggregated discounts.
|
88
|
+
attr_reader :discounts
|
89
|
+
|
90
|
+
# The aggregated tax amounts by rate.
|
91
|
+
attr_reader :taxes
|
92
|
+
end
|
93
|
+
# This is the sum of all the discounts.
|
94
|
+
attr_reader :amount_discount
|
95
|
+
|
96
|
+
# This is the sum of all the shipping amounts.
|
97
|
+
attr_reader :amount_shipping
|
98
|
+
|
99
|
+
# This is the sum of all the tax amounts.
|
100
|
+
attr_reader :amount_tax
|
101
|
+
|
102
|
+
# Attribute for field breakdown
|
103
|
+
attr_reader :breakdown
|
104
|
+
end
|
105
|
+
# Total before any discounts or taxes are applied.
|
106
|
+
attr_reader :amount_subtotal
|
107
|
+
|
108
|
+
# Total after discounts and taxes are applied.
|
109
|
+
attr_reader :amount_total
|
110
|
+
|
111
|
+
# The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
|
112
|
+
attr_reader :interval
|
113
|
+
|
114
|
+
# The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.
|
115
|
+
attr_reader :interval_count
|
116
|
+
|
117
|
+
# Attribute for field total_details
|
118
|
+
attr_reader :total_details
|
119
|
+
end
|
120
|
+
|
121
|
+
class Upfront < Stripe::StripeObject
|
122
|
+
class TotalDetails < Stripe::StripeObject
|
123
|
+
class Breakdown < Stripe::StripeObject
|
124
|
+
class Discount < Stripe::StripeObject
|
125
|
+
# The amount discounted.
|
126
|
+
attr_reader :amount
|
127
|
+
|
128
|
+
# A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
|
129
|
+
# It contains information about when the discount began, when it will end, and what it is applied to.
|
130
|
+
#
|
131
|
+
# Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
|
132
|
+
attr_reader :discount
|
133
|
+
end
|
134
|
+
|
135
|
+
class Tax < Stripe::StripeObject
|
136
|
+
# Amount of tax applied for this rate.
|
137
|
+
attr_reader :amount
|
138
|
+
|
139
|
+
# Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
|
140
|
+
#
|
141
|
+
# Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
|
142
|
+
attr_reader :rate
|
143
|
+
|
144
|
+
# The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
|
145
|
+
attr_reader :taxability_reason
|
146
|
+
|
147
|
+
# The amount on which tax is calculated, in cents (or local equivalent).
|
148
|
+
attr_reader :taxable_amount
|
149
|
+
end
|
150
|
+
# The aggregated discounts.
|
151
|
+
attr_reader :discounts
|
152
|
+
|
153
|
+
# The aggregated tax amounts by rate.
|
154
|
+
attr_reader :taxes
|
155
|
+
end
|
156
|
+
# This is the sum of all the discounts.
|
157
|
+
attr_reader :amount_discount
|
158
|
+
|
159
|
+
# This is the sum of all the shipping amounts.
|
160
|
+
attr_reader :amount_shipping
|
161
|
+
|
162
|
+
# This is the sum of all the tax amounts.
|
163
|
+
attr_reader :amount_tax
|
164
|
+
|
165
|
+
# Attribute for field breakdown
|
166
|
+
attr_reader :breakdown
|
167
|
+
end
|
168
|
+
# Total before any discounts or taxes are applied.
|
169
|
+
attr_reader :amount_subtotal
|
170
|
+
|
171
|
+
# Total after discounts and taxes are applied.
|
172
|
+
attr_reader :amount_total
|
173
|
+
|
174
|
+
# The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice.
|
175
|
+
attr_reader :line_items
|
176
|
+
|
177
|
+
# Attribute for field total_details
|
178
|
+
attr_reader :total_details
|
179
|
+
end
|
180
|
+
# Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation.
|
181
|
+
attr_reader :last_reestimation_details
|
182
|
+
|
183
|
+
# The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
|
184
|
+
attr_reader :recurring
|
185
|
+
|
186
|
+
# The time at which the quote's estimated schedules and upcoming invoices were generated.
|
187
|
+
attr_reader :updated_at
|
188
|
+
|
189
|
+
# Attribute for field upfront
|
190
|
+
attr_reader :upfront
|
191
|
+
end
|
192
|
+
|
193
|
+
class FromQuote < Stripe::StripeObject
|
194
|
+
# Whether this quote is a revision of a different quote.
|
195
|
+
attr_reader :is_revision
|
196
|
+
|
197
|
+
# The quote that was cloned.
|
198
|
+
attr_reader :quote
|
199
|
+
end
|
200
|
+
|
201
|
+
class InvoiceSettings < Stripe::StripeObject
|
202
|
+
class Issuer < Stripe::StripeObject
|
203
|
+
# The connected account being referenced when `type` is `account`.
|
204
|
+
attr_reader :account
|
205
|
+
|
206
|
+
# Type of the account referenced.
|
207
|
+
attr_reader :type
|
208
|
+
end
|
209
|
+
# Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
|
210
|
+
attr_reader :days_until_due
|
211
|
+
|
212
|
+
# Attribute for field issuer
|
213
|
+
attr_reader :issuer
|
214
|
+
end
|
215
|
+
|
216
|
+
class StatusDetails < Stripe::StripeObject
|
217
|
+
class Canceled < Stripe::StripeObject
|
218
|
+
# The reason this quote was marked as canceled.
|
219
|
+
attr_reader :reason
|
220
|
+
|
221
|
+
# Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch.
|
222
|
+
attr_reader :transitioned_at
|
223
|
+
end
|
224
|
+
|
225
|
+
class Stale < Stripe::StripeObject
|
226
|
+
class LastReason < Stripe::StripeObject
|
227
|
+
class LinesInvalid < Stripe::StripeObject
|
228
|
+
# The timestamp at which the lines were marked as invalid.
|
229
|
+
attr_reader :invalid_at
|
230
|
+
|
231
|
+
# The list of lines that became invalid at the given timestamp.
|
232
|
+
attr_reader :lines
|
233
|
+
end
|
234
|
+
|
235
|
+
class SubscriptionChanged < Stripe::StripeObject
|
236
|
+
# The subscription's state before the quote was marked as stale.
|
237
|
+
attr_reader :previous_subscription
|
238
|
+
end
|
239
|
+
|
240
|
+
class SubscriptionScheduleChanged < Stripe::StripeObject
|
241
|
+
# The subscription schedule's state before the quote was marked as stale.
|
242
|
+
attr_reader :previous_subscription_schedule
|
243
|
+
end
|
244
|
+
# The ID of the line that is invalid if the stale reason type is `line_invalid`.
|
245
|
+
attr_reader :line_invalid
|
246
|
+
|
247
|
+
# The IDs of the lines that are invalid if the stale reason type is `lines_invalid`.
|
248
|
+
attr_reader :lines_invalid
|
249
|
+
|
250
|
+
# The user supplied mark stale reason.
|
251
|
+
attr_reader :marked_stale
|
252
|
+
|
253
|
+
# The ID of the subscription that was canceled.
|
254
|
+
attr_reader :subscription_canceled
|
255
|
+
|
256
|
+
# Attribute for field subscription_changed
|
257
|
+
attr_reader :subscription_changed
|
258
|
+
|
259
|
+
# The ID of the subscription that was expired.
|
260
|
+
attr_reader :subscription_expired
|
261
|
+
|
262
|
+
# The ID of the subscription schedule that was canceled.
|
263
|
+
attr_reader :subscription_schedule_canceled
|
264
|
+
|
265
|
+
# Attribute for field subscription_schedule_changed
|
266
|
+
attr_reader :subscription_schedule_changed
|
267
|
+
|
268
|
+
# The ID of the subscription schedule that was released.
|
269
|
+
attr_reader :subscription_schedule_released
|
270
|
+
|
271
|
+
# The reason the quote was marked as stale.
|
272
|
+
attr_reader :type
|
273
|
+
end
|
274
|
+
# Time at which the quote expires. Measured in seconds since the Unix epoch.
|
275
|
+
attr_reader :expires_at
|
276
|
+
|
277
|
+
# The most recent reason this quote was marked as stale.
|
278
|
+
attr_reader :last_reason
|
279
|
+
|
280
|
+
# Time at which the stale reason was updated. Measured in seconds since the Unix epoch.
|
281
|
+
attr_reader :last_updated_at
|
282
|
+
|
283
|
+
# Time at which the quote was marked as stale. Measured in seconds since the Unix epoch.
|
284
|
+
attr_reader :transitioned_at
|
285
|
+
end
|
286
|
+
# Attribute for field canceled
|
287
|
+
attr_reader :canceled
|
288
|
+
|
289
|
+
# Attribute for field stale
|
290
|
+
attr_reader :stale
|
291
|
+
end
|
292
|
+
|
293
|
+
class StatusTransitions < Stripe::StripeObject
|
294
|
+
# The time that the quote was accepted. Measured in seconds since Unix epoch.
|
295
|
+
attr_reader :accepted_at
|
296
|
+
|
297
|
+
# The time that the quote was canceled. Measured in seconds since Unix epoch.
|
298
|
+
attr_reader :canceled_at
|
299
|
+
|
300
|
+
# The time that the quote was finalized. Measured in seconds since Unix epoch.
|
301
|
+
attr_reader :finalized_at
|
302
|
+
end
|
303
|
+
|
304
|
+
class SubscriptionData < Stripe::StripeObject
|
305
|
+
class BillOnAcceptance < Stripe::StripeObject
|
306
|
+
class BillFrom < Stripe::StripeObject
|
307
|
+
class LineStartsAt < Stripe::StripeObject
|
308
|
+
# Unique identifier for the object.
|
309
|
+
attr_reader :id
|
310
|
+
end
|
311
|
+
# The materialized time.
|
312
|
+
attr_reader :computed
|
313
|
+
|
314
|
+
# The timestamp the given line starts at.
|
315
|
+
attr_reader :line_starts_at
|
316
|
+
|
317
|
+
# A precise Unix timestamp.
|
318
|
+
attr_reader :timestamp
|
319
|
+
|
320
|
+
# The type of method to specify the `bill_from` time.
|
321
|
+
attr_reader :type
|
322
|
+
end
|
323
|
+
|
324
|
+
class BillUntil < Stripe::StripeObject
|
325
|
+
class Duration < Stripe::StripeObject
|
326
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
327
|
+
attr_reader :interval
|
328
|
+
|
329
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
330
|
+
attr_reader :interval_count
|
331
|
+
end
|
332
|
+
|
333
|
+
class LineEndsAt < Stripe::StripeObject
|
334
|
+
# Unique identifier for the object.
|
335
|
+
attr_reader :id
|
336
|
+
end
|
337
|
+
# The materialized time.
|
338
|
+
attr_reader :computed
|
339
|
+
|
340
|
+
# Time span for the quote line starting from the `starts_at` date.
|
341
|
+
attr_reader :duration
|
342
|
+
|
343
|
+
# The timestamp the given line ends at.
|
344
|
+
attr_reader :line_ends_at
|
345
|
+
|
346
|
+
# A precise Unix timestamp.
|
347
|
+
attr_reader :timestamp
|
348
|
+
|
349
|
+
# The type of method to specify the `bill_until` time.
|
350
|
+
attr_reader :type
|
351
|
+
end
|
352
|
+
# The start of the period to bill from when the Quote is accepted.
|
353
|
+
attr_reader :bill_from
|
354
|
+
|
355
|
+
# The end of the period to bill until when the Quote is accepted.
|
356
|
+
attr_reader :bill_until
|
357
|
+
end
|
358
|
+
|
359
|
+
class Prebilling < Stripe::StripeObject
|
360
|
+
# Attribute for field iterations
|
361
|
+
attr_reader :iterations
|
362
|
+
end
|
363
|
+
# Describes the period to bill for upon accepting the quote.
|
364
|
+
attr_reader :bill_on_acceptance
|
365
|
+
|
366
|
+
# 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.
|
367
|
+
attr_reader :billing_behavior
|
368
|
+
|
369
|
+
# Whether the subscription will always start a new billing period when the quote is accepted.
|
370
|
+
attr_reader :billing_cycle_anchor
|
371
|
+
|
372
|
+
# 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.
|
373
|
+
attr_reader :description
|
374
|
+
|
375
|
+
# When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
|
376
|
+
attr_reader :effective_date
|
377
|
+
|
378
|
+
# Behavior of the subscription schedule and underlying subscription when it ends.
|
379
|
+
attr_reader :end_behavior
|
380
|
+
|
381
|
+
# The id of the subscription that will be updated when the quote is accepted.
|
382
|
+
attr_reader :from_subscription
|
383
|
+
|
384
|
+
# 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.
|
385
|
+
attr_reader :metadata
|
386
|
+
|
387
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
388
|
+
attr_reader :prebilling
|
389
|
+
|
390
|
+
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
391
|
+
attr_reader :proration_behavior
|
392
|
+
|
393
|
+
# Integer representing the number of trial period days before the customer is charged for the first time.
|
394
|
+
attr_reader :trial_period_days
|
395
|
+
end
|
396
|
+
|
397
|
+
class SubscriptionDataOverride < Stripe::StripeObject
|
398
|
+
class AppliesTo < Stripe::StripeObject
|
399
|
+
# 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.
|
400
|
+
attr_reader :new_reference
|
401
|
+
|
402
|
+
# The ID of the schedule the line applies to.
|
403
|
+
attr_reader :subscription_schedule
|
404
|
+
|
405
|
+
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
406
|
+
attr_reader :type
|
407
|
+
end
|
408
|
+
|
409
|
+
class BillOnAcceptance < Stripe::StripeObject
|
410
|
+
class BillFrom < Stripe::StripeObject
|
411
|
+
class LineStartsAt < Stripe::StripeObject
|
412
|
+
# Unique identifier for the object.
|
413
|
+
attr_reader :id
|
414
|
+
end
|
415
|
+
# The materialized time.
|
416
|
+
attr_reader :computed
|
417
|
+
|
418
|
+
# The timestamp the given line starts at.
|
419
|
+
attr_reader :line_starts_at
|
420
|
+
|
421
|
+
# A precise Unix timestamp.
|
422
|
+
attr_reader :timestamp
|
423
|
+
|
424
|
+
# The type of method to specify the `bill_from` time.
|
425
|
+
attr_reader :type
|
426
|
+
end
|
427
|
+
|
428
|
+
class BillUntil < Stripe::StripeObject
|
429
|
+
class Duration < Stripe::StripeObject
|
430
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
431
|
+
attr_reader :interval
|
432
|
+
|
433
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
434
|
+
attr_reader :interval_count
|
435
|
+
end
|
436
|
+
|
437
|
+
class LineEndsAt < Stripe::StripeObject
|
438
|
+
# Unique identifier for the object.
|
439
|
+
attr_reader :id
|
440
|
+
end
|
441
|
+
# The materialized time.
|
442
|
+
attr_reader :computed
|
443
|
+
|
444
|
+
# Time span for the quote line starting from the `starts_at` date.
|
445
|
+
attr_reader :duration
|
446
|
+
|
447
|
+
# The timestamp the given line ends at.
|
448
|
+
attr_reader :line_ends_at
|
449
|
+
|
450
|
+
# A precise Unix timestamp.
|
451
|
+
attr_reader :timestamp
|
452
|
+
|
453
|
+
# The type of method to specify the `bill_until` time.
|
454
|
+
attr_reader :type
|
455
|
+
end
|
456
|
+
# The start of the period to bill from when the Quote is accepted.
|
457
|
+
attr_reader :bill_from
|
458
|
+
|
459
|
+
# The end of the period to bill until when the Quote is accepted.
|
460
|
+
attr_reader :bill_until
|
461
|
+
end
|
462
|
+
# Attribute for field applies_to
|
463
|
+
attr_reader :applies_to
|
464
|
+
|
465
|
+
# Describes the period to bill for upon accepting the quote.
|
466
|
+
attr_reader :bill_on_acceptance
|
467
|
+
|
468
|
+
# 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.
|
469
|
+
attr_reader :billing_behavior
|
470
|
+
|
471
|
+
# The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
472
|
+
attr_reader :customer
|
473
|
+
|
474
|
+
# 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.
|
475
|
+
attr_reader :description
|
476
|
+
|
477
|
+
# Behavior of the subscription schedule and underlying subscription when it ends.
|
478
|
+
attr_reader :end_behavior
|
479
|
+
|
480
|
+
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
481
|
+
attr_reader :proration_behavior
|
482
|
+
end
|
483
|
+
|
484
|
+
class SubscriptionSchedule < Stripe::StripeObject
|
485
|
+
class AppliesTo < Stripe::StripeObject
|
486
|
+
# 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.
|
487
|
+
attr_reader :new_reference
|
488
|
+
|
489
|
+
# The ID of the schedule the line applies to.
|
490
|
+
attr_reader :subscription_schedule
|
491
|
+
|
492
|
+
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
493
|
+
attr_reader :type
|
494
|
+
end
|
495
|
+
# Attribute for field applies_to
|
496
|
+
attr_reader :applies_to
|
497
|
+
|
498
|
+
# The subscription schedule that was created or updated from this quote.
|
499
|
+
attr_reader :subscription_schedule
|
500
|
+
end
|
501
|
+
|
502
|
+
class TotalDetails < Stripe::StripeObject
|
503
|
+
class Breakdown < Stripe::StripeObject
|
504
|
+
class Discount < Stripe::StripeObject
|
505
|
+
# The amount discounted.
|
506
|
+
attr_reader :amount
|
507
|
+
|
508
|
+
# A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
|
509
|
+
# It contains information about when the discount began, when it will end, and what it is applied to.
|
510
|
+
#
|
511
|
+
# Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
|
512
|
+
attr_reader :discount
|
513
|
+
end
|
514
|
+
|
515
|
+
class Tax < Stripe::StripeObject
|
516
|
+
# Amount of tax applied for this rate.
|
517
|
+
attr_reader :amount
|
518
|
+
|
519
|
+
# Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
|
520
|
+
#
|
521
|
+
# Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
|
522
|
+
attr_reader :rate
|
523
|
+
|
524
|
+
# The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
|
525
|
+
attr_reader :taxability_reason
|
526
|
+
|
527
|
+
# The amount on which tax is calculated, in cents (or local equivalent).
|
528
|
+
attr_reader :taxable_amount
|
529
|
+
end
|
530
|
+
# The aggregated discounts.
|
531
|
+
attr_reader :discounts
|
532
|
+
|
533
|
+
# The aggregated tax amounts by rate.
|
534
|
+
attr_reader :taxes
|
535
|
+
end
|
536
|
+
# This is the sum of all the discounts.
|
537
|
+
attr_reader :amount_discount
|
538
|
+
|
539
|
+
# This is the sum of all the shipping amounts.
|
540
|
+
attr_reader :amount_shipping
|
541
|
+
|
542
|
+
# This is the sum of all the tax amounts.
|
543
|
+
attr_reader :amount_tax
|
544
|
+
|
545
|
+
# Attribute for field breakdown
|
546
|
+
attr_reader :breakdown
|
547
|
+
end
|
548
|
+
|
549
|
+
class TransferData < Stripe::StripeObject
|
550
|
+
# The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.
|
551
|
+
attr_reader :amount
|
552
|
+
|
553
|
+
# 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 destination account. By default, the entire amount will be transferred to the destination.
|
554
|
+
attr_reader :amount_percent
|
555
|
+
|
556
|
+
# The account where funds from the payment will be transferred to upon payment success.
|
557
|
+
attr_reader :destination
|
558
|
+
end
|
559
|
+
|
560
|
+
class ListParams < Stripe::RequestParams
|
561
|
+
# The ID of the customer whose quotes will be retrieved.
|
562
|
+
attr_accessor :customer
|
563
|
+
|
564
|
+
# 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.
|
565
|
+
attr_accessor :ending_before
|
566
|
+
|
567
|
+
# Specifies which fields in the response should be expanded.
|
568
|
+
attr_accessor :expand
|
569
|
+
|
570
|
+
# The subscription which the quote updates.
|
571
|
+
attr_accessor :from_subscription
|
572
|
+
|
573
|
+
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
574
|
+
attr_accessor :limit
|
575
|
+
|
576
|
+
# 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.
|
577
|
+
attr_accessor :starting_after
|
578
|
+
|
579
|
+
# The status of the quote.
|
580
|
+
attr_accessor :status
|
581
|
+
|
582
|
+
# Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set.
|
583
|
+
attr_accessor :test_clock
|
584
|
+
|
585
|
+
def initialize(
|
586
|
+
customer: nil,
|
587
|
+
ending_before: nil,
|
588
|
+
expand: nil,
|
589
|
+
from_subscription: nil,
|
590
|
+
limit: nil,
|
591
|
+
starting_after: nil,
|
592
|
+
status: nil,
|
593
|
+
test_clock: nil
|
594
|
+
)
|
595
|
+
@customer = customer
|
596
|
+
@ending_before = ending_before
|
597
|
+
@expand = expand
|
598
|
+
@from_subscription = from_subscription
|
599
|
+
@limit = limit
|
600
|
+
@starting_after = starting_after
|
601
|
+
@status = status
|
602
|
+
@test_clock = test_clock
|
603
|
+
end
|
604
|
+
end
|
605
|
+
|
606
|
+
class CreateParams < Stripe::RequestParams
|
607
|
+
class AutomaticTax < Stripe::RequestParams
|
608
|
+
class Liability < Stripe::RequestParams
|
609
|
+
# The connected account being referenced when `type` is `account`.
|
610
|
+
attr_accessor :account
|
611
|
+
|
612
|
+
# Type of the account referenced in the request.
|
613
|
+
attr_accessor :type
|
614
|
+
|
615
|
+
def initialize(account: nil, type: nil)
|
616
|
+
@account = account
|
617
|
+
@type = type
|
618
|
+
end
|
619
|
+
end
|
620
|
+
# Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
|
621
|
+
attr_accessor :enabled
|
622
|
+
|
623
|
+
# The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
624
|
+
attr_accessor :liability
|
625
|
+
|
626
|
+
def initialize(enabled: nil, liability: nil)
|
627
|
+
@enabled = enabled
|
628
|
+
@liability = liability
|
629
|
+
end
|
630
|
+
end
|
631
|
+
|
632
|
+
class Discount < Stripe::RequestParams
|
633
|
+
class DiscountEnd < Stripe::RequestParams
|
634
|
+
class Duration < Stripe::RequestParams
|
635
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
636
|
+
attr_accessor :interval
|
637
|
+
|
638
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
639
|
+
attr_accessor :interval_count
|
640
|
+
|
641
|
+
def initialize(interval: nil, interval_count: nil)
|
642
|
+
@interval = interval
|
643
|
+
@interval_count = interval_count
|
644
|
+
end
|
645
|
+
end
|
646
|
+
# Time span for the redeemed discount.
|
647
|
+
attr_accessor :duration
|
648
|
+
|
649
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
650
|
+
attr_accessor :timestamp
|
651
|
+
|
652
|
+
# The type of calculation made to determine when the discount ends.
|
653
|
+
attr_accessor :type
|
654
|
+
|
655
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
656
|
+
@duration = duration
|
657
|
+
@timestamp = timestamp
|
658
|
+
@type = type
|
659
|
+
end
|
660
|
+
end
|
661
|
+
# ID of the coupon to create a new discount for.
|
662
|
+
attr_accessor :coupon
|
663
|
+
|
664
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
665
|
+
attr_accessor :discount
|
666
|
+
|
667
|
+
# Details to determine how long the discount should be applied for.
|
668
|
+
attr_accessor :discount_end
|
669
|
+
|
670
|
+
# ID of the promotion code to create a new discount for.
|
671
|
+
attr_accessor :promotion_code
|
672
|
+
|
673
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
674
|
+
@coupon = coupon
|
675
|
+
@discount = discount
|
676
|
+
@discount_end = discount_end
|
677
|
+
@promotion_code = promotion_code
|
678
|
+
end
|
679
|
+
end
|
680
|
+
|
681
|
+
class FromQuote < Stripe::RequestParams
|
682
|
+
# Whether this quote is a revision of the previous quote.
|
683
|
+
attr_accessor :is_revision
|
684
|
+
|
685
|
+
# The `id` of the quote that will be cloned.
|
686
|
+
attr_accessor :quote
|
687
|
+
|
688
|
+
def initialize(is_revision: nil, quote: nil)
|
689
|
+
@is_revision = is_revision
|
690
|
+
@quote = quote
|
691
|
+
end
|
692
|
+
end
|
693
|
+
|
694
|
+
class InvoiceSettings < Stripe::RequestParams
|
695
|
+
class Issuer < Stripe::RequestParams
|
696
|
+
# The connected account being referenced when `type` is `account`.
|
697
|
+
attr_accessor :account
|
698
|
+
|
699
|
+
# Type of the account referenced in the request.
|
700
|
+
attr_accessor :type
|
701
|
+
|
702
|
+
def initialize(account: nil, type: nil)
|
703
|
+
@account = account
|
704
|
+
@type = type
|
705
|
+
end
|
706
|
+
end
|
707
|
+
# Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
|
708
|
+
attr_accessor :days_until_due
|
709
|
+
|
710
|
+
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
711
|
+
attr_accessor :issuer
|
712
|
+
|
713
|
+
def initialize(days_until_due: nil, issuer: nil)
|
714
|
+
@days_until_due = days_until_due
|
715
|
+
@issuer = issuer
|
716
|
+
end
|
717
|
+
end
|
718
|
+
|
719
|
+
class Line < Stripe::RequestParams
|
720
|
+
class Action < Stripe::RequestParams
|
721
|
+
class AddDiscount < Stripe::RequestParams
|
722
|
+
class DiscountEnd < Stripe::RequestParams
|
723
|
+
# The type of calculation made to determine when the discount ends.
|
724
|
+
attr_accessor :type
|
725
|
+
|
726
|
+
def initialize(type: nil)
|
727
|
+
@type = type
|
728
|
+
end
|
729
|
+
end
|
730
|
+
# The coupon code to redeem.
|
731
|
+
attr_accessor :coupon
|
732
|
+
|
733
|
+
# An ID of an existing discount for a coupon that was already redeemed.
|
734
|
+
attr_accessor :discount
|
735
|
+
|
736
|
+
# Details to determine how long the discount should be applied for.
|
737
|
+
attr_accessor :discount_end
|
738
|
+
|
739
|
+
# 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.
|
740
|
+
attr_accessor :index
|
741
|
+
|
742
|
+
# The promotion code to redeem.
|
743
|
+
attr_accessor :promotion_code
|
744
|
+
|
745
|
+
def initialize(
|
746
|
+
coupon: nil,
|
747
|
+
discount: nil,
|
748
|
+
discount_end: nil,
|
749
|
+
index: nil,
|
750
|
+
promotion_code: nil
|
751
|
+
)
|
752
|
+
@coupon = coupon
|
753
|
+
@discount = discount
|
754
|
+
@discount_end = discount_end
|
755
|
+
@index = index
|
756
|
+
@promotion_code = promotion_code
|
757
|
+
end
|
758
|
+
end
|
759
|
+
|
760
|
+
class AddItem < Stripe::RequestParams
|
761
|
+
class Discount < Stripe::RequestParams
|
762
|
+
class DiscountEnd < Stripe::RequestParams
|
763
|
+
class Duration < Stripe::RequestParams
|
764
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
765
|
+
attr_accessor :interval
|
766
|
+
|
767
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
768
|
+
attr_accessor :interval_count
|
769
|
+
|
770
|
+
def initialize(interval: nil, interval_count: nil)
|
771
|
+
@interval = interval
|
772
|
+
@interval_count = interval_count
|
773
|
+
end
|
774
|
+
end
|
775
|
+
# Time span for the redeemed discount.
|
776
|
+
attr_accessor :duration
|
777
|
+
|
778
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
779
|
+
attr_accessor :timestamp
|
780
|
+
|
781
|
+
# The type of calculation made to determine when the discount ends.
|
782
|
+
attr_accessor :type
|
783
|
+
|
784
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
785
|
+
@duration = duration
|
786
|
+
@timestamp = timestamp
|
787
|
+
@type = type
|
788
|
+
end
|
789
|
+
end
|
790
|
+
# ID of the coupon to create a new discount for.
|
791
|
+
attr_accessor :coupon
|
792
|
+
|
793
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
794
|
+
attr_accessor :discount
|
795
|
+
|
796
|
+
# Details to determine how long the discount should be applied for.
|
797
|
+
attr_accessor :discount_end
|
798
|
+
|
799
|
+
# ID of the promotion code to create a new discount for.
|
800
|
+
attr_accessor :promotion_code
|
801
|
+
|
802
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
803
|
+
@coupon = coupon
|
804
|
+
@discount = discount
|
805
|
+
@discount_end = discount_end
|
806
|
+
@promotion_code = promotion_code
|
807
|
+
end
|
808
|
+
end
|
809
|
+
|
810
|
+
class Trial < Stripe::RequestParams
|
811
|
+
# 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.
|
812
|
+
attr_accessor :converts_to
|
813
|
+
|
814
|
+
# Determines the type of trial for this item.
|
815
|
+
attr_accessor :type
|
816
|
+
|
817
|
+
def initialize(converts_to: nil, type: nil)
|
818
|
+
@converts_to = converts_to
|
819
|
+
@type = type
|
820
|
+
end
|
821
|
+
end
|
822
|
+
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
823
|
+
attr_accessor :discounts
|
824
|
+
|
825
|
+
# 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`.
|
826
|
+
attr_accessor :metadata
|
827
|
+
|
828
|
+
# The ID of the price object.
|
829
|
+
attr_accessor :price
|
830
|
+
|
831
|
+
# Quantity for this item.
|
832
|
+
attr_accessor :quantity
|
833
|
+
|
834
|
+
# 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`.
|
835
|
+
attr_accessor :tax_rates
|
836
|
+
|
837
|
+
# Options that configure the trial on the subscription item.
|
838
|
+
attr_accessor :trial
|
839
|
+
|
840
|
+
def initialize(
|
841
|
+
discounts: nil,
|
842
|
+
metadata: nil,
|
843
|
+
price: nil,
|
844
|
+
quantity: nil,
|
845
|
+
tax_rates: nil,
|
846
|
+
trial: nil
|
847
|
+
)
|
848
|
+
@discounts = discounts
|
849
|
+
@metadata = metadata
|
850
|
+
@price = price
|
851
|
+
@quantity = quantity
|
852
|
+
@tax_rates = tax_rates
|
853
|
+
@trial = trial
|
854
|
+
end
|
855
|
+
end
|
856
|
+
|
857
|
+
class RemoveDiscount < Stripe::RequestParams
|
858
|
+
# The coupon code to remove from the `discounts` array.
|
859
|
+
attr_accessor :coupon
|
860
|
+
|
861
|
+
# The ID of a discount to remove from the `discounts` array.
|
862
|
+
attr_accessor :discount
|
863
|
+
|
864
|
+
# The ID of a promotion code to remove from the `discounts` array.
|
865
|
+
attr_accessor :promotion_code
|
866
|
+
|
867
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
868
|
+
@coupon = coupon
|
869
|
+
@discount = discount
|
870
|
+
@promotion_code = promotion_code
|
871
|
+
end
|
872
|
+
end
|
873
|
+
|
874
|
+
class RemoveItem < Stripe::RequestParams
|
875
|
+
# ID of a price to remove.
|
876
|
+
attr_accessor :price
|
877
|
+
|
878
|
+
def initialize(price: nil)
|
879
|
+
@price = price
|
880
|
+
end
|
881
|
+
end
|
882
|
+
|
883
|
+
class SetDiscount < Stripe::RequestParams
|
884
|
+
# The coupon code to replace the `discounts` array with.
|
885
|
+
attr_accessor :coupon
|
886
|
+
|
887
|
+
# An ID of an existing discount to replace the `discounts` array with.
|
888
|
+
attr_accessor :discount
|
889
|
+
|
890
|
+
# An ID of an existing promotion code to replace the `discounts` array with.
|
891
|
+
attr_accessor :promotion_code
|
892
|
+
|
893
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
894
|
+
@coupon = coupon
|
895
|
+
@discount = discount
|
896
|
+
@promotion_code = promotion_code
|
897
|
+
end
|
898
|
+
end
|
899
|
+
|
900
|
+
class SetItem < Stripe::RequestParams
|
901
|
+
class Discount < Stripe::RequestParams
|
902
|
+
class DiscountEnd < Stripe::RequestParams
|
903
|
+
class Duration < Stripe::RequestParams
|
904
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
905
|
+
attr_accessor :interval
|
906
|
+
|
907
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
908
|
+
attr_accessor :interval_count
|
909
|
+
|
910
|
+
def initialize(interval: nil, interval_count: nil)
|
911
|
+
@interval = interval
|
912
|
+
@interval_count = interval_count
|
913
|
+
end
|
914
|
+
end
|
915
|
+
# Time span for the redeemed discount.
|
916
|
+
attr_accessor :duration
|
917
|
+
|
918
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
919
|
+
attr_accessor :timestamp
|
920
|
+
|
921
|
+
# The type of calculation made to determine when the discount ends.
|
922
|
+
attr_accessor :type
|
923
|
+
|
924
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
925
|
+
@duration = duration
|
926
|
+
@timestamp = timestamp
|
927
|
+
@type = type
|
928
|
+
end
|
929
|
+
end
|
930
|
+
# ID of the coupon to create a new discount for.
|
931
|
+
attr_accessor :coupon
|
932
|
+
|
933
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
934
|
+
attr_accessor :discount
|
935
|
+
|
936
|
+
# Details to determine how long the discount should be applied for.
|
937
|
+
attr_accessor :discount_end
|
938
|
+
|
939
|
+
# ID of the promotion code to create a new discount for.
|
940
|
+
attr_accessor :promotion_code
|
941
|
+
|
942
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
943
|
+
@coupon = coupon
|
944
|
+
@discount = discount
|
945
|
+
@discount_end = discount_end
|
946
|
+
@promotion_code = promotion_code
|
947
|
+
end
|
948
|
+
end
|
949
|
+
|
950
|
+
class Trial < Stripe::RequestParams
|
951
|
+
# 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.
|
952
|
+
attr_accessor :converts_to
|
953
|
+
|
954
|
+
# Determines the type of trial for this item.
|
955
|
+
attr_accessor :type
|
956
|
+
|
957
|
+
def initialize(converts_to: nil, type: nil)
|
958
|
+
@converts_to = converts_to
|
959
|
+
@type = type
|
960
|
+
end
|
961
|
+
end
|
962
|
+
# 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`.
|
963
|
+
attr_accessor :discounts
|
964
|
+
|
965
|
+
# 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`.
|
966
|
+
attr_accessor :metadata
|
967
|
+
|
968
|
+
# The ID of the price object.
|
969
|
+
attr_accessor :price
|
970
|
+
|
971
|
+
# 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`.
|
972
|
+
attr_accessor :quantity
|
973
|
+
|
974
|
+
# 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`.
|
975
|
+
attr_accessor :tax_rates
|
976
|
+
|
977
|
+
# 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`.
|
978
|
+
attr_accessor :trial
|
979
|
+
|
980
|
+
def initialize(
|
981
|
+
discounts: nil,
|
982
|
+
metadata: nil,
|
983
|
+
price: nil,
|
984
|
+
quantity: nil,
|
985
|
+
tax_rates: nil,
|
986
|
+
trial: nil
|
987
|
+
)
|
988
|
+
@discounts = discounts
|
989
|
+
@metadata = metadata
|
990
|
+
@price = price
|
991
|
+
@quantity = quantity
|
992
|
+
@tax_rates = tax_rates
|
993
|
+
@trial = trial
|
994
|
+
end
|
995
|
+
end
|
996
|
+
# Details for the `add_discount` type.
|
997
|
+
attr_accessor :add_discount
|
998
|
+
|
999
|
+
# Details for the `add_item` type.
|
1000
|
+
attr_accessor :add_item
|
1001
|
+
|
1002
|
+
# Details for the `add_metadata` type: specify a hash of key-value pairs.
|
1003
|
+
attr_accessor :add_metadata
|
1004
|
+
|
1005
|
+
# Details for the `remove_discount` type.
|
1006
|
+
attr_accessor :remove_discount
|
1007
|
+
|
1008
|
+
# Details for the `remove_item` type.
|
1009
|
+
attr_accessor :remove_item
|
1010
|
+
|
1011
|
+
# Details for the `remove_metadata` type: specify an array of metadata keys.
|
1012
|
+
attr_accessor :remove_metadata
|
1013
|
+
|
1014
|
+
# Details for the `set_discounts` type.
|
1015
|
+
attr_accessor :set_discounts
|
1016
|
+
|
1017
|
+
# Details for the `set_items` type.
|
1018
|
+
attr_accessor :set_items
|
1019
|
+
|
1020
|
+
# Details for the `set_metadata` type: specify an array of key-value pairs.
|
1021
|
+
attr_accessor :set_metadata
|
1022
|
+
|
1023
|
+
# The type of action the quote line performs.
|
1024
|
+
attr_accessor :type
|
1025
|
+
|
1026
|
+
def initialize(
|
1027
|
+
add_discount: nil,
|
1028
|
+
add_item: nil,
|
1029
|
+
add_metadata: nil,
|
1030
|
+
remove_discount: nil,
|
1031
|
+
remove_item: nil,
|
1032
|
+
remove_metadata: nil,
|
1033
|
+
set_discounts: nil,
|
1034
|
+
set_items: nil,
|
1035
|
+
set_metadata: nil,
|
1036
|
+
type: nil
|
1037
|
+
)
|
1038
|
+
@add_discount = add_discount
|
1039
|
+
@add_item = add_item
|
1040
|
+
@add_metadata = add_metadata
|
1041
|
+
@remove_discount = remove_discount
|
1042
|
+
@remove_item = remove_item
|
1043
|
+
@remove_metadata = remove_metadata
|
1044
|
+
@set_discounts = set_discounts
|
1045
|
+
@set_items = set_items
|
1046
|
+
@set_metadata = set_metadata
|
1047
|
+
@type = type
|
1048
|
+
end
|
1049
|
+
end
|
1050
|
+
|
1051
|
+
class AppliesTo < Stripe::RequestParams
|
1052
|
+
# 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.
|
1053
|
+
attr_accessor :new_reference
|
1054
|
+
|
1055
|
+
# The ID of the schedule the line applies to.
|
1056
|
+
attr_accessor :subscription_schedule
|
1057
|
+
|
1058
|
+
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
1059
|
+
attr_accessor :type
|
1060
|
+
|
1061
|
+
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
1062
|
+
@new_reference = new_reference
|
1063
|
+
@subscription_schedule = subscription_schedule
|
1064
|
+
@type = type
|
1065
|
+
end
|
1066
|
+
end
|
1067
|
+
|
1068
|
+
class CancelSubscriptionSchedule < Stripe::RequestParams
|
1069
|
+
# Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
1070
|
+
attr_accessor :cancel_at
|
1071
|
+
|
1072
|
+
# 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`.
|
1073
|
+
attr_accessor :invoice_now
|
1074
|
+
|
1075
|
+
# If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
1076
|
+
attr_accessor :prorate
|
1077
|
+
|
1078
|
+
def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
|
1079
|
+
@cancel_at = cancel_at
|
1080
|
+
@invoice_now = invoice_now
|
1081
|
+
@prorate = prorate
|
1082
|
+
end
|
1083
|
+
end
|
1084
|
+
|
1085
|
+
class EndsAt < Stripe::RequestParams
|
1086
|
+
class DiscountEnd < Stripe::RequestParams
|
1087
|
+
# The ID of a specific discount.
|
1088
|
+
attr_accessor :discount
|
1089
|
+
|
1090
|
+
def initialize(discount: nil)
|
1091
|
+
@discount = discount
|
1092
|
+
end
|
1093
|
+
end
|
1094
|
+
|
1095
|
+
class Duration < Stripe::RequestParams
|
1096
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1097
|
+
attr_accessor :interval
|
1098
|
+
|
1099
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1100
|
+
attr_accessor :interval_count
|
1101
|
+
|
1102
|
+
def initialize(interval: nil, interval_count: nil)
|
1103
|
+
@interval = interval
|
1104
|
+
@interval_count = interval_count
|
1105
|
+
end
|
1106
|
+
end
|
1107
|
+
# Use the `end` time of a given discount.
|
1108
|
+
attr_accessor :discount_end
|
1109
|
+
|
1110
|
+
# Time span for the quote line starting from the `starts_at` date.
|
1111
|
+
attr_accessor :duration
|
1112
|
+
|
1113
|
+
# A precise Unix timestamp.
|
1114
|
+
attr_accessor :timestamp
|
1115
|
+
|
1116
|
+
# Select a way to pass in `ends_at`.
|
1117
|
+
attr_accessor :type
|
1118
|
+
|
1119
|
+
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
1120
|
+
@discount_end = discount_end
|
1121
|
+
@duration = duration
|
1122
|
+
@timestamp = timestamp
|
1123
|
+
@type = type
|
1124
|
+
end
|
1125
|
+
end
|
1126
|
+
|
1127
|
+
class SetPauseCollection < Stripe::RequestParams
|
1128
|
+
class Set < Stripe::RequestParams
|
1129
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1130
|
+
attr_accessor :behavior
|
1131
|
+
|
1132
|
+
def initialize(behavior: nil)
|
1133
|
+
@behavior = behavior
|
1134
|
+
end
|
1135
|
+
end
|
1136
|
+
# Details of the pause_collection behavior to apply to the amendment.
|
1137
|
+
attr_accessor :set
|
1138
|
+
|
1139
|
+
# Determines the type of the pause_collection amendment.
|
1140
|
+
attr_accessor :type
|
1141
|
+
|
1142
|
+
def initialize(set: nil, type: nil)
|
1143
|
+
@set = set
|
1144
|
+
@type = type
|
1145
|
+
end
|
1146
|
+
end
|
1147
|
+
|
1148
|
+
class StartsAt < Stripe::RequestParams
|
1149
|
+
class DiscountEnd < Stripe::RequestParams
|
1150
|
+
# The ID of a specific discount.
|
1151
|
+
attr_accessor :discount
|
1152
|
+
|
1153
|
+
def initialize(discount: nil)
|
1154
|
+
@discount = discount
|
1155
|
+
end
|
1156
|
+
end
|
1157
|
+
|
1158
|
+
class LineEndsAt < Stripe::RequestParams
|
1159
|
+
# 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.
|
1160
|
+
attr_accessor :index
|
1161
|
+
|
1162
|
+
def initialize(index: nil)
|
1163
|
+
@index = index
|
1164
|
+
end
|
1165
|
+
end
|
1166
|
+
# Use the `end` time of a given discount.
|
1167
|
+
attr_accessor :discount_end
|
1168
|
+
|
1169
|
+
# The timestamp the given line ends at.
|
1170
|
+
attr_accessor :line_ends_at
|
1171
|
+
|
1172
|
+
# A precise Unix timestamp.
|
1173
|
+
attr_accessor :timestamp
|
1174
|
+
|
1175
|
+
# Select a way to pass in `starts_at`.
|
1176
|
+
attr_accessor :type
|
1177
|
+
|
1178
|
+
def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
1179
|
+
@discount_end = discount_end
|
1180
|
+
@line_ends_at = line_ends_at
|
1181
|
+
@timestamp = timestamp
|
1182
|
+
@type = type
|
1183
|
+
end
|
1184
|
+
end
|
1185
|
+
|
1186
|
+
class TrialSettings < Stripe::RequestParams
|
1187
|
+
class EndBehavior < Stripe::RequestParams
|
1188
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1189
|
+
attr_accessor :prorate_up_front
|
1190
|
+
|
1191
|
+
def initialize(prorate_up_front: nil)
|
1192
|
+
@prorate_up_front = prorate_up_front
|
1193
|
+
end
|
1194
|
+
end
|
1195
|
+
# Defines how the subscription should behave when a trial ends.
|
1196
|
+
attr_accessor :end_behavior
|
1197
|
+
|
1198
|
+
def initialize(end_behavior: nil)
|
1199
|
+
@end_behavior = end_behavior
|
1200
|
+
end
|
1201
|
+
end
|
1202
|
+
# An array of operations the quote line performs.
|
1203
|
+
attr_accessor :actions
|
1204
|
+
|
1205
|
+
# Details to identify the subscription schedule the quote line applies to.
|
1206
|
+
attr_accessor :applies_to
|
1207
|
+
|
1208
|
+
# 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.
|
1209
|
+
attr_accessor :billing_cycle_anchor
|
1210
|
+
|
1211
|
+
# 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.
|
1212
|
+
attr_accessor :cancel_subscription_schedule
|
1213
|
+
|
1214
|
+
# 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.
|
1215
|
+
attr_accessor :ends_at
|
1216
|
+
|
1217
|
+
# 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.
|
1218
|
+
attr_accessor :proration_behavior
|
1219
|
+
|
1220
|
+
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
1221
|
+
attr_accessor :set_pause_collection
|
1222
|
+
|
1223
|
+
# Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
1224
|
+
attr_accessor :set_schedule_end
|
1225
|
+
|
1226
|
+
# Details to identify the earliest timestamp where the proposed change should take effect.
|
1227
|
+
attr_accessor :starts_at
|
1228
|
+
|
1229
|
+
# Settings related to subscription trials.
|
1230
|
+
attr_accessor :trial_settings
|
1231
|
+
|
1232
|
+
def initialize(
|
1233
|
+
actions: nil,
|
1234
|
+
applies_to: nil,
|
1235
|
+
billing_cycle_anchor: nil,
|
1236
|
+
cancel_subscription_schedule: nil,
|
1237
|
+
ends_at: nil,
|
1238
|
+
proration_behavior: nil,
|
1239
|
+
set_pause_collection: nil,
|
1240
|
+
set_schedule_end: nil,
|
1241
|
+
starts_at: nil,
|
1242
|
+
trial_settings: nil
|
1243
|
+
)
|
1244
|
+
@actions = actions
|
1245
|
+
@applies_to = applies_to
|
1246
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
1247
|
+
@cancel_subscription_schedule = cancel_subscription_schedule
|
1248
|
+
@ends_at = ends_at
|
1249
|
+
@proration_behavior = proration_behavior
|
1250
|
+
@set_pause_collection = set_pause_collection
|
1251
|
+
@set_schedule_end = set_schedule_end
|
1252
|
+
@starts_at = starts_at
|
1253
|
+
@trial_settings = trial_settings
|
1254
|
+
end
|
1255
|
+
end
|
1256
|
+
|
1257
|
+
class LineItem < Stripe::RequestParams
|
1258
|
+
class Discount < Stripe::RequestParams
|
1259
|
+
class DiscountEnd < Stripe::RequestParams
|
1260
|
+
class Duration < Stripe::RequestParams
|
1261
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1262
|
+
attr_accessor :interval
|
1263
|
+
|
1264
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1265
|
+
attr_accessor :interval_count
|
1266
|
+
|
1267
|
+
def initialize(interval: nil, interval_count: nil)
|
1268
|
+
@interval = interval
|
1269
|
+
@interval_count = interval_count
|
1270
|
+
end
|
1271
|
+
end
|
1272
|
+
# Time span for the redeemed discount.
|
1273
|
+
attr_accessor :duration
|
1274
|
+
|
1275
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1276
|
+
attr_accessor :timestamp
|
1277
|
+
|
1278
|
+
# The type of calculation made to determine when the discount ends.
|
1279
|
+
attr_accessor :type
|
1280
|
+
|
1281
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1282
|
+
@duration = duration
|
1283
|
+
@timestamp = timestamp
|
1284
|
+
@type = type
|
1285
|
+
end
|
1286
|
+
end
|
1287
|
+
# ID of the coupon to create a new discount for.
|
1288
|
+
attr_accessor :coupon
|
1289
|
+
|
1290
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1291
|
+
attr_accessor :discount
|
1292
|
+
|
1293
|
+
# Details to determine how long the discount should be applied for.
|
1294
|
+
attr_accessor :discount_end
|
1295
|
+
|
1296
|
+
# ID of the promotion code to create a new discount for.
|
1297
|
+
attr_accessor :promotion_code
|
1298
|
+
|
1299
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1300
|
+
@coupon = coupon
|
1301
|
+
@discount = discount
|
1302
|
+
@discount_end = discount_end
|
1303
|
+
@promotion_code = promotion_code
|
1304
|
+
end
|
1305
|
+
end
|
1306
|
+
|
1307
|
+
class PriceData < Stripe::RequestParams
|
1308
|
+
class Recurring < Stripe::RequestParams
|
1309
|
+
# Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
1310
|
+
attr_accessor :interval
|
1311
|
+
|
1312
|
+
# The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
1313
|
+
attr_accessor :interval_count
|
1314
|
+
|
1315
|
+
def initialize(interval: nil, interval_count: nil)
|
1316
|
+
@interval = interval
|
1317
|
+
@interval_count = interval_count
|
1318
|
+
end
|
1319
|
+
end
|
1320
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
1321
|
+
attr_accessor :currency
|
1322
|
+
|
1323
|
+
# The ID of the product that this price will belong to.
|
1324
|
+
attr_accessor :product
|
1325
|
+
|
1326
|
+
# The recurring components of a price such as `interval` and `interval_count`.
|
1327
|
+
attr_accessor :recurring
|
1328
|
+
|
1329
|
+
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
1330
|
+
attr_accessor :tax_behavior
|
1331
|
+
|
1332
|
+
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
1333
|
+
attr_accessor :unit_amount
|
1334
|
+
|
1335
|
+
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
1336
|
+
attr_accessor :unit_amount_decimal
|
1337
|
+
|
1338
|
+
def initialize(
|
1339
|
+
currency: nil,
|
1340
|
+
product: nil,
|
1341
|
+
recurring: nil,
|
1342
|
+
tax_behavior: nil,
|
1343
|
+
unit_amount: nil,
|
1344
|
+
unit_amount_decimal: nil
|
1345
|
+
)
|
1346
|
+
@currency = currency
|
1347
|
+
@product = product
|
1348
|
+
@recurring = recurring
|
1349
|
+
@tax_behavior = tax_behavior
|
1350
|
+
@unit_amount = unit_amount
|
1351
|
+
@unit_amount_decimal = unit_amount_decimal
|
1352
|
+
end
|
1353
|
+
end
|
1354
|
+
# The discounts applied to this line item.
|
1355
|
+
attr_accessor :discounts
|
1356
|
+
|
1357
|
+
# The ID of the price object. One of `price` or `price_data` is required.
|
1358
|
+
attr_accessor :price
|
1359
|
+
|
1360
|
+
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
1361
|
+
attr_accessor :price_data
|
1362
|
+
|
1363
|
+
# The quantity of the line item.
|
1364
|
+
attr_accessor :quantity
|
1365
|
+
|
1366
|
+
# The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
|
1367
|
+
attr_accessor :tax_rates
|
1368
|
+
|
1369
|
+
def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil)
|
1370
|
+
@discounts = discounts
|
1371
|
+
@price = price
|
1372
|
+
@price_data = price_data
|
1373
|
+
@quantity = quantity
|
1374
|
+
@tax_rates = tax_rates
|
1375
|
+
end
|
1376
|
+
end
|
1377
|
+
|
1378
|
+
class SubscriptionData < Stripe::RequestParams
|
1379
|
+
class BillOnAcceptance < Stripe::RequestParams
|
1380
|
+
class BillFrom < Stripe::RequestParams
|
1381
|
+
class LineStartsAt < Stripe::RequestParams
|
1382
|
+
# The ID of a quote line.
|
1383
|
+
attr_accessor :id
|
1384
|
+
|
1385
|
+
# 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.
|
1386
|
+
attr_accessor :index
|
1387
|
+
|
1388
|
+
def initialize(id: nil, index: nil)
|
1389
|
+
@id = id
|
1390
|
+
@index = index
|
1391
|
+
end
|
1392
|
+
end
|
1393
|
+
# Details of a Quote line to start the bill period from.
|
1394
|
+
attr_accessor :line_starts_at
|
1395
|
+
|
1396
|
+
# A precise Unix timestamp.
|
1397
|
+
attr_accessor :timestamp
|
1398
|
+
|
1399
|
+
# The type of method to specify the `bill_from` time.
|
1400
|
+
attr_accessor :type
|
1401
|
+
|
1402
|
+
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
1403
|
+
@line_starts_at = line_starts_at
|
1404
|
+
@timestamp = timestamp
|
1405
|
+
@type = type
|
1406
|
+
end
|
1407
|
+
end
|
1408
|
+
|
1409
|
+
class BillUntil < Stripe::RequestParams
|
1410
|
+
class Duration < Stripe::RequestParams
|
1411
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1412
|
+
attr_accessor :interval
|
1413
|
+
|
1414
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1415
|
+
attr_accessor :interval_count
|
1416
|
+
|
1417
|
+
def initialize(interval: nil, interval_count: nil)
|
1418
|
+
@interval = interval
|
1419
|
+
@interval_count = interval_count
|
1420
|
+
end
|
1421
|
+
end
|
1422
|
+
|
1423
|
+
class LineEndsAt < Stripe::RequestParams
|
1424
|
+
# The ID of a quote line.
|
1425
|
+
attr_accessor :id
|
1426
|
+
|
1427
|
+
# 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.
|
1428
|
+
attr_accessor :index
|
1429
|
+
|
1430
|
+
def initialize(id: nil, index: nil)
|
1431
|
+
@id = id
|
1432
|
+
@index = index
|
1433
|
+
end
|
1434
|
+
end
|
1435
|
+
# Details of the duration over which to bill.
|
1436
|
+
attr_accessor :duration
|
1437
|
+
|
1438
|
+
# Details of a Quote line item from which to bill until.
|
1439
|
+
attr_accessor :line_ends_at
|
1440
|
+
|
1441
|
+
# A precise Unix timestamp.
|
1442
|
+
attr_accessor :timestamp
|
1443
|
+
|
1444
|
+
# The type of method to specify the `bill_until` time.
|
1445
|
+
attr_accessor :type
|
1446
|
+
|
1447
|
+
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
1448
|
+
@duration = duration
|
1449
|
+
@line_ends_at = line_ends_at
|
1450
|
+
@timestamp = timestamp
|
1451
|
+
@type = type
|
1452
|
+
end
|
1453
|
+
end
|
1454
|
+
# The start of the period to bill from when the Quote is accepted.
|
1455
|
+
attr_accessor :bill_from
|
1456
|
+
|
1457
|
+
# The end of the period to bill until when the Quote is accepted.
|
1458
|
+
attr_accessor :bill_until
|
1459
|
+
|
1460
|
+
def initialize(bill_from: nil, bill_until: nil)
|
1461
|
+
@bill_from = bill_from
|
1462
|
+
@bill_until = bill_until
|
1463
|
+
end
|
1464
|
+
end
|
1465
|
+
|
1466
|
+
class Prebilling < Stripe::RequestParams
|
1467
|
+
# This is used to determine the number of billing cycles to prebill.
|
1468
|
+
attr_accessor :iterations
|
1469
|
+
|
1470
|
+
def initialize(iterations: nil)
|
1471
|
+
@iterations = iterations
|
1472
|
+
end
|
1473
|
+
end
|
1474
|
+
# Describes the period to bill for upon accepting the quote.
|
1475
|
+
attr_accessor :bill_on_acceptance
|
1476
|
+
|
1477
|
+
# 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.
|
1478
|
+
attr_accessor :billing_behavior
|
1479
|
+
|
1480
|
+
# When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
1481
|
+
attr_accessor :billing_cycle_anchor
|
1482
|
+
|
1483
|
+
# 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.
|
1484
|
+
attr_accessor :description
|
1485
|
+
|
1486
|
+
# 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.
|
1487
|
+
attr_accessor :effective_date
|
1488
|
+
|
1489
|
+
# Behavior of the subscription schedule and underlying subscription when it ends.
|
1490
|
+
attr_accessor :end_behavior
|
1491
|
+
|
1492
|
+
# 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.
|
1493
|
+
attr_accessor :from_subscription
|
1494
|
+
|
1495
|
+
# 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.
|
1496
|
+
attr_accessor :metadata
|
1497
|
+
|
1498
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
1499
|
+
attr_accessor :prebilling
|
1500
|
+
|
1501
|
+
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
1502
|
+
#
|
1503
|
+
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
1504
|
+
#
|
1505
|
+
# 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`.
|
1506
|
+
#
|
1507
|
+
# Prorations can be disabled by passing `none`.
|
1508
|
+
attr_accessor :proration_behavior
|
1509
|
+
|
1510
|
+
# Integer representing the number of trial period days before the customer is charged for the first time.
|
1511
|
+
attr_accessor :trial_period_days
|
1512
|
+
|
1513
|
+
def initialize(
|
1514
|
+
bill_on_acceptance: nil,
|
1515
|
+
billing_behavior: nil,
|
1516
|
+
billing_cycle_anchor: nil,
|
1517
|
+
description: nil,
|
1518
|
+
effective_date: nil,
|
1519
|
+
end_behavior: nil,
|
1520
|
+
from_subscription: nil,
|
1521
|
+
metadata: nil,
|
1522
|
+
prebilling: nil,
|
1523
|
+
proration_behavior: nil,
|
1524
|
+
trial_period_days: nil
|
1525
|
+
)
|
1526
|
+
@bill_on_acceptance = bill_on_acceptance
|
1527
|
+
@billing_behavior = billing_behavior
|
1528
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
1529
|
+
@description = description
|
1530
|
+
@effective_date = effective_date
|
1531
|
+
@end_behavior = end_behavior
|
1532
|
+
@from_subscription = from_subscription
|
1533
|
+
@metadata = metadata
|
1534
|
+
@prebilling = prebilling
|
1535
|
+
@proration_behavior = proration_behavior
|
1536
|
+
@trial_period_days = trial_period_days
|
1537
|
+
end
|
1538
|
+
end
|
1539
|
+
|
1540
|
+
class SubscriptionDataOverride < Stripe::RequestParams
|
1541
|
+
class AppliesTo < Stripe::RequestParams
|
1542
|
+
# 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.
|
1543
|
+
attr_accessor :new_reference
|
1544
|
+
|
1545
|
+
# The ID of the schedule the line applies to.
|
1546
|
+
attr_accessor :subscription_schedule
|
1547
|
+
|
1548
|
+
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
1549
|
+
attr_accessor :type
|
1550
|
+
|
1551
|
+
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
1552
|
+
@new_reference = new_reference
|
1553
|
+
@subscription_schedule = subscription_schedule
|
1554
|
+
@type = type
|
1555
|
+
end
|
1556
|
+
end
|
1557
|
+
|
1558
|
+
class BillOnAcceptance < Stripe::RequestParams
|
1559
|
+
class BillFrom < Stripe::RequestParams
|
1560
|
+
class LineStartsAt < Stripe::RequestParams
|
1561
|
+
# The ID of a quote line.
|
1562
|
+
attr_accessor :id
|
1563
|
+
|
1564
|
+
# 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.
|
1565
|
+
attr_accessor :index
|
1566
|
+
|
1567
|
+
def initialize(id: nil, index: nil)
|
1568
|
+
@id = id
|
1569
|
+
@index = index
|
1570
|
+
end
|
1571
|
+
end
|
1572
|
+
# Details of a Quote line to start the bill period from.
|
1573
|
+
attr_accessor :line_starts_at
|
1574
|
+
|
1575
|
+
# A precise Unix timestamp.
|
1576
|
+
attr_accessor :timestamp
|
1577
|
+
|
1578
|
+
# The type of method to specify the `bill_from` time.
|
1579
|
+
attr_accessor :type
|
1580
|
+
|
1581
|
+
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
1582
|
+
@line_starts_at = line_starts_at
|
1583
|
+
@timestamp = timestamp
|
1584
|
+
@type = type
|
1585
|
+
end
|
1586
|
+
end
|
1587
|
+
|
1588
|
+
class BillUntil < Stripe::RequestParams
|
1589
|
+
class Duration < Stripe::RequestParams
|
1590
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1591
|
+
attr_accessor :interval
|
1592
|
+
|
1593
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1594
|
+
attr_accessor :interval_count
|
1595
|
+
|
1596
|
+
def initialize(interval: nil, interval_count: nil)
|
1597
|
+
@interval = interval
|
1598
|
+
@interval_count = interval_count
|
1599
|
+
end
|
1600
|
+
end
|
1601
|
+
|
1602
|
+
class LineEndsAt < Stripe::RequestParams
|
1603
|
+
# The ID of a quote line.
|
1604
|
+
attr_accessor :id
|
1605
|
+
|
1606
|
+
# 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.
|
1607
|
+
attr_accessor :index
|
1608
|
+
|
1609
|
+
def initialize(id: nil, index: nil)
|
1610
|
+
@id = id
|
1611
|
+
@index = index
|
1612
|
+
end
|
1613
|
+
end
|
1614
|
+
# Details of the duration over which to bill.
|
1615
|
+
attr_accessor :duration
|
1616
|
+
|
1617
|
+
# Details of a Quote line item from which to bill until.
|
1618
|
+
attr_accessor :line_ends_at
|
1619
|
+
|
1620
|
+
# A precise Unix timestamp.
|
1621
|
+
attr_accessor :timestamp
|
1622
|
+
|
1623
|
+
# The type of method to specify the `bill_until` time.
|
1624
|
+
attr_accessor :type
|
1625
|
+
|
1626
|
+
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
1627
|
+
@duration = duration
|
1628
|
+
@line_ends_at = line_ends_at
|
1629
|
+
@timestamp = timestamp
|
1630
|
+
@type = type
|
1631
|
+
end
|
1632
|
+
end
|
1633
|
+
# The start of the period to bill from when the Quote is accepted.
|
1634
|
+
attr_accessor :bill_from
|
1635
|
+
|
1636
|
+
# The end of the period to bill until when the Quote is accepted.
|
1637
|
+
attr_accessor :bill_until
|
1638
|
+
|
1639
|
+
def initialize(bill_from: nil, bill_until: nil)
|
1640
|
+
@bill_from = bill_from
|
1641
|
+
@bill_until = bill_until
|
1642
|
+
end
|
1643
|
+
end
|
1644
|
+
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
1645
|
+
attr_accessor :applies_to
|
1646
|
+
|
1647
|
+
# Describes the period to bill for upon accepting the quote.
|
1648
|
+
attr_accessor :bill_on_acceptance
|
1649
|
+
|
1650
|
+
# 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.
|
1651
|
+
attr_accessor :billing_behavior
|
1652
|
+
|
1653
|
+
# The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
|
1654
|
+
attr_accessor :customer
|
1655
|
+
|
1656
|
+
# 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.
|
1657
|
+
attr_accessor :description
|
1658
|
+
|
1659
|
+
# Behavior of the subscription schedule and underlying subscription when it ends.
|
1660
|
+
attr_accessor :end_behavior
|
1661
|
+
|
1662
|
+
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
1663
|
+
#
|
1664
|
+
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
1665
|
+
#
|
1666
|
+
# 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`.
|
1667
|
+
#
|
1668
|
+
# Prorations can be disabled by passing `none`.
|
1669
|
+
attr_accessor :proration_behavior
|
1670
|
+
|
1671
|
+
def initialize(
|
1672
|
+
applies_to: nil,
|
1673
|
+
bill_on_acceptance: nil,
|
1674
|
+
billing_behavior: nil,
|
1675
|
+
customer: nil,
|
1676
|
+
description: nil,
|
1677
|
+
end_behavior: nil,
|
1678
|
+
proration_behavior: nil
|
1679
|
+
)
|
1680
|
+
@applies_to = applies_to
|
1681
|
+
@bill_on_acceptance = bill_on_acceptance
|
1682
|
+
@billing_behavior = billing_behavior
|
1683
|
+
@customer = customer
|
1684
|
+
@description = description
|
1685
|
+
@end_behavior = end_behavior
|
1686
|
+
@proration_behavior = proration_behavior
|
1687
|
+
end
|
1688
|
+
end
|
1689
|
+
|
1690
|
+
class TransferData < Stripe::RequestParams
|
1691
|
+
# 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.
|
1692
|
+
attr_accessor :amount
|
1693
|
+
|
1694
|
+
# 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 destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
|
1695
|
+
attr_accessor :amount_percent
|
1696
|
+
|
1697
|
+
# ID of an existing, connected Stripe account.
|
1698
|
+
attr_accessor :destination
|
1699
|
+
|
1700
|
+
def initialize(amount: nil, amount_percent: nil, destination: nil)
|
1701
|
+
@amount = amount
|
1702
|
+
@amount_percent = amount_percent
|
1703
|
+
@destination = destination
|
1704
|
+
end
|
1705
|
+
end
|
1706
|
+
# Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
1707
|
+
attr_accessor :allow_backdated_lines
|
1708
|
+
|
1709
|
+
# 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.
|
1710
|
+
attr_accessor :application_fee_amount
|
1711
|
+
|
1712
|
+
# 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.
|
1713
|
+
attr_accessor :application_fee_percent
|
1714
|
+
|
1715
|
+
# Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
|
1716
|
+
attr_accessor :automatic_tax
|
1717
|
+
|
1718
|
+
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
|
1719
|
+
attr_accessor :collection_method
|
1720
|
+
|
1721
|
+
# The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
1722
|
+
attr_accessor :customer
|
1723
|
+
|
1724
|
+
# The tax rates that will apply to any line item that does not have `tax_rates` set.
|
1725
|
+
attr_accessor :default_tax_rates
|
1726
|
+
|
1727
|
+
# 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.
|
1728
|
+
attr_accessor :description
|
1729
|
+
|
1730
|
+
# The discounts applied to the quote.
|
1731
|
+
attr_accessor :discounts
|
1732
|
+
|
1733
|
+
# Specifies which fields in the response should be expanded.
|
1734
|
+
attr_accessor :expand
|
1735
|
+
|
1736
|
+
# A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
|
1737
|
+
attr_accessor :expires_at
|
1738
|
+
|
1739
|
+
# A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
|
1740
|
+
attr_accessor :footer
|
1741
|
+
|
1742
|
+
# Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.
|
1743
|
+
attr_accessor :from_quote
|
1744
|
+
|
1745
|
+
# A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
|
1746
|
+
attr_accessor :header
|
1747
|
+
|
1748
|
+
# All invoices will be billed using the specified settings.
|
1749
|
+
attr_accessor :invoice_settings
|
1750
|
+
|
1751
|
+
# 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.
|
1752
|
+
attr_accessor :line_items
|
1753
|
+
|
1754
|
+
# 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.
|
1755
|
+
attr_accessor :lines
|
1756
|
+
|
1757
|
+
# 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`.
|
1758
|
+
attr_accessor :metadata
|
1759
|
+
|
1760
|
+
# The account on behalf of which to charge.
|
1761
|
+
attr_accessor :on_behalf_of
|
1762
|
+
|
1763
|
+
# 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.
|
1764
|
+
attr_accessor :subscription_data
|
1765
|
+
|
1766
|
+
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
1767
|
+
attr_accessor :subscription_data_overrides
|
1768
|
+
|
1769
|
+
# ID of the test clock to attach to the quote.
|
1770
|
+
attr_accessor :test_clock
|
1771
|
+
|
1772
|
+
# The data with which to automatically create a Transfer for each of the invoices.
|
1773
|
+
attr_accessor :transfer_data
|
1774
|
+
|
1775
|
+
def initialize(
|
1776
|
+
allow_backdated_lines: nil,
|
1777
|
+
application_fee_amount: nil,
|
1778
|
+
application_fee_percent: nil,
|
1779
|
+
automatic_tax: nil,
|
1780
|
+
collection_method: nil,
|
1781
|
+
customer: nil,
|
1782
|
+
default_tax_rates: nil,
|
1783
|
+
description: nil,
|
1784
|
+
discounts: nil,
|
1785
|
+
expand: nil,
|
1786
|
+
expires_at: nil,
|
1787
|
+
footer: nil,
|
1788
|
+
from_quote: nil,
|
1789
|
+
header: nil,
|
1790
|
+
invoice_settings: nil,
|
1791
|
+
line_items: nil,
|
1792
|
+
lines: nil,
|
1793
|
+
metadata: nil,
|
1794
|
+
on_behalf_of: nil,
|
1795
|
+
subscription_data: nil,
|
1796
|
+
subscription_data_overrides: nil,
|
1797
|
+
test_clock: nil,
|
1798
|
+
transfer_data: nil
|
1799
|
+
)
|
1800
|
+
@allow_backdated_lines = allow_backdated_lines
|
1801
|
+
@application_fee_amount = application_fee_amount
|
1802
|
+
@application_fee_percent = application_fee_percent
|
1803
|
+
@automatic_tax = automatic_tax
|
1804
|
+
@collection_method = collection_method
|
1805
|
+
@customer = customer
|
1806
|
+
@default_tax_rates = default_tax_rates
|
1807
|
+
@description = description
|
1808
|
+
@discounts = discounts
|
1809
|
+
@expand = expand
|
1810
|
+
@expires_at = expires_at
|
1811
|
+
@footer = footer
|
1812
|
+
@from_quote = from_quote
|
1813
|
+
@header = header
|
1814
|
+
@invoice_settings = invoice_settings
|
1815
|
+
@line_items = line_items
|
1816
|
+
@lines = lines
|
1817
|
+
@metadata = metadata
|
1818
|
+
@on_behalf_of = on_behalf_of
|
1819
|
+
@subscription_data = subscription_data
|
1820
|
+
@subscription_data_overrides = subscription_data_overrides
|
1821
|
+
@test_clock = test_clock
|
1822
|
+
@transfer_data = transfer_data
|
1823
|
+
end
|
1824
|
+
end
|
1825
|
+
|
1826
|
+
class RetrieveParams < Stripe::RequestParams
|
1827
|
+
# Specifies which fields in the response should be expanded.
|
1828
|
+
attr_accessor :expand
|
1829
|
+
|
1830
|
+
def initialize(expand: nil)
|
1831
|
+
@expand = expand
|
1832
|
+
end
|
1833
|
+
end
|
1834
|
+
|
1835
|
+
class UpdateParams < Stripe::RequestParams
|
1836
|
+
class AutomaticTax < Stripe::RequestParams
|
1837
|
+
class Liability < Stripe::RequestParams
|
1838
|
+
# The connected account being referenced when `type` is `account`.
|
1839
|
+
attr_accessor :account
|
1840
|
+
|
1841
|
+
# Type of the account referenced in the request.
|
1842
|
+
attr_accessor :type
|
1843
|
+
|
1844
|
+
def initialize(account: nil, type: nil)
|
1845
|
+
@account = account
|
1846
|
+
@type = type
|
1847
|
+
end
|
1848
|
+
end
|
1849
|
+
# Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
|
1850
|
+
attr_accessor :enabled
|
1851
|
+
|
1852
|
+
# The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
1853
|
+
attr_accessor :liability
|
1854
|
+
|
1855
|
+
def initialize(enabled: nil, liability: nil)
|
1856
|
+
@enabled = enabled
|
1857
|
+
@liability = liability
|
1858
|
+
end
|
1859
|
+
end
|
1860
|
+
|
1861
|
+
class Discount < Stripe::RequestParams
|
1862
|
+
class DiscountEnd < Stripe::RequestParams
|
1863
|
+
class Duration < Stripe::RequestParams
|
1864
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1865
|
+
attr_accessor :interval
|
1866
|
+
|
1867
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1868
|
+
attr_accessor :interval_count
|
1869
|
+
|
1870
|
+
def initialize(interval: nil, interval_count: nil)
|
1871
|
+
@interval = interval
|
1872
|
+
@interval_count = interval_count
|
1873
|
+
end
|
1874
|
+
end
|
1875
|
+
# Time span for the redeemed discount.
|
1876
|
+
attr_accessor :duration
|
1877
|
+
|
1878
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1879
|
+
attr_accessor :timestamp
|
1880
|
+
|
1881
|
+
# The type of calculation made to determine when the discount ends.
|
1882
|
+
attr_accessor :type
|
1883
|
+
|
1884
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
1885
|
+
@duration = duration
|
1886
|
+
@timestamp = timestamp
|
1887
|
+
@type = type
|
1888
|
+
end
|
1889
|
+
end
|
1890
|
+
# ID of the coupon to create a new discount for.
|
1891
|
+
attr_accessor :coupon
|
1892
|
+
|
1893
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1894
|
+
attr_accessor :discount
|
1895
|
+
|
1896
|
+
# Details to determine how long the discount should be applied for.
|
1897
|
+
attr_accessor :discount_end
|
1898
|
+
|
1899
|
+
# ID of the promotion code to create a new discount for.
|
1900
|
+
attr_accessor :promotion_code
|
1901
|
+
|
1902
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1903
|
+
@coupon = coupon
|
1904
|
+
@discount = discount
|
1905
|
+
@discount_end = discount_end
|
1906
|
+
@promotion_code = promotion_code
|
1907
|
+
end
|
1908
|
+
end
|
1909
|
+
|
1910
|
+
class InvoiceSettings < Stripe::RequestParams
|
1911
|
+
class Issuer < Stripe::RequestParams
|
1912
|
+
# The connected account being referenced when `type` is `account`.
|
1913
|
+
attr_accessor :account
|
1914
|
+
|
1915
|
+
# Type of the account referenced in the request.
|
1916
|
+
attr_accessor :type
|
1917
|
+
|
1918
|
+
def initialize(account: nil, type: nil)
|
1919
|
+
@account = account
|
1920
|
+
@type = type
|
1921
|
+
end
|
1922
|
+
end
|
1923
|
+
# Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
|
1924
|
+
attr_accessor :days_until_due
|
1925
|
+
|
1926
|
+
# The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
1927
|
+
attr_accessor :issuer
|
1928
|
+
|
1929
|
+
def initialize(days_until_due: nil, issuer: nil)
|
1930
|
+
@days_until_due = days_until_due
|
1931
|
+
@issuer = issuer
|
1932
|
+
end
|
1933
|
+
end
|
1934
|
+
|
1935
|
+
class Line < Stripe::RequestParams
|
1936
|
+
class Action < Stripe::RequestParams
|
1937
|
+
class AddDiscount < Stripe::RequestParams
|
1938
|
+
class DiscountEnd < Stripe::RequestParams
|
1939
|
+
# The type of calculation made to determine when the discount ends.
|
1940
|
+
attr_accessor :type
|
1941
|
+
|
1942
|
+
def initialize(type: nil)
|
1943
|
+
@type = type
|
1944
|
+
end
|
1945
|
+
end
|
1946
|
+
# The coupon code to redeem.
|
1947
|
+
attr_accessor :coupon
|
1948
|
+
|
1949
|
+
# An ID of an existing discount for a coupon that was already redeemed.
|
1950
|
+
attr_accessor :discount
|
1951
|
+
|
1952
|
+
# Details to determine how long the discount should be applied for.
|
1953
|
+
attr_accessor :discount_end
|
1954
|
+
|
1955
|
+
# 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.
|
1956
|
+
attr_accessor :index
|
1957
|
+
|
1958
|
+
# The promotion code to redeem.
|
1959
|
+
attr_accessor :promotion_code
|
1960
|
+
|
1961
|
+
def initialize(
|
1962
|
+
coupon: nil,
|
1963
|
+
discount: nil,
|
1964
|
+
discount_end: nil,
|
1965
|
+
index: nil,
|
1966
|
+
promotion_code: nil
|
1967
|
+
)
|
1968
|
+
@coupon = coupon
|
1969
|
+
@discount = discount
|
1970
|
+
@discount_end = discount_end
|
1971
|
+
@index = index
|
1972
|
+
@promotion_code = promotion_code
|
1973
|
+
end
|
1974
|
+
end
|
1975
|
+
|
1976
|
+
class AddItem < Stripe::RequestParams
|
1977
|
+
class Discount < Stripe::RequestParams
|
1978
|
+
class DiscountEnd < Stripe::RequestParams
|
1979
|
+
class Duration < Stripe::RequestParams
|
1980
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1981
|
+
attr_accessor :interval
|
1982
|
+
|
1983
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1984
|
+
attr_accessor :interval_count
|
1985
|
+
|
1986
|
+
def initialize(interval: nil, interval_count: nil)
|
1987
|
+
@interval = interval
|
1988
|
+
@interval_count = interval_count
|
1989
|
+
end
|
1990
|
+
end
|
1991
|
+
# Time span for the redeemed discount.
|
1992
|
+
attr_accessor :duration
|
1993
|
+
|
1994
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1995
|
+
attr_accessor :timestamp
|
1996
|
+
|
1997
|
+
# The type of calculation made to determine when the discount ends.
|
1998
|
+
attr_accessor :type
|
1999
|
+
|
2000
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2001
|
+
@duration = duration
|
2002
|
+
@timestamp = timestamp
|
2003
|
+
@type = type
|
2004
|
+
end
|
2005
|
+
end
|
2006
|
+
# ID of the coupon to create a new discount for.
|
2007
|
+
attr_accessor :coupon
|
2008
|
+
|
2009
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2010
|
+
attr_accessor :discount
|
2011
|
+
|
2012
|
+
# Details to determine how long the discount should be applied for.
|
2013
|
+
attr_accessor :discount_end
|
2014
|
+
|
2015
|
+
# ID of the promotion code to create a new discount for.
|
2016
|
+
attr_accessor :promotion_code
|
2017
|
+
|
2018
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2019
|
+
@coupon = coupon
|
2020
|
+
@discount = discount
|
2021
|
+
@discount_end = discount_end
|
2022
|
+
@promotion_code = promotion_code
|
2023
|
+
end
|
2024
|
+
end
|
2025
|
+
|
2026
|
+
class Trial < Stripe::RequestParams
|
2027
|
+
# 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.
|
2028
|
+
attr_accessor :converts_to
|
2029
|
+
|
2030
|
+
# Determines the type of trial for this item.
|
2031
|
+
attr_accessor :type
|
2032
|
+
|
2033
|
+
def initialize(converts_to: nil, type: nil)
|
2034
|
+
@converts_to = converts_to
|
2035
|
+
@type = type
|
2036
|
+
end
|
2037
|
+
end
|
2038
|
+
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
2039
|
+
attr_accessor :discounts
|
2040
|
+
|
2041
|
+
# 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`.
|
2042
|
+
attr_accessor :metadata
|
2043
|
+
|
2044
|
+
# The ID of the price object.
|
2045
|
+
attr_accessor :price
|
2046
|
+
|
2047
|
+
# Quantity for this item.
|
2048
|
+
attr_accessor :quantity
|
2049
|
+
|
2050
|
+
# 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`.
|
2051
|
+
attr_accessor :tax_rates
|
2052
|
+
|
2053
|
+
# Options that configure the trial on the subscription item.
|
2054
|
+
attr_accessor :trial
|
2055
|
+
|
2056
|
+
def initialize(
|
2057
|
+
discounts: nil,
|
2058
|
+
metadata: nil,
|
2059
|
+
price: nil,
|
2060
|
+
quantity: nil,
|
2061
|
+
tax_rates: nil,
|
2062
|
+
trial: nil
|
2063
|
+
)
|
2064
|
+
@discounts = discounts
|
2065
|
+
@metadata = metadata
|
2066
|
+
@price = price
|
2067
|
+
@quantity = quantity
|
2068
|
+
@tax_rates = tax_rates
|
2069
|
+
@trial = trial
|
2070
|
+
end
|
2071
|
+
end
|
2072
|
+
|
2073
|
+
class RemoveDiscount < Stripe::RequestParams
|
2074
|
+
# The coupon code to remove from the `discounts` array.
|
2075
|
+
attr_accessor :coupon
|
2076
|
+
|
2077
|
+
# The ID of a discount to remove from the `discounts` array.
|
2078
|
+
attr_accessor :discount
|
2079
|
+
|
2080
|
+
# The ID of a promotion code to remove from the `discounts` array.
|
2081
|
+
attr_accessor :promotion_code
|
2082
|
+
|
2083
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2084
|
+
@coupon = coupon
|
2085
|
+
@discount = discount
|
2086
|
+
@promotion_code = promotion_code
|
2087
|
+
end
|
2088
|
+
end
|
2089
|
+
|
2090
|
+
class RemoveItem < Stripe::RequestParams
|
2091
|
+
# ID of a price to remove.
|
2092
|
+
attr_accessor :price
|
2093
|
+
|
2094
|
+
def initialize(price: nil)
|
2095
|
+
@price = price
|
2096
|
+
end
|
2097
|
+
end
|
2098
|
+
|
2099
|
+
class SetDiscount < Stripe::RequestParams
|
2100
|
+
# The coupon code to replace the `discounts` array with.
|
2101
|
+
attr_accessor :coupon
|
2102
|
+
|
2103
|
+
# An ID of an existing discount to replace the `discounts` array with.
|
2104
|
+
attr_accessor :discount
|
2105
|
+
|
2106
|
+
# An ID of an existing promotion code to replace the `discounts` array with.
|
2107
|
+
attr_accessor :promotion_code
|
2108
|
+
|
2109
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
2110
|
+
@coupon = coupon
|
2111
|
+
@discount = discount
|
2112
|
+
@promotion_code = promotion_code
|
2113
|
+
end
|
2114
|
+
end
|
2115
|
+
|
2116
|
+
class SetItem < Stripe::RequestParams
|
2117
|
+
class Discount < Stripe::RequestParams
|
2118
|
+
class DiscountEnd < Stripe::RequestParams
|
2119
|
+
class Duration < Stripe::RequestParams
|
2120
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2121
|
+
attr_accessor :interval
|
2122
|
+
|
2123
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2124
|
+
attr_accessor :interval_count
|
2125
|
+
|
2126
|
+
def initialize(interval: nil, interval_count: nil)
|
2127
|
+
@interval = interval
|
2128
|
+
@interval_count = interval_count
|
2129
|
+
end
|
2130
|
+
end
|
2131
|
+
# Time span for the redeemed discount.
|
2132
|
+
attr_accessor :duration
|
2133
|
+
|
2134
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2135
|
+
attr_accessor :timestamp
|
2136
|
+
|
2137
|
+
# The type of calculation made to determine when the discount ends.
|
2138
|
+
attr_accessor :type
|
2139
|
+
|
2140
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2141
|
+
@duration = duration
|
2142
|
+
@timestamp = timestamp
|
2143
|
+
@type = type
|
2144
|
+
end
|
2145
|
+
end
|
2146
|
+
# ID of the coupon to create a new discount for.
|
2147
|
+
attr_accessor :coupon
|
2148
|
+
|
2149
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2150
|
+
attr_accessor :discount
|
2151
|
+
|
2152
|
+
# Details to determine how long the discount should be applied for.
|
2153
|
+
attr_accessor :discount_end
|
2154
|
+
|
2155
|
+
# ID of the promotion code to create a new discount for.
|
2156
|
+
attr_accessor :promotion_code
|
2157
|
+
|
2158
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2159
|
+
@coupon = coupon
|
2160
|
+
@discount = discount
|
2161
|
+
@discount_end = discount_end
|
2162
|
+
@promotion_code = promotion_code
|
2163
|
+
end
|
2164
|
+
end
|
2165
|
+
|
2166
|
+
class Trial < Stripe::RequestParams
|
2167
|
+
# 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.
|
2168
|
+
attr_accessor :converts_to
|
2169
|
+
|
2170
|
+
# Determines the type of trial for this item.
|
2171
|
+
attr_accessor :type
|
2172
|
+
|
2173
|
+
def initialize(converts_to: nil, type: nil)
|
2174
|
+
@converts_to = converts_to
|
2175
|
+
@type = type
|
2176
|
+
end
|
2177
|
+
end
|
2178
|
+
# 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`.
|
2179
|
+
attr_accessor :discounts
|
2180
|
+
|
2181
|
+
# 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`.
|
2182
|
+
attr_accessor :metadata
|
2183
|
+
|
2184
|
+
# The ID of the price object.
|
2185
|
+
attr_accessor :price
|
2186
|
+
|
2187
|
+
# 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`.
|
2188
|
+
attr_accessor :quantity
|
2189
|
+
|
2190
|
+
# 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`.
|
2191
|
+
attr_accessor :tax_rates
|
2192
|
+
|
2193
|
+
# 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`.
|
2194
|
+
attr_accessor :trial
|
2195
|
+
|
2196
|
+
def initialize(
|
2197
|
+
discounts: nil,
|
2198
|
+
metadata: nil,
|
2199
|
+
price: nil,
|
2200
|
+
quantity: nil,
|
2201
|
+
tax_rates: nil,
|
2202
|
+
trial: nil
|
2203
|
+
)
|
2204
|
+
@discounts = discounts
|
2205
|
+
@metadata = metadata
|
2206
|
+
@price = price
|
2207
|
+
@quantity = quantity
|
2208
|
+
@tax_rates = tax_rates
|
2209
|
+
@trial = trial
|
2210
|
+
end
|
2211
|
+
end
|
2212
|
+
# Details for the `add_discount` type.
|
2213
|
+
attr_accessor :add_discount
|
2214
|
+
|
2215
|
+
# Details for the `add_item` type.
|
2216
|
+
attr_accessor :add_item
|
2217
|
+
|
2218
|
+
# Details for the `add_metadata` type: specify a hash of key-value pairs.
|
2219
|
+
attr_accessor :add_metadata
|
2220
|
+
|
2221
|
+
# Details for the `remove_discount` type.
|
2222
|
+
attr_accessor :remove_discount
|
2223
|
+
|
2224
|
+
# Details for the `remove_item` type.
|
2225
|
+
attr_accessor :remove_item
|
2226
|
+
|
2227
|
+
# Details for the `remove_metadata` type: specify an array of metadata keys.
|
2228
|
+
attr_accessor :remove_metadata
|
2229
|
+
|
2230
|
+
# Details for the `set_discounts` type.
|
2231
|
+
attr_accessor :set_discounts
|
2232
|
+
|
2233
|
+
# Details for the `set_items` type.
|
2234
|
+
attr_accessor :set_items
|
2235
|
+
|
2236
|
+
# Details for the `set_metadata` type: specify an array of key-value pairs.
|
2237
|
+
attr_accessor :set_metadata
|
2238
|
+
|
2239
|
+
# The type of action the quote line performs.
|
2240
|
+
attr_accessor :type
|
2241
|
+
|
2242
|
+
def initialize(
|
2243
|
+
add_discount: nil,
|
2244
|
+
add_item: nil,
|
2245
|
+
add_metadata: nil,
|
2246
|
+
remove_discount: nil,
|
2247
|
+
remove_item: nil,
|
2248
|
+
remove_metadata: nil,
|
2249
|
+
set_discounts: nil,
|
2250
|
+
set_items: nil,
|
2251
|
+
set_metadata: nil,
|
2252
|
+
type: nil
|
2253
|
+
)
|
2254
|
+
@add_discount = add_discount
|
2255
|
+
@add_item = add_item
|
2256
|
+
@add_metadata = add_metadata
|
2257
|
+
@remove_discount = remove_discount
|
2258
|
+
@remove_item = remove_item
|
2259
|
+
@remove_metadata = remove_metadata
|
2260
|
+
@set_discounts = set_discounts
|
2261
|
+
@set_items = set_items
|
2262
|
+
@set_metadata = set_metadata
|
2263
|
+
@type = type
|
2264
|
+
end
|
2265
|
+
end
|
2266
|
+
|
2267
|
+
class AppliesTo < Stripe::RequestParams
|
2268
|
+
# 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.
|
2269
|
+
attr_accessor :new_reference
|
2270
|
+
|
2271
|
+
# The ID of the schedule the line applies to.
|
2272
|
+
attr_accessor :subscription_schedule
|
2273
|
+
|
2274
|
+
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
2275
|
+
attr_accessor :type
|
2276
|
+
|
2277
|
+
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
2278
|
+
@new_reference = new_reference
|
2279
|
+
@subscription_schedule = subscription_schedule
|
2280
|
+
@type = type
|
2281
|
+
end
|
2282
|
+
end
|
2283
|
+
|
2284
|
+
class CancelSubscriptionSchedule < Stripe::RequestParams
|
2285
|
+
# Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
2286
|
+
attr_accessor :cancel_at
|
2287
|
+
|
2288
|
+
# 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`.
|
2289
|
+
attr_accessor :invoice_now
|
2290
|
+
|
2291
|
+
# If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
2292
|
+
attr_accessor :prorate
|
2293
|
+
|
2294
|
+
def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
|
2295
|
+
@cancel_at = cancel_at
|
2296
|
+
@invoice_now = invoice_now
|
2297
|
+
@prorate = prorate
|
2298
|
+
end
|
2299
|
+
end
|
2300
|
+
|
2301
|
+
class EndsAt < Stripe::RequestParams
|
2302
|
+
class DiscountEnd < Stripe::RequestParams
|
2303
|
+
# The ID of a specific discount.
|
2304
|
+
attr_accessor :discount
|
2305
|
+
|
2306
|
+
def initialize(discount: nil)
|
2307
|
+
@discount = discount
|
2308
|
+
end
|
2309
|
+
end
|
2310
|
+
|
2311
|
+
class Duration < Stripe::RequestParams
|
2312
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2313
|
+
attr_accessor :interval
|
2314
|
+
|
2315
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2316
|
+
attr_accessor :interval_count
|
2317
|
+
|
2318
|
+
def initialize(interval: nil, interval_count: nil)
|
2319
|
+
@interval = interval
|
2320
|
+
@interval_count = interval_count
|
2321
|
+
end
|
2322
|
+
end
|
2323
|
+
# Use the `end` time of a given discount.
|
2324
|
+
attr_accessor :discount_end
|
2325
|
+
|
2326
|
+
# Time span for the quote line starting from the `starts_at` date.
|
2327
|
+
attr_accessor :duration
|
2328
|
+
|
2329
|
+
# A precise Unix timestamp.
|
2330
|
+
attr_accessor :timestamp
|
2331
|
+
|
2332
|
+
# Select a way to pass in `ends_at`.
|
2333
|
+
attr_accessor :type
|
2334
|
+
|
2335
|
+
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
2336
|
+
@discount_end = discount_end
|
2337
|
+
@duration = duration
|
2338
|
+
@timestamp = timestamp
|
2339
|
+
@type = type
|
2340
|
+
end
|
2341
|
+
end
|
2342
|
+
|
2343
|
+
class SetPauseCollection < Stripe::RequestParams
|
2344
|
+
class Set < Stripe::RequestParams
|
2345
|
+
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
2346
|
+
attr_accessor :behavior
|
2347
|
+
|
2348
|
+
def initialize(behavior: nil)
|
2349
|
+
@behavior = behavior
|
2350
|
+
end
|
2351
|
+
end
|
2352
|
+
# Details of the pause_collection behavior to apply to the amendment.
|
2353
|
+
attr_accessor :set
|
2354
|
+
|
2355
|
+
# Determines the type of the pause_collection amendment.
|
2356
|
+
attr_accessor :type
|
2357
|
+
|
2358
|
+
def initialize(set: nil, type: nil)
|
2359
|
+
@set = set
|
2360
|
+
@type = type
|
2361
|
+
end
|
2362
|
+
end
|
2363
|
+
|
2364
|
+
class StartsAt < Stripe::RequestParams
|
2365
|
+
class DiscountEnd < Stripe::RequestParams
|
2366
|
+
# The ID of a specific discount.
|
2367
|
+
attr_accessor :discount
|
2368
|
+
|
2369
|
+
def initialize(discount: nil)
|
2370
|
+
@discount = discount
|
2371
|
+
end
|
2372
|
+
end
|
2373
|
+
|
2374
|
+
class LineEndsAt < Stripe::RequestParams
|
2375
|
+
# The ID of a quote line.
|
2376
|
+
attr_accessor :id
|
2377
|
+
|
2378
|
+
# 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.
|
2379
|
+
attr_accessor :index
|
2380
|
+
|
2381
|
+
def initialize(id: nil, index: nil)
|
2382
|
+
@id = id
|
2383
|
+
@index = index
|
2384
|
+
end
|
2385
|
+
end
|
2386
|
+
# Use the `end` time of a given discount.
|
2387
|
+
attr_accessor :discount_end
|
2388
|
+
|
2389
|
+
# The timestamp the given line ends at.
|
2390
|
+
attr_accessor :line_ends_at
|
2391
|
+
|
2392
|
+
# A precise Unix timestamp.
|
2393
|
+
attr_accessor :timestamp
|
2394
|
+
|
2395
|
+
# Select a way to pass in `starts_at`.
|
2396
|
+
attr_accessor :type
|
2397
|
+
|
2398
|
+
def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
2399
|
+
@discount_end = discount_end
|
2400
|
+
@line_ends_at = line_ends_at
|
2401
|
+
@timestamp = timestamp
|
2402
|
+
@type = type
|
2403
|
+
end
|
2404
|
+
end
|
2405
|
+
|
2406
|
+
class TrialSettings < Stripe::RequestParams
|
2407
|
+
class EndBehavior < Stripe::RequestParams
|
2408
|
+
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
2409
|
+
attr_accessor :prorate_up_front
|
2410
|
+
|
2411
|
+
def initialize(prorate_up_front: nil)
|
2412
|
+
@prorate_up_front = prorate_up_front
|
2413
|
+
end
|
2414
|
+
end
|
2415
|
+
# Defines how the subscription should behave when a trial ends.
|
2416
|
+
attr_accessor :end_behavior
|
2417
|
+
|
2418
|
+
def initialize(end_behavior: nil)
|
2419
|
+
@end_behavior = end_behavior
|
2420
|
+
end
|
2421
|
+
end
|
2422
|
+
# An array of operations the quote line performs.
|
2423
|
+
attr_accessor :actions
|
2424
|
+
|
2425
|
+
# Details to identify the subscription schedule the quote line applies to.
|
2426
|
+
attr_accessor :applies_to
|
2427
|
+
|
2428
|
+
# 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.
|
2429
|
+
attr_accessor :billing_cycle_anchor
|
2430
|
+
|
2431
|
+
# 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.
|
2432
|
+
attr_accessor :cancel_subscription_schedule
|
2433
|
+
|
2434
|
+
# 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.
|
2435
|
+
attr_accessor :ends_at
|
2436
|
+
|
2437
|
+
# The ID of an existing line on the quote.
|
2438
|
+
attr_accessor :id
|
2439
|
+
|
2440
|
+
# 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.
|
2441
|
+
attr_accessor :proration_behavior
|
2442
|
+
|
2443
|
+
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
2444
|
+
attr_accessor :set_pause_collection
|
2445
|
+
|
2446
|
+
# Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
2447
|
+
attr_accessor :set_schedule_end
|
2448
|
+
|
2449
|
+
# Details to identify the earliest timestamp where the proposed change should take effect.
|
2450
|
+
attr_accessor :starts_at
|
2451
|
+
|
2452
|
+
# Settings related to subscription trials.
|
2453
|
+
attr_accessor :trial_settings
|
2454
|
+
|
2455
|
+
def initialize(
|
2456
|
+
actions: nil,
|
2457
|
+
applies_to: nil,
|
2458
|
+
billing_cycle_anchor: nil,
|
2459
|
+
cancel_subscription_schedule: nil,
|
2460
|
+
ends_at: nil,
|
2461
|
+
id: nil,
|
2462
|
+
proration_behavior: nil,
|
2463
|
+
set_pause_collection: nil,
|
2464
|
+
set_schedule_end: nil,
|
2465
|
+
starts_at: nil,
|
2466
|
+
trial_settings: nil
|
2467
|
+
)
|
2468
|
+
@actions = actions
|
2469
|
+
@applies_to = applies_to
|
2470
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
2471
|
+
@cancel_subscription_schedule = cancel_subscription_schedule
|
2472
|
+
@ends_at = ends_at
|
2473
|
+
@id = id
|
2474
|
+
@proration_behavior = proration_behavior
|
2475
|
+
@set_pause_collection = set_pause_collection
|
2476
|
+
@set_schedule_end = set_schedule_end
|
2477
|
+
@starts_at = starts_at
|
2478
|
+
@trial_settings = trial_settings
|
2479
|
+
end
|
2480
|
+
end
|
2481
|
+
|
2482
|
+
class LineItem < Stripe::RequestParams
|
2483
|
+
class Discount < Stripe::RequestParams
|
2484
|
+
class DiscountEnd < Stripe::RequestParams
|
2485
|
+
class Duration < Stripe::RequestParams
|
2486
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2487
|
+
attr_accessor :interval
|
2488
|
+
|
2489
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2490
|
+
attr_accessor :interval_count
|
2491
|
+
|
2492
|
+
def initialize(interval: nil, interval_count: nil)
|
2493
|
+
@interval = interval
|
2494
|
+
@interval_count = interval_count
|
2495
|
+
end
|
2496
|
+
end
|
2497
|
+
# Time span for the redeemed discount.
|
2498
|
+
attr_accessor :duration
|
2499
|
+
|
2500
|
+
# A precise Unix timestamp for the discount to end. Must be in the future.
|
2501
|
+
attr_accessor :timestamp
|
2502
|
+
|
2503
|
+
# The type of calculation made to determine when the discount ends.
|
2504
|
+
attr_accessor :type
|
2505
|
+
|
2506
|
+
def initialize(duration: nil, timestamp: nil, type: nil)
|
2507
|
+
@duration = duration
|
2508
|
+
@timestamp = timestamp
|
2509
|
+
@type = type
|
2510
|
+
end
|
2511
|
+
end
|
2512
|
+
# ID of the coupon to create a new discount for.
|
2513
|
+
attr_accessor :coupon
|
2514
|
+
|
2515
|
+
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
2516
|
+
attr_accessor :discount
|
2517
|
+
|
2518
|
+
# Details to determine how long the discount should be applied for.
|
2519
|
+
attr_accessor :discount_end
|
2520
|
+
|
2521
|
+
# ID of the promotion code to create a new discount for.
|
2522
|
+
attr_accessor :promotion_code
|
2523
|
+
|
2524
|
+
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
2525
|
+
@coupon = coupon
|
2526
|
+
@discount = discount
|
2527
|
+
@discount_end = discount_end
|
2528
|
+
@promotion_code = promotion_code
|
2529
|
+
end
|
2530
|
+
end
|
2531
|
+
|
2532
|
+
class PriceData < Stripe::RequestParams
|
2533
|
+
class Recurring < Stripe::RequestParams
|
2534
|
+
# Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
2535
|
+
attr_accessor :interval
|
2536
|
+
|
2537
|
+
# The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
2538
|
+
attr_accessor :interval_count
|
2539
|
+
|
2540
|
+
def initialize(interval: nil, interval_count: nil)
|
2541
|
+
@interval = interval
|
2542
|
+
@interval_count = interval_count
|
2543
|
+
end
|
2544
|
+
end
|
2545
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
2546
|
+
attr_accessor :currency
|
2547
|
+
|
2548
|
+
# The ID of the product that this price will belong to.
|
2549
|
+
attr_accessor :product
|
2550
|
+
|
2551
|
+
# The recurring components of a price such as `interval` and `interval_count`.
|
2552
|
+
attr_accessor :recurring
|
2553
|
+
|
2554
|
+
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
2555
|
+
attr_accessor :tax_behavior
|
2556
|
+
|
2557
|
+
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
2558
|
+
attr_accessor :unit_amount
|
2559
|
+
|
2560
|
+
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
2561
|
+
attr_accessor :unit_amount_decimal
|
2562
|
+
|
2563
|
+
def initialize(
|
2564
|
+
currency: nil,
|
2565
|
+
product: nil,
|
2566
|
+
recurring: nil,
|
2567
|
+
tax_behavior: nil,
|
2568
|
+
unit_amount: nil,
|
2569
|
+
unit_amount_decimal: nil
|
2570
|
+
)
|
2571
|
+
@currency = currency
|
2572
|
+
@product = product
|
2573
|
+
@recurring = recurring
|
2574
|
+
@tax_behavior = tax_behavior
|
2575
|
+
@unit_amount = unit_amount
|
2576
|
+
@unit_amount_decimal = unit_amount_decimal
|
2577
|
+
end
|
2578
|
+
end
|
2579
|
+
# The discounts applied to this line item.
|
2580
|
+
attr_accessor :discounts
|
2581
|
+
|
2582
|
+
# The ID of an existing line item on the quote.
|
2583
|
+
attr_accessor :id
|
2584
|
+
|
2585
|
+
# The ID of the price object. One of `price` or `price_data` is required.
|
2586
|
+
attr_accessor :price
|
2587
|
+
|
2588
|
+
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
2589
|
+
attr_accessor :price_data
|
2590
|
+
|
2591
|
+
# The quantity of the line item.
|
2592
|
+
attr_accessor :quantity
|
2593
|
+
|
2594
|
+
# The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
|
2595
|
+
attr_accessor :tax_rates
|
2596
|
+
|
2597
|
+
def initialize(
|
2598
|
+
discounts: nil,
|
2599
|
+
id: nil,
|
2600
|
+
price: nil,
|
2601
|
+
price_data: nil,
|
2602
|
+
quantity: nil,
|
2603
|
+
tax_rates: nil
|
2604
|
+
)
|
2605
|
+
@discounts = discounts
|
2606
|
+
@id = id
|
2607
|
+
@price = price
|
2608
|
+
@price_data = price_data
|
2609
|
+
@quantity = quantity
|
2610
|
+
@tax_rates = tax_rates
|
2611
|
+
end
|
2612
|
+
end
|
2613
|
+
|
2614
|
+
class SubscriptionData < Stripe::RequestParams
|
2615
|
+
class BillOnAcceptance < Stripe::RequestParams
|
2616
|
+
class BillFrom < Stripe::RequestParams
|
2617
|
+
class LineStartsAt < Stripe::RequestParams
|
2618
|
+
# The ID of a quote line.
|
2619
|
+
attr_accessor :id
|
2620
|
+
|
2621
|
+
# 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.
|
2622
|
+
attr_accessor :index
|
2623
|
+
|
2624
|
+
def initialize(id: nil, index: nil)
|
2625
|
+
@id = id
|
2626
|
+
@index = index
|
2627
|
+
end
|
2628
|
+
end
|
2629
|
+
# Details of a Quote line to start the bill period from.
|
2630
|
+
attr_accessor :line_starts_at
|
2631
|
+
|
2632
|
+
# A precise Unix timestamp.
|
2633
|
+
attr_accessor :timestamp
|
2634
|
+
|
2635
|
+
# The type of method to specify the `bill_from` time.
|
2636
|
+
attr_accessor :type
|
2637
|
+
|
2638
|
+
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
2639
|
+
@line_starts_at = line_starts_at
|
2640
|
+
@timestamp = timestamp
|
2641
|
+
@type = type
|
2642
|
+
end
|
2643
|
+
end
|
2644
|
+
|
2645
|
+
class BillUntil < Stripe::RequestParams
|
2646
|
+
class Duration < Stripe::RequestParams
|
2647
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2648
|
+
attr_accessor :interval
|
2649
|
+
|
2650
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2651
|
+
attr_accessor :interval_count
|
2652
|
+
|
2653
|
+
def initialize(interval: nil, interval_count: nil)
|
2654
|
+
@interval = interval
|
2655
|
+
@interval_count = interval_count
|
2656
|
+
end
|
2657
|
+
end
|
2658
|
+
|
2659
|
+
class LineEndsAt < Stripe::RequestParams
|
2660
|
+
# The ID of a quote line.
|
2661
|
+
attr_accessor :id
|
2662
|
+
|
2663
|
+
# 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.
|
2664
|
+
attr_accessor :index
|
2665
|
+
|
2666
|
+
def initialize(id: nil, index: nil)
|
2667
|
+
@id = id
|
2668
|
+
@index = index
|
2669
|
+
end
|
2670
|
+
end
|
2671
|
+
# Details of the duration over which to bill.
|
2672
|
+
attr_accessor :duration
|
2673
|
+
|
2674
|
+
# Details of a Quote line item from which to bill until.
|
2675
|
+
attr_accessor :line_ends_at
|
2676
|
+
|
2677
|
+
# A precise Unix timestamp.
|
2678
|
+
attr_accessor :timestamp
|
2679
|
+
|
2680
|
+
# The type of method to specify the `bill_until` time.
|
2681
|
+
attr_accessor :type
|
2682
|
+
|
2683
|
+
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
2684
|
+
@duration = duration
|
2685
|
+
@line_ends_at = line_ends_at
|
2686
|
+
@timestamp = timestamp
|
2687
|
+
@type = type
|
2688
|
+
end
|
2689
|
+
end
|
2690
|
+
# The start of the period to bill from when the Quote is accepted.
|
2691
|
+
attr_accessor :bill_from
|
2692
|
+
|
2693
|
+
# The end of the period to bill until when the Quote is accepted.
|
2694
|
+
attr_accessor :bill_until
|
2695
|
+
|
2696
|
+
def initialize(bill_from: nil, bill_until: nil)
|
2697
|
+
@bill_from = bill_from
|
2698
|
+
@bill_until = bill_until
|
2699
|
+
end
|
2700
|
+
end
|
2701
|
+
|
2702
|
+
class Prebilling < Stripe::RequestParams
|
2703
|
+
# This is used to determine the number of billing cycles to prebill.
|
2704
|
+
attr_accessor :iterations
|
2705
|
+
|
2706
|
+
def initialize(iterations: nil)
|
2707
|
+
@iterations = iterations
|
2708
|
+
end
|
2709
|
+
end
|
2710
|
+
# Describes the period to bill for upon accepting the quote.
|
2711
|
+
attr_accessor :bill_on_acceptance
|
2712
|
+
|
2713
|
+
# 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.
|
2714
|
+
attr_accessor :billing_behavior
|
2715
|
+
|
2716
|
+
# When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
2717
|
+
attr_accessor :billing_cycle_anchor
|
2718
|
+
|
2719
|
+
# 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.
|
2720
|
+
attr_accessor :description
|
2721
|
+
|
2722
|
+
# 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.
|
2723
|
+
attr_accessor :effective_date
|
2724
|
+
|
2725
|
+
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2726
|
+
attr_accessor :end_behavior
|
2727
|
+
|
2728
|
+
# 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.
|
2729
|
+
attr_accessor :metadata
|
2730
|
+
|
2731
|
+
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
2732
|
+
attr_accessor :prebilling
|
2733
|
+
|
2734
|
+
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
2735
|
+
#
|
2736
|
+
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
2737
|
+
#
|
2738
|
+
# 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`.
|
2739
|
+
#
|
2740
|
+
# Prorations can be disabled by passing `none`.
|
2741
|
+
attr_accessor :proration_behavior
|
2742
|
+
|
2743
|
+
# Integer representing the number of trial period days before the customer is charged for the first time.
|
2744
|
+
attr_accessor :trial_period_days
|
2745
|
+
|
2746
|
+
def initialize(
|
2747
|
+
bill_on_acceptance: nil,
|
2748
|
+
billing_behavior: nil,
|
2749
|
+
billing_cycle_anchor: nil,
|
2750
|
+
description: nil,
|
2751
|
+
effective_date: nil,
|
2752
|
+
end_behavior: nil,
|
2753
|
+
metadata: nil,
|
2754
|
+
prebilling: nil,
|
2755
|
+
proration_behavior: nil,
|
2756
|
+
trial_period_days: nil
|
2757
|
+
)
|
2758
|
+
@bill_on_acceptance = bill_on_acceptance
|
2759
|
+
@billing_behavior = billing_behavior
|
2760
|
+
@billing_cycle_anchor = billing_cycle_anchor
|
2761
|
+
@description = description
|
2762
|
+
@effective_date = effective_date
|
2763
|
+
@end_behavior = end_behavior
|
2764
|
+
@metadata = metadata
|
2765
|
+
@prebilling = prebilling
|
2766
|
+
@proration_behavior = proration_behavior
|
2767
|
+
@trial_period_days = trial_period_days
|
2768
|
+
end
|
2769
|
+
end
|
2770
|
+
|
2771
|
+
class SubscriptionDataOverride < Stripe::RequestParams
|
2772
|
+
class AppliesTo < Stripe::RequestParams
|
2773
|
+
# 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.
|
2774
|
+
attr_accessor :new_reference
|
2775
|
+
|
2776
|
+
# The ID of the schedule the line applies to.
|
2777
|
+
attr_accessor :subscription_schedule
|
2778
|
+
|
2779
|
+
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
2780
|
+
attr_accessor :type
|
2781
|
+
|
2782
|
+
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
2783
|
+
@new_reference = new_reference
|
2784
|
+
@subscription_schedule = subscription_schedule
|
2785
|
+
@type = type
|
2786
|
+
end
|
2787
|
+
end
|
2788
|
+
|
2789
|
+
class BillOnAcceptance < Stripe::RequestParams
|
2790
|
+
class BillFrom < Stripe::RequestParams
|
2791
|
+
class LineStartsAt < Stripe::RequestParams
|
2792
|
+
# The ID of a quote line.
|
2793
|
+
attr_accessor :id
|
2794
|
+
|
2795
|
+
# 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.
|
2796
|
+
attr_accessor :index
|
2797
|
+
|
2798
|
+
def initialize(id: nil, index: nil)
|
2799
|
+
@id = id
|
2800
|
+
@index = index
|
2801
|
+
end
|
2802
|
+
end
|
2803
|
+
# Details of a Quote line to start the bill period from.
|
2804
|
+
attr_accessor :line_starts_at
|
2805
|
+
|
2806
|
+
# A precise Unix timestamp.
|
2807
|
+
attr_accessor :timestamp
|
2808
|
+
|
2809
|
+
# The type of method to specify the `bill_from` time.
|
2810
|
+
attr_accessor :type
|
2811
|
+
|
2812
|
+
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
2813
|
+
@line_starts_at = line_starts_at
|
2814
|
+
@timestamp = timestamp
|
2815
|
+
@type = type
|
2816
|
+
end
|
2817
|
+
end
|
2818
|
+
|
2819
|
+
class BillUntil < Stripe::RequestParams
|
2820
|
+
class Duration < Stripe::RequestParams
|
2821
|
+
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2822
|
+
attr_accessor :interval
|
2823
|
+
|
2824
|
+
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2825
|
+
attr_accessor :interval_count
|
2826
|
+
|
2827
|
+
def initialize(interval: nil, interval_count: nil)
|
2828
|
+
@interval = interval
|
2829
|
+
@interval_count = interval_count
|
2830
|
+
end
|
2831
|
+
end
|
2832
|
+
|
2833
|
+
class LineEndsAt < Stripe::RequestParams
|
2834
|
+
# The ID of a quote line.
|
2835
|
+
attr_accessor :id
|
2836
|
+
|
2837
|
+
# 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.
|
2838
|
+
attr_accessor :index
|
2839
|
+
|
2840
|
+
def initialize(id: nil, index: nil)
|
2841
|
+
@id = id
|
2842
|
+
@index = index
|
2843
|
+
end
|
2844
|
+
end
|
2845
|
+
# Details of the duration over which to bill.
|
2846
|
+
attr_accessor :duration
|
2847
|
+
|
2848
|
+
# Details of a Quote line item from which to bill until.
|
2849
|
+
attr_accessor :line_ends_at
|
2850
|
+
|
2851
|
+
# A precise Unix timestamp.
|
2852
|
+
attr_accessor :timestamp
|
2853
|
+
|
2854
|
+
# The type of method to specify the `bill_until` time.
|
2855
|
+
attr_accessor :type
|
2856
|
+
|
2857
|
+
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
2858
|
+
@duration = duration
|
2859
|
+
@line_ends_at = line_ends_at
|
2860
|
+
@timestamp = timestamp
|
2861
|
+
@type = type
|
2862
|
+
end
|
2863
|
+
end
|
2864
|
+
# The start of the period to bill from when the Quote is accepted.
|
2865
|
+
attr_accessor :bill_from
|
2866
|
+
|
2867
|
+
# The end of the period to bill until when the Quote is accepted.
|
2868
|
+
attr_accessor :bill_until
|
2869
|
+
|
2870
|
+
def initialize(bill_from: nil, bill_until: nil)
|
2871
|
+
@bill_from = bill_from
|
2872
|
+
@bill_until = bill_until
|
2873
|
+
end
|
2874
|
+
end
|
2875
|
+
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
2876
|
+
attr_accessor :applies_to
|
2877
|
+
|
2878
|
+
# Describes the period to bill for upon accepting the quote.
|
2879
|
+
attr_accessor :bill_on_acceptance
|
2880
|
+
|
2881
|
+
# 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.
|
2882
|
+
attr_accessor :billing_behavior
|
2883
|
+
|
2884
|
+
# The customer the Subscription Data override applies to.
|
2885
|
+
attr_accessor :customer
|
2886
|
+
|
2887
|
+
# 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.
|
2888
|
+
attr_accessor :description
|
2889
|
+
|
2890
|
+
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2891
|
+
attr_accessor :end_behavior
|
2892
|
+
|
2893
|
+
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
2894
|
+
#
|
2895
|
+
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
2896
|
+
#
|
2897
|
+
# 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`.
|
2898
|
+
#
|
2899
|
+
# Prorations can be disabled by passing `none`.
|
2900
|
+
attr_accessor :proration_behavior
|
2901
|
+
|
2902
|
+
def initialize(
|
2903
|
+
applies_to: nil,
|
2904
|
+
bill_on_acceptance: nil,
|
2905
|
+
billing_behavior: nil,
|
2906
|
+
customer: nil,
|
2907
|
+
description: nil,
|
2908
|
+
end_behavior: nil,
|
2909
|
+
proration_behavior: nil
|
2910
|
+
)
|
2911
|
+
@applies_to = applies_to
|
2912
|
+
@bill_on_acceptance = bill_on_acceptance
|
2913
|
+
@billing_behavior = billing_behavior
|
2914
|
+
@customer = customer
|
2915
|
+
@description = description
|
2916
|
+
@end_behavior = end_behavior
|
2917
|
+
@proration_behavior = proration_behavior
|
2918
|
+
end
|
2919
|
+
end
|
2920
|
+
|
2921
|
+
class TransferData < Stripe::RequestParams
|
2922
|
+
# 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.
|
2923
|
+
attr_accessor :amount
|
2924
|
+
|
2925
|
+
# 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 destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
|
2926
|
+
attr_accessor :amount_percent
|
2927
|
+
|
2928
|
+
# ID of an existing, connected Stripe account.
|
2929
|
+
attr_accessor :destination
|
2930
|
+
|
2931
|
+
def initialize(amount: nil, amount_percent: nil, destination: nil)
|
2932
|
+
@amount = amount
|
2933
|
+
@amount_percent = amount_percent
|
2934
|
+
@destination = destination
|
2935
|
+
end
|
2936
|
+
end
|
2937
|
+
# Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
2938
|
+
attr_accessor :allow_backdated_lines
|
2939
|
+
|
2940
|
+
# 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.
|
2941
|
+
attr_accessor :application_fee_amount
|
2942
|
+
|
2943
|
+
# 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.
|
2944
|
+
attr_accessor :application_fee_percent
|
2945
|
+
|
2946
|
+
# Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
|
2947
|
+
attr_accessor :automatic_tax
|
2948
|
+
|
2949
|
+
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
|
2950
|
+
attr_accessor :collection_method
|
2951
|
+
|
2952
|
+
# The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
2953
|
+
attr_accessor :customer
|
2954
|
+
|
2955
|
+
# The tax rates that will apply to any line item that does not have `tax_rates` set.
|
2956
|
+
attr_accessor :default_tax_rates
|
2957
|
+
|
2958
|
+
# A description that will be displayed on the quote PDF.
|
2959
|
+
attr_accessor :description
|
2960
|
+
|
2961
|
+
# The discounts applied to the quote.
|
2962
|
+
attr_accessor :discounts
|
2963
|
+
|
2964
|
+
# Specifies which fields in the response should be expanded.
|
2965
|
+
attr_accessor :expand
|
2966
|
+
|
2967
|
+
# A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
|
2968
|
+
attr_accessor :expires_at
|
2969
|
+
|
2970
|
+
# A footer that will be displayed on the quote PDF.
|
2971
|
+
attr_accessor :footer
|
2972
|
+
|
2973
|
+
# A header that will be displayed on the quote PDF.
|
2974
|
+
attr_accessor :header
|
2975
|
+
|
2976
|
+
# All invoices will be billed using the specified settings.
|
2977
|
+
attr_accessor :invoice_settings
|
2978
|
+
|
2979
|
+
# 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.
|
2980
|
+
attr_accessor :line_items
|
2981
|
+
|
2982
|
+
# 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.
|
2983
|
+
attr_accessor :lines
|
2984
|
+
|
2985
|
+
# 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`.
|
2986
|
+
attr_accessor :metadata
|
2987
|
+
|
2988
|
+
# The account on behalf of which to charge.
|
2989
|
+
attr_accessor :on_behalf_of
|
2990
|
+
|
2991
|
+
# 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.
|
2992
|
+
attr_accessor :subscription_data
|
2993
|
+
|
2994
|
+
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
2995
|
+
attr_accessor :subscription_data_overrides
|
2996
|
+
|
2997
|
+
# The data with which to automatically create a Transfer for each of the invoices.
|
2998
|
+
attr_accessor :transfer_data
|
2999
|
+
|
3000
|
+
def initialize(
|
3001
|
+
allow_backdated_lines: nil,
|
3002
|
+
application_fee_amount: nil,
|
3003
|
+
application_fee_percent: nil,
|
3004
|
+
automatic_tax: nil,
|
3005
|
+
collection_method: nil,
|
3006
|
+
customer: nil,
|
3007
|
+
default_tax_rates: nil,
|
3008
|
+
description: nil,
|
3009
|
+
discounts: nil,
|
3010
|
+
expand: nil,
|
3011
|
+
expires_at: nil,
|
3012
|
+
footer: nil,
|
3013
|
+
header: nil,
|
3014
|
+
invoice_settings: nil,
|
3015
|
+
line_items: nil,
|
3016
|
+
lines: nil,
|
3017
|
+
metadata: nil,
|
3018
|
+
on_behalf_of: nil,
|
3019
|
+
subscription_data: nil,
|
3020
|
+
subscription_data_overrides: nil,
|
3021
|
+
transfer_data: nil
|
3022
|
+
)
|
3023
|
+
@allow_backdated_lines = allow_backdated_lines
|
3024
|
+
@application_fee_amount = application_fee_amount
|
3025
|
+
@application_fee_percent = application_fee_percent
|
3026
|
+
@automatic_tax = automatic_tax
|
3027
|
+
@collection_method = collection_method
|
3028
|
+
@customer = customer
|
3029
|
+
@default_tax_rates = default_tax_rates
|
3030
|
+
@description = description
|
3031
|
+
@discounts = discounts
|
3032
|
+
@expand = expand
|
3033
|
+
@expires_at = expires_at
|
3034
|
+
@footer = footer
|
3035
|
+
@header = header
|
3036
|
+
@invoice_settings = invoice_settings
|
3037
|
+
@line_items = line_items
|
3038
|
+
@lines = lines
|
3039
|
+
@metadata = metadata
|
3040
|
+
@on_behalf_of = on_behalf_of
|
3041
|
+
@subscription_data = subscription_data
|
3042
|
+
@subscription_data_overrides = subscription_data_overrides
|
3043
|
+
@transfer_data = transfer_data
|
3044
|
+
end
|
3045
|
+
end
|
3046
|
+
|
3047
|
+
class ListComputedUpfrontLineItemsParams < Stripe::RequestParams
|
3048
|
+
# 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.
|
3049
|
+
attr_accessor :ending_before
|
3050
|
+
|
3051
|
+
# Specifies which fields in the response should be expanded.
|
3052
|
+
attr_accessor :expand
|
3053
|
+
|
3054
|
+
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
3055
|
+
attr_accessor :limit
|
3056
|
+
|
3057
|
+
# 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.
|
3058
|
+
attr_accessor :starting_after
|
3059
|
+
|
3060
|
+
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
3061
|
+
@ending_before = ending_before
|
3062
|
+
@expand = expand
|
3063
|
+
@limit = limit
|
3064
|
+
@starting_after = starting_after
|
3065
|
+
end
|
3066
|
+
end
|
3067
|
+
|
3068
|
+
class ListLineItemsParams < Stripe::RequestParams
|
3069
|
+
# 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.
|
3070
|
+
attr_accessor :ending_before
|
3071
|
+
|
3072
|
+
# Specifies which fields in the response should be expanded.
|
3073
|
+
attr_accessor :expand
|
3074
|
+
|
3075
|
+
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
3076
|
+
attr_accessor :limit
|
3077
|
+
|
3078
|
+
# 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.
|
3079
|
+
attr_accessor :starting_after
|
3080
|
+
|
3081
|
+
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
3082
|
+
@ending_before = ending_before
|
3083
|
+
@expand = expand
|
3084
|
+
@limit = limit
|
3085
|
+
@starting_after = starting_after
|
3086
|
+
end
|
3087
|
+
end
|
3088
|
+
|
3089
|
+
class ListLinesParams < Stripe::RequestParams
|
3090
|
+
# 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.
|
3091
|
+
attr_accessor :ending_before
|
3092
|
+
|
3093
|
+
# Specifies which fields in the response should be expanded.
|
3094
|
+
attr_accessor :expand
|
3095
|
+
|
3096
|
+
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
3097
|
+
attr_accessor :limit
|
3098
|
+
|
3099
|
+
# 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.
|
3100
|
+
attr_accessor :starting_after
|
3101
|
+
|
3102
|
+
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
3103
|
+
@ending_before = ending_before
|
3104
|
+
@expand = expand
|
3105
|
+
@limit = limit
|
3106
|
+
@starting_after = starting_after
|
3107
|
+
end
|
3108
|
+
end
|
3109
|
+
|
3110
|
+
class AcceptParams < Stripe::RequestParams
|
3111
|
+
# Specifies which fields in the response should be expanded.
|
3112
|
+
attr_accessor :expand
|
3113
|
+
|
3114
|
+
def initialize(expand: nil)
|
3115
|
+
@expand = expand
|
3116
|
+
end
|
3117
|
+
end
|
3118
|
+
|
3119
|
+
class CancelParams < Stripe::RequestParams
|
3120
|
+
# Specifies which fields in the response should be expanded.
|
3121
|
+
attr_accessor :expand
|
3122
|
+
|
3123
|
+
def initialize(expand: nil)
|
3124
|
+
@expand = expand
|
3125
|
+
end
|
3126
|
+
end
|
3127
|
+
|
3128
|
+
class FinalizeQuoteParams < Stripe::RequestParams
|
3129
|
+
# Specifies which fields in the response should be expanded.
|
3130
|
+
attr_accessor :expand
|
3131
|
+
|
3132
|
+
# A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
|
3133
|
+
attr_accessor :expires_at
|
3134
|
+
|
3135
|
+
def initialize(expand: nil, expires_at: nil)
|
3136
|
+
@expand = expand
|
3137
|
+
@expires_at = expires_at
|
3138
|
+
end
|
3139
|
+
end
|
3140
|
+
|
3141
|
+
class MarkDraftParams < Stripe::RequestParams
|
3142
|
+
# Specifies which fields in the response should be expanded.
|
3143
|
+
attr_accessor :expand
|
3144
|
+
|
3145
|
+
def initialize(expand: nil)
|
3146
|
+
@expand = expand
|
3147
|
+
end
|
3148
|
+
end
|
3149
|
+
|
3150
|
+
class MarkStaleParams < Stripe::RequestParams
|
3151
|
+
# Specifies which fields in the response should be expanded.
|
3152
|
+
attr_accessor :expand
|
3153
|
+
|
3154
|
+
# Reason the Quote is being marked stale.
|
3155
|
+
attr_accessor :reason
|
3156
|
+
|
3157
|
+
def initialize(expand: nil, reason: nil)
|
3158
|
+
@expand = expand
|
3159
|
+
@reason = reason
|
3160
|
+
end
|
3161
|
+
end
|
3162
|
+
|
3163
|
+
class ReestimateParams < Stripe::RequestParams
|
3164
|
+
# Specifies which fields in the response should be expanded.
|
3165
|
+
attr_accessor :expand
|
3166
|
+
|
3167
|
+
def initialize(expand: nil)
|
3168
|
+
@expand = expand
|
3169
|
+
end
|
3170
|
+
end
|
3171
|
+
|
3172
|
+
class PdfParams < Stripe::RequestParams
|
3173
|
+
# Specifies which fields in the response should be expanded.
|
3174
|
+
attr_accessor :expand
|
3175
|
+
|
3176
|
+
def initialize(expand: nil)
|
3177
|
+
@expand = expand
|
3178
|
+
end
|
3179
|
+
end
|
3180
|
+
|
3181
|
+
class ListPreviewInvoiceLinesParams < Stripe::RequestParams
|
3182
|
+
# 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.
|
3183
|
+
attr_accessor :ending_before
|
3184
|
+
|
3185
|
+
# Specifies which fields in the response should be expanded.
|
3186
|
+
attr_accessor :expand
|
3187
|
+
|
3188
|
+
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
3189
|
+
attr_accessor :limit
|
3190
|
+
|
3191
|
+
# 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.
|
3192
|
+
attr_accessor :starting_after
|
3193
|
+
|
3194
|
+
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
3195
|
+
@ending_before = ending_before
|
3196
|
+
@expand = expand
|
3197
|
+
@limit = limit
|
3198
|
+
@starting_after = starting_after
|
3199
|
+
end
|
3200
|
+
end
|
3201
|
+
# Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
3202
|
+
attr_reader :allow_backdated_lines
|
3203
|
+
|
3204
|
+
# Total before any discounts or taxes are applied.
|
3205
|
+
attr_reader :amount_subtotal
|
3206
|
+
|
3207
|
+
# Total after discounts and taxes are applied.
|
3208
|
+
attr_reader :amount_total
|
3209
|
+
|
3210
|
+
# ID of the Connect Application that created the quote.
|
3211
|
+
attr_reader :application
|
3212
|
+
|
3213
|
+
# 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. Only applicable if there are no line items with recurring prices on the quote.
|
3214
|
+
attr_reader :application_fee_amount
|
3215
|
+
|
3216
|
+
# 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. Only applicable if there are line items with recurring prices on the quote.
|
3217
|
+
attr_reader :application_fee_percent
|
3218
|
+
|
3219
|
+
# Attribute for field automatic_tax
|
3220
|
+
attr_reader :automatic_tax
|
3221
|
+
|
3222
|
+
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
|
3223
|
+
attr_reader :collection_method
|
3224
|
+
|
3225
|
+
# Attribute for field computed
|
3226
|
+
attr_reader :computed
|
3227
|
+
|
3228
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
3229
|
+
attr_reader :created
|
3230
|
+
|
3231
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
3232
|
+
attr_reader :currency
|
3233
|
+
|
3234
|
+
# The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
3235
|
+
attr_reader :customer
|
3236
|
+
|
3237
|
+
# The tax rates applied to this quote.
|
3238
|
+
attr_reader :default_tax_rates
|
3239
|
+
|
3240
|
+
# A description that will be displayed on the quote PDF.
|
3241
|
+
attr_reader :description
|
3242
|
+
|
3243
|
+
# The discounts applied to this quote.
|
3244
|
+
attr_reader :discounts
|
3245
|
+
|
3246
|
+
# The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
|
3247
|
+
attr_reader :expires_at
|
3248
|
+
|
3249
|
+
# A footer that will be displayed on the quote PDF.
|
3250
|
+
attr_reader :footer
|
3251
|
+
|
3252
|
+
# Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details.
|
3253
|
+
attr_reader :from_quote
|
3254
|
+
|
3255
|
+
# A header that will be displayed on the quote PDF.
|
3256
|
+
attr_reader :header
|
3257
|
+
|
3258
|
+
# Unique identifier for the object.
|
3259
|
+
attr_reader :id
|
3260
|
+
|
3261
|
+
# The invoice that was created from this quote.
|
3262
|
+
attr_reader :invoice
|
3263
|
+
|
3264
|
+
# Attribute for field invoice_settings
|
3265
|
+
attr_reader :invoice_settings
|
3266
|
+
|
3267
|
+
# A list of items the customer is being quoted for.
|
3268
|
+
attr_reader :line_items
|
3269
|
+
|
3270
|
+
# 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.
|
3271
|
+
attr_reader :lines
|
3272
|
+
|
3273
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
3274
|
+
attr_reader :livemode
|
3275
|
+
|
3276
|
+
# 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.
|
3277
|
+
attr_reader :metadata
|
3278
|
+
|
3279
|
+
# A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize).
|
3280
|
+
attr_reader :number
|
3281
|
+
|
3282
|
+
# String representing the object's type. Objects of the same type share the same value.
|
3283
|
+
attr_reader :object
|
3284
|
+
|
3285
|
+
# The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.
|
3286
|
+
attr_reader :on_behalf_of
|
3287
|
+
|
3288
|
+
# The status of the quote.
|
3289
|
+
attr_reader :status
|
3290
|
+
|
3291
|
+
# Details on when and why a quote has been marked as stale or canceled.
|
3292
|
+
attr_reader :status_details
|
3293
|
+
|
3294
|
+
# Attribute for field status_transitions
|
3295
|
+
attr_reader :status_transitions
|
3296
|
+
|
3297
|
+
# The subscription that was created or updated from this quote.
|
3298
|
+
attr_reader :subscription
|
3299
|
+
|
3300
|
+
# Attribute for field subscription_data
|
3301
|
+
attr_reader :subscription_data
|
3302
|
+
|
3303
|
+
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
3304
|
+
attr_reader :subscription_data_overrides
|
3305
|
+
|
3306
|
+
# The subscription schedule that was created or updated from this quote.
|
3307
|
+
attr_reader :subscription_schedule
|
3308
|
+
|
3309
|
+
# The subscription schedules that were created or updated from this quote.
|
3310
|
+
attr_reader :subscription_schedules
|
3311
|
+
|
3312
|
+
# ID of the test clock this quote belongs to.
|
3313
|
+
attr_reader :test_clock
|
3314
|
+
|
3315
|
+
# Attribute for field total_details
|
3316
|
+
attr_reader :total_details
|
3317
|
+
|
3318
|
+
# The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.
|
3319
|
+
attr_reader :transfer_data
|
3320
|
+
|
17
3321
|
# Accepts the specified quote.
|
18
3322
|
def accept(params = {}, opts = {})
|
19
3323
|
request_stripe_object(
|
@@ -124,6 +3428,86 @@ module Stripe
|
|
124
3428
|
)
|
125
3429
|
end
|
126
3430
|
|
3431
|
+
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
3432
|
+
def list_lines(params = {}, opts = {})
|
3433
|
+
request_stripe_object(
|
3434
|
+
method: :get,
|
3435
|
+
path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(self["id"]) }),
|
3436
|
+
params: params,
|
3437
|
+
opts: opts
|
3438
|
+
)
|
3439
|
+
end
|
3440
|
+
|
3441
|
+
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
3442
|
+
def self.list_lines(quote, params = {}, opts = {})
|
3443
|
+
request_stripe_object(
|
3444
|
+
method: :get,
|
3445
|
+
path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(quote) }),
|
3446
|
+
params: params,
|
3447
|
+
opts: opts
|
3448
|
+
)
|
3449
|
+
end
|
3450
|
+
|
3451
|
+
# Preview the invoice line items that would be generated by accepting the quote.
|
3452
|
+
def list_preview_invoice_lines(preview_invoice, params = {}, opts = {})
|
3453
|
+
request_stripe_object(
|
3454
|
+
method: :get,
|
3455
|
+
path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(self["id"]), preview_invoice: CGI.escape(preview_invoice) }),
|
3456
|
+
params: params,
|
3457
|
+
opts: opts
|
3458
|
+
)
|
3459
|
+
end
|
3460
|
+
|
3461
|
+
# Preview the invoice line items that would be generated by accepting the quote.
|
3462
|
+
def self.list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {})
|
3463
|
+
request_stripe_object(
|
3464
|
+
method: :get,
|
3465
|
+
path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(quote), preview_invoice: CGI.escape(preview_invoice) }),
|
3466
|
+
params: params,
|
3467
|
+
opts: opts
|
3468
|
+
)
|
3469
|
+
end
|
3470
|
+
|
3471
|
+
# Converts a stale quote to draft.
|
3472
|
+
def mark_draft(params = {}, opts = {})
|
3473
|
+
request_stripe_object(
|
3474
|
+
method: :post,
|
3475
|
+
path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(self["id"]) }),
|
3476
|
+
params: params,
|
3477
|
+
opts: opts
|
3478
|
+
)
|
3479
|
+
end
|
3480
|
+
|
3481
|
+
# Converts a stale quote to draft.
|
3482
|
+
def self.mark_draft(quote, params = {}, opts = {})
|
3483
|
+
request_stripe_object(
|
3484
|
+
method: :post,
|
3485
|
+
path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(quote) }),
|
3486
|
+
params: params,
|
3487
|
+
opts: opts
|
3488
|
+
)
|
3489
|
+
end
|
3490
|
+
|
3491
|
+
# Converts a draft or open quote to stale.
|
3492
|
+
def mark_stale(params = {}, opts = {})
|
3493
|
+
request_stripe_object(
|
3494
|
+
method: :post,
|
3495
|
+
path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(self["id"]) }),
|
3496
|
+
params: params,
|
3497
|
+
opts: opts
|
3498
|
+
)
|
3499
|
+
end
|
3500
|
+
|
3501
|
+
# Converts a draft or open quote to stale.
|
3502
|
+
def self.mark_stale(quote, params = {}, opts = {})
|
3503
|
+
request_stripe_object(
|
3504
|
+
method: :post,
|
3505
|
+
path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(quote) }),
|
3506
|
+
params: params,
|
3507
|
+
opts: opts
|
3508
|
+
)
|
3509
|
+
end
|
3510
|
+
|
127
3511
|
# Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
|
128
3512
|
def pdf(params = {}, opts = {}, &read_body_chunk_block)
|
129
3513
|
opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
|
@@ -150,6 +3534,26 @@ module Stripe
|
|
150
3534
|
)
|
151
3535
|
end
|
152
3536
|
|
3537
|
+
# Recompute the upcoming invoice estimate for the quote.
|
3538
|
+
def reestimate(params = {}, opts = {})
|
3539
|
+
request_stripe_object(
|
3540
|
+
method: :post,
|
3541
|
+
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(self["id"]) }),
|
3542
|
+
params: params,
|
3543
|
+
opts: opts
|
3544
|
+
)
|
3545
|
+
end
|
3546
|
+
|
3547
|
+
# Recompute the upcoming invoice estimate for the quote.
|
3548
|
+
def self.reestimate(quote, params = {}, opts = {})
|
3549
|
+
request_stripe_object(
|
3550
|
+
method: :post,
|
3551
|
+
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(quote) }),
|
3552
|
+
params: params,
|
3553
|
+
opts: opts
|
3554
|
+
)
|
3555
|
+
end
|
3556
|
+
|
153
3557
|
# A quote models prices and services for a customer.
|
154
3558
|
def self.update(id, params = {}, opts = {})
|
155
3559
|
request_stripe_object(
|