Sha256: 58d29f8f863eae45d788de7507c7f611ada9dd58c62c0d0d9a3230188e6cb3fd

Contents?: true

Size: 899 Bytes

Versions: 1

Compression:

Stored size: 899 Bytes

Contents

module SmartyStreets
  module USReverseGeo
    # In addition to holding all of the input data for this lookup, this class also will contain the
    # result of the lookup after it comes back from the API.
    #
    # Note: Lookups must have certain required fields set with non-blank values.
    # These can be found at the URL below.
    #
    # See "https://smartystreets.com/docs/cloud/us-reverse-geo-api#http-request-input-fields"

    class Lookup

      attr_accessor :latitude, :longitude, :source, :response, :custom_param_hash

      def initialize(latitude, longitude, source=nil, custom_param_hash=nil)
        @latitude = sprintf('%.8f', latitude)
        @longitude = sprintf('%.8f', longitude)
        @source = source
        @custom_param_hash = {}
      end

      def add_custom_parameter(parameter, value)
        @custom_param_hash[parameter] = value
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
smartystreets_ruby_sdk-5.20.6 lib/smartystreets_ruby_sdk/us_reverse_geo/lookup.rb