class LabelMe::Order::Customer

Attributes

address[RW]
email[RW]
name[RW]
number[RW]
phone_number[RW]
postal_code[RW]

Public Class Methods

new(row) click to toggle source
# File lib/label_me/order/customer.rb, line 4
def initialize(row)
  @number       = row.customer_id.to_i
  @name         = row.customer_name
  @email        = row.customer_email
  @phone_number = row.customer_phone_number
  @address      = row.customer_address
  @postal_code  = row.customer_postal_code
end

Public Instance Methods

===(other) click to toggle source
# File lib/label_me/order/customer.rb, line 31
def ===(other)
  self.number == other.number
end
to_hash() click to toggle source
# File lib/label_me/order/customer.rb, line 20
def to_hash
  {
    number:       number,
    name:         name,
    email:        email,
    phone_number: phone_number,
    address:      address,
    postal_code:  postal_code
  }
end