Method: ActiveShipping::AddressValidationResponse#location

Defined in:
lib/active_shipping/address_validation_response.rb

#locationString

The Location to be validated

Returns:

  • (String)


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/active_shipping/address_validation_response.rb', line 8

class AddressValidationResponse < Response
  attr_reader :validity, :classification, :candidate_addresses, :options, :params

  def initialize(success, message, params = {}, options = {})
    @validity = options[:validity]
    @candidate_addresses = options[:candidate_addresses]
    @classification = options[:classification]
    super
  end

  def address_match?
    @validity == :valid
  end

  def residential?
    @classification == :residential
  end

  def commercial?
    @classification == :commercial
  end
end