Class: Stripe::InvoiceCreatePreviewParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::InvoiceCreatePreviewParams
- Defined in:
- lib/stripe/params/invoice_create_preview_params.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.
-
#billing_cadence ⇒ Object
The identifier of the billing cadence for which you’d like to retrieve the upcoming invoice.
-
#currency ⇒ Object
The currency to preview this invoice in.
-
#customer ⇒ Object
The identifier of the customer whose upcoming invoice you’re retrieving.
-
#customer_account ⇒ Object
The identifier of the account representing the customer whose upcoming invoice you’re retrieving.
-
#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, billing_cadence: 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) ⇒ InvoiceCreatePreviewParams
constructor
A new instance of InvoiceCreatePreviewParams.
Methods inherited from RequestParams
Constructor Details
#initialize(automatic_tax: nil, billing_cadence: 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) ⇒ InvoiceCreatePreviewParams
Returns a new instance of InvoiceCreatePreviewParams.
2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2322 def initialize( automatic_tax: nil, billing_cadence: 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 @billing_cadence = billing_cadence @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.
2290 2291 2292 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2290 def automatic_tax @automatic_tax end |
#billing_cadence ⇒ Object
The identifier of the billing cadence for which you’d like to retrieve the upcoming invoice. Cannot be provided when ‘subscription`, `schedule`, `subscription_details` or `schedule_details` are provided.
2292 2293 2294 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2292 def billing_cadence @billing_cadence end |
#currency ⇒ Object
The currency to preview this invoice in. Defaults to that of ‘customer` if not specified.
2294 2295 2296 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2294 def currency @currency end |
#customer ⇒ Object
The identifier of the customer whose upcoming invoice you’re retrieving. If ‘automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
2296 2297 2298 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2296 def customer @customer end |
#customer_account ⇒ Object
The identifier of the account representing the customer whose upcoming invoice you’re retrieving. If ‘automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
2298 2299 2300 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2298 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.
2300 2301 2302 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2300 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.
2302 2303 2304 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2302 def discounts @discounts end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
2304 2305 2306 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2304 def @expand end |
#invoice_items ⇒ Object
List of invoice items to add or update in the upcoming invoice preview (up to 250).
2306 2307 2308 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2306 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.
2308 2309 2310 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2308 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](docs.stripe.com/billing/invoices/connect) documentation for details.
2310 2311 2312 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2310 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.
2312 2313 2314 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2312 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.
2314 2315 2316 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2314 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.
2316 2317 2318 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2316 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.
2318 2319 2320 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2318 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.
2320 2321 2322 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 2320 def subscription_details @subscription_details end |