Class: OrderInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/objects/order_info.rb

Overview

This object represents information about an order.

Instance Method Summary collapse

Constructor Details

#initialize(info) ⇒ OrderInfo

:nodoc:



8
9
10
# File 'lib/objects/order_info.rb', line 8

def initialize(info) # :nodoc:
  @info = info
end

Instance Method Details

#emailObject

Optional. User email



23
24
25
# File 'lib/objects/order_info.rb', line 23

def email
  @info.email
end

#nameObject

Optional. User name



13
14
15
# File 'lib/objects/order_info.rb', line 13

def name
  @info.name
end

#phone_numberObject

Optional. User’s phone number.



18
19
20
# File 'lib/objects/order_info.rb', line 18

def phone_number
  @info.phone_number
end

#shipping_addressObject

Optional. User shipping address



28
29
30
31
32
33
# File 'lib/objects/order_info.rb', line 28

def shipping_address
  address = @info.shipping_address
  return ShippingAddress.new(address) if address

  false
end