Class: Brownie::Shipper
- Inherits:
-
Object
- Object
- Brownie::Shipper
- Defined in:
- lib/brownie/shipper.rb
Instance Attribute Summary collapse
-
#account_number ⇒ Object
Returns the value of attribute account_number.
-
#address_line1 ⇒ Object
Returns the value of attribute address_line1.
-
#address_line2 ⇒ Object
Returns the value of attribute address_line2.
-
#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.
-
#phone_number ⇒ Object
Returns the value of attribute phone_number.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#shipper_number ⇒ Object
Returns the value of attribute shipper_number.
-
#state_province_code ⇒ Object
Returns the value of attribute state_province_code.
-
#tax_identification_number ⇒ Object
Returns the value of attribute tax_identification_number.
Instance Method Summary collapse
Instance Attribute Details
#account_number ⇒ Object
Returns the value of attribute account_number.
3 4 5 |
# File 'lib/brownie/shipper.rb', line 3 def account_number @account_number end |
#address_line1 ⇒ Object
Returns the value of attribute address_line1.
3 4 5 |
# File 'lib/brownie/shipper.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/shipper.rb', line 3 def address_line2 @address_line2 end |
#city ⇒ Object
Returns the value of attribute city.
3 4 5 |
# File 'lib/brownie/shipper.rb', line 3 def city @city end |
#country_code ⇒ Object
Returns the value of attribute country_code.
3 4 5 |
# File 'lib/brownie/shipper.rb', line 3 def country_code @country_code end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/brownie/shipper.rb', line 3 def name @name end |
#phone_number ⇒ Object
Returns the value of attribute phone_number.
3 4 5 |
# File 'lib/brownie/shipper.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/shipper.rb', line 3 def postal_code @postal_code end |
#shipper_number ⇒ Object
Returns the value of attribute shipper_number.
3 4 5 |
# File 'lib/brownie/shipper.rb', line 3 def shipper_number @shipper_number end |
#state_province_code ⇒ Object
Returns the value of attribute state_province_code.
3 4 5 |
# File 'lib/brownie/shipper.rb', line 3 def state_province_code @state_province_code end |
#tax_identification_number ⇒ Object
Returns the value of attribute tax_identification_number.
3 4 5 |
# File 'lib/brownie/shipper.rb', line 3 def tax_identification_number @tax_identification_number end |
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/brownie/shipper.rb', line 9 def create data = Hash.from_xml(template)["Shipper"] data["Name"] = self.name data["PhoneNumber"] = self.phone_number data["ShipperNumber"] = self.account_number data["TaxIdentificationNumber"] = self.tax_identification_number 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 |