Class: Orders::Order::Address

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = {})
  @type = address_type
  @first_name = get_arg(options, (@type + '_address_first_name'))
  @last_name = get_arg(options, (@type + '_address_last_name'))
  @line1 = get_arg(options, (@type + '_address_line1'))
  @line2 = get_arg(options, (@type + '_address_line2'))
  @line3 = get_arg(options, (@type + '_address_line3'))
  @city = get_arg(options, (@type + '_address_city'))
  @state = get_arg(options, (@type + '_address_state'))
  @country = get_arg(options, (@type + '_address_country'))
  @postal_code = get_arg(options, (@type + '_address_postal_code'))
  @phone = get_arg(options, (@type + '_address_phone'))
  @country_code_iso = get_arg(options, (@type + '_address_country_code_iso'))
end

Instance Attribute Details

#cityObject (readonly)

Returns the value of attribute city.



24
25
26
# File 'lib/Orders.rb', line 24

def city
  @city
end

#countryObject (readonly)

Returns the value of attribute country.



24
25
26
# File 'lib/Orders.rb', line 24

def country
  @country
end

#country_code_isoObject (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_nameObject (readonly)

Returns the value of attribute first_name.



24
25
26
# File 'lib/Orders.rb', line 24

def first_name
  @first_name
end

#last_nameObject (readonly)

Returns the value of attribute last_name.



24
25
26
# File 'lib/Orders.rb', line 24

def last_name
  @last_name
end

#line1Object (readonly)

Returns the value of attribute line1.



24
25
26
# File 'lib/Orders.rb', line 24

def line1
  @line1
end

#line2Object (readonly)

Returns the value of attribute line2.



24
25
26
# File 'lib/Orders.rb', line 24

def line2
  @line2
end

#line3Object (readonly)

Returns the value of attribute line3.



24
25
26
# File 'lib/Orders.rb', line 24

def line3
  @line3
end

#phoneObject (readonly)

Returns the value of attribute phone.



24
25
26
# File 'lib/Orders.rb', line 24

def phone
  @phone
end

#postal_codeObject (readonly)

Returns the value of attribute postal_code.



24
25
26
# File 'lib/Orders.rb', line 24

def postal_code
  @postal_code
end

#stateObject (readonly)

Returns the value of attribute state.



24
25
26
# File 'lib/Orders.rb', line 24

def state
  @state
end

#typeObject (readonly)

Returns the value of attribute type.



24
25
26
# File 'lib/Orders.rb', line 24

def type
  @type
end