Class: Stripe::Terminal::ReaderService::SetReaderDisplayParams::Cart

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



252
253
254
255
256
257
# File 'lib/stripe/services/terminal/reader_service.rb', line 252

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



244
245
246
# File 'lib/stripe/services/terminal/reader_service.rb', line 244

def currency
  @currency
end

#line_itemsObject

Array of line items that were purchased.



246
247
248
# File 'lib/stripe/services/terminal/reader_service.rb', line 246

def line_items
  @line_items
end

#taxObject

The amount of tax in cents.



248
249
250
# File 'lib/stripe/services/terminal/reader_service.rb', line 248

def tax
  @tax
end

#totalObject

Total balance of cart due in cents.



250
251
252
# File 'lib/stripe/services/terminal/reader_service.rb', line 250

def total
  @total
end