Class: SmartyStreets::USReverseGeo::Lookup

Inherits:
Object
  • Object
show all
Defined in:
lib/smartystreets_ruby_sdk/us_reverse_geo/lookup.rb

Overview

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 “smartystreets.com/docs/cloud/us-reverse-geo-api#http-request-input-fields

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(latitude, longitude, source) ⇒ Lookup

Returns a new instance of Lookup.



15
16
17
18
19
# File 'lib/smartystreets_ruby_sdk/us_reverse_geo/lookup.rb', line 15

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

Instance Attribute Details

#latitudeObject

Returns the value of attribute latitude.



13
14
15
# File 'lib/smartystreets_ruby_sdk/us_reverse_geo/lookup.rb', line 13

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude.



13
14
15
# File 'lib/smartystreets_ruby_sdk/us_reverse_geo/lookup.rb', line 13

def longitude
  @longitude
end

#responseObject

Returns the value of attribute response.



13
14
15
# File 'lib/smartystreets_ruby_sdk/us_reverse_geo/lookup.rb', line 13

def response
  @response
end

#sourceObject

Returns the value of attribute source.



13
14
15
# File 'lib/smartystreets_ruby_sdk/us_reverse_geo/lookup.rb', line 13

def source
  @source
end