Class: Orders::Order::Address
- Inherits:
-
Object
- Object
- Orders::Order::Address
- Defined in:
- lib/Orders.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#country_code_iso ⇒ Object
readonly
Returns the value of attribute country_code_iso.
-
#first_name ⇒ Object
readonly
Returns the value of attribute first_name.
-
#last_name ⇒ Object
readonly
Returns the value of attribute last_name.
-
#line1 ⇒ Object
readonly
Returns the value of attribute line1.
-
#line2 ⇒ Object
readonly
Returns the value of attribute line2.
-
#line3 ⇒ Object
readonly
Returns the value of attribute line3.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#postal_code ⇒ Object
readonly
Returns the value of attribute postal_code.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(address_type, options = {}) ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(address_type, options = {}) ⇒ Address
Returns a new instance of Address.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/Orders.rb', line 26 def initialize(address_type, = {}) @type = address_type @first_name = get_arg(, (@type + '_address_first_name')) @last_name = get_arg(, (@type + '_address_last_name')) @line1 = get_arg(, (@type + '_address_line1')) @line2 = get_arg(, (@type + '_address_line2')) @line3 = get_arg(, (@type + '_address_line3')) @city = get_arg(, (@type + '_address_city')) @state = get_arg(, (@type + '_address_state')) @country = get_arg(, (@type + '_address_country')) @postal_code = get_arg(, (@type + '_address_postal_code')) @phone = get_arg(, (@type + '_address_phone')) @country_code_iso = get_arg(, (@type + '_address_country_code_iso')) end |
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city.
24 25 26 |
# File 'lib/Orders.rb', line 24 def city @city end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
24 25 26 |
# File 'lib/Orders.rb', line 24 def country @country end |
#country_code_iso ⇒ Object (readonly)
Returns the value of attribute country_code_iso.
24 25 26 |
# File 'lib/Orders.rb', line 24 def country_code_iso @country_code_iso end |
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
24 25 26 |
# File 'lib/Orders.rb', line 24 def first_name @first_name end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
24 25 26 |
# File 'lib/Orders.rb', line 24 def last_name @last_name end |
#line1 ⇒ Object (readonly)
Returns the value of attribute line1.
24 25 26 |
# File 'lib/Orders.rb', line 24 def line1 @line1 end |
#line2 ⇒ Object (readonly)
Returns the value of attribute line2.
24 25 26 |
# File 'lib/Orders.rb', line 24 def line2 @line2 end |
#line3 ⇒ Object (readonly)
Returns the value of attribute line3.
24 25 26 |
# File 'lib/Orders.rb', line 24 def line3 @line3 end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
24 25 26 |
# File 'lib/Orders.rb', line 24 def phone @phone end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
24 25 26 |
# File 'lib/Orders.rb', line 24 def postal_code @postal_code end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
24 25 26 |
# File 'lib/Orders.rb', line 24 def state @state end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
24 25 26 |
# File 'lib/Orders.rb', line 24 def type @type end |