Class: OrderInfo
- Inherits:
-
Object
- Object
- OrderInfo
- Defined in:
- lib/objects/order_info.rb
Overview
This object represents information about an order.
Instance Method Summary collapse
-
#email ⇒ Object
Optional.
-
#initialize(info) ⇒ OrderInfo
constructor
:nodoc:.
-
#name ⇒ Object
Optional.
-
#phone_number ⇒ Object
Optional.
-
#shipping_address ⇒ Object
Optional.
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
#email ⇒ Object
Optional. User email
23 24 25 |
# File 'lib/objects/order_info.rb', line 23 def email @info.email end |
#name ⇒ Object
Optional. User name
13 14 15 |
# File 'lib/objects/order_info.rb', line 13 def name @info.name end |
#phone_number ⇒ Object
Optional. User’s phone number.
18 19 20 |
# File 'lib/objects/order_info.rb', line 18 def phone_number @info.phone_number end |
#shipping_address ⇒ Object
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 |