stripe 13.6.0.pre.beta.1 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +699 -1457
- data/OPENAPI_VERSION +1 -1
- data/README.md +29 -0
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +2 -0
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/errors.rb +0 -7
- data/lib/stripe/object_types.rb +0 -26
- data/lib/stripe/resources/account.rb +83 -614
- data/lib/stripe/resources/account_session.rb +1 -247
- data/lib/stripe/resources/apple_pay_domain.rb +0 -9
- data/lib/stripe/resources/application_fee.rb +1 -10
- data/lib/stripe/resources/balance.rb +0 -9
- data/lib/stripe/resources/balance_transaction.rb +2 -11
- data/lib/stripe/resources/bank_account.rb +1 -1
- data/lib/stripe/resources/billing/alert.rb +0 -9
- data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -48
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -9
- data/lib/stripe/resources/billing/credit_grant.rb +4 -13
- data/lib/stripe/resources/billing/meter.rb +1 -10
- data/lib/stripe/resources/billing_portal/configuration.rb +0 -9
- data/lib/stripe/resources/card.rb +2 -4
- data/lib/stripe/resources/charge.rb +35 -1457
- data/lib/stripe/resources/checkout/session.rb +100 -293
- data/lib/stripe/resources/climate/order.rb +0 -9
- data/lib/stripe/resources/climate/product.rb +0 -9
- data/lib/stripe/resources/climate/supplier.rb +0 -9
- data/lib/stripe/resources/confirmation_token.rb +74 -156
- data/lib/stripe/resources/country_spec.rb +0 -9
- data/lib/stripe/resources/coupon.rb +0 -9
- data/lib/stripe/resources/credit_note.rb +14 -35
- data/lib/stripe/resources/credit_note_line_item.rb +14 -12
- data/lib/stripe/resources/customer.rb +12 -28
- data/lib/stripe/resources/customer_balance_transaction.rb +3 -1
- data/lib/stripe/resources/dispute.rb +0 -9
- data/lib/stripe/resources/entitlements/active_entitlement.rb +0 -9
- data/lib/stripe/resources/entitlements/feature.rb +0 -9
- data/lib/stripe/resources/event.rb +0 -40
- data/lib/stripe/resources/exchange_rate.rb +0 -9
- data/lib/stripe/resources/file.rb +0 -9
- data/lib/stripe/resources/file_link.rb +0 -9
- data/lib/stripe/resources/financial_connections/account.rb +0 -23
- data/lib/stripe/resources/financial_connections/session.rb +1 -65
- data/lib/stripe/resources/financial_connections/transaction.rb +0 -9
- data/lib/stripe/resources/forwarding/request.rb +0 -9
- data/lib/stripe/resources/identity/verification_report.rb +0 -9
- data/lib/stripe/resources/identity/verification_session.rb +0 -9
- data/lib/stripe/resources/invoice.rb +225 -5120
- data/lib/stripe/resources/invoice_item.rb +65 -110
- data/lib/stripe/resources/invoice_line_item.rb +106 -89
- data/lib/stripe/resources/invoice_payment.rb +53 -4
- data/lib/stripe/resources/invoice_rendering_template.rb +0 -12
- data/lib/stripe/resources/issuing/authorization.rb +0 -9
- data/lib/stripe/resources/issuing/card.rb +0 -9
- data/lib/stripe/resources/issuing/cardholder.rb +1 -11
- data/lib/stripe/resources/issuing/dispute.rb +0 -9
- data/lib/stripe/resources/issuing/personalization_design.rb +0 -9
- data/lib/stripe/resources/issuing/physical_bundle.rb +0 -9
- data/lib/stripe/resources/issuing/token.rb +0 -9
- data/lib/stripe/resources/issuing/transaction.rb +0 -15
- data/lib/stripe/resources/line_item.rb +0 -28
- data/lib/stripe/resources/mandate.rb +6 -33
- data/lib/stripe/resources/payment_intent.rb +642 -4975
- data/lib/stripe/resources/payment_link.rb +84 -15
- data/lib/stripe/resources/payment_method.rb +74 -187
- data/lib/stripe/resources/payment_method_configuration.rb +87 -214
- data/lib/stripe/resources/payment_method_domain.rb +9 -18
- data/lib/stripe/resources/payout.rb +0 -9
- data/lib/stripe/resources/person.rb +9 -9
- data/lib/stripe/resources/plan.rb +0 -15
- data/lib/stripe/resources/price.rb +2 -47
- data/lib/stripe/resources/product.rb +0 -68
- data/lib/stripe/resources/promotion_code.rb +0 -9
- data/lib/stripe/resources/quote.rb +8 -2037
- data/lib/stripe/resources/radar/early_fraud_warning.rb +0 -9
- data/lib/stripe/resources/radar/value_list.rb +0 -9
- data/lib/stripe/resources/radar/value_list_item.rb +0 -9
- data/lib/stripe/resources/refund.rb +13 -18
- data/lib/stripe/resources/reporting/report_run.rb +0 -9
- data/lib/stripe/resources/reporting/report_type.rb +0 -9
- data/lib/stripe/resources/review.rb +2 -11
- data/lib/stripe/resources/setup_attempt.rb +11 -16
- data/lib/stripe/resources/setup_intent.rb +158 -540
- data/lib/stripe/resources/shipping_rate.rb +0 -9
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +0 -9
- data/lib/stripe/resources/source.rb +0 -41
- data/lib/stripe/resources/subscription.rb +14 -385
- data/lib/stripe/resources/subscription_item.rb +9 -134
- data/lib/stripe/resources/subscription_schedule.rb +14 -1135
- data/lib/stripe/resources/tax/calculation.rb +0 -9
- data/lib/stripe/resources/tax/registration.rb +1 -10
- data/lib/stripe/resources/tax/settings.rb +0 -9
- data/lib/stripe/resources/tax/transaction.rb +0 -9
- data/lib/stripe/resources/tax_code.rb +0 -9
- data/lib/stripe/resources/tax_id.rb +0 -9
- data/lib/stripe/resources/tax_rate.rb +0 -9
- data/lib/stripe/resources/terminal/configuration.rb +214 -14
- data/lib/stripe/resources/terminal/location.rb +0 -9
- data/lib/stripe/resources/terminal/reader.rb +0 -408
- data/lib/stripe/resources/test_helpers/test_clock.rb +0 -9
- data/lib/stripe/resources/token.rb +1 -10
- data/lib/stripe/resources/topup.rb +0 -9
- data/lib/stripe/resources/transfer.rb +0 -9
- data/lib/stripe/resources/treasury/credit_reversal.rb +0 -9
- data/lib/stripe/resources/treasury/debit_reversal.rb +0 -9
- data/lib/stripe/resources/treasury/financial_account.rb +4 -32
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
- data/lib/stripe/resources/treasury/inbound_transfer.rb +0 -9
- data/lib/stripe/resources/treasury/outbound_payment.rb +0 -9
- data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -46
- data/lib/stripe/resources/treasury/received_credit.rb +1 -47
- data/lib/stripe/resources/treasury/received_debit.rb +1 -49
- data/lib/stripe/resources/treasury/transaction.rb +0 -9
- data/lib/stripe/resources/treasury/transaction_entry.rb +0 -9
- data/lib/stripe/resources/v2/event.rb +1 -0
- data/lib/stripe/resources/v2/event_destination.rb +1 -0
- data/lib/stripe/resources/webhook_endpoint.rb +0 -9
- data/lib/stripe/resources.rb +0 -25
- data/lib/stripe/services/account_external_account_service.rb +1 -1
- data/lib/stripe/services/account_service.rb +68 -509
- data/lib/stripe/services/account_session_service.rb +1 -217
- data/lib/stripe/services/balance_transaction_service.rb +1 -1
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +2 -2
- data/lib/stripe/services/billing/credit_grant_service.rb +2 -2
- data/lib/stripe/services/billing/meter_service.rb +1 -1
- data/lib/stripe/services/charge_service.rb +1 -1335
- data/lib/stripe/services/checkout/session_service.rb +60 -168
- data/lib/stripe/services/credit_note_preview_lines_service.rb +0 -4
- data/lib/stripe/services/credit_note_service.rb +0 -8
- data/lib/stripe/services/customer_service.rb +0 -16
- data/lib/stripe/services/financial_connections/account_service.rb +1 -3
- data/lib/stripe/services/financial_connections/session_service.rb +1 -30
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/invoice_item_service.rb +34 -88
- data/lib/stripe/services/invoice_line_item_service.rb +25 -41
- data/lib/stripe/services/invoice_payment_service.rb +33 -5
- data/lib/stripe/services/invoice_service.rb +210 -3147
- data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
- data/lib/stripe/services/issuing/transaction_service.rb +0 -4
- data/lib/stripe/services/issuing_service.rb +1 -5
- data/lib/stripe/services/payment_intent_service.rb +568 -4513
- data/lib/stripe/services/payment_link_service.rb +59 -6
- data/lib/stripe/services/payment_method_configuration_service.rb +62 -146
- data/lib/stripe/services/payment_method_domain_service.rb +6 -6
- data/lib/stripe/services/payment_method_service.rb +49 -119
- data/lib/stripe/services/plan_service.rb +0 -4
- data/lib/stripe/services/price_service.rb +2 -25
- data/lib/stripe/services/product_service.rb +0 -38
- data/lib/stripe/services/quote_service.rb +9 -1716
- data/lib/stripe/services/setup_intent_service.rb +158 -492
- data/lib/stripe/services/subscription_item_service.rb +5 -111
- data/lib/stripe/services/subscription_schedule_service.rb +14 -1005
- data/lib/stripe/services/subscription_service.rb +13 -323
- data/lib/stripe/services/tax/registration_service.rb +1 -1
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/configuration_service.rb +170 -4
- data/lib/stripe/services/terminal/reader_service.rb +0 -177
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +49 -87
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -43
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
- data/lib/stripe/services/token_service.rb +1 -1
- data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
- data/lib/stripe/services/treasury/financial_account_service.rb +3 -17
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
- data/lib/stripe/services/v1_services.rb +2 -8
- data/lib/stripe/services/v2/core/event_destination_service.rb +1 -4
- data/lib/stripe/services/v2/core/event_service.rb +1 -4
- data/lib/stripe/services.rb +0 -27
- data/lib/stripe/stripe_client.rb +1 -0
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/util.rb +1 -7
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -45
- data/rbi/stripe/resources/account.rbi +1131 -1479
- data/rbi/stripe/resources/account_link.rbi +9 -9
- data/rbi/stripe/resources/account_session.rbi +118 -367
- data/rbi/stripe/resources/apple_pay_domain.rbi +8 -15
- data/rbi/stripe/resources/application_fee.rbi +15 -20
- data/rbi/stripe/resources/apps/secret.rbi +20 -20
- data/rbi/stripe/resources/balance.rbi +0 -7
- data/rbi/stripe/resources/balance_transaction.rbi +19 -24
- data/rbi/stripe/resources/bank_account.rbi +1 -1
- data/rbi/stripe/resources/billing/alert.rbi +23 -28
- data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -53
- data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +6 -13
- data/rbi/stripe/resources/billing/credit_grant.rbi +30 -37
- data/rbi/stripe/resources/billing/meter.rbi +19 -26
- data/rbi/stripe/resources/billing/meter_event.rbi +4 -4
- data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +5 -5
- data/rbi/stripe/resources/billing_portal/configuration.rbi +86 -81
- data/rbi/stripe/resources/billing_portal/session.rbi +31 -27
- data/rbi/stripe/resources/card.rbi +2 -5
- data/rbi/stripe/resources/charge.rbi +136 -1576
- data/rbi/stripe/resources/checkout/session.rbi +631 -748
- data/rbi/stripe/resources/climate/order.rbi +20 -25
- data/rbi/stripe/resources/climate/product.rbi +5 -12
- data/rbi/stripe/resources/climate/supplier.rbi +5 -12
- data/rbi/stripe/resources/confirmation_token.rbi +274 -268
- data/rbi/stripe/resources/country_spec.rbi +5 -12
- data/rbi/stripe/resources/coupon.rbi +34 -39
- data/rbi/stripe/resources/credit_note.rbi +134 -146
- data/rbi/stripe/resources/credit_note_line_item.rbi +20 -18
- data/rbi/stripe/resources/customer.rbi +172 -164
- data/rbi/stripe/resources/customer_balance_transaction.rbi +4 -1
- data/rbi/stripe/resources/customer_session.rbi +19 -15
- data/rbi/stripe/resources/dispute.rbi +92 -95
- data/rbi/stripe/resources/entitlements/active_entitlement.rbi +5 -12
- data/rbi/stripe/resources/entitlements/feature.rbi +15 -22
- data/rbi/stripe/resources/ephemeral_key.rbi +2 -2
- data/rbi/stripe/resources/event.rbi +16 -60
- data/rbi/stripe/resources/exchange_rate.rbi +5 -12
- data/rbi/stripe/resources/file.rbi +20 -25
- data/rbi/stripe/resources/file_link.rbi +23 -28
- data/rbi/stripe/resources/financial_connections/account.rbi +25 -44
- data/rbi/stripe/resources/financial_connections/session.rbi +12 -75
- data/rbi/stripe/resources/financial_connections/transaction.rbi +16 -19
- data/rbi/stripe/resources/forwarding/request.rbi +21 -24
- data/rbi/stripe/resources/identity/verification_report.rbi +18 -21
- data/rbi/stripe/resources/identity/verification_session.rbi +60 -61
- data/rbi/stripe/resources/invoice.rbi +723 -5918
- data/rbi/stripe/resources/invoice_item.rbi +138 -177
- data/rbi/stripe/resources/invoice_line_item.rbi +199 -264
- data/rbi/stripe/resources/invoice_payment.rbi +51 -7
- data/rbi/stripe/resources/invoice_rendering_template.rbi +10 -20
- data/rbi/stripe/resources/issuing/authorization.rbi +216 -199
- data/rbi/stripe/resources/issuing/card.rbi +104 -101
- data/rbi/stripe/resources/issuing/cardholder.rbi +120 -108
- data/rbi/stripe/resources/issuing/dispute.rbi +164 -151
- data/rbi/stripe/resources/issuing/personalization_design.rbi +61 -56
- data/rbi/stripe/resources/issuing/physical_bundle.rbi +7 -14
- data/rbi/stripe/resources/issuing/token.rbi +16 -21
- data/rbi/stripe/resources/issuing/transaction.rbi +180 -176
- data/rbi/stripe/resources/line_item.rbi +0 -36
- data/rbi/stripe/resources/mandate.rbi +8 -40
- data/rbi/stripe/resources/payment_intent.rbi +2252 -6482
- data/rbi/stripe/resources/payment_link.rbi +346 -211
- data/rbi/stripe/resources/payment_method.rbi +226 -330
- data/rbi/stripe/resources/payment_method_configuration.rbi +602 -685
- data/rbi/stripe/resources/payment_method_domain.rbi +26 -31
- data/rbi/stripe/resources/payout.rbi +43 -42
- data/rbi/stripe/resources/person.rbi +9 -9
- data/rbi/stripe/resources/plan.rbi +51 -63
- data/rbi/stripe/resources/price.rbi +114 -151
- data/rbi/stripe/resources/product.rbi +90 -152
- data/rbi/stripe/resources/promotion_code.rbi +42 -47
- data/rbi/stripe/resources/quote.rbi +168 -2231
- data/rbi/stripe/resources/radar/early_fraud_warning.rbi +17 -20
- data/rbi/stripe/resources/radar/value_list.rbi +24 -29
- data/rbi/stripe/resources/radar/value_list_item.rbi +18 -21
- data/rbi/stripe/resources/refund.rbi +52 -51
- data/rbi/stripe/resources/reporting/report_run.rbi +27 -30
- data/rbi/stripe/resources/reporting/report_type.rbi +2 -9
- data/rbi/stripe/resources/review.rbi +17 -22
- data/rbi/stripe/resources/setup_attempt.rbi +25 -32
- data/rbi/stripe/resources/setup_intent.rbi +900 -1102
- data/rbi/stripe/resources/shipping_rate.rbi +41 -46
- data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +5 -12
- data/rbi/stripe/resources/source.rbi +132 -179
- data/rbi/stripe/resources/subscription.rbi +363 -707
- data/rbi/stripe/resources/subscription_item.rbi +69 -177
- data/rbi/stripe/resources/subscription_schedule.rbi +289 -1447
- data/rbi/stripe/resources/tax/calculation.rbi +43 -48
- data/rbi/stripe/resources/tax/registration.rbi +217 -170
- data/rbi/stripe/resources/tax/settings.rbi +14 -21
- data/rbi/stripe/resources/tax/transaction.rbi +20 -25
- data/rbi/stripe/resources/tax_code.rbi +5 -12
- data/rbi/stripe/resources/tax_id.rbi +15 -22
- data/rbi/stripe/resources/tax_rate.rbi +34 -39
- data/rbi/stripe/resources/terminal/configuration.rbi +457 -212
- data/rbi/stripe/resources/terminal/connection_token.rbi +3 -3
- data/rbi/stripe/resources/terminal/location.rbi +28 -35
- data/rbi/stripe/resources/terminal/reader.rbi +71 -441
- data/rbi/stripe/resources/test_helpers/test_clock.rbi +12 -17
- data/rbi/stripe/resources/token.rbi +288 -263
- data/rbi/stripe/resources/topup.rbi +35 -38
- data/rbi/stripe/resources/transfer.rbi +27 -32
- data/rbi/stripe/resources/treasury/credit_reversal.rbi +10 -17
- data/rbi/stripe/resources/treasury/debit_reversal.rbi +11 -18
- data/rbi/stripe/resources/treasury/financial_account.rbi +125 -130
- data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -3
- data/rbi/stripe/resources/treasury/inbound_transfer.rbi +22 -29
- data/rbi/stripe/resources/treasury/outbound_payment.rbi +82 -79
- data/rbi/stripe/resources/treasury/outbound_transfer.rbi +44 -86
- data/rbi/stripe/resources/treasury/received_credit.rbi +18 -64
- data/rbi/stripe/resources/treasury/received_debit.rbi +17 -66
- data/rbi/stripe/resources/treasury/transaction.rbi +27 -28
- data/rbi/stripe/resources/treasury/transaction_entry.rbi +25 -26
- data/rbi/stripe/resources/v2/amount.rbi +1 -1
- data/rbi/stripe/resources/v2/event.rbi +1 -0
- data/rbi/stripe/resources/v2/event_destination.rbi +1 -0
- data/rbi/stripe/resources/webhook_endpoint.rbi +18 -25
- data/rbi/stripe/services/account_capability_service.rbi +7 -7
- data/rbi/stripe/services/account_external_account_service.rbi +52 -52
- data/rbi/stripe/services/account_link_service.rbi +9 -9
- data/rbi/stripe/services/account_login_link_service.rbi +2 -2
- data/rbi/stripe/services/account_person_service.rbi +221 -201
- data/rbi/stripe/services/account_service.rbi +1221 -1345
- data/rbi/stripe/services/account_session_service.rbi +115 -346
- data/rbi/stripe/services/apple_pay_domain_service.rbi +10 -10
- data/rbi/stripe/services/application_fee_refund_service.rbi +16 -14
- data/rbi/stripe/services/application_fee_service.rbi +18 -14
- data/rbi/stripe/services/apps/secret_service.rbi +20 -20
- data/rbi/stripe/services/balance_service.rbi +2 -2
- data/rbi/stripe/services/balance_transaction_service.rbi +22 -18
- data/rbi/stripe/services/billing/alert_service.rbi +23 -23
- data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +10 -10
- data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +8 -8
- data/rbi/stripe/services/billing/credit_grant_service.rbi +32 -30
- data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +7 -5
- data/rbi/stripe/services/billing/meter_event_service.rbi +4 -4
- data/rbi/stripe/services/billing/meter_event_summary_service.rbi +6 -6
- data/rbi/stripe/services/billing/meter_service.rbi +21 -21
- data/rbi/stripe/services/billing_portal/configuration_service.rbi +90 -76
- data/rbi/stripe/services/billing_portal/session_service.rbi +29 -27
- data/rbi/stripe/services/charge_service.rbi +96 -1464
- data/rbi/stripe/services/checkout/session_line_item_service.rbi +5 -5
- data/rbi/stripe/services/checkout/session_service.rbi +555 -591
- data/rbi/stripe/services/climate/order_service.rbi +22 -20
- data/rbi/stripe/services/climate/product_service.rbi +7 -7
- data/rbi/stripe/services/climate/supplier_service.rbi +7 -7
- data/rbi/stripe/services/confirmation_token_service.rbi +2 -2
- data/rbi/stripe/services/country_spec_service.rbi +7 -7
- data/rbi/stripe/services/coupon_service.rbi +40 -34
- data/rbi/stripe/services/credit_note_line_item_service.rbi +5 -5
- data/rbi/stripe/services/credit_note_preview_lines_service.rbi +35 -35
- data/rbi/stripe/services/credit_note_service.rbi +81 -85
- data/rbi/stripe/services/customer_balance_transaction_service.rbi +15 -15
- data/rbi/stripe/services/customer_cash_balance_service.rbi +7 -7
- data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +7 -7
- data/rbi/stripe/services/customer_funding_instructions_service.rbi +5 -5
- data/rbi/stripe/services/customer_payment_method_service.rbi +9 -9
- data/rbi/stripe/services/customer_payment_source_service.rbi +48 -44
- data/rbi/stripe/services/customer_service.rbi +143 -139
- data/rbi/stripe/services/customer_session_service.rbi +21 -15
- data/rbi/stripe/services/customer_tax_id_service.rbi +9 -9
- data/rbi/stripe/services/dispute_service.rbi +92 -90
- data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +7 -7
- data/rbi/stripe/services/entitlements/feature_service.rbi +17 -17
- data/rbi/stripe/services/ephemeral_key_service.rbi +8 -8
- data/rbi/stripe/services/event_service.rbi +18 -16
- data/rbi/stripe/services/exchange_rate_service.rbi +7 -7
- data/rbi/stripe/services/file_link_service.rbi +25 -23
- data/rbi/stripe/services/file_service.rbi +22 -20
- data/rbi/stripe/services/financial_connections/account_owner_service.rbi +5 -5
- data/rbi/stripe/services/financial_connections/account_service.rbi +22 -21
- data/rbi/stripe/services/financial_connections/session_service.rbi +16 -39
- data/rbi/stripe/services/financial_connections/transaction_service.rbi +16 -14
- data/rbi/stripe/services/financial_connections_service.rbi +0 -1
- data/rbi/stripe/services/forwarding/request_service.rbi +21 -19
- data/rbi/stripe/services/identity/verification_report_service.rbi +18 -16
- data/rbi/stripe/services/identity/verification_session_service.rbi +62 -56
- data/rbi/stripe/services/invoice_item_service.rbi +99 -155
- data/rbi/stripe/services/invoice_line_item_service.rbi +71 -82
- data/rbi/stripe/services/invoice_payment_service.rbi +39 -12
- data/rbi/stripe/services/invoice_rendering_template_service.rbi +13 -13
- data/rbi/stripe/services/invoice_service.rbi +679 -3799
- data/rbi/stripe/services/issuing/authorization_service.rbi +32 -26
- data/rbi/stripe/services/issuing/card_service.rbi +102 -86
- data/rbi/stripe/services/issuing/cardholder_service.rbi +122 -103
- data/rbi/stripe/services/issuing/dispute_service.rbi +152 -146
- data/rbi/stripe/services/issuing/personalization_design_service.rbi +52 -42
- data/rbi/stripe/services/issuing/physical_bundle_service.rbi +9 -9
- data/rbi/stripe/services/issuing/token_service.rbi +20 -16
- data/rbi/stripe/services/issuing/transaction_service.rbi +25 -23
- data/rbi/stripe/services/issuing_service.rbi +0 -3
- data/rbi/stripe/services/mandate_service.rbi +2 -2
- data/rbi/stripe/services/payment_intent_service.rbi +2312 -6081
- data/rbi/stripe/services/payment_link_line_item_service.rbi +5 -5
- data/rbi/stripe/services/payment_link_service.rbi +303 -201
- data/rbi/stripe/services/payment_method_configuration_service.rbi +616 -620
- data/rbi/stripe/services/payment_method_domain_service.rbi +25 -23
- data/rbi/stripe/services/payment_method_service.rbi +192 -249
- data/rbi/stripe/services/payout_service.rbi +45 -37
- data/rbi/stripe/services/plan_service.rbi +53 -55
- data/rbi/stripe/services/price_service.rbi +124 -129
- data/rbi/stripe/services/product_feature_service.rbi +9 -9
- data/rbi/stripe/services/product_service.rbi +94 -122
- data/rbi/stripe/services/promotion_code_service.rbi +46 -42
- data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +5 -5
- data/rbi/stripe/services/quote_line_item_service.rbi +5 -5
- data/rbi/stripe/services/quote_service.rbi +159 -1863
- data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +17 -15
- data/rbi/stripe/services/radar/value_list_item_service.rbi +20 -16
- data/rbi/stripe/services/radar/value_list_service.rbi +28 -24
- data/rbi/stripe/services/refund_service.rbi +37 -33
- data/rbi/stripe/services/reporting/report_run_service.rbi +29 -25
- data/rbi/stripe/services/reporting/report_type_service.rbi +4 -4
- data/rbi/stripe/services/review_service.rbi +17 -15
- data/rbi/stripe/services/setup_attempt_service.rbi +13 -11
- data/rbi/stripe/services/setup_intent_service.rbi +1028 -1062
- data/rbi/stripe/services/shipping_rate_service.rbi +47 -41
- data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +7 -7
- data/rbi/stripe/services/source_service.rbi +149 -133
- data/rbi/stripe/services/source_transaction_service.rbi +5 -5
- data/rbi/stripe/services/subscription_item_service.rbi +61 -159
- data/rbi/stripe/services/subscription_schedule_service.rbi +289 -1305
- data/rbi/stripe/services/subscription_service.rbi +366 -640
- data/rbi/stripe/services/tax/calculation_line_item_service.rbi +5 -5
- data/rbi/stripe/services/tax/calculation_service.rbi +40 -38
- data/rbi/stripe/services/tax/registration_service.rbi +337 -165
- data/rbi/stripe/services/tax/settings_service.rbi +16 -16
- data/rbi/stripe/services/tax/transaction_line_item_service.rbi +5 -5
- data/rbi/stripe/services/tax/transaction_service.rbi +19 -15
- data/rbi/stripe/services/tax_code_service.rbi +7 -7
- data/rbi/stripe/services/tax_id_service.rbi +17 -17
- data/rbi/stripe/services/tax_rate_service.rbi +36 -34
- data/rbi/stripe/services/tax_service.rbi +0 -2
- data/rbi/stripe/services/terminal/configuration_service.rbi +464 -204
- data/rbi/stripe/services/terminal/connection_token_service.rbi +3 -3
- data/rbi/stripe/services/terminal/location_service.rbi +30 -30
- data/rbi/stripe/services/terminal/reader_service.rbi +57 -226
- data/rbi/stripe/services/terminal_service.rbi +0 -1
- data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +157 -198
- data/rbi/stripe/services/test_helpers/customer_service.rbi +3 -3
- data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +180 -168
- data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +10 -10
- data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +11 -9
- data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +151 -145
- data/rbi/stripe/services/test_helpers/refund_service.rbi +2 -2
- data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +10 -39
- data/rbi/stripe/services/test_helpers/test_clock_service.rbi +14 -12
- data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +9 -9
- data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +20 -18
- data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +20 -18
- data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +11 -38
- data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +11 -38
- data/rbi/stripe/services/token_service.rbi +292 -258
- data/rbi/stripe/services/topup_service.rbi +37 -33
- data/rbi/stripe/services/transfer_reversal_service.rbi +18 -16
- data/rbi/stripe/services/transfer_service.rbi +29 -27
- data/rbi/stripe/services/treasury/credit_reversal_service.rbi +12 -12
- data/rbi/stripe/services/treasury/debit_reversal_service.rbi +13 -13
- data/rbi/stripe/services/treasury/financial_account_features_service.rbi +23 -26
- data/rbi/stripe/services/treasury/financial_account_service.rbi +92 -96
- data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +15 -15
- data/rbi/stripe/services/treasury/outbound_payment_service.rbi +60 -56
- data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +24 -49
- data/rbi/stripe/services/treasury/received_credit_service.rbi +11 -9
- data/rbi/stripe/services/treasury/received_debit_service.rbi +8 -8
- data/rbi/stripe/services/treasury/transaction_entry_service.rbi +25 -21
- data/rbi/stripe/services/treasury/transaction_service.rbi +31 -23
- data/rbi/stripe/services/v1_services.rbi +1 -7
- data/rbi/stripe/services/v2/billing/meter_event_service.rbi +3 -3
- data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +3 -3
- data/rbi/stripe/services/v2/core/event_destination_service.rbi +21 -24
- data/rbi/stripe/services/v2/core/event_service.rbi +3 -6
- data/rbi/stripe/services/webhook_endpoint_service.rbi +20 -20
- metadata +4 -109
- data/lib/stripe/request_signing_authenticator.rb +0 -79
- data/lib/stripe/resources/account_notice.rb +0 -132
- data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
- data/lib/stripe/resources/capital/financing_offer.rb +0 -188
- data/lib/stripe/resources/capital/financing_summary.rb +0 -64
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -123
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
- data/lib/stripe/resources/financial_connections/institution.rb +0 -99
- data/lib/stripe/resources/gift_cards/card.rb +0 -217
- data/lib/stripe/resources/gift_cards/transaction.rb +0 -281
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -611
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -84
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -95
- data/lib/stripe/resources/issuing/settlement.rb +0 -49
- data/lib/stripe/resources/margin.rb +0 -124
- data/lib/stripe/resources/order.rb +0 -2868
- data/lib/stripe/resources/payment_attempt_record.rb +0 -184
- data/lib/stripe/resources/payment_record.rb +0 -715
- data/lib/stripe/resources/quote_line.rb +0 -274
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -652
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -362
- data/lib/stripe/resources/tax/association.rb +0 -89
- data/lib/stripe/resources/tax/form.rb +0 -220
- data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -40
- data/lib/stripe/resources/usage_record.rb +0 -30
- data/lib/stripe/resources/usage_record_summary.rb +0 -33
- data/lib/stripe/services/account_notice_service.rb +0 -101
- data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
- data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
- data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
- data/lib/stripe/services/capital_service.rb +0 -15
- data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +0 -37
- data/lib/stripe/services/financial_connections/institution_service.rb +0 -57
- data/lib/stripe/services/gift_cards/card_service.rb +0 -170
- data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
- data/lib/stripe/services/gift_cards_service.rb +0 -14
- data/lib/stripe/services/invoice_upcoming_lines_service.rb +0 -1881
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
- data/lib/stripe/services/margin_service.rb +0 -119
- data/lib/stripe/services/order_line_item_service.rb +0 -35
- data/lib/stripe/services/order_service.rb +0 -2268
- data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
- data/lib/stripe/services/payment_record_service.rb +0 -542
- data/lib/stripe/services/quote_line_service.rb +0 -35
- data/lib/stripe/services/quote_preview_invoice_service.rb +0 -35
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
- data/lib/stripe/services/subscription_item_usage_record_service.rb +0 -41
- data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +0 -37
- data/lib/stripe/services/tax/association_service.rb +0 -31
- data/lib/stripe/services/tax/form_service.rb +0 -100
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
- data/rbi/stripe/resources/account_notice.rbi +0 -139
- data/rbi/stripe/resources/billing/meter_error_report.rbi +0 -71
- data/rbi/stripe/resources/capital/financing_offer.rbi +0 -190
- data/rbi/stripe/resources/capital/financing_summary.rbi +0 -74
- data/rbi/stripe/resources/capital/financing_transaction.rbi +0 -130
- data/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +0 -27
- data/rbi/stripe/resources/financial_connections/institution.rbi +0 -99
- data/rbi/stripe/resources/gift_cards/card.rbi +0 -206
- data/rbi/stripe/resources/gift_cards/transaction.rbi +0 -257
- data/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +0 -622
- data/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +0 -83
- data/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +0 -90
- data/rbi/stripe/resources/issuing/settlement.rbi +0 -62
- data/rbi/stripe/resources/margin.rbi +0 -127
- data/rbi/stripe/resources/order.rbi +0 -3036
- data/rbi/stripe/resources/payment_attempt_record.rbi +0 -215
- data/rbi/stripe/resources/payment_record.rbi +0 -722
- data/rbi/stripe/resources/quote_line.rbi +0 -350
- data/rbi/stripe/resources/quote_preview_invoice.rbi +0 -850
- data/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +0 -474
- data/rbi/stripe/resources/tax/association.rbi +0 -94
- data/rbi/stripe/resources/tax/form.rbi +0 -224
- data/rbi/stripe/resources/terminal/reader_collected_data.rbi +0 -41
- data/rbi/stripe/resources/usage_record.rbi +0 -32
- data/rbi/stripe/resources/usage_record_summary.rbi +0 -38
- data/rbi/stripe/services/account_notice_service.rbi +0 -90
- data/rbi/stripe/services/capital/financing_offer_service.rbi +0 -95
- data/rbi/stripe/services/capital/financing_summary_service.rbi +0 -22
- data/rbi/stripe/services/capital/financing_transaction_service.rbi +0 -68
- data/rbi/stripe/services/capital_service.rbi +0 -11
- data/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi +0 -33
- data/rbi/stripe/services/financial_connections/institution_service.rbi +0 -46
- data/rbi/stripe/services/gift_cards/card_service.rbi +0 -142
- data/rbi/stripe/services/gift_cards/transaction_service.rbi +0 -174
- data/rbi/stripe/services/gift_cards_service.rbi +0 -10
- data/rbi/stripe/services/invoice_upcoming_lines_service.rbi +0 -2023
- data/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi +0 -498
- data/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi +0 -55
- data/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi +0 -73
- data/rbi/stripe/services/margin_service.rbi +0 -104
- data/rbi/stripe/services/order_line_item_service.rbi +0 -31
- data/rbi/stripe/services/order_service.rbi +0 -2320
- data/rbi/stripe/services/payment_attempt_record_service.rbi +0 -36
- data/rbi/stripe/services/payment_record_service.rbi +0 -521
- data/rbi/stripe/services/quote_line_service.rbi +0 -31
- data/rbi/stripe/services/quote_preview_invoice_service.rbi +0 -31
- data/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi +0 -31
- data/rbi/stripe/services/subscription_item_usage_record_service.rbi +0 -37
- data/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi +0 -33
- data/rbi/stripe/services/tax/association_service.rbi +0 -25
- data/rbi/stripe/services/tax/form_service.rbi +0 -85
- data/rbi/stripe/services/terminal/reader_collected_data_service.rbi +0 -22
@@ -3,14 +3,10 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
class QuoteService < StripeService
|
6
|
-
attr_reader :
|
6
|
+
attr_reader :line_items, :computed_upfront_line_items
|
7
7
|
|
8
8
|
def initialize(requestor)
|
9
9
|
super(requestor)
|
10
|
-
@preview_invoices = Stripe::QuotePreviewInvoiceService.new(@requestor)
|
11
|
-
@preview_subscription_schedules = Stripe::QuotePreviewSubscriptionScheduleService
|
12
|
-
.new(@requestor)
|
13
|
-
@lines = Stripe::QuoteLineService.new(@requestor)
|
14
10
|
@line_items = Stripe::QuoteLineItemService.new(@requestor)
|
15
11
|
@computed_upfront_line_items = Stripe::QuoteComputedUpfrontLineItemsService.new(@requestor)
|
16
12
|
end
|
@@ -22,8 +18,6 @@ module Stripe
|
|
22
18
|
attr_accessor :ending_before
|
23
19
|
# Specifies which fields in the response should be expanded.
|
24
20
|
attr_accessor :expand
|
25
|
-
# The subscription which the quote updates.
|
26
|
-
attr_accessor :from_subscription
|
27
21
|
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
28
22
|
attr_accessor :limit
|
29
23
|
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
@@ -37,7 +31,6 @@ module Stripe
|
|
37
31
|
customer: nil,
|
38
32
|
ending_before: nil,
|
39
33
|
expand: nil,
|
40
|
-
from_subscription: nil,
|
41
34
|
limit: nil,
|
42
35
|
starting_after: nil,
|
43
36
|
status: nil,
|
@@ -46,7 +39,6 @@ module Stripe
|
|
46
39
|
@customer = customer
|
47
40
|
@ending_before = ending_before
|
48
41
|
@expand = expand
|
49
|
-
@from_subscription = from_subscription
|
50
42
|
@limit = limit
|
51
43
|
@starting_after = starting_after
|
52
44
|
@status = status
|
@@ -79,44 +71,16 @@ module Stripe
|
|
79
71
|
end
|
80
72
|
|
81
73
|
class Discount < Stripe::RequestParams
|
82
|
-
class DiscountEnd < Stripe::RequestParams
|
83
|
-
class Duration < Stripe::RequestParams
|
84
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
85
|
-
attr_accessor :interval
|
86
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
87
|
-
attr_accessor :interval_count
|
88
|
-
|
89
|
-
def initialize(interval: nil, interval_count: nil)
|
90
|
-
@interval = interval
|
91
|
-
@interval_count = interval_count
|
92
|
-
end
|
93
|
-
end
|
94
|
-
# Time span for the redeemed discount.
|
95
|
-
attr_accessor :duration
|
96
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
97
|
-
attr_accessor :timestamp
|
98
|
-
# The type of calculation made to determine when the discount ends.
|
99
|
-
attr_accessor :type
|
100
|
-
|
101
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
102
|
-
@duration = duration
|
103
|
-
@timestamp = timestamp
|
104
|
-
@type = type
|
105
|
-
end
|
106
|
-
end
|
107
74
|
# ID of the coupon to create a new discount for.
|
108
75
|
attr_accessor :coupon
|
109
76
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
110
77
|
attr_accessor :discount
|
111
|
-
# Details to determine how long the discount should be applied for.
|
112
|
-
attr_accessor :discount_end
|
113
78
|
# ID of the promotion code to create a new discount for.
|
114
79
|
attr_accessor :promotion_code
|
115
80
|
|
116
|
-
def initialize(coupon: nil, discount: nil,
|
81
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
117
82
|
@coupon = coupon
|
118
83
|
@discount = discount
|
119
|
-
@discount_end = discount_end
|
120
84
|
@promotion_code = promotion_code
|
121
85
|
end
|
122
86
|
end
|
@@ -156,522 +120,18 @@ module Stripe
|
|
156
120
|
end
|
157
121
|
end
|
158
122
|
|
159
|
-
class Line < Stripe::RequestParams
|
160
|
-
class Action < Stripe::RequestParams
|
161
|
-
class AddDiscount < Stripe::RequestParams
|
162
|
-
class DiscountEnd < Stripe::RequestParams
|
163
|
-
# The type of calculation made to determine when the discount ends.
|
164
|
-
attr_accessor :type
|
165
|
-
|
166
|
-
def initialize(type: nil)
|
167
|
-
@type = type
|
168
|
-
end
|
169
|
-
end
|
170
|
-
# The coupon code to redeem.
|
171
|
-
attr_accessor :coupon
|
172
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
173
|
-
attr_accessor :discount
|
174
|
-
# Details to determine how long the discount should be applied for.
|
175
|
-
attr_accessor :discount_end
|
176
|
-
# 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.
|
177
|
-
attr_accessor :index
|
178
|
-
# The promotion code to redeem.
|
179
|
-
attr_accessor :promotion_code
|
180
|
-
|
181
|
-
def initialize(
|
182
|
-
coupon: nil,
|
183
|
-
discount: nil,
|
184
|
-
discount_end: nil,
|
185
|
-
index: nil,
|
186
|
-
promotion_code: nil
|
187
|
-
)
|
188
|
-
@coupon = coupon
|
189
|
-
@discount = discount
|
190
|
-
@discount_end = discount_end
|
191
|
-
@index = index
|
192
|
-
@promotion_code = promotion_code
|
193
|
-
end
|
194
|
-
end
|
195
|
-
|
196
|
-
class AddItem < Stripe::RequestParams
|
197
|
-
class Discount < Stripe::RequestParams
|
198
|
-
class DiscountEnd < Stripe::RequestParams
|
199
|
-
class Duration < Stripe::RequestParams
|
200
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
201
|
-
attr_accessor :interval
|
202
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
203
|
-
attr_accessor :interval_count
|
204
|
-
|
205
|
-
def initialize(interval: nil, interval_count: nil)
|
206
|
-
@interval = interval
|
207
|
-
@interval_count = interval_count
|
208
|
-
end
|
209
|
-
end
|
210
|
-
# Time span for the redeemed discount.
|
211
|
-
attr_accessor :duration
|
212
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
213
|
-
attr_accessor :timestamp
|
214
|
-
# The type of calculation made to determine when the discount ends.
|
215
|
-
attr_accessor :type
|
216
|
-
|
217
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
218
|
-
@duration = duration
|
219
|
-
@timestamp = timestamp
|
220
|
-
@type = type
|
221
|
-
end
|
222
|
-
end
|
223
|
-
# ID of the coupon to create a new discount for.
|
224
|
-
attr_accessor :coupon
|
225
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
226
|
-
attr_accessor :discount
|
227
|
-
# Details to determine how long the discount should be applied for.
|
228
|
-
attr_accessor :discount_end
|
229
|
-
# ID of the promotion code to create a new discount for.
|
230
|
-
attr_accessor :promotion_code
|
231
|
-
|
232
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
233
|
-
@coupon = coupon
|
234
|
-
@discount = discount
|
235
|
-
@discount_end = discount_end
|
236
|
-
@promotion_code = promotion_code
|
237
|
-
end
|
238
|
-
end
|
239
|
-
|
240
|
-
class Trial < Stripe::RequestParams
|
241
|
-
# 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.
|
242
|
-
attr_accessor :converts_to
|
243
|
-
# Determines the type of trial for this item.
|
244
|
-
attr_accessor :type
|
245
|
-
|
246
|
-
def initialize(converts_to: nil, type: nil)
|
247
|
-
@converts_to = converts_to
|
248
|
-
@type = type
|
249
|
-
end
|
250
|
-
end
|
251
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
252
|
-
attr_accessor :discounts
|
253
|
-
# 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`.
|
254
|
-
attr_accessor :metadata
|
255
|
-
# The ID of the price object.
|
256
|
-
attr_accessor :price
|
257
|
-
# Quantity for this item.
|
258
|
-
attr_accessor :quantity
|
259
|
-
# 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`.
|
260
|
-
attr_accessor :tax_rates
|
261
|
-
# Options that configure the trial on the subscription item.
|
262
|
-
attr_accessor :trial
|
263
|
-
|
264
|
-
def initialize(
|
265
|
-
discounts: nil,
|
266
|
-
metadata: nil,
|
267
|
-
price: nil,
|
268
|
-
quantity: nil,
|
269
|
-
tax_rates: nil,
|
270
|
-
trial: nil
|
271
|
-
)
|
272
|
-
@discounts = discounts
|
273
|
-
@metadata = metadata
|
274
|
-
@price = price
|
275
|
-
@quantity = quantity
|
276
|
-
@tax_rates = tax_rates
|
277
|
-
@trial = trial
|
278
|
-
end
|
279
|
-
end
|
280
|
-
|
281
|
-
class RemoveDiscount < Stripe::RequestParams
|
282
|
-
# The coupon code to remove from the `discounts` array.
|
283
|
-
attr_accessor :coupon
|
284
|
-
# The ID of a discount to remove from the `discounts` array.
|
285
|
-
attr_accessor :discount
|
286
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
287
|
-
attr_accessor :promotion_code
|
288
|
-
|
289
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
290
|
-
@coupon = coupon
|
291
|
-
@discount = discount
|
292
|
-
@promotion_code = promotion_code
|
293
|
-
end
|
294
|
-
end
|
295
|
-
|
296
|
-
class RemoveItem < Stripe::RequestParams
|
297
|
-
# ID of a price to remove.
|
298
|
-
attr_accessor :price
|
299
|
-
|
300
|
-
def initialize(price: nil)
|
301
|
-
@price = price
|
302
|
-
end
|
303
|
-
end
|
304
|
-
|
305
|
-
class SetDiscount < Stripe::RequestParams
|
306
|
-
# The coupon code to replace the `discounts` array with.
|
307
|
-
attr_accessor :coupon
|
308
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
309
|
-
attr_accessor :discount
|
310
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
311
|
-
attr_accessor :promotion_code
|
312
|
-
|
313
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
314
|
-
@coupon = coupon
|
315
|
-
@discount = discount
|
316
|
-
@promotion_code = promotion_code
|
317
|
-
end
|
318
|
-
end
|
319
|
-
|
320
|
-
class SetItem < Stripe::RequestParams
|
321
|
-
class Discount < Stripe::RequestParams
|
322
|
-
class DiscountEnd < Stripe::RequestParams
|
323
|
-
class Duration < Stripe::RequestParams
|
324
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
325
|
-
attr_accessor :interval
|
326
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
327
|
-
attr_accessor :interval_count
|
328
|
-
|
329
|
-
def initialize(interval: nil, interval_count: nil)
|
330
|
-
@interval = interval
|
331
|
-
@interval_count = interval_count
|
332
|
-
end
|
333
|
-
end
|
334
|
-
# Time span for the redeemed discount.
|
335
|
-
attr_accessor :duration
|
336
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
337
|
-
attr_accessor :timestamp
|
338
|
-
# The type of calculation made to determine when the discount ends.
|
339
|
-
attr_accessor :type
|
340
|
-
|
341
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
342
|
-
@duration = duration
|
343
|
-
@timestamp = timestamp
|
344
|
-
@type = type
|
345
|
-
end
|
346
|
-
end
|
347
|
-
# ID of the coupon to create a new discount for.
|
348
|
-
attr_accessor :coupon
|
349
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
350
|
-
attr_accessor :discount
|
351
|
-
# Details to determine how long the discount should be applied for.
|
352
|
-
attr_accessor :discount_end
|
353
|
-
# ID of the promotion code to create a new discount for.
|
354
|
-
attr_accessor :promotion_code
|
355
|
-
|
356
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
357
|
-
@coupon = coupon
|
358
|
-
@discount = discount
|
359
|
-
@discount_end = discount_end
|
360
|
-
@promotion_code = promotion_code
|
361
|
-
end
|
362
|
-
end
|
363
|
-
|
364
|
-
class Trial < Stripe::RequestParams
|
365
|
-
# 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.
|
366
|
-
attr_accessor :converts_to
|
367
|
-
# Determines the type of trial for this item.
|
368
|
-
attr_accessor :type
|
369
|
-
|
370
|
-
def initialize(converts_to: nil, type: nil)
|
371
|
-
@converts_to = converts_to
|
372
|
-
@type = type
|
373
|
-
end
|
374
|
-
end
|
375
|
-
# 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`.
|
376
|
-
attr_accessor :discounts
|
377
|
-
# 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`.
|
378
|
-
attr_accessor :metadata
|
379
|
-
# The ID of the price object.
|
380
|
-
attr_accessor :price
|
381
|
-
# 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`.
|
382
|
-
attr_accessor :quantity
|
383
|
-
# 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`.
|
384
|
-
attr_accessor :tax_rates
|
385
|
-
# 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`.
|
386
|
-
attr_accessor :trial
|
387
|
-
|
388
|
-
def initialize(
|
389
|
-
discounts: nil,
|
390
|
-
metadata: nil,
|
391
|
-
price: nil,
|
392
|
-
quantity: nil,
|
393
|
-
tax_rates: nil,
|
394
|
-
trial: nil
|
395
|
-
)
|
396
|
-
@discounts = discounts
|
397
|
-
@metadata = metadata
|
398
|
-
@price = price
|
399
|
-
@quantity = quantity
|
400
|
-
@tax_rates = tax_rates
|
401
|
-
@trial = trial
|
402
|
-
end
|
403
|
-
end
|
404
|
-
# Details for the `add_discount` type.
|
405
|
-
attr_accessor :add_discount
|
406
|
-
# Details for the `add_item` type.
|
407
|
-
attr_accessor :add_item
|
408
|
-
# Details for the `add_metadata` type: specify a hash of key-value pairs.
|
409
|
-
attr_accessor :add_metadata
|
410
|
-
# Details for the `remove_discount` type.
|
411
|
-
attr_accessor :remove_discount
|
412
|
-
# Details for the `remove_item` type.
|
413
|
-
attr_accessor :remove_item
|
414
|
-
# Details for the `remove_metadata` type: specify an array of metadata keys.
|
415
|
-
attr_accessor :remove_metadata
|
416
|
-
# Details for the `set_discounts` type.
|
417
|
-
attr_accessor :set_discounts
|
418
|
-
# Details for the `set_items` type.
|
419
|
-
attr_accessor :set_items
|
420
|
-
# Details for the `set_metadata` type: specify an array of key-value pairs.
|
421
|
-
attr_accessor :set_metadata
|
422
|
-
# The type of action the quote line performs.
|
423
|
-
attr_accessor :type
|
424
|
-
|
425
|
-
def initialize(
|
426
|
-
add_discount: nil,
|
427
|
-
add_item: nil,
|
428
|
-
add_metadata: nil,
|
429
|
-
remove_discount: nil,
|
430
|
-
remove_item: nil,
|
431
|
-
remove_metadata: nil,
|
432
|
-
set_discounts: nil,
|
433
|
-
set_items: nil,
|
434
|
-
set_metadata: nil,
|
435
|
-
type: nil
|
436
|
-
)
|
437
|
-
@add_discount = add_discount
|
438
|
-
@add_item = add_item
|
439
|
-
@add_metadata = add_metadata
|
440
|
-
@remove_discount = remove_discount
|
441
|
-
@remove_item = remove_item
|
442
|
-
@remove_metadata = remove_metadata
|
443
|
-
@set_discounts = set_discounts
|
444
|
-
@set_items = set_items
|
445
|
-
@set_metadata = set_metadata
|
446
|
-
@type = type
|
447
|
-
end
|
448
|
-
end
|
449
|
-
|
450
|
-
class AppliesTo < Stripe::RequestParams
|
451
|
-
# 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.
|
452
|
-
attr_accessor :new_reference
|
453
|
-
# The ID of the schedule the line applies to.
|
454
|
-
attr_accessor :subscription_schedule
|
455
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
456
|
-
attr_accessor :type
|
457
|
-
|
458
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
459
|
-
@new_reference = new_reference
|
460
|
-
@subscription_schedule = subscription_schedule
|
461
|
-
@type = type
|
462
|
-
end
|
463
|
-
end
|
464
|
-
|
465
|
-
class CancelSubscriptionSchedule < Stripe::RequestParams
|
466
|
-
# Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
467
|
-
attr_accessor :cancel_at
|
468
|
-
# 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`.
|
469
|
-
attr_accessor :invoice_now
|
470
|
-
# If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
471
|
-
attr_accessor :prorate
|
472
|
-
|
473
|
-
def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
|
474
|
-
@cancel_at = cancel_at
|
475
|
-
@invoice_now = invoice_now
|
476
|
-
@prorate = prorate
|
477
|
-
end
|
478
|
-
end
|
479
|
-
|
480
|
-
class EndsAt < Stripe::RequestParams
|
481
|
-
class DiscountEnd < Stripe::RequestParams
|
482
|
-
# The ID of a specific discount.
|
483
|
-
attr_accessor :discount
|
484
|
-
|
485
|
-
def initialize(discount: nil)
|
486
|
-
@discount = discount
|
487
|
-
end
|
488
|
-
end
|
489
|
-
|
490
|
-
class Duration < Stripe::RequestParams
|
491
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
492
|
-
attr_accessor :interval
|
493
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
494
|
-
attr_accessor :interval_count
|
495
|
-
|
496
|
-
def initialize(interval: nil, interval_count: nil)
|
497
|
-
@interval = interval
|
498
|
-
@interval_count = interval_count
|
499
|
-
end
|
500
|
-
end
|
501
|
-
# Use the `end` time of a given discount.
|
502
|
-
attr_accessor :discount_end
|
503
|
-
# Time span for the quote line starting from the `starts_at` date.
|
504
|
-
attr_accessor :duration
|
505
|
-
# A precise Unix timestamp.
|
506
|
-
attr_accessor :timestamp
|
507
|
-
# Select a way to pass in `ends_at`.
|
508
|
-
attr_accessor :type
|
509
|
-
|
510
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
511
|
-
@discount_end = discount_end
|
512
|
-
@duration = duration
|
513
|
-
@timestamp = timestamp
|
514
|
-
@type = type
|
515
|
-
end
|
516
|
-
end
|
517
|
-
|
518
|
-
class SetPauseCollection < Stripe::RequestParams
|
519
|
-
class Set < Stripe::RequestParams
|
520
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
521
|
-
attr_accessor :behavior
|
522
|
-
|
523
|
-
def initialize(behavior: nil)
|
524
|
-
@behavior = behavior
|
525
|
-
end
|
526
|
-
end
|
527
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
528
|
-
attr_accessor :set
|
529
|
-
# Determines the type of the pause_collection amendment.
|
530
|
-
attr_accessor :type
|
531
|
-
|
532
|
-
def initialize(set: nil, type: nil)
|
533
|
-
@set = set
|
534
|
-
@type = type
|
535
|
-
end
|
536
|
-
end
|
537
|
-
|
538
|
-
class StartsAt < Stripe::RequestParams
|
539
|
-
class DiscountEnd < Stripe::RequestParams
|
540
|
-
# The ID of a specific discount.
|
541
|
-
attr_accessor :discount
|
542
|
-
|
543
|
-
def initialize(discount: nil)
|
544
|
-
@discount = discount
|
545
|
-
end
|
546
|
-
end
|
547
|
-
|
548
|
-
class LineEndsAt < Stripe::RequestParams
|
549
|
-
# 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.
|
550
|
-
attr_accessor :index
|
551
|
-
|
552
|
-
def initialize(index: nil)
|
553
|
-
@index = index
|
554
|
-
end
|
555
|
-
end
|
556
|
-
# Use the `end` time of a given discount.
|
557
|
-
attr_accessor :discount_end
|
558
|
-
# The timestamp the given line ends at.
|
559
|
-
attr_accessor :line_ends_at
|
560
|
-
# A precise Unix timestamp.
|
561
|
-
attr_accessor :timestamp
|
562
|
-
# Select a way to pass in `starts_at`.
|
563
|
-
attr_accessor :type
|
564
|
-
|
565
|
-
def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
566
|
-
@discount_end = discount_end
|
567
|
-
@line_ends_at = line_ends_at
|
568
|
-
@timestamp = timestamp
|
569
|
-
@type = type
|
570
|
-
end
|
571
|
-
end
|
572
|
-
|
573
|
-
class TrialSettings < Stripe::RequestParams
|
574
|
-
class EndBehavior < Stripe::RequestParams
|
575
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
576
|
-
attr_accessor :prorate_up_front
|
577
|
-
|
578
|
-
def initialize(prorate_up_front: nil)
|
579
|
-
@prorate_up_front = prorate_up_front
|
580
|
-
end
|
581
|
-
end
|
582
|
-
# Defines how the subscription should behave when a trial ends.
|
583
|
-
attr_accessor :end_behavior
|
584
|
-
|
585
|
-
def initialize(end_behavior: nil)
|
586
|
-
@end_behavior = end_behavior
|
587
|
-
end
|
588
|
-
end
|
589
|
-
# An array of operations the quote line performs.
|
590
|
-
attr_accessor :actions
|
591
|
-
# Details to identify the subscription schedule the quote line applies to.
|
592
|
-
attr_accessor :applies_to
|
593
|
-
# 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.
|
594
|
-
attr_accessor :billing_cycle_anchor
|
595
|
-
# 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.
|
596
|
-
attr_accessor :cancel_subscription_schedule
|
597
|
-
# 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.
|
598
|
-
attr_accessor :ends_at
|
599
|
-
# 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.
|
600
|
-
attr_accessor :proration_behavior
|
601
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
602
|
-
attr_accessor :set_pause_collection
|
603
|
-
# Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
604
|
-
attr_accessor :set_schedule_end
|
605
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
606
|
-
attr_accessor :starts_at
|
607
|
-
# Settings related to subscription trials.
|
608
|
-
attr_accessor :trial_settings
|
609
|
-
|
610
|
-
def initialize(
|
611
|
-
actions: nil,
|
612
|
-
applies_to: nil,
|
613
|
-
billing_cycle_anchor: nil,
|
614
|
-
cancel_subscription_schedule: nil,
|
615
|
-
ends_at: nil,
|
616
|
-
proration_behavior: nil,
|
617
|
-
set_pause_collection: nil,
|
618
|
-
set_schedule_end: nil,
|
619
|
-
starts_at: nil,
|
620
|
-
trial_settings: nil
|
621
|
-
)
|
622
|
-
@actions = actions
|
623
|
-
@applies_to = applies_to
|
624
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
625
|
-
@cancel_subscription_schedule = cancel_subscription_schedule
|
626
|
-
@ends_at = ends_at
|
627
|
-
@proration_behavior = proration_behavior
|
628
|
-
@set_pause_collection = set_pause_collection
|
629
|
-
@set_schedule_end = set_schedule_end
|
630
|
-
@starts_at = starts_at
|
631
|
-
@trial_settings = trial_settings
|
632
|
-
end
|
633
|
-
end
|
634
|
-
|
635
123
|
class LineItem < Stripe::RequestParams
|
636
124
|
class Discount < Stripe::RequestParams
|
637
|
-
class DiscountEnd < Stripe::RequestParams
|
638
|
-
class Duration < Stripe::RequestParams
|
639
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
640
|
-
attr_accessor :interval
|
641
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
642
|
-
attr_accessor :interval_count
|
643
|
-
|
644
|
-
def initialize(interval: nil, interval_count: nil)
|
645
|
-
@interval = interval
|
646
|
-
@interval_count = interval_count
|
647
|
-
end
|
648
|
-
end
|
649
|
-
# Time span for the redeemed discount.
|
650
|
-
attr_accessor :duration
|
651
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
652
|
-
attr_accessor :timestamp
|
653
|
-
# The type of calculation made to determine when the discount ends.
|
654
|
-
attr_accessor :type
|
655
|
-
|
656
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
657
|
-
@duration = duration
|
658
|
-
@timestamp = timestamp
|
659
|
-
@type = type
|
660
|
-
end
|
661
|
-
end
|
662
125
|
# ID of the coupon to create a new discount for.
|
663
126
|
attr_accessor :coupon
|
664
127
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
665
128
|
attr_accessor :discount
|
666
|
-
# Details to determine how long the discount should be applied for.
|
667
|
-
attr_accessor :discount_end
|
668
129
|
# ID of the promotion code to create a new discount for.
|
669
130
|
attr_accessor :promotion_code
|
670
131
|
|
671
|
-
def initialize(coupon: nil, discount: nil,
|
132
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
672
133
|
@coupon = coupon
|
673
134
|
@discount = discount
|
674
|
-
@discount_end = discount_end
|
675
135
|
@promotion_code = promotion_code
|
676
136
|
end
|
677
137
|
end
|
@@ -690,7 +150,7 @@ module Stripe
|
|
690
150
|
end
|
691
151
|
# 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).
|
692
152
|
attr_accessor :currency
|
693
|
-
# The ID of the
|
153
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
694
154
|
attr_accessor :product
|
695
155
|
# The recurring components of a price such as `interval` and `interval_count`.
|
696
156
|
attr_accessor :recurring
|
@@ -738,281 +198,23 @@ module Stripe
|
|
738
198
|
end
|
739
199
|
|
740
200
|
class SubscriptionData < Stripe::RequestParams
|
741
|
-
class BillOnAcceptance < Stripe::RequestParams
|
742
|
-
class BillFrom < Stripe::RequestParams
|
743
|
-
class LineStartsAt < Stripe::RequestParams
|
744
|
-
# The ID of a quote line.
|
745
|
-
attr_accessor :id
|
746
|
-
# 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.
|
747
|
-
attr_accessor :index
|
748
|
-
|
749
|
-
def initialize(id: nil, index: nil)
|
750
|
-
@id = id
|
751
|
-
@index = index
|
752
|
-
end
|
753
|
-
end
|
754
|
-
# Details of a Quote line to start the bill period from.
|
755
|
-
attr_accessor :line_starts_at
|
756
|
-
# A precise Unix timestamp.
|
757
|
-
attr_accessor :timestamp
|
758
|
-
# The type of method to specify the `bill_from` time.
|
759
|
-
attr_accessor :type
|
760
|
-
|
761
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
762
|
-
@line_starts_at = line_starts_at
|
763
|
-
@timestamp = timestamp
|
764
|
-
@type = type
|
765
|
-
end
|
766
|
-
end
|
767
|
-
|
768
|
-
class BillUntil < Stripe::RequestParams
|
769
|
-
class Duration < Stripe::RequestParams
|
770
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
771
|
-
attr_accessor :interval
|
772
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
773
|
-
attr_accessor :interval_count
|
774
|
-
|
775
|
-
def initialize(interval: nil, interval_count: nil)
|
776
|
-
@interval = interval
|
777
|
-
@interval_count = interval_count
|
778
|
-
end
|
779
|
-
end
|
780
|
-
|
781
|
-
class LineEndsAt < Stripe::RequestParams
|
782
|
-
# The ID of a quote line.
|
783
|
-
attr_accessor :id
|
784
|
-
# 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.
|
785
|
-
attr_accessor :index
|
786
|
-
|
787
|
-
def initialize(id: nil, index: nil)
|
788
|
-
@id = id
|
789
|
-
@index = index
|
790
|
-
end
|
791
|
-
end
|
792
|
-
# Details of the duration over which to bill.
|
793
|
-
attr_accessor :duration
|
794
|
-
# Details of a Quote line item from which to bill until.
|
795
|
-
attr_accessor :line_ends_at
|
796
|
-
# A precise Unix timestamp.
|
797
|
-
attr_accessor :timestamp
|
798
|
-
# The type of method to specify the `bill_until` time.
|
799
|
-
attr_accessor :type
|
800
|
-
|
801
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
802
|
-
@duration = duration
|
803
|
-
@line_ends_at = line_ends_at
|
804
|
-
@timestamp = timestamp
|
805
|
-
@type = type
|
806
|
-
end
|
807
|
-
end
|
808
|
-
# The start of the period to bill from when the Quote is accepted.
|
809
|
-
attr_accessor :bill_from
|
810
|
-
# The end of the period to bill until when the Quote is accepted.
|
811
|
-
attr_accessor :bill_until
|
812
|
-
|
813
|
-
def initialize(bill_from: nil, bill_until: nil)
|
814
|
-
@bill_from = bill_from
|
815
|
-
@bill_until = bill_until
|
816
|
-
end
|
817
|
-
end
|
818
|
-
|
819
|
-
class Prebilling < Stripe::RequestParams
|
820
|
-
# This is used to determine the number of billing cycles to prebill.
|
821
|
-
attr_accessor :iterations
|
822
|
-
|
823
|
-
def initialize(iterations: nil)
|
824
|
-
@iterations = iterations
|
825
|
-
end
|
826
|
-
end
|
827
|
-
# Describes the period to bill for upon accepting the quote.
|
828
|
-
attr_accessor :bill_on_acceptance
|
829
|
-
# 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.
|
830
|
-
attr_accessor :billing_behavior
|
831
|
-
# When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
832
|
-
attr_accessor :billing_cycle_anchor
|
833
201
|
# The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
834
202
|
attr_accessor :description
|
835
203
|
# When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
836
204
|
attr_accessor :effective_date
|
837
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
838
|
-
attr_accessor :end_behavior
|
839
|
-
# 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.
|
840
|
-
attr_accessor :from_subscription
|
841
205
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
|
842
206
|
attr_accessor :metadata
|
843
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
844
|
-
attr_accessor :prebilling
|
845
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
846
|
-
#
|
847
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
848
|
-
#
|
849
|
-
# 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`.
|
850
|
-
#
|
851
|
-
# Prorations can be disabled by passing `none`.
|
852
|
-
attr_accessor :proration_behavior
|
853
207
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
854
208
|
attr_accessor :trial_period_days
|
855
209
|
|
856
|
-
def initialize(
|
857
|
-
bill_on_acceptance: nil,
|
858
|
-
billing_behavior: nil,
|
859
|
-
billing_cycle_anchor: nil,
|
860
|
-
description: nil,
|
861
|
-
effective_date: nil,
|
862
|
-
end_behavior: nil,
|
863
|
-
from_subscription: nil,
|
864
|
-
metadata: nil,
|
865
|
-
prebilling: nil,
|
866
|
-
proration_behavior: nil,
|
867
|
-
trial_period_days: nil
|
868
|
-
)
|
869
|
-
@bill_on_acceptance = bill_on_acceptance
|
870
|
-
@billing_behavior = billing_behavior
|
871
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
210
|
+
def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil)
|
872
211
|
@description = description
|
873
212
|
@effective_date = effective_date
|
874
|
-
@end_behavior = end_behavior
|
875
|
-
@from_subscription = from_subscription
|
876
213
|
@metadata = metadata
|
877
|
-
@prebilling = prebilling
|
878
|
-
@proration_behavior = proration_behavior
|
879
214
|
@trial_period_days = trial_period_days
|
880
215
|
end
|
881
216
|
end
|
882
217
|
|
883
|
-
class SubscriptionDataOverride < Stripe::RequestParams
|
884
|
-
class AppliesTo < Stripe::RequestParams
|
885
|
-
# 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.
|
886
|
-
attr_accessor :new_reference
|
887
|
-
# The ID of the schedule the line applies to.
|
888
|
-
attr_accessor :subscription_schedule
|
889
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
890
|
-
attr_accessor :type
|
891
|
-
|
892
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
893
|
-
@new_reference = new_reference
|
894
|
-
@subscription_schedule = subscription_schedule
|
895
|
-
@type = type
|
896
|
-
end
|
897
|
-
end
|
898
|
-
|
899
|
-
class BillOnAcceptance < Stripe::RequestParams
|
900
|
-
class BillFrom < Stripe::RequestParams
|
901
|
-
class LineStartsAt < Stripe::RequestParams
|
902
|
-
# The ID of a quote line.
|
903
|
-
attr_accessor :id
|
904
|
-
# 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.
|
905
|
-
attr_accessor :index
|
906
|
-
|
907
|
-
def initialize(id: nil, index: nil)
|
908
|
-
@id = id
|
909
|
-
@index = index
|
910
|
-
end
|
911
|
-
end
|
912
|
-
# Details of a Quote line to start the bill period from.
|
913
|
-
attr_accessor :line_starts_at
|
914
|
-
# A precise Unix timestamp.
|
915
|
-
attr_accessor :timestamp
|
916
|
-
# The type of method to specify the `bill_from` time.
|
917
|
-
attr_accessor :type
|
918
|
-
|
919
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
920
|
-
@line_starts_at = line_starts_at
|
921
|
-
@timestamp = timestamp
|
922
|
-
@type = type
|
923
|
-
end
|
924
|
-
end
|
925
|
-
|
926
|
-
class BillUntil < Stripe::RequestParams
|
927
|
-
class Duration < Stripe::RequestParams
|
928
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
929
|
-
attr_accessor :interval
|
930
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
931
|
-
attr_accessor :interval_count
|
932
|
-
|
933
|
-
def initialize(interval: nil, interval_count: nil)
|
934
|
-
@interval = interval
|
935
|
-
@interval_count = interval_count
|
936
|
-
end
|
937
|
-
end
|
938
|
-
|
939
|
-
class LineEndsAt < Stripe::RequestParams
|
940
|
-
# The ID of a quote line.
|
941
|
-
attr_accessor :id
|
942
|
-
# 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.
|
943
|
-
attr_accessor :index
|
944
|
-
|
945
|
-
def initialize(id: nil, index: nil)
|
946
|
-
@id = id
|
947
|
-
@index = index
|
948
|
-
end
|
949
|
-
end
|
950
|
-
# Details of the duration over which to bill.
|
951
|
-
attr_accessor :duration
|
952
|
-
# Details of a Quote line item from which to bill until.
|
953
|
-
attr_accessor :line_ends_at
|
954
|
-
# A precise Unix timestamp.
|
955
|
-
attr_accessor :timestamp
|
956
|
-
# The type of method to specify the `bill_until` time.
|
957
|
-
attr_accessor :type
|
958
|
-
|
959
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
960
|
-
@duration = duration
|
961
|
-
@line_ends_at = line_ends_at
|
962
|
-
@timestamp = timestamp
|
963
|
-
@type = type
|
964
|
-
end
|
965
|
-
end
|
966
|
-
# The start of the period to bill from when the Quote is accepted.
|
967
|
-
attr_accessor :bill_from
|
968
|
-
# The end of the period to bill until when the Quote is accepted.
|
969
|
-
attr_accessor :bill_until
|
970
|
-
|
971
|
-
def initialize(bill_from: nil, bill_until: nil)
|
972
|
-
@bill_from = bill_from
|
973
|
-
@bill_until = bill_until
|
974
|
-
end
|
975
|
-
end
|
976
|
-
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
977
|
-
attr_accessor :applies_to
|
978
|
-
# Describes the period to bill for upon accepting the quote.
|
979
|
-
attr_accessor :bill_on_acceptance
|
980
|
-
# 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.
|
981
|
-
attr_accessor :billing_behavior
|
982
|
-
# The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
|
983
|
-
attr_accessor :customer
|
984
|
-
# 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.
|
985
|
-
attr_accessor :description
|
986
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
987
|
-
attr_accessor :end_behavior
|
988
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
989
|
-
#
|
990
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
991
|
-
#
|
992
|
-
# 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`.
|
993
|
-
#
|
994
|
-
# Prorations can be disabled by passing `none`.
|
995
|
-
attr_accessor :proration_behavior
|
996
|
-
|
997
|
-
def initialize(
|
998
|
-
applies_to: nil,
|
999
|
-
bill_on_acceptance: nil,
|
1000
|
-
billing_behavior: nil,
|
1001
|
-
customer: nil,
|
1002
|
-
description: nil,
|
1003
|
-
end_behavior: nil,
|
1004
|
-
proration_behavior: nil
|
1005
|
-
)
|
1006
|
-
@applies_to = applies_to
|
1007
|
-
@bill_on_acceptance = bill_on_acceptance
|
1008
|
-
@billing_behavior = billing_behavior
|
1009
|
-
@customer = customer
|
1010
|
-
@description = description
|
1011
|
-
@end_behavior = end_behavior
|
1012
|
-
@proration_behavior = proration_behavior
|
1013
|
-
end
|
1014
|
-
end
|
1015
|
-
|
1016
218
|
class TransferData < Stripe::RequestParams
|
1017
219
|
# The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
|
1018
220
|
attr_accessor :amount
|
@@ -1027,8 +229,6 @@ module Stripe
|
|
1027
229
|
@destination = destination
|
1028
230
|
end
|
1029
231
|
end
|
1030
|
-
# Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
1031
|
-
attr_accessor :allow_backdated_lines
|
1032
232
|
# The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
|
1033
233
|
attr_accessor :application_fee_amount
|
1034
234
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
|
@@ -1059,23 +259,18 @@ module Stripe
|
|
1059
259
|
attr_accessor :invoice_settings
|
1060
260
|
# A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
|
1061
261
|
attr_accessor :line_items
|
1062
|
-
# 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.
|
1063
|
-
attr_accessor :lines
|
1064
262
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1065
263
|
attr_accessor :metadata
|
1066
264
|
# The account on behalf of which to charge.
|
1067
265
|
attr_accessor :on_behalf_of
|
1068
266
|
# When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
|
1069
267
|
attr_accessor :subscription_data
|
1070
|
-
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
1071
|
-
attr_accessor :subscription_data_overrides
|
1072
268
|
# ID of the test clock to attach to the quote.
|
1073
269
|
attr_accessor :test_clock
|
1074
270
|
# The data with which to automatically create a Transfer for each of the invoices.
|
1075
271
|
attr_accessor :transfer_data
|
1076
272
|
|
1077
273
|
def initialize(
|
1078
|
-
allow_backdated_lines: nil,
|
1079
274
|
application_fee_amount: nil,
|
1080
275
|
application_fee_percent: nil,
|
1081
276
|
automatic_tax: nil,
|
@@ -1091,15 +286,12 @@ module Stripe
|
|
1091
286
|
header: nil,
|
1092
287
|
invoice_settings: nil,
|
1093
288
|
line_items: nil,
|
1094
|
-
lines: nil,
|
1095
289
|
metadata: nil,
|
1096
290
|
on_behalf_of: nil,
|
1097
291
|
subscription_data: nil,
|
1098
|
-
subscription_data_overrides: nil,
|
1099
292
|
test_clock: nil,
|
1100
293
|
transfer_data: nil
|
1101
294
|
)
|
1102
|
-
@allow_backdated_lines = allow_backdated_lines
|
1103
295
|
@application_fee_amount = application_fee_amount
|
1104
296
|
@application_fee_percent = application_fee_percent
|
1105
297
|
@automatic_tax = automatic_tax
|
@@ -1115,11 +307,9 @@ module Stripe
|
|
1115
307
|
@header = header
|
1116
308
|
@invoice_settings = invoice_settings
|
1117
309
|
@line_items = line_items
|
1118
|
-
@lines = lines
|
1119
310
|
@metadata = metadata
|
1120
311
|
@on_behalf_of = on_behalf_of
|
1121
312
|
@subscription_data = subscription_data
|
1122
|
-
@subscription_data_overrides = subscription_data_overrides
|
1123
313
|
@test_clock = test_clock
|
1124
314
|
@transfer_data = transfer_data
|
1125
315
|
end
|
@@ -1159,44 +349,16 @@ module Stripe
|
|
1159
349
|
end
|
1160
350
|
|
1161
351
|
class Discount < Stripe::RequestParams
|
1162
|
-
class DiscountEnd < Stripe::RequestParams
|
1163
|
-
class Duration < Stripe::RequestParams
|
1164
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1165
|
-
attr_accessor :interval
|
1166
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1167
|
-
attr_accessor :interval_count
|
1168
|
-
|
1169
|
-
def initialize(interval: nil, interval_count: nil)
|
1170
|
-
@interval = interval
|
1171
|
-
@interval_count = interval_count
|
1172
|
-
end
|
1173
|
-
end
|
1174
|
-
# Time span for the redeemed discount.
|
1175
|
-
attr_accessor :duration
|
1176
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1177
|
-
attr_accessor :timestamp
|
1178
|
-
# The type of calculation made to determine when the discount ends.
|
1179
|
-
attr_accessor :type
|
1180
|
-
|
1181
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1182
|
-
@duration = duration
|
1183
|
-
@timestamp = timestamp
|
1184
|
-
@type = type
|
1185
|
-
end
|
1186
|
-
end
|
1187
352
|
# ID of the coupon to create a new discount for.
|
1188
353
|
attr_accessor :coupon
|
1189
354
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1190
355
|
attr_accessor :discount
|
1191
|
-
# Details to determine how long the discount should be applied for.
|
1192
|
-
attr_accessor :discount_end
|
1193
356
|
# ID of the promotion code to create a new discount for.
|
1194
357
|
attr_accessor :promotion_code
|
1195
358
|
|
1196
|
-
def initialize(coupon: nil, discount: nil,
|
359
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1197
360
|
@coupon = coupon
|
1198
361
|
@discount = discount
|
1199
|
-
@discount_end = discount_end
|
1200
362
|
@promotion_code = promotion_code
|
1201
363
|
end
|
1202
364
|
end
|
@@ -1224,529 +386,18 @@ module Stripe
|
|
1224
386
|
end
|
1225
387
|
end
|
1226
388
|
|
1227
|
-
class Line < Stripe::RequestParams
|
1228
|
-
class Action < Stripe::RequestParams
|
1229
|
-
class AddDiscount < Stripe::RequestParams
|
1230
|
-
class DiscountEnd < Stripe::RequestParams
|
1231
|
-
# The type of calculation made to determine when the discount ends.
|
1232
|
-
attr_accessor :type
|
1233
|
-
|
1234
|
-
def initialize(type: nil)
|
1235
|
-
@type = type
|
1236
|
-
end
|
1237
|
-
end
|
1238
|
-
# The coupon code to redeem.
|
1239
|
-
attr_accessor :coupon
|
1240
|
-
# An ID of an existing discount for a coupon that was already redeemed.
|
1241
|
-
attr_accessor :discount
|
1242
|
-
# Details to determine how long the discount should be applied for.
|
1243
|
-
attr_accessor :discount_end
|
1244
|
-
# 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.
|
1245
|
-
attr_accessor :index
|
1246
|
-
# The promotion code to redeem.
|
1247
|
-
attr_accessor :promotion_code
|
1248
|
-
|
1249
|
-
def initialize(
|
1250
|
-
coupon: nil,
|
1251
|
-
discount: nil,
|
1252
|
-
discount_end: nil,
|
1253
|
-
index: nil,
|
1254
|
-
promotion_code: nil
|
1255
|
-
)
|
1256
|
-
@coupon = coupon
|
1257
|
-
@discount = discount
|
1258
|
-
@discount_end = discount_end
|
1259
|
-
@index = index
|
1260
|
-
@promotion_code = promotion_code
|
1261
|
-
end
|
1262
|
-
end
|
1263
|
-
|
1264
|
-
class AddItem < Stripe::RequestParams
|
1265
|
-
class Discount < Stripe::RequestParams
|
1266
|
-
class DiscountEnd < Stripe::RequestParams
|
1267
|
-
class Duration < Stripe::RequestParams
|
1268
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1269
|
-
attr_accessor :interval
|
1270
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1271
|
-
attr_accessor :interval_count
|
1272
|
-
|
1273
|
-
def initialize(interval: nil, interval_count: nil)
|
1274
|
-
@interval = interval
|
1275
|
-
@interval_count = interval_count
|
1276
|
-
end
|
1277
|
-
end
|
1278
|
-
# Time span for the redeemed discount.
|
1279
|
-
attr_accessor :duration
|
1280
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1281
|
-
attr_accessor :timestamp
|
1282
|
-
# The type of calculation made to determine when the discount ends.
|
1283
|
-
attr_accessor :type
|
1284
|
-
|
1285
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1286
|
-
@duration = duration
|
1287
|
-
@timestamp = timestamp
|
1288
|
-
@type = type
|
1289
|
-
end
|
1290
|
-
end
|
1291
|
-
# ID of the coupon to create a new discount for.
|
1292
|
-
attr_accessor :coupon
|
1293
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1294
|
-
attr_accessor :discount
|
1295
|
-
# Details to determine how long the discount should be applied for.
|
1296
|
-
attr_accessor :discount_end
|
1297
|
-
# ID of the promotion code to create a new discount for.
|
1298
|
-
attr_accessor :promotion_code
|
1299
|
-
|
1300
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1301
|
-
@coupon = coupon
|
1302
|
-
@discount = discount
|
1303
|
-
@discount_end = discount_end
|
1304
|
-
@promotion_code = promotion_code
|
1305
|
-
end
|
1306
|
-
end
|
1307
|
-
|
1308
|
-
class Trial < Stripe::RequestParams
|
1309
|
-
# 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.
|
1310
|
-
attr_accessor :converts_to
|
1311
|
-
# Determines the type of trial for this item.
|
1312
|
-
attr_accessor :type
|
1313
|
-
|
1314
|
-
def initialize(converts_to: nil, type: nil)
|
1315
|
-
@converts_to = converts_to
|
1316
|
-
@type = type
|
1317
|
-
end
|
1318
|
-
end
|
1319
|
-
# The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
1320
|
-
attr_accessor :discounts
|
1321
|
-
# 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`.
|
1322
|
-
attr_accessor :metadata
|
1323
|
-
# The ID of the price object.
|
1324
|
-
attr_accessor :price
|
1325
|
-
# Quantity for this item.
|
1326
|
-
attr_accessor :quantity
|
1327
|
-
# 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`.
|
1328
|
-
attr_accessor :tax_rates
|
1329
|
-
# Options that configure the trial on the subscription item.
|
1330
|
-
attr_accessor :trial
|
1331
|
-
|
1332
|
-
def initialize(
|
1333
|
-
discounts: nil,
|
1334
|
-
metadata: nil,
|
1335
|
-
price: nil,
|
1336
|
-
quantity: nil,
|
1337
|
-
tax_rates: nil,
|
1338
|
-
trial: nil
|
1339
|
-
)
|
1340
|
-
@discounts = discounts
|
1341
|
-
@metadata = metadata
|
1342
|
-
@price = price
|
1343
|
-
@quantity = quantity
|
1344
|
-
@tax_rates = tax_rates
|
1345
|
-
@trial = trial
|
1346
|
-
end
|
1347
|
-
end
|
1348
|
-
|
1349
|
-
class RemoveDiscount < Stripe::RequestParams
|
1350
|
-
# The coupon code to remove from the `discounts` array.
|
1351
|
-
attr_accessor :coupon
|
1352
|
-
# The ID of a discount to remove from the `discounts` array.
|
1353
|
-
attr_accessor :discount
|
1354
|
-
# The ID of a promotion code to remove from the `discounts` array.
|
1355
|
-
attr_accessor :promotion_code
|
1356
|
-
|
1357
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1358
|
-
@coupon = coupon
|
1359
|
-
@discount = discount
|
1360
|
-
@promotion_code = promotion_code
|
1361
|
-
end
|
1362
|
-
end
|
1363
|
-
|
1364
|
-
class RemoveItem < Stripe::RequestParams
|
1365
|
-
# ID of a price to remove.
|
1366
|
-
attr_accessor :price
|
1367
|
-
|
1368
|
-
def initialize(price: nil)
|
1369
|
-
@price = price
|
1370
|
-
end
|
1371
|
-
end
|
1372
|
-
|
1373
|
-
class SetDiscount < Stripe::RequestParams
|
1374
|
-
# The coupon code to replace the `discounts` array with.
|
1375
|
-
attr_accessor :coupon
|
1376
|
-
# An ID of an existing discount to replace the `discounts` array with.
|
1377
|
-
attr_accessor :discount
|
1378
|
-
# An ID of an existing promotion code to replace the `discounts` array with.
|
1379
|
-
attr_accessor :promotion_code
|
1380
|
-
|
1381
|
-
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1382
|
-
@coupon = coupon
|
1383
|
-
@discount = discount
|
1384
|
-
@promotion_code = promotion_code
|
1385
|
-
end
|
1386
|
-
end
|
1387
|
-
|
1388
|
-
class SetItem < Stripe::RequestParams
|
1389
|
-
class Discount < Stripe::RequestParams
|
1390
|
-
class DiscountEnd < Stripe::RequestParams
|
1391
|
-
class Duration < Stripe::RequestParams
|
1392
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1393
|
-
attr_accessor :interval
|
1394
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1395
|
-
attr_accessor :interval_count
|
1396
|
-
|
1397
|
-
def initialize(interval: nil, interval_count: nil)
|
1398
|
-
@interval = interval
|
1399
|
-
@interval_count = interval_count
|
1400
|
-
end
|
1401
|
-
end
|
1402
|
-
# Time span for the redeemed discount.
|
1403
|
-
attr_accessor :duration
|
1404
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1405
|
-
attr_accessor :timestamp
|
1406
|
-
# The type of calculation made to determine when the discount ends.
|
1407
|
-
attr_accessor :type
|
1408
|
-
|
1409
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1410
|
-
@duration = duration
|
1411
|
-
@timestamp = timestamp
|
1412
|
-
@type = type
|
1413
|
-
end
|
1414
|
-
end
|
1415
|
-
# ID of the coupon to create a new discount for.
|
1416
|
-
attr_accessor :coupon
|
1417
|
-
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1418
|
-
attr_accessor :discount
|
1419
|
-
# Details to determine how long the discount should be applied for.
|
1420
|
-
attr_accessor :discount_end
|
1421
|
-
# ID of the promotion code to create a new discount for.
|
1422
|
-
attr_accessor :promotion_code
|
1423
|
-
|
1424
|
-
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
1425
|
-
@coupon = coupon
|
1426
|
-
@discount = discount
|
1427
|
-
@discount_end = discount_end
|
1428
|
-
@promotion_code = promotion_code
|
1429
|
-
end
|
1430
|
-
end
|
1431
|
-
|
1432
|
-
class Trial < Stripe::RequestParams
|
1433
|
-
# 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.
|
1434
|
-
attr_accessor :converts_to
|
1435
|
-
# Determines the type of trial for this item.
|
1436
|
-
attr_accessor :type
|
1437
|
-
|
1438
|
-
def initialize(converts_to: nil, type: nil)
|
1439
|
-
@converts_to = converts_to
|
1440
|
-
@type = type
|
1441
|
-
end
|
1442
|
-
end
|
1443
|
-
# 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`.
|
1444
|
-
attr_accessor :discounts
|
1445
|
-
# 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`.
|
1446
|
-
attr_accessor :metadata
|
1447
|
-
# The ID of the price object.
|
1448
|
-
attr_accessor :price
|
1449
|
-
# 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`.
|
1450
|
-
attr_accessor :quantity
|
1451
|
-
# 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`.
|
1452
|
-
attr_accessor :tax_rates
|
1453
|
-
# 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`.
|
1454
|
-
attr_accessor :trial
|
1455
|
-
|
1456
|
-
def initialize(
|
1457
|
-
discounts: nil,
|
1458
|
-
metadata: nil,
|
1459
|
-
price: nil,
|
1460
|
-
quantity: nil,
|
1461
|
-
tax_rates: nil,
|
1462
|
-
trial: nil
|
1463
|
-
)
|
1464
|
-
@discounts = discounts
|
1465
|
-
@metadata = metadata
|
1466
|
-
@price = price
|
1467
|
-
@quantity = quantity
|
1468
|
-
@tax_rates = tax_rates
|
1469
|
-
@trial = trial
|
1470
|
-
end
|
1471
|
-
end
|
1472
|
-
# Details for the `add_discount` type.
|
1473
|
-
attr_accessor :add_discount
|
1474
|
-
# Details for the `add_item` type.
|
1475
|
-
attr_accessor :add_item
|
1476
|
-
# Details for the `add_metadata` type: specify a hash of key-value pairs.
|
1477
|
-
attr_accessor :add_metadata
|
1478
|
-
# Details for the `remove_discount` type.
|
1479
|
-
attr_accessor :remove_discount
|
1480
|
-
# Details for the `remove_item` type.
|
1481
|
-
attr_accessor :remove_item
|
1482
|
-
# Details for the `remove_metadata` type: specify an array of metadata keys.
|
1483
|
-
attr_accessor :remove_metadata
|
1484
|
-
# Details for the `set_discounts` type.
|
1485
|
-
attr_accessor :set_discounts
|
1486
|
-
# Details for the `set_items` type.
|
1487
|
-
attr_accessor :set_items
|
1488
|
-
# Details for the `set_metadata` type: specify an array of key-value pairs.
|
1489
|
-
attr_accessor :set_metadata
|
1490
|
-
# The type of action the quote line performs.
|
1491
|
-
attr_accessor :type
|
1492
|
-
|
1493
|
-
def initialize(
|
1494
|
-
add_discount: nil,
|
1495
|
-
add_item: nil,
|
1496
|
-
add_metadata: nil,
|
1497
|
-
remove_discount: nil,
|
1498
|
-
remove_item: nil,
|
1499
|
-
remove_metadata: nil,
|
1500
|
-
set_discounts: nil,
|
1501
|
-
set_items: nil,
|
1502
|
-
set_metadata: nil,
|
1503
|
-
type: nil
|
1504
|
-
)
|
1505
|
-
@add_discount = add_discount
|
1506
|
-
@add_item = add_item
|
1507
|
-
@add_metadata = add_metadata
|
1508
|
-
@remove_discount = remove_discount
|
1509
|
-
@remove_item = remove_item
|
1510
|
-
@remove_metadata = remove_metadata
|
1511
|
-
@set_discounts = set_discounts
|
1512
|
-
@set_items = set_items
|
1513
|
-
@set_metadata = set_metadata
|
1514
|
-
@type = type
|
1515
|
-
end
|
1516
|
-
end
|
1517
|
-
|
1518
|
-
class AppliesTo < Stripe::RequestParams
|
1519
|
-
# 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.
|
1520
|
-
attr_accessor :new_reference
|
1521
|
-
# The ID of the schedule the line applies to.
|
1522
|
-
attr_accessor :subscription_schedule
|
1523
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
1524
|
-
attr_accessor :type
|
1525
|
-
|
1526
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
1527
|
-
@new_reference = new_reference
|
1528
|
-
@subscription_schedule = subscription_schedule
|
1529
|
-
@type = type
|
1530
|
-
end
|
1531
|
-
end
|
1532
|
-
|
1533
|
-
class CancelSubscriptionSchedule < Stripe::RequestParams
|
1534
|
-
# Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
1535
|
-
attr_accessor :cancel_at
|
1536
|
-
# 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`.
|
1537
|
-
attr_accessor :invoice_now
|
1538
|
-
# If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
1539
|
-
attr_accessor :prorate
|
1540
|
-
|
1541
|
-
def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
|
1542
|
-
@cancel_at = cancel_at
|
1543
|
-
@invoice_now = invoice_now
|
1544
|
-
@prorate = prorate
|
1545
|
-
end
|
1546
|
-
end
|
1547
|
-
|
1548
|
-
class EndsAt < Stripe::RequestParams
|
1549
|
-
class DiscountEnd < Stripe::RequestParams
|
1550
|
-
# The ID of a specific discount.
|
1551
|
-
attr_accessor :discount
|
1552
|
-
|
1553
|
-
def initialize(discount: nil)
|
1554
|
-
@discount = discount
|
1555
|
-
end
|
1556
|
-
end
|
1557
|
-
|
1558
|
-
class Duration < Stripe::RequestParams
|
1559
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1560
|
-
attr_accessor :interval
|
1561
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1562
|
-
attr_accessor :interval_count
|
1563
|
-
|
1564
|
-
def initialize(interval: nil, interval_count: nil)
|
1565
|
-
@interval = interval
|
1566
|
-
@interval_count = interval_count
|
1567
|
-
end
|
1568
|
-
end
|
1569
|
-
# Use the `end` time of a given discount.
|
1570
|
-
attr_accessor :discount_end
|
1571
|
-
# Time span for the quote line starting from the `starts_at` date.
|
1572
|
-
attr_accessor :duration
|
1573
|
-
# A precise Unix timestamp.
|
1574
|
-
attr_accessor :timestamp
|
1575
|
-
# Select a way to pass in `ends_at`.
|
1576
|
-
attr_accessor :type
|
1577
|
-
|
1578
|
-
def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
|
1579
|
-
@discount_end = discount_end
|
1580
|
-
@duration = duration
|
1581
|
-
@timestamp = timestamp
|
1582
|
-
@type = type
|
1583
|
-
end
|
1584
|
-
end
|
1585
|
-
|
1586
|
-
class SetPauseCollection < Stripe::RequestParams
|
1587
|
-
class Set < Stripe::RequestParams
|
1588
|
-
# The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
1589
|
-
attr_accessor :behavior
|
1590
|
-
|
1591
|
-
def initialize(behavior: nil)
|
1592
|
-
@behavior = behavior
|
1593
|
-
end
|
1594
|
-
end
|
1595
|
-
# Details of the pause_collection behavior to apply to the amendment.
|
1596
|
-
attr_accessor :set
|
1597
|
-
# Determines the type of the pause_collection amendment.
|
1598
|
-
attr_accessor :type
|
1599
|
-
|
1600
|
-
def initialize(set: nil, type: nil)
|
1601
|
-
@set = set
|
1602
|
-
@type = type
|
1603
|
-
end
|
1604
|
-
end
|
1605
|
-
|
1606
|
-
class StartsAt < Stripe::RequestParams
|
1607
|
-
class DiscountEnd < Stripe::RequestParams
|
1608
|
-
# The ID of a specific discount.
|
1609
|
-
attr_accessor :discount
|
1610
|
-
|
1611
|
-
def initialize(discount: nil)
|
1612
|
-
@discount = discount
|
1613
|
-
end
|
1614
|
-
end
|
1615
|
-
|
1616
|
-
class LineEndsAt < Stripe::RequestParams
|
1617
|
-
# The ID of a quote line.
|
1618
|
-
attr_accessor :id
|
1619
|
-
# 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.
|
1620
|
-
attr_accessor :index
|
1621
|
-
|
1622
|
-
def initialize(id: nil, index: nil)
|
1623
|
-
@id = id
|
1624
|
-
@index = index
|
1625
|
-
end
|
1626
|
-
end
|
1627
|
-
# Use the `end` time of a given discount.
|
1628
|
-
attr_accessor :discount_end
|
1629
|
-
# The timestamp the given line ends at.
|
1630
|
-
attr_accessor :line_ends_at
|
1631
|
-
# A precise Unix timestamp.
|
1632
|
-
attr_accessor :timestamp
|
1633
|
-
# Select a way to pass in `starts_at`.
|
1634
|
-
attr_accessor :type
|
1635
|
-
|
1636
|
-
def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
1637
|
-
@discount_end = discount_end
|
1638
|
-
@line_ends_at = line_ends_at
|
1639
|
-
@timestamp = timestamp
|
1640
|
-
@type = type
|
1641
|
-
end
|
1642
|
-
end
|
1643
|
-
|
1644
|
-
class TrialSettings < Stripe::RequestParams
|
1645
|
-
class EndBehavior < Stripe::RequestParams
|
1646
|
-
# Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
1647
|
-
attr_accessor :prorate_up_front
|
1648
|
-
|
1649
|
-
def initialize(prorate_up_front: nil)
|
1650
|
-
@prorate_up_front = prorate_up_front
|
1651
|
-
end
|
1652
|
-
end
|
1653
|
-
# Defines how the subscription should behave when a trial ends.
|
1654
|
-
attr_accessor :end_behavior
|
1655
|
-
|
1656
|
-
def initialize(end_behavior: nil)
|
1657
|
-
@end_behavior = end_behavior
|
1658
|
-
end
|
1659
|
-
end
|
1660
|
-
# An array of operations the quote line performs.
|
1661
|
-
attr_accessor :actions
|
1662
|
-
# Details to identify the subscription schedule the quote line applies to.
|
1663
|
-
attr_accessor :applies_to
|
1664
|
-
# 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.
|
1665
|
-
attr_accessor :billing_cycle_anchor
|
1666
|
-
# 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.
|
1667
|
-
attr_accessor :cancel_subscription_schedule
|
1668
|
-
# 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.
|
1669
|
-
attr_accessor :ends_at
|
1670
|
-
# The ID of an existing line on the quote.
|
1671
|
-
attr_accessor :id
|
1672
|
-
# 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.
|
1673
|
-
attr_accessor :proration_behavior
|
1674
|
-
# Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
1675
|
-
attr_accessor :set_pause_collection
|
1676
|
-
# Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
1677
|
-
attr_accessor :set_schedule_end
|
1678
|
-
# Details to identify the earliest timestamp where the proposed change should take effect.
|
1679
|
-
attr_accessor :starts_at
|
1680
|
-
# Settings related to subscription trials.
|
1681
|
-
attr_accessor :trial_settings
|
1682
|
-
|
1683
|
-
def initialize(
|
1684
|
-
actions: nil,
|
1685
|
-
applies_to: nil,
|
1686
|
-
billing_cycle_anchor: nil,
|
1687
|
-
cancel_subscription_schedule: nil,
|
1688
|
-
ends_at: nil,
|
1689
|
-
id: nil,
|
1690
|
-
proration_behavior: nil,
|
1691
|
-
set_pause_collection: nil,
|
1692
|
-
set_schedule_end: nil,
|
1693
|
-
starts_at: nil,
|
1694
|
-
trial_settings: nil
|
1695
|
-
)
|
1696
|
-
@actions = actions
|
1697
|
-
@applies_to = applies_to
|
1698
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
1699
|
-
@cancel_subscription_schedule = cancel_subscription_schedule
|
1700
|
-
@ends_at = ends_at
|
1701
|
-
@id = id
|
1702
|
-
@proration_behavior = proration_behavior
|
1703
|
-
@set_pause_collection = set_pause_collection
|
1704
|
-
@set_schedule_end = set_schedule_end
|
1705
|
-
@starts_at = starts_at
|
1706
|
-
@trial_settings = trial_settings
|
1707
|
-
end
|
1708
|
-
end
|
1709
|
-
|
1710
389
|
class LineItem < Stripe::RequestParams
|
1711
390
|
class Discount < Stripe::RequestParams
|
1712
|
-
class DiscountEnd < Stripe::RequestParams
|
1713
|
-
class Duration < Stripe::RequestParams
|
1714
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1715
|
-
attr_accessor :interval
|
1716
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1717
|
-
attr_accessor :interval_count
|
1718
|
-
|
1719
|
-
def initialize(interval: nil, interval_count: nil)
|
1720
|
-
@interval = interval
|
1721
|
-
@interval_count = interval_count
|
1722
|
-
end
|
1723
|
-
end
|
1724
|
-
# Time span for the redeemed discount.
|
1725
|
-
attr_accessor :duration
|
1726
|
-
# A precise Unix timestamp for the discount to end. Must be in the future.
|
1727
|
-
attr_accessor :timestamp
|
1728
|
-
# The type of calculation made to determine when the discount ends.
|
1729
|
-
attr_accessor :type
|
1730
|
-
|
1731
|
-
def initialize(duration: nil, timestamp: nil, type: nil)
|
1732
|
-
@duration = duration
|
1733
|
-
@timestamp = timestamp
|
1734
|
-
@type = type
|
1735
|
-
end
|
1736
|
-
end
|
1737
391
|
# ID of the coupon to create a new discount for.
|
1738
392
|
attr_accessor :coupon
|
1739
393
|
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
1740
394
|
attr_accessor :discount
|
1741
|
-
# Details to determine how long the discount should be applied for.
|
1742
|
-
attr_accessor :discount_end
|
1743
395
|
# ID of the promotion code to create a new discount for.
|
1744
396
|
attr_accessor :promotion_code
|
1745
397
|
|
1746
|
-
def initialize(coupon: nil, discount: nil,
|
398
|
+
def initialize(coupon: nil, discount: nil, promotion_code: nil)
|
1747
399
|
@coupon = coupon
|
1748
400
|
@discount = discount
|
1749
|
-
@discount_end = discount_end
|
1750
401
|
@promotion_code = promotion_code
|
1751
402
|
end
|
1752
403
|
end
|
@@ -1765,7 +416,7 @@ module Stripe
|
|
1765
416
|
end
|
1766
417
|
# 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).
|
1767
418
|
attr_accessor :currency
|
1768
|
-
# The ID of the
|
419
|
+
# The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
1769
420
|
attr_accessor :product
|
1770
421
|
# The recurring components of a price such as `interval` and `interval_count`.
|
1771
422
|
attr_accessor :recurring
|
@@ -1823,277 +474,23 @@ module Stripe
|
|
1823
474
|
end
|
1824
475
|
|
1825
476
|
class SubscriptionData < Stripe::RequestParams
|
1826
|
-
class BillOnAcceptance < Stripe::RequestParams
|
1827
|
-
class BillFrom < Stripe::RequestParams
|
1828
|
-
class LineStartsAt < Stripe::RequestParams
|
1829
|
-
# The ID of a quote line.
|
1830
|
-
attr_accessor :id
|
1831
|
-
# 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.
|
1832
|
-
attr_accessor :index
|
1833
|
-
|
1834
|
-
def initialize(id: nil, index: nil)
|
1835
|
-
@id = id
|
1836
|
-
@index = index
|
1837
|
-
end
|
1838
|
-
end
|
1839
|
-
# Details of a Quote line to start the bill period from.
|
1840
|
-
attr_accessor :line_starts_at
|
1841
|
-
# A precise Unix timestamp.
|
1842
|
-
attr_accessor :timestamp
|
1843
|
-
# The type of method to specify the `bill_from` time.
|
1844
|
-
attr_accessor :type
|
1845
|
-
|
1846
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
1847
|
-
@line_starts_at = line_starts_at
|
1848
|
-
@timestamp = timestamp
|
1849
|
-
@type = type
|
1850
|
-
end
|
1851
|
-
end
|
1852
|
-
|
1853
|
-
class BillUntil < Stripe::RequestParams
|
1854
|
-
class Duration < Stripe::RequestParams
|
1855
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
1856
|
-
attr_accessor :interval
|
1857
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
1858
|
-
attr_accessor :interval_count
|
1859
|
-
|
1860
|
-
def initialize(interval: nil, interval_count: nil)
|
1861
|
-
@interval = interval
|
1862
|
-
@interval_count = interval_count
|
1863
|
-
end
|
1864
|
-
end
|
1865
|
-
|
1866
|
-
class LineEndsAt < Stripe::RequestParams
|
1867
|
-
# The ID of a quote line.
|
1868
|
-
attr_accessor :id
|
1869
|
-
# 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.
|
1870
|
-
attr_accessor :index
|
1871
|
-
|
1872
|
-
def initialize(id: nil, index: nil)
|
1873
|
-
@id = id
|
1874
|
-
@index = index
|
1875
|
-
end
|
1876
|
-
end
|
1877
|
-
# Details of the duration over which to bill.
|
1878
|
-
attr_accessor :duration
|
1879
|
-
# Details of a Quote line item from which to bill until.
|
1880
|
-
attr_accessor :line_ends_at
|
1881
|
-
# A precise Unix timestamp.
|
1882
|
-
attr_accessor :timestamp
|
1883
|
-
# The type of method to specify the `bill_until` time.
|
1884
|
-
attr_accessor :type
|
1885
|
-
|
1886
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
1887
|
-
@duration = duration
|
1888
|
-
@line_ends_at = line_ends_at
|
1889
|
-
@timestamp = timestamp
|
1890
|
-
@type = type
|
1891
|
-
end
|
1892
|
-
end
|
1893
|
-
# The start of the period to bill from when the Quote is accepted.
|
1894
|
-
attr_accessor :bill_from
|
1895
|
-
# The end of the period to bill until when the Quote is accepted.
|
1896
|
-
attr_accessor :bill_until
|
1897
|
-
|
1898
|
-
def initialize(bill_from: nil, bill_until: nil)
|
1899
|
-
@bill_from = bill_from
|
1900
|
-
@bill_until = bill_until
|
1901
|
-
end
|
1902
|
-
end
|
1903
|
-
|
1904
|
-
class Prebilling < Stripe::RequestParams
|
1905
|
-
# This is used to determine the number of billing cycles to prebill.
|
1906
|
-
attr_accessor :iterations
|
1907
|
-
|
1908
|
-
def initialize(iterations: nil)
|
1909
|
-
@iterations = iterations
|
1910
|
-
end
|
1911
|
-
end
|
1912
|
-
# Describes the period to bill for upon accepting the quote.
|
1913
|
-
attr_accessor :bill_on_acceptance
|
1914
|
-
# 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.
|
1915
|
-
attr_accessor :billing_behavior
|
1916
|
-
# When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
1917
|
-
attr_accessor :billing_cycle_anchor
|
1918
477
|
# The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
1919
478
|
attr_accessor :description
|
1920
479
|
# When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
1921
480
|
attr_accessor :effective_date
|
1922
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
1923
|
-
attr_accessor :end_behavior
|
1924
481
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
|
1925
482
|
attr_accessor :metadata
|
1926
|
-
# If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
1927
|
-
attr_accessor :prebilling
|
1928
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
1929
|
-
#
|
1930
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
1931
|
-
#
|
1932
|
-
# 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`.
|
1933
|
-
#
|
1934
|
-
# Prorations can be disabled by passing `none`.
|
1935
|
-
attr_accessor :proration_behavior
|
1936
483
|
# Integer representing the number of trial period days before the customer is charged for the first time.
|
1937
484
|
attr_accessor :trial_period_days
|
1938
485
|
|
1939
|
-
def initialize(
|
1940
|
-
bill_on_acceptance: nil,
|
1941
|
-
billing_behavior: nil,
|
1942
|
-
billing_cycle_anchor: nil,
|
1943
|
-
description: nil,
|
1944
|
-
effective_date: nil,
|
1945
|
-
end_behavior: nil,
|
1946
|
-
metadata: nil,
|
1947
|
-
prebilling: nil,
|
1948
|
-
proration_behavior: nil,
|
1949
|
-
trial_period_days: nil
|
1950
|
-
)
|
1951
|
-
@bill_on_acceptance = bill_on_acceptance
|
1952
|
-
@billing_behavior = billing_behavior
|
1953
|
-
@billing_cycle_anchor = billing_cycle_anchor
|
486
|
+
def initialize(description: nil, effective_date: nil, metadata: nil, trial_period_days: nil)
|
1954
487
|
@description = description
|
1955
488
|
@effective_date = effective_date
|
1956
|
-
@end_behavior = end_behavior
|
1957
489
|
@metadata = metadata
|
1958
|
-
@prebilling = prebilling
|
1959
|
-
@proration_behavior = proration_behavior
|
1960
490
|
@trial_period_days = trial_period_days
|
1961
491
|
end
|
1962
492
|
end
|
1963
493
|
|
1964
|
-
class SubscriptionDataOverride < Stripe::RequestParams
|
1965
|
-
class AppliesTo < Stripe::RequestParams
|
1966
|
-
# 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.
|
1967
|
-
attr_accessor :new_reference
|
1968
|
-
# The ID of the schedule the line applies to.
|
1969
|
-
attr_accessor :subscription_schedule
|
1970
|
-
# Describes whether the quote line is affecting a new schedule or an existing schedule.
|
1971
|
-
attr_accessor :type
|
1972
|
-
|
1973
|
-
def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
|
1974
|
-
@new_reference = new_reference
|
1975
|
-
@subscription_schedule = subscription_schedule
|
1976
|
-
@type = type
|
1977
|
-
end
|
1978
|
-
end
|
1979
|
-
|
1980
|
-
class BillOnAcceptance < Stripe::RequestParams
|
1981
|
-
class BillFrom < Stripe::RequestParams
|
1982
|
-
class LineStartsAt < Stripe::RequestParams
|
1983
|
-
# The ID of a quote line.
|
1984
|
-
attr_accessor :id
|
1985
|
-
# 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.
|
1986
|
-
attr_accessor :index
|
1987
|
-
|
1988
|
-
def initialize(id: nil, index: nil)
|
1989
|
-
@id = id
|
1990
|
-
@index = index
|
1991
|
-
end
|
1992
|
-
end
|
1993
|
-
# Details of a Quote line to start the bill period from.
|
1994
|
-
attr_accessor :line_starts_at
|
1995
|
-
# A precise Unix timestamp.
|
1996
|
-
attr_accessor :timestamp
|
1997
|
-
# The type of method to specify the `bill_from` time.
|
1998
|
-
attr_accessor :type
|
1999
|
-
|
2000
|
-
def initialize(line_starts_at: nil, timestamp: nil, type: nil)
|
2001
|
-
@line_starts_at = line_starts_at
|
2002
|
-
@timestamp = timestamp
|
2003
|
-
@type = type
|
2004
|
-
end
|
2005
|
-
end
|
2006
|
-
|
2007
|
-
class BillUntil < Stripe::RequestParams
|
2008
|
-
class Duration < Stripe::RequestParams
|
2009
|
-
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
2010
|
-
attr_accessor :interval
|
2011
|
-
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
2012
|
-
attr_accessor :interval_count
|
2013
|
-
|
2014
|
-
def initialize(interval: nil, interval_count: nil)
|
2015
|
-
@interval = interval
|
2016
|
-
@interval_count = interval_count
|
2017
|
-
end
|
2018
|
-
end
|
2019
|
-
|
2020
|
-
class LineEndsAt < Stripe::RequestParams
|
2021
|
-
# The ID of a quote line.
|
2022
|
-
attr_accessor :id
|
2023
|
-
# 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.
|
2024
|
-
attr_accessor :index
|
2025
|
-
|
2026
|
-
def initialize(id: nil, index: nil)
|
2027
|
-
@id = id
|
2028
|
-
@index = index
|
2029
|
-
end
|
2030
|
-
end
|
2031
|
-
# Details of the duration over which to bill.
|
2032
|
-
attr_accessor :duration
|
2033
|
-
# Details of a Quote line item from which to bill until.
|
2034
|
-
attr_accessor :line_ends_at
|
2035
|
-
# A precise Unix timestamp.
|
2036
|
-
attr_accessor :timestamp
|
2037
|
-
# The type of method to specify the `bill_until` time.
|
2038
|
-
attr_accessor :type
|
2039
|
-
|
2040
|
-
def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
|
2041
|
-
@duration = duration
|
2042
|
-
@line_ends_at = line_ends_at
|
2043
|
-
@timestamp = timestamp
|
2044
|
-
@type = type
|
2045
|
-
end
|
2046
|
-
end
|
2047
|
-
# The start of the period to bill from when the Quote is accepted.
|
2048
|
-
attr_accessor :bill_from
|
2049
|
-
# The end of the period to bill until when the Quote is accepted.
|
2050
|
-
attr_accessor :bill_until
|
2051
|
-
|
2052
|
-
def initialize(bill_from: nil, bill_until: nil)
|
2053
|
-
@bill_from = bill_from
|
2054
|
-
@bill_until = bill_until
|
2055
|
-
end
|
2056
|
-
end
|
2057
|
-
# Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
2058
|
-
attr_accessor :applies_to
|
2059
|
-
# Describes the period to bill for upon accepting the quote.
|
2060
|
-
attr_accessor :bill_on_acceptance
|
2061
|
-
# 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.
|
2062
|
-
attr_accessor :billing_behavior
|
2063
|
-
# The customer the Subscription Data override applies to.
|
2064
|
-
attr_accessor :customer
|
2065
|
-
# 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.
|
2066
|
-
attr_accessor :description
|
2067
|
-
# Behavior of the subscription schedule and underlying subscription when it ends.
|
2068
|
-
attr_accessor :end_behavior
|
2069
|
-
# Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
2070
|
-
#
|
2071
|
-
# When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
2072
|
-
#
|
2073
|
-
# 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`.
|
2074
|
-
#
|
2075
|
-
# Prorations can be disabled by passing `none`.
|
2076
|
-
attr_accessor :proration_behavior
|
2077
|
-
|
2078
|
-
def initialize(
|
2079
|
-
applies_to: nil,
|
2080
|
-
bill_on_acceptance: nil,
|
2081
|
-
billing_behavior: nil,
|
2082
|
-
customer: nil,
|
2083
|
-
description: nil,
|
2084
|
-
end_behavior: nil,
|
2085
|
-
proration_behavior: nil
|
2086
|
-
)
|
2087
|
-
@applies_to = applies_to
|
2088
|
-
@bill_on_acceptance = bill_on_acceptance
|
2089
|
-
@billing_behavior = billing_behavior
|
2090
|
-
@customer = customer
|
2091
|
-
@description = description
|
2092
|
-
@end_behavior = end_behavior
|
2093
|
-
@proration_behavior = proration_behavior
|
2094
|
-
end
|
2095
|
-
end
|
2096
|
-
|
2097
494
|
class TransferData < Stripe::RequestParams
|
2098
495
|
# The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
|
2099
496
|
attr_accessor :amount
|
@@ -2108,8 +505,6 @@ module Stripe
|
|
2108
505
|
@destination = destination
|
2109
506
|
end
|
2110
507
|
end
|
2111
|
-
# Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
2112
|
-
attr_accessor :allow_backdated_lines
|
2113
508
|
# The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
|
2114
509
|
attr_accessor :application_fee_amount
|
2115
510
|
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
|
@@ -2138,21 +533,16 @@ module Stripe
|
|
2138
533
|
attr_accessor :invoice_settings
|
2139
534
|
# A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
|
2140
535
|
attr_accessor :line_items
|
2141
|
-
# 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.
|
2142
|
-
attr_accessor :lines
|
2143
536
|
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
2144
537
|
attr_accessor :metadata
|
2145
538
|
# The account on behalf of which to charge.
|
2146
539
|
attr_accessor :on_behalf_of
|
2147
540
|
# When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
|
2148
541
|
attr_accessor :subscription_data
|
2149
|
-
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
2150
|
-
attr_accessor :subscription_data_overrides
|
2151
542
|
# The data with which to automatically create a Transfer for each of the invoices.
|
2152
543
|
attr_accessor :transfer_data
|
2153
544
|
|
2154
545
|
def initialize(
|
2155
|
-
allow_backdated_lines: nil,
|
2156
546
|
application_fee_amount: nil,
|
2157
547
|
application_fee_percent: nil,
|
2158
548
|
automatic_tax: nil,
|
@@ -2167,14 +557,11 @@ module Stripe
|
|
2167
557
|
header: nil,
|
2168
558
|
invoice_settings: nil,
|
2169
559
|
line_items: nil,
|
2170
|
-
lines: nil,
|
2171
560
|
metadata: nil,
|
2172
561
|
on_behalf_of: nil,
|
2173
562
|
subscription_data: nil,
|
2174
|
-
subscription_data_overrides: nil,
|
2175
563
|
transfer_data: nil
|
2176
564
|
)
|
2177
|
-
@allow_backdated_lines = allow_backdated_lines
|
2178
565
|
@application_fee_amount = application_fee_amount
|
2179
566
|
@application_fee_percent = application_fee_percent
|
2180
567
|
@automatic_tax = automatic_tax
|
@@ -2189,11 +576,9 @@ module Stripe
|
|
2189
576
|
@header = header
|
2190
577
|
@invoice_settings = invoice_settings
|
2191
578
|
@line_items = line_items
|
2192
|
-
@lines = lines
|
2193
579
|
@metadata = metadata
|
2194
580
|
@on_behalf_of = on_behalf_of
|
2195
581
|
@subscription_data = subscription_data
|
2196
|
-
@subscription_data_overrides = subscription_data_overrides
|
2197
582
|
@transfer_data = transfer_data
|
2198
583
|
end
|
2199
584
|
end
|
@@ -2228,36 +613,6 @@ module Stripe
|
|
2228
613
|
end
|
2229
614
|
end
|
2230
615
|
|
2231
|
-
class MarkDraftParams < Stripe::RequestParams
|
2232
|
-
# Specifies which fields in the response should be expanded.
|
2233
|
-
attr_accessor :expand
|
2234
|
-
|
2235
|
-
def initialize(expand: nil)
|
2236
|
-
@expand = expand
|
2237
|
-
end
|
2238
|
-
end
|
2239
|
-
|
2240
|
-
class MarkStaleParams < Stripe::RequestParams
|
2241
|
-
# Specifies which fields in the response should be expanded.
|
2242
|
-
attr_accessor :expand
|
2243
|
-
# Reason the Quote is being marked stale.
|
2244
|
-
attr_accessor :reason
|
2245
|
-
|
2246
|
-
def initialize(expand: nil, reason: nil)
|
2247
|
-
@expand = expand
|
2248
|
-
@reason = reason
|
2249
|
-
end
|
2250
|
-
end
|
2251
|
-
|
2252
|
-
class ReestimateParams < Stripe::RequestParams
|
2253
|
-
# Specifies which fields in the response should be expanded.
|
2254
|
-
attr_accessor :expand
|
2255
|
-
|
2256
|
-
def initialize(expand: nil)
|
2257
|
-
@expand = expand
|
2258
|
-
end
|
2259
|
-
end
|
2260
|
-
|
2261
616
|
class PdfParams < Stripe::RequestParams
|
2262
617
|
# Specifies which fields in the response should be expanded.
|
2263
618
|
attr_accessor :expand
|
@@ -2267,24 +622,6 @@ module Stripe
|
|
2267
622
|
end
|
2268
623
|
end
|
2269
624
|
|
2270
|
-
class ListPreviewInvoiceLinesParams < Stripe::RequestParams
|
2271
|
-
# 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.
|
2272
|
-
attr_accessor :ending_before
|
2273
|
-
# Specifies which fields in the response should be expanded.
|
2274
|
-
attr_accessor :expand
|
2275
|
-
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
2276
|
-
attr_accessor :limit
|
2277
|
-
# 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.
|
2278
|
-
attr_accessor :starting_after
|
2279
|
-
|
2280
|
-
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
2281
|
-
@ending_before = ending_before
|
2282
|
-
@expand = expand
|
2283
|
-
@limit = limit
|
2284
|
-
@starting_after = starting_after
|
2285
|
-
end
|
2286
|
-
end
|
2287
|
-
|
2288
625
|
# Accepts the specified quote.
|
2289
626
|
def accept(quote, params = {}, opts = {})
|
2290
627
|
request(
|
@@ -2328,39 +665,6 @@ module Stripe
|
|
2328
665
|
request(method: :get, path: "/v1/quotes", params: params, opts: opts, base_address: :api)
|
2329
666
|
end
|
2330
667
|
|
2331
|
-
# Preview the invoice line items that would be generated by accepting the quote.
|
2332
|
-
def list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {})
|
2333
|
-
request(
|
2334
|
-
method: :get,
|
2335
|
-
path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(quote), preview_invoice: CGI.escape(preview_invoice) }),
|
2336
|
-
params: params,
|
2337
|
-
opts: opts,
|
2338
|
-
base_address: :api
|
2339
|
-
)
|
2340
|
-
end
|
2341
|
-
|
2342
|
-
# Converts a stale quote to draft.
|
2343
|
-
def mark_draft(quote, params = {}, opts = {})
|
2344
|
-
request(
|
2345
|
-
method: :post,
|
2346
|
-
path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(quote) }),
|
2347
|
-
params: params,
|
2348
|
-
opts: opts,
|
2349
|
-
base_address: :api
|
2350
|
-
)
|
2351
|
-
end
|
2352
|
-
|
2353
|
-
# Converts a draft or open quote to stale.
|
2354
|
-
def mark_stale(quote, params = {}, opts = {})
|
2355
|
-
request(
|
2356
|
-
method: :post,
|
2357
|
-
path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(quote) }),
|
2358
|
-
params: params,
|
2359
|
-
opts: opts,
|
2360
|
-
base_address: :api
|
2361
|
-
)
|
2362
|
-
end
|
2363
|
-
|
2364
668
|
# Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
|
2365
669
|
def pdf(quote, params = {}, opts = {}, &read_body_chunk_block)
|
2366
670
|
opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
|
@@ -2374,17 +678,6 @@ module Stripe
|
|
2374
678
|
)
|
2375
679
|
end
|
2376
680
|
|
2377
|
-
# Recompute the upcoming invoice estimate for the quote.
|
2378
|
-
def reestimate(quote, params = {}, opts = {})
|
2379
|
-
request(
|
2380
|
-
method: :post,
|
2381
|
-
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(quote) }),
|
2382
|
-
params: params,
|
2383
|
-
opts: opts,
|
2384
|
-
base_address: :api
|
2385
|
-
)
|
2386
|
-
end
|
2387
|
-
|
2388
681
|
# Retrieves the quote with the given ID.
|
2389
682
|
def retrieve(quote, params = {}, opts = {})
|
2390
683
|
request(
|