Class: MWS::Address
- Inherits:
-
Object
- Object
- MWS::Address
- Defined in:
- lib/mws/address.rb
Instance Attribute Summary collapse
-
#address_line_1 ⇒ Object
Returns the value of attribute address_line_1.
-
#address_line_2 ⇒ Object
Returns the value of attribute address_line_2.
-
#city ⇒ Object
Returns the value of attribute city.
-
#country_code ⇒ Object
Returns the value of attribute country_code.
-
#name ⇒ Object
Returns the value of attribute name.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#state_or_province_code ⇒ Object
Returns the value of attribute state_or_province_code.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Address
constructor
A new instance of Address.
- #to_hash ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Address
Returns a new instance of Address.
6 7 8 |
# File 'lib/mws/address.rb', line 6 def initialize(args={}) args.each { |k, v| send("#{k}=", v) } end |
Instance Attribute Details
#address_line_1 ⇒ Object
Returns the value of attribute address_line_1.
10 11 12 |
# File 'lib/mws/address.rb', line 10 def address_line_1 @address_line_1 end |
#address_line_2 ⇒ Object
Returns the value of attribute address_line_2.
10 11 12 |
# File 'lib/mws/address.rb', line 10 def address_line_2 @address_line_2 end |
#city ⇒ Object
Returns the value of attribute city.
10 11 12 |
# File 'lib/mws/address.rb', line 10 def city @city end |
#country_code ⇒ Object
Returns the value of attribute country_code.
10 11 12 |
# File 'lib/mws/address.rb', line 10 def country_code @country_code end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/mws/address.rb', line 10 def name @name end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
10 11 12 |
# File 'lib/mws/address.rb', line 10 def postal_code @postal_code end |
#state_or_province_code ⇒ Object
Returns the value of attribute state_or_province_code.
10 11 12 |
# File 'lib/mws/address.rb', line 10 def state_or_province_code @state_or_province_code end |
Instance Method Details
#to_hash ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/mws/address.rb', line 12 def to_hash { :name => @name, :address_line_1 => @address_line_1, :address_line_2 => @address_line_2, :city => @city, :state_or_province_code => @state_or_province_code, :country_code => @country_code, :postal_code => @postal_code } end |