Class: Stripe::Invoice::CreatePreviewParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Invoice::CreatePreviewParams
- Defined in:
- lib/stripe/resources/invoice.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_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_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_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.
3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 |
# File 'lib/stripe/resources/invoice.rb', line 3135 def initialize( automatic_tax: nil, currency: nil, customer: 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_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.
3107 3108 3109 |
# File 'lib/stripe/resources/invoice.rb', line 3107 def automatic_tax @automatic_tax end |
#currency ⇒ Object
The currency to preview this invoice in. Defaults to that of ‘customer` if not specified.
3109 3110 3111 |
# File 'lib/stripe/resources/invoice.rb', line 3109 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.
3111 3112 3113 |
# File 'lib/stripe/resources/invoice.rb', line 3111 def customer @customer 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.
3113 3114 3115 |
# File 'lib/stripe/resources/invoice.rb', line 3113 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.
3115 3116 3117 |
# File 'lib/stripe/resources/invoice.rb', line 3115 def discounts @discounts end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
3117 3118 3119 |
# File 'lib/stripe/resources/invoice.rb', line 3117 def @expand end |
#invoice_items ⇒ Object
List of invoice items to add or update in the upcoming invoice preview (up to 250).
3119 3120 3121 |
# File 'lib/stripe/resources/invoice.rb', line 3119 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.
3121 3122 3123 |
# File 'lib/stripe/resources/invoice.rb', line 3121 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.
3123 3124 3125 |
# File 'lib/stripe/resources/invoice.rb', line 3123 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.
3125 3126 3127 |
# File 'lib/stripe/resources/invoice.rb', line 3125 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.
3127 3128 3129 |
# File 'lib/stripe/resources/invoice.rb', line 3127 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.
3129 3130 3131 |
# File 'lib/stripe/resources/invoice.rb', line 3129 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.
3131 3132 3133 |
# File 'lib/stripe/resources/invoice.rb', line 3131 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.
3133 3134 3135 |
# File 'lib/stripe/resources/invoice.rb', line 3133 def subscription_details @subscription_details end |