Method: Fedex::Address#initialize
- Defined in:
- lib/fedex/address.rb
#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 |
# 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] @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] = end |