Class: Stripe::InvoiceService::CreatePreviewParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::InvoiceService::CreatePreviewParams
- Defined in:
- lib/stripe/services/invoice_service.rb
Defined Under Namespace
Classes: AutomaticTax, CustomerDetails, Discount, InvoiceItem, Issuer, ScheduleDetails, SubscriptionDetails
Instance Attribute Summary collapse
-
#automatic_tax ⇒ Object
Settings for automatic tax lookup for this invoice preview.
-
#currency ⇒ Object
The currency to preview this invoice in.
-
#customer ⇒ Object
The identifier of the customer whose upcoming invoice you’d like to retrieve.
-
#customer_account ⇒ Object
The identifier of the account whose upcoming invoice you’d like to retrieve.
-
#customer_details ⇒ Object
Details about the customer you want to invoice or overrides for an existing customer.
-
#discounts ⇒ Object
The coupons to redeem into discounts for the invoice preview.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#invoice_items ⇒ Object
List of invoice items to add or update in the upcoming invoice preview (up to 250).
-
#issuer ⇒ Object
The connected account that issues the invoice.
-
#on_behalf_of ⇒ Object
The account (if any) for which the funds of the invoice payment are intended.
-
#preview_mode ⇒ Object
Customizes the types of values to include when calculating the invoice.
-
#schedule ⇒ Object
The identifier of the schedule whose upcoming invoice you’d like to retrieve.
-
#schedule_details ⇒ Object
The schedule creation or modification params to apply as a preview.
-
#subscription ⇒ Object
The identifier of the subscription for which you’d like to retrieve the upcoming invoice.
-
#subscription_details ⇒ Object
The subscription creation or modification params to apply as a preview.
Instance Method Summary collapse
-
#initialize(automatic_tax: nil, currency: nil, customer: nil, customer_account: nil, customer_details: nil, discounts: nil, expand: nil, invoice_items: nil, issuer: nil, on_behalf_of: nil, preview_mode: nil, schedule: nil, schedule_details: nil, subscription: nil, subscription_details: nil) ⇒ CreatePreviewParams
constructor
A new instance of CreatePreviewParams.
Methods inherited from RequestParams
Constructor Details
#initialize(automatic_tax: nil, currency: nil, customer: nil, customer_account: nil, customer_details: nil, discounts: nil, expand: nil, invoice_items: nil, issuer: nil, on_behalf_of: nil, preview_mode: nil, schedule: nil, schedule_details: nil, subscription: nil, subscription_details: nil) ⇒ CreatePreviewParams
Returns a new instance of CreatePreviewParams.
3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 |
# File 'lib/stripe/services/invoice_service.rb', line 3771 def initialize( automatic_tax: nil, currency: nil, customer: nil, customer_account: nil, customer_details: nil, discounts: nil, expand: nil, invoice_items: nil, issuer: nil, on_behalf_of: nil, preview_mode: nil, schedule: nil, schedule_details: nil, subscription: nil, subscription_details: nil ) @automatic_tax = automatic_tax @currency = currency @customer = customer @customer_account = customer_account @customer_details = customer_details @discounts = discounts @expand = @invoice_items = invoice_items @issuer = issuer @on_behalf_of = on_behalf_of @preview_mode = preview_mode @schedule = schedule @schedule_details = schedule_details @subscription = subscription @subscription_details = subscription_details end |
Instance Attribute Details
#automatic_tax ⇒ Object
Settings for automatic tax lookup for this invoice preview.
3741 3742 3743 |
# File 'lib/stripe/services/invoice_service.rb', line 3741 def automatic_tax @automatic_tax end |
#currency ⇒ Object
The currency to preview this invoice in. Defaults to that of ‘customer` if not specified.
3743 3744 3745 |
# File 'lib/stripe/services/invoice_service.rb', line 3743 def currency @currency end |
#customer ⇒ Object
The identifier of the customer whose upcoming invoice you’d like to retrieve. If ‘automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
3745 3746 3747 |
# File 'lib/stripe/services/invoice_service.rb', line 3745 def customer @customer end |
#customer_account ⇒ Object
The identifier of the account whose upcoming invoice you’d like to retrieve. If ‘automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
3747 3748 3749 |
# File 'lib/stripe/services/invoice_service.rb', line 3747 def customer_account @customer_account end |
#customer_details ⇒ Object
Details about the customer you want to invoice or overrides for an existing customer. If ‘automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
3749 3750 3751 |
# File 'lib/stripe/services/invoice_service.rb', line 3749 def customer_details @customer_details end |
#discounts ⇒ Object
The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
3751 3752 3753 |
# File 'lib/stripe/services/invoice_service.rb', line 3751 def discounts @discounts end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
3753 3754 3755 |
# File 'lib/stripe/services/invoice_service.rb', line 3753 def @expand end |
#invoice_items ⇒ Object
List of invoice items to add or update in the upcoming invoice preview (up to 250).
3755 3756 3757 |
# File 'lib/stripe/services/invoice_service.rb', line 3755 def invoice_items @invoice_items end |
#issuer ⇒ Object
The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
3757 3758 3759 |
# File 'lib/stripe/services/invoice_service.rb', line 3757 def issuer @issuer end |
#on_behalf_of ⇒ Object
The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](stripe.com/docs/billing/invoices/connect) documentation for details.
3759 3760 3761 |
# File 'lib/stripe/services/invoice_service.rb', line 3759 def on_behalf_of @on_behalf_of end |
#preview_mode ⇒ Object
Customizes the types of values to include when calculating the invoice. Defaults to ‘next` if unspecified.
3761 3762 3763 |
# File 'lib/stripe/services/invoice_service.rb', line 3761 def preview_mode @preview_mode end |
#schedule ⇒ Object
The identifier of the schedule whose upcoming invoice you’d like to retrieve. Cannot be used with subscription or subscription fields.
3763 3764 3765 |
# File 'lib/stripe/services/invoice_service.rb', line 3763 def schedule @schedule end |
#schedule_details ⇒ Object
The schedule creation or modification params to apply as a preview. Cannot be used with ‘subscription` or `subscription_` prefixed fields.
3765 3766 3767 |
# File 'lib/stripe/services/invoice_service.rb', line 3765 def schedule_details @schedule_details end |
#subscription ⇒ Object
The identifier of the subscription for which you’d like to retrieve the upcoming invoice. If not provided, but a ‘subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer’s subscriptions.
3767 3768 3769 |
# File 'lib/stripe/services/invoice_service.rb', line 3767 def subscription @subscription end |
#subscription_details ⇒ Object
The subscription creation or modification params to apply as a preview. Cannot be used with ‘schedule` or `schedule_details` fields.
3769 3770 3771 |
# File 'lib/stripe/services/invoice_service.rb', line 3769 def subscription_details @subscription_details end |