class Square::Connect::Tender

Attributes

card_brand[RW]
change_back_money[RW]
entry_method[RW]
name[RW]
pan_suffix[RW]
payment_note[RW]
tendered_money[RW]
total_money[RW]
type[RW]

Public Class Methods

new(attributes = {}) click to toggle source
# File lib/square/connect/tender.rb, line 6
def initialize(attributes = {})
  self.type = attributes[:type]
  self.name = attributes[:name]
  self.card_brand = attributes[:card_brand]
  self.pan_suffix = attributes[:pan_suffix]
  self.entry_method = attributes[:entry_method]
  self.payment_note = attributes[:payment_note]
  [
    :total_money,
    :tendered_money,
    :change_back_money
  ].each do |money_attr|
    if attributes[money_attr]
      self.send "#{money_attr}=", Money.new(attributes[money_attr])
    end
  end
end