class Retailigence::Location
A location result from the Retailigence
API
Attributes¶ ↑
-
id
- Unique identifier for the location -
timezone
- Timezone of the location -
distance
-Distance
object calculated based off theuserlocation
param -
phone
- Location’s phone number -
t_nav_link
- URL to get directions from your current position to the location’s position -
location
- Contains the latitude and longitude for the location. Using thelatitude
andlongitude
attributes are preferred -
address
- AnAddress
object containing the physical postal address -
hours
- Colon separated operating hours -
map_link
- Google Maps URL for the location’s address -
name
- Name of the location -
retailer
-Retailer
-
retlocationid
- External location ID provided by theRetailer
-
latitude
- The location’s latitude -
longitide
- The location’s longitude
Public Class Methods
Search locations and retailers based on the params
passed.
Params¶ ↑
See the documentation from Retailigence
for all possible parameters
Returns¶ ↑
SearchResult
with results
being an array of Retailer
# File lib/retailigence/location.rb, line 31 def self.search(params = {}) results = get('locations', params) retailers = results['RetailigenceAPIResult']['results'].map do |result| Retailer.new(result['Retailer']) end SearchResult.new(retailers) end