Class: Stripe::Terminal::ReaderSetReaderDisplayParams::Cart

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/terminal/reader_set_reader_display_params.rb

Defined Under Namespace

Classes: LineItem

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(currency: nil, line_items: nil, tax: nil, total: nil) ⇒ Cart

Returns a new instance of Cart.



31
32
33
34
35
36
# File 'lib/stripe/params/terminal/reader_set_reader_display_params.rb', line 31

def initialize(currency: nil, line_items: nil, tax: nil, total: nil)
  @currency = currency
  @line_items = line_items
  @tax = tax
  @total = total
end

Instance Attribute Details

#currencyObject

Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).



23
24
25
# File 'lib/stripe/params/terminal/reader_set_reader_display_params.rb', line 23

def currency
  @currency
end

#line_itemsObject

Array of line items to display.



25
26
27
# File 'lib/stripe/params/terminal/reader_set_reader_display_params.rb', line 25

def line_items
  @line_items
end

#taxObject

The amount of tax in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal).



27
28
29
# File 'lib/stripe/params/terminal/reader_set_reader_display_params.rb', line 27

def tax
  @tax
end

#totalObject

Total balance of cart due in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal).



29
30
31
# File 'lib/stripe/params/terminal/reader_set_reader_display_params.rb', line 29

def total
  @total
end