Class: Fedex::Address
- Inherits:
-
Object
- Object
- Fedex::Address
- Defined in:
- lib/fedex/address.rb
Instance Attribute Summary collapse
-
#available ⇒ Object
readonly
Returns the value of attribute available.
-
#business ⇒ Object
readonly
Returns the value of attribute business.
-
#changes ⇒ Object
readonly
Returns the value of attribute changes.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#company ⇒ Object
readonly
Returns the value of attribute company.
-
#confirmed ⇒ Object
readonly
Returns the value of attribute confirmed.
-
#country_code ⇒ Object
readonly
Returns the value of attribute country_code.
-
#postal_code ⇒ Object
readonly
Returns the value of attribute postal_code.
-
#province_code ⇒ Object
readonly
Returns the value of attribute province_code.
-
#residential ⇒ Object
readonly
Returns the value of attribute residential.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#street_lines ⇒ Object
readonly
Returns the value of attribute street_lines.
Instance Method Summary collapse
-
#initialize(options) ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(options) ⇒ Address
Returns a new instance of Address.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/fedex/address.rb', line 8 def initialize() @changes = [:changes] @score = [:score].to_i @confirmed = [:delivery_point_validation] == "CONFIRMED" @available = [:delivery_point_validation] != "UNAVAILABLE" @status = [:residential_status] @residential = status == "RESIDENTIAL" @business = status == "BUSINESS" address = [:address] @company = [:company_name] @street_lines = address[:street_lines] @city = address[:city] @state = address[:state_or_province_code] @province_code = address[:state_or_province_code] @postal_code = address[:postal_code] @country_code = address[:country_code] @options = end |
Instance Attribute Details
#available ⇒ Object (readonly)
Returns the value of attribute available.
4 5 6 |
# File 'lib/fedex/address.rb', line 4 def available @available end |
#business ⇒ Object (readonly)
Returns the value of attribute business.
4 5 6 |
# File 'lib/fedex/address.rb', line 4 def business @business end |
#changes ⇒ Object (readonly)
Returns the value of attribute changes.
4 5 6 |
# File 'lib/fedex/address.rb', line 4 def changes @changes end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
4 5 6 |
# File 'lib/fedex/address.rb', line 4 def city @city end |
#company ⇒ Object (readonly)
Returns the value of attribute company.
4 5 6 |
# File 'lib/fedex/address.rb', line 4 def company @company end |
#confirmed ⇒ Object (readonly)
Returns the value of attribute confirmed.
4 5 6 |
# File 'lib/fedex/address.rb', line 4 def confirmed @confirmed end |
#country_code ⇒ Object (readonly)
Returns the value of attribute country_code.
4 5 6 |
# File 'lib/fedex/address.rb', line 4 def country_code @country_code end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
4 5 6 |
# File 'lib/fedex/address.rb', line 4 def postal_code @postal_code end |
#province_code ⇒ Object (readonly)
Returns the value of attribute province_code.
4 5 6 |
# File 'lib/fedex/address.rb', line 4 def province_code @province_code end |
#residential ⇒ Object (readonly)
Returns the value of attribute residential.
4 5 6 |
# File 'lib/fedex/address.rb', line 4 def residential @residential end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
4 5 6 |
# File 'lib/fedex/address.rb', line 4 def score @score end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
4 5 6 |
# File 'lib/fedex/address.rb', line 4 def state @state end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/fedex/address.rb', line 4 def status @status end |
#street_lines ⇒ Object (readonly)
Returns the value of attribute street_lines.
4 5 6 |
# File 'lib/fedex/address.rb', line 4 def street_lines @street_lines end |