Class: Stripe::Terminal::Reader::SetReaderDisplayParams::Cart

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/terminal/reader.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.



641
642
643
644
645
646
# File 'lib/stripe/resources/terminal/reader.rb', line 641

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).



633
634
635
# File 'lib/stripe/resources/terminal/reader.rb', line 633

def currency
  @currency
end

#line_itemsObject

Array of line items that were purchased.



635
636
637
# File 'lib/stripe/resources/terminal/reader.rb', line 635

def line_items
  @line_items
end

#taxObject

The amount of tax in cents.



637
638
639
# File 'lib/stripe/resources/terminal/reader.rb', line 637

def tax
  @tax
end

#totalObject

Total balance of cart due in cents.



639
640
641
# File 'lib/stripe/resources/terminal/reader.rb', line 639

def total
  @total
end