Class: Xpost::Models::Address
- Inherits:
-
Object
- Object
- Xpost::Models::Address
- Includes:
- ActiveModel::Model
- Defined in:
- lib/xpost/models/address.rb
Constant Summary collapse
- REQUIRED_ADDRESS_PARAMETERS =
Set[:name, :shipment, :line_1, :city, :state, :postal_code, :country]
- OPTIONAL_ADDRESS_PARAMETERS =
Set[:company, :title, :email, :phone_number, :mobile_number, :fax_number, :district, :line_2, :remarks]
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#company ⇒ Object
Returns the value of attribute company.
-
#country ⇒ Object
Returns the value of attribute country.
-
#district ⇒ Object
Returns the value of attribute district.
-
#email ⇒ Object
Returns the value of attribute email.
-
#fax_number ⇒ Object
Returns the value of attribute fax_number.
-
#line_1 ⇒ Object
Returns the value of attribute line_1.
-
#line_2 ⇒ Object
Returns the value of attribute line_2.
-
#mobile_number ⇒ Object
Returns the value of attribute mobile_number.
-
#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.
-
#remarks ⇒ Object
Returns the value of attribute remarks.
-
#shipment ⇒ Object
Returns the value of attribute shipment.
-
#state ⇒ Object
Returns the value of attribute state.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(options = {}) ⇒ Address
Returns a new instance of Address.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/xpost/models/address.rb', line 18 def initialize( = {}) @shipment = [:shipment] @name = [:name] @email = [:email] @phone_number = [:phone_number] @mobile_number = [:mobile_number] @fax_number = [:fax_number] @company = [:company] @title = [:title] @line_1 = [:line_1] @line_2 = [:line_2] @city = [:city] @district = [:district] @state = [:state] @postal_code = [:postal_code] @country = [:country] @remarks = [:remarks] end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
13 14 15 |
# File 'lib/xpost/models/address.rb', line 13 def city @city end |
#company ⇒ Object
Returns the value of attribute company.
14 15 16 |
# File 'lib/xpost/models/address.rb', line 14 def company @company end |
#country ⇒ Object
Returns the value of attribute country.
13 14 15 |
# File 'lib/xpost/models/address.rb', line 13 def country @country end |
#district ⇒ Object
Returns the value of attribute district.
14 15 16 |
# File 'lib/xpost/models/address.rb', line 14 def district @district end |
#email ⇒ Object
Returns the value of attribute email.
14 15 16 |
# File 'lib/xpost/models/address.rb', line 14 def email @email end |
#fax_number ⇒ Object
Returns the value of attribute fax_number.
14 15 16 |
# File 'lib/xpost/models/address.rb', line 14 def fax_number @fax_number end |
#line_1 ⇒ Object
Returns the value of attribute line_1.
13 14 15 |
# File 'lib/xpost/models/address.rb', line 13 def line_1 @line_1 end |
#line_2 ⇒ Object
Returns the value of attribute line_2.
14 15 16 |
# File 'lib/xpost/models/address.rb', line 14 def line_2 @line_2 end |
#mobile_number ⇒ Object
Returns the value of attribute mobile_number.
14 15 16 |
# File 'lib/xpost/models/address.rb', line 14 def mobile_number @mobile_number end |
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/xpost/models/address.rb', line 13 def name @name end |
#phone_number ⇒ Object
Returns the value of attribute phone_number.
14 15 16 |
# File 'lib/xpost/models/address.rb', line 14 def phone_number @phone_number end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
13 14 15 |
# File 'lib/xpost/models/address.rb', line 13 def postal_code @postal_code end |
#remarks ⇒ Object
Returns the value of attribute remarks.
14 15 16 |
# File 'lib/xpost/models/address.rb', line 14 def remarks @remarks end |
#shipment ⇒ Object
Returns the value of attribute shipment.
13 14 15 |
# File 'lib/xpost/models/address.rb', line 13 def shipment @shipment end |
#state ⇒ Object
Returns the value of attribute state.
13 14 15 |
# File 'lib/xpost/models/address.rb', line 13 def state @state end |
#title ⇒ Object
Returns the value of attribute title.
14 15 16 |
# File 'lib/xpost/models/address.rb', line 14 def title @title end |