Class: Workarea::Emarsys::Contact::Order

Inherits:
Object
  • Object
show all
Defined in:
app/services/emarsys/contact/order.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(order) ⇒ Order

Returns a new instance of Order.



7
8
9
# File 'app/services/emarsys/contact/order.rb', line 7

def initialize(order)
  @order = order
end

Instance Attribute Details

#orderObject (readonly)

Returns the value of attribute order.



5
6
7
# File 'app/services/emarsys/contact/order.rb', line 5

def order
  @order
end

Instance Method Details

#emailObject



11
12
13
# File 'app/services/emarsys/contact/order.rb', line 11

def email
  order.email
end

#first_nameObject



15
16
17
# File 'app/services/emarsys/contact/order.rb', line 15

def first_name
  payment.address.first_name
end

#last_nameObject



19
20
21
# File 'app/services/emarsys/contact/order.rb', line 19

def last_name
  payment.address.last_name
end