Class: Stripe::Quote::CreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/quote.rb

Defined Under Namespace

Classes: AutomaticTax, Discount, FromQuote, InvoiceSettings, LineItem, SubscriptionData, TransferData

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(application_fee_amount: nil, application_fee_percent: nil, automatic_tax: nil, collection_method: nil, customer: nil, default_tax_rates: nil, description: nil, discounts: nil, expand: nil, expires_at: nil, footer: nil, from_quote: nil, header: nil, invoice_settings: nil, line_items: nil, metadata: nil, on_behalf_of: nil, subscription_data: nil, test_clock: nil, transfer_data: nil) ⇒ CreateParams

Returns a new instance of CreateParams.



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
# File 'lib/stripe/resources/quote.rb', line 485

def initialize(
  application_fee_amount: nil,
  application_fee_percent: nil,
  automatic_tax: nil,
  collection_method: nil,
  customer: nil,
  default_tax_rates: nil,
  description: nil,
  discounts: nil,
  expand: nil,
  expires_at: nil,
  footer: nil,
  from_quote: nil,
  header: nil,
  invoice_settings: nil,
  line_items: nil,
  metadata: nil,
  on_behalf_of: nil,
  subscription_data: nil,
  test_clock: nil,
  transfer_data: nil
)
  @application_fee_amount = application_fee_amount
  @application_fee_percent = application_fee_percent
  @automatic_tax = automatic_tax
  @collection_method = collection_method
  @customer = customer
  @default_tax_rates = default_tax_rates
  @description = description
  @discounts = discounts
  @expand = expand
  @expires_at = expires_at
  @footer = footer
  @from_quote = from_quote
  @header = header
  @invoice_settings = invoice_settings
  @line_items = line_items
  @metadata = 
  @on_behalf_of = on_behalf_of
  @subscription_data = subscription_data
  @test_clock = test_clock
  @transfer_data = transfer_data
end

Instance Attribute Details

#application_fee_amountObject

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.



445
446
447
# File 'lib/stripe/resources/quote.rb', line 445

def application_fee_amount
  @application_fee_amount
end

#application_fee_percentObject

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.



447
448
449
# File 'lib/stripe/resources/quote.rb', line 447

def application_fee_percent
  @application_fee_percent
end

#automatic_taxObject

Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.



449
450
451
# File 'lib/stripe/resources/quote.rb', line 449

def automatic_tax
  @automatic_tax
end

#collection_methodObject

Either ‘charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.



451
452
453
# File 'lib/stripe/resources/quote.rb', line 451

def collection_method
  @collection_method
end

#customerObject

The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.



453
454
455
# File 'lib/stripe/resources/quote.rb', line 453

def customer
  @customer
end

#default_tax_ratesObject

The tax rates that will apply to any line item that does not have ‘tax_rates` set.



455
456
457
# File 'lib/stripe/resources/quote.rb', line 455

def default_tax_rates
  @default_tax_rates
end

#descriptionObject

A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](dashboard.stripe.com/settings/billing/quote) will be used.



457
458
459
# File 'lib/stripe/resources/quote.rb', line 457

def description
  @description
end

#discountsObject

The discounts applied to the quote.



459
460
461
# File 'lib/stripe/resources/quote.rb', line 459

def discounts
  @discounts
end

#expandObject

Specifies which fields in the response should be expanded.



461
462
463
# File 'lib/stripe/resources/quote.rb', line 461

def expand
  @expand
end

#expires_atObject

A future timestamp on which the quote will be canceled if in ‘open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](dashboard.stripe.com/settings/billing/quote) will be used.



463
464
465
# File 'lib/stripe/resources/quote.rb', line 463

def expires_at
  @expires_at
end

A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](dashboard.stripe.com/settings/billing/quote) will be used.



465
466
467
# File 'lib/stripe/resources/quote.rb', line 465

def footer
  @footer
end

#from_quoteObject

Clone an existing quote. The new quote will be created in ‘status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.



467
468
469
# File 'lib/stripe/resources/quote.rb', line 467

def from_quote
  @from_quote
end

#headerObject

A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](dashboard.stripe.com/settings/billing/quote) will be used.



469
470
471
# File 'lib/stripe/resources/quote.rb', line 469

def header
  @header
end

#invoice_settingsObject

All invoices will be billed using the specified settings.



471
472
473
# File 'lib/stripe/resources/quote.rb', line 471

def invoice_settings
  @invoice_settings
end

#line_itemsObject

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.



473
474
475
# File 'lib/stripe/resources/quote.rb', line 473

def line_items
  @line_items
end

#metadataObject

Set of [key-value pairs](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`.



475
476
477
# File 'lib/stripe/resources/quote.rb', line 475

def 
  @metadata
end

#on_behalf_ofObject

The account on behalf of which to charge.



477
478
479
# File 'lib/stripe/resources/quote.rb', line 477

def on_behalf_of
  @on_behalf_of
end

#subscription_dataObject

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` is present and in the future, otherwise a subscription is created.



479
480
481
# File 'lib/stripe/resources/quote.rb', line 479

def subscription_data
  @subscription_data
end

#test_clockObject

ID of the test clock to attach to the quote.



481
482
483
# File 'lib/stripe/resources/quote.rb', line 481

def test_clock
  @test_clock
end

#transfer_dataObject

The data with which to automatically create a Transfer for each of the invoices.



483
484
485
# File 'lib/stripe/resources/quote.rb', line 483

def transfer_data
  @transfer_data
end