Class: Brownie::ShipTo
- Inherits:
-
Object
- Object
- Brownie::ShipTo
- Defined in:
- lib/brownie/ship_to.rb
Instance Attribute Summary collapse
-
#address_line1 ⇒ Object
Returns the value of attribute address_line1.
-
#address_line2 ⇒ Object
Returns the value of attribute address_line2.
-
#attention_name ⇒ Object
Returns the value of attribute attention_name.
-
#city ⇒ Object
Returns the value of attribute city.
-
#company_name ⇒ Object
Returns the value of attribute company_name.
-
#country_code ⇒ Object
Returns the value of attribute country_code.
-
#phone_number ⇒ Object
Returns the value of attribute phone_number.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#state_province_code ⇒ Object
Returns the value of attribute state_province_code.
Instance Method Summary collapse
Instance Attribute Details
#address_line1 ⇒ Object
Returns the value of attribute address_line1.
3 4 5 |
# File 'lib/brownie/ship_to.rb', line 3 def address_line1 @address_line1 end |
#address_line2 ⇒ Object
Returns the value of attribute address_line2.
3 4 5 |
# File 'lib/brownie/ship_to.rb', line 3 def address_line2 @address_line2 end |
#attention_name ⇒ Object
Returns the value of attribute attention_name.
3 4 5 |
# File 'lib/brownie/ship_to.rb', line 3 def attention_name @attention_name end |
#city ⇒ Object
Returns the value of attribute city.
3 4 5 |
# File 'lib/brownie/ship_to.rb', line 3 def city @city end |
#company_name ⇒ Object
Returns the value of attribute company_name.
3 4 5 |
# File 'lib/brownie/ship_to.rb', line 3 def company_name @company_name end |
#country_code ⇒ Object
Returns the value of attribute country_code.
3 4 5 |
# File 'lib/brownie/ship_to.rb', line 3 def country_code @country_code end |
#phone_number ⇒ Object
Returns the value of attribute phone_number.
3 4 5 |
# File 'lib/brownie/ship_to.rb', line 3 def phone_number @phone_number end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
3 4 5 |
# File 'lib/brownie/ship_to.rb', line 3 def postal_code @postal_code end |
#state_province_code ⇒ Object
Returns the value of attribute state_province_code.
3 4 5 |
# File 'lib/brownie/ship_to.rb', line 3 def state_province_code @state_province_code end |
Instance Method Details
#create ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/brownie/ship_to.rb', line 5 def create data = Hash.from_xml(template)["ShipTo"] data["CompanyName"] = self.company_name data["AttentionName"] = self.attention_name data["PhoneNumber"] = self.phone_number data["AttentionName"] = self.attention_name data["Address"]["AddressLine1"] = self.address_line1 data["Address"]["AddressLine2"] = self.address_line2 if !self.address_line2.nil? data["Address"]["City"] = self.city data["Address"]["StateProvinceCode"] = self.state_province_code data["Address"]["PostalCode"] = self.postal_code data["Address"]["CountryCode"] = self.country_code return data end |