Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1Place
- Inherits:
-
Object
- Object
- Google::Apis::PlacesV1::GoogleMapsPlacesV1Place
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/places_v1/classes.rb,
lib/google/apis/places_v1/representations.rb,
lib/google/apis/places_v1/representations.rb
Overview
All the information representing a Place.
Instance Attribute Summary collapse
-
#address_components ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceAddressComponent>
Output only.
-
#adr_format_address ⇒ String
Output only.
-
#attributions ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceAttribution>
Output only.
-
#business_status ⇒ String
Output only.
-
#curbside_pickup ⇒ Boolean
(also: #curbside_pickup?)
Output only.
-
#current_opening_hours ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHours
Information about business hour of the place.
-
#current_secondary_opening_hours ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHours>
Output only.
-
#delivery ⇒ Boolean
(also: #delivery?)
Output only.
-
#dine_in ⇒ Boolean
(also: #dine_in?)
Output only.
-
#display_name ⇒ Google::Apis::PlacesV1::GoogleTypeLocalizedText
Localized variant of a text in a particular language.
-
#editorial_summary ⇒ Google::Apis::PlacesV1::GoogleTypeLocalizedText
Localized variant of a text in a particular language.
-
#formatted_address ⇒ String
Output only.
-
#google_maps_uri ⇒ String
Output only.
-
#icon_background_color ⇒ String
Output only.
-
#icon_mask_base_uri ⇒ String
Output only.
-
#id ⇒ String
Output only.
-
#international_phone_number ⇒ String
Output only.
-
#location ⇒ Google::Apis::PlacesV1::GoogleTypeLatLng
An object that represents a latitude/longitude pair.
-
#name ⇒ String
Output only.
-
#national_phone_number ⇒ String
Output only.
-
#opening_hours ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHours
Information about business hour of the place.
-
#plus_code ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1PlacePlusCode
Plus code (http://plus.codes) is a location reference with two formats: global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, and compound code, replacing the prefix with a reference location.
-
#price_level ⇒ String
Output only.
-
#rating ⇒ Float
Output only.
-
#reservable ⇒ Boolean
(also: #reservable?)
Output only.
-
#reviews ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1Review>
Output only.
-
#secondary_opening_hours ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHours>
Output only.
-
#serves_beer ⇒ Boolean
(also: #serves_beer?)
Output only.
-
#serves_breakfast ⇒ Boolean
(also: #serves_breakfast?)
Output only.
-
#serves_brunch ⇒ Boolean
(also: #serves_brunch?)
Output only.
-
#serves_dinner ⇒ Boolean
(also: #serves_dinner?)
Output only.
-
#serves_lunch ⇒ Boolean
(also: #serves_lunch?)
Output only.
-
#serves_vegetarian_food ⇒ Boolean
(also: #serves_vegetarian_food?)
Output only.
-
#serves_wine ⇒ Boolean
(also: #serves_wine?)
Output only.
-
#takeout ⇒ Boolean
(also: #takeout?)
Output only.
-
#types ⇒ Array<String>
Output only.
-
#user_rating_count ⇒ Fixnum
Output only.
-
#utc_offset_minutes ⇒ Fixnum
Output only.
-
#viewport ⇒ Google::Apis::PlacesV1::GoogleGeoTypeViewport
A latitude-longitude viewport, represented as two diagonally opposite
lowandhighpoints. -
#website_uri ⇒ String
Output only.
-
#wheelchair_accessible_entrance ⇒ Boolean
(also: #wheelchair_accessible_entrance?)
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleMapsPlacesV1Place
constructor
A new instance of GoogleMapsPlacesV1Place.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleMapsPlacesV1Place
Returns a new instance of GoogleMapsPlacesV1Place.
396 397 398 |
# File 'lib/google/apis/places_v1/classes.rb', line 396 def initialize(**args) update!(**args) end |
Instance Attribute Details
#address_components ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceAddressComponent>
Output only. Repeated components for each locality level.
Corresponds to the JSON property addressComponents
137 138 139 |
# File 'lib/google/apis/places_v1/classes.rb', line 137 def address_components @address_components end |
#adr_format_address ⇒ String
Output only. The place's address in adr microformat: http://microformats.org/
wiki/adr.
Corresponds to the JSON property adrFormatAddress
143 144 145 |
# File 'lib/google/apis/places_v1/classes.rb', line 143 def adr_format_address @adr_format_address end |
#attributions ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceAttribution>
Output only. A set of data provider that must be shown with this result.
Corresponds to the JSON property attributions
148 149 150 |
# File 'lib/google/apis/places_v1/classes.rb', line 148 def attributions @attributions end |
#business_status ⇒ String
Output only. The business status for the place.
Corresponds to the JSON property businessStatus
153 154 155 |
# File 'lib/google/apis/places_v1/classes.rb', line 153 def business_status @business_status end |
#curbside_pickup ⇒ Boolean Also known as: curbside_pickup?
Output only. Specifies if the business supports curbside pickup.
Corresponds to the JSON property curbsidePickup
158 159 160 |
# File 'lib/google/apis/places_v1/classes.rb', line 158 def curbside_pickup @curbside_pickup end |
#current_opening_hours ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHours
Information about business hour of the place.
Corresponds to the JSON property currentOpeningHours
164 165 166 |
# File 'lib/google/apis/places_v1/classes.rb', line 164 def current_opening_hours @current_opening_hours end |
#current_secondary_opening_hours ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHours>
Output only. Contains an array of entries for the next seven days including
information about secondary hours of a business. Secondary hours are different
from a business's main hours. For example, a restaurant can specify drive
through hours or delivery hours as its secondary hours. This field populates
the type subfield, which draws from a predefined list of opening hours types (
such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place.
This field includes the special_days subfield of all hours, set for dates that
have exceptional hours.
Corresponds to the JSON property currentSecondaryOpeningHours
176 177 178 |
# File 'lib/google/apis/places_v1/classes.rb', line 176 def current_secondary_opening_hours @current_secondary_opening_hours end |
#delivery ⇒ Boolean Also known as: delivery?
Output only. Specifies if the business supports delivery.
Corresponds to the JSON property delivery
181 182 183 |
# File 'lib/google/apis/places_v1/classes.rb', line 181 def delivery @delivery end |
#dine_in ⇒ Boolean Also known as: dine_in?
Output only. Specifies if the business supports indoor or outdoor seating
options.
Corresponds to the JSON property dineIn
188 189 190 |
# File 'lib/google/apis/places_v1/classes.rb', line 188 def dine_in @dine_in end |
#display_name ⇒ Google::Apis::PlacesV1::GoogleTypeLocalizedText
Localized variant of a text in a particular language.
Corresponds to the JSON property displayName
194 195 196 |
# File 'lib/google/apis/places_v1/classes.rb', line 194 def display_name @display_name end |
#editorial_summary ⇒ Google::Apis::PlacesV1::GoogleTypeLocalizedText
Localized variant of a text in a particular language.
Corresponds to the JSON property editorialSummary
199 200 201 |
# File 'lib/google/apis/places_v1/classes.rb', line 199 def editorial_summary @editorial_summary end |
#formatted_address ⇒ String
Output only. A full, human-readable address for this place.
Corresponds to the JSON property formattedAddress
204 205 206 |
# File 'lib/google/apis/places_v1/classes.rb', line 204 def formatted_address @formatted_address end |
#google_maps_uri ⇒ String
Output only. A URL providing more information about this place.
Corresponds to the JSON property googleMapsUri
209 210 211 |
# File 'lib/google/apis/places_v1/classes.rb', line 209 def google_maps_uri @google_maps_uri end |
#icon_background_color ⇒ String
Output only. Background color for icon_mask in hex format, e.g. #909CE1.
Corresponds to the JSON property iconBackgroundColor
214 215 216 |
# File 'lib/google/apis/places_v1/classes.rb', line 214 def icon_background_color @icon_background_color end |
#icon_mask_base_uri ⇒ String
Output only. A truncated URL to an v2 icon mask. User can access different
icon type by appending type suffix to the end (eg, ".svg" or ".png").
Corresponds to the JSON property iconMaskBaseUri
220 221 222 |
# File 'lib/google/apis/places_v1/classes.rb', line 220 def icon_mask_base_uri @icon_mask_base_uri end |
#id ⇒ String
Output only. The unique identifier of a place.
Corresponds to the JSON property id
225 226 227 |
# File 'lib/google/apis/places_v1/classes.rb', line 225 def id @id end |
#international_phone_number ⇒ String
Output only. A human-readable phone number for the place, in international
format.
Corresponds to the JSON property internationalPhoneNumber
231 232 233 |
# File 'lib/google/apis/places_v1/classes.rb', line 231 def international_phone_number @international_phone_number end |
#location ⇒ Google::Apis::PlacesV1::GoogleTypeLatLng
An object that represents a latitude/longitude pair. This is expressed as a
pair of doubles to represent degrees latitude and degrees longitude. Unless
specified otherwise, this object must conform to the WGS84 standard. Values
must be within normalized ranges.
Corresponds to the JSON property location
239 240 241 |
# File 'lib/google/apis/places_v1/classes.rb', line 239 def location @location end |
#name ⇒ String
Output only. An ID representing this place which may be used to look up this
place again (a.k.a. the API "resource" name: places/).
Corresponds to the JSON property name
245 246 247 |
# File 'lib/google/apis/places_v1/classes.rb', line 245 def name @name end |
#national_phone_number ⇒ String
Output only. A human-readable phone number for the place, in national format.
Corresponds to the JSON property nationalPhoneNumber
250 251 252 |
# File 'lib/google/apis/places_v1/classes.rb', line 250 def national_phone_number @national_phone_number end |
#opening_hours ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHours
Information about business hour of the place.
Corresponds to the JSON property openingHours
255 256 257 |
# File 'lib/google/apis/places_v1/classes.rb', line 255 def opening_hours @opening_hours end |
#plus_code ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1PlacePlusCode
Plus code (http://plus.codes) is a location reference with two formats: global
code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, and
compound code, replacing the prefix with a reference location.
Corresponds to the JSON property plusCode
262 263 264 |
# File 'lib/google/apis/places_v1/classes.rb', line 262 def plus_code @plus_code end |
#price_level ⇒ String
Output only. Price level of the place.
Corresponds to the JSON property priceLevel
267 268 269 |
# File 'lib/google/apis/places_v1/classes.rb', line 267 def price_level @price_level end |
#rating ⇒ Float
Output only. A rating between 1.0 and 5.0, based on user reviews of this place.
Corresponds to the JSON property rating
272 273 274 |
# File 'lib/google/apis/places_v1/classes.rb', line 272 def @rating end |
#reservable ⇒ Boolean Also known as: reservable?
Output only. Specifies if the place supports reservations.
Corresponds to the JSON property reservable
277 278 279 |
# File 'lib/google/apis/places_v1/classes.rb', line 277 def reservable @reservable end |
#reviews ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1Review>
Output only. List of reviews about this place.
Corresponds to the JSON property reviews
283 284 285 |
# File 'lib/google/apis/places_v1/classes.rb', line 283 def reviews @reviews end |
#secondary_opening_hours ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHours>
Output only. Contains an array of entries for information about regular
secondary hours of a business. Secondary hours are different from a business's
main hours. For example, a restaurant can specify drive through hours or
delivery hours as its secondary hours. This field populates the type subfield,
which draws from a predefined list of opening hours types (such as
DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place.
Corresponds to the JSON property secondaryOpeningHours
293 294 295 |
# File 'lib/google/apis/places_v1/classes.rb', line 293 def secondary_opening_hours @secondary_opening_hours end |
#serves_beer ⇒ Boolean Also known as: serves_beer?
Output only. Specifies if the place serves beer.
Corresponds to the JSON property servesBeer
298 299 300 |
# File 'lib/google/apis/places_v1/classes.rb', line 298 def serves_beer @serves_beer end |
#serves_breakfast ⇒ Boolean Also known as: serves_breakfast?
Output only. Specifies if the place serves breakfast.
Corresponds to the JSON property servesBreakfast
304 305 306 |
# File 'lib/google/apis/places_v1/classes.rb', line 304 def serves_breakfast @serves_breakfast end |
#serves_brunch ⇒ Boolean Also known as: serves_brunch?
Output only. Specifies if the place serves brunch.
Corresponds to the JSON property servesBrunch
310 311 312 |
# File 'lib/google/apis/places_v1/classes.rb', line 310 def serves_brunch @serves_brunch end |
#serves_dinner ⇒ Boolean Also known as: serves_dinner?
Output only. Specifies if the place serves dinner.
Corresponds to the JSON property servesDinner
316 317 318 |
# File 'lib/google/apis/places_v1/classes.rb', line 316 def serves_dinner @serves_dinner end |
#serves_lunch ⇒ Boolean Also known as: serves_lunch?
Output only. Specifies if the place serves lunch.
Corresponds to the JSON property servesLunch
322 323 324 |
# File 'lib/google/apis/places_v1/classes.rb', line 322 def serves_lunch @serves_lunch end |
#serves_vegetarian_food ⇒ Boolean Also known as: serves_vegetarian_food?
Output only. Specifies if the place serves vegetarian food.
Corresponds to the JSON property servesVegetarianFood
328 329 330 |
# File 'lib/google/apis/places_v1/classes.rb', line 328 def serves_vegetarian_food @serves_vegetarian_food end |
#serves_wine ⇒ Boolean Also known as: serves_wine?
Output only. Specifies if the place serves wine.
Corresponds to the JSON property servesWine
334 335 336 |
# File 'lib/google/apis/places_v1/classes.rb', line 334 def serves_wine @serves_wine end |
#takeout ⇒ Boolean Also known as: takeout?
Output only. Specifies if the business supports takeout.
Corresponds to the JSON property takeout
340 341 342 |
# File 'lib/google/apis/places_v1/classes.rb', line 340 def takeout @takeout end |
#types ⇒ Array<String>
Output only. A set of type tags for this result. For example, "political" and "
locality".
Corresponds to the JSON property types
347 348 349 |
# File 'lib/google/apis/places_v1/classes.rb', line 347 def types @types end |
#user_rating_count ⇒ Fixnum
Output only. The total number of reviews (with or without text) for this place.
Corresponds to the JSON property userRatingCount
352 353 354 |
# File 'lib/google/apis/places_v1/classes.rb', line 352 def @user_rating_count end |
#utc_offset_minutes ⇒ Fixnum
Output only. Number of minutes this place's timezone is currently offset from
UTC. This is expressed in minutes to support timezones that are offset by
fractions of an hour, e.g. X hours and 15 minutes.
Corresponds to the JSON property utcOffsetMinutes
359 360 361 |
# File 'lib/google/apis/places_v1/classes.rb', line 359 def utc_offset_minutes @utc_offset_minutes end |
#viewport ⇒ Google::Apis::PlacesV1::GoogleGeoTypeViewport
A latitude-longitude viewport, represented as two diagonally opposite low
and high points. A viewport is considered a closed region, i.e. it includes
its boundary. The latitude bounds must range between -90 to 90 degrees
inclusive, and the longitude bounds must range between -180 to 180 degrees
inclusive. Various cases include: - If low = high, the viewport consists
of that single point. - If low.longitude > high.longitude, the longitude
range is inverted (the viewport crosses the 180 degree longitude line). - If
low.longitude = -180 degrees and high.longitude = 180 degrees, the viewport
includes all longitudes. - If low.longitude = 180 degrees and high.
longitude = -180 degrees, the longitude range is empty. - If low.latitude >
high.latitude, the latitude range is empty. Both low and high must be
populated, and the represented box cannot be empty (as specified by the
definitions above). An empty viewport will result in an error. For example,
this viewport fully encloses New York City: "low": "latitude": 40.477398, "
longitude": -74.259087 , "high": "latitude": 40.91618, "longitude": -73.
70018
Corresponds to the JSON property viewport
379 380 381 |
# File 'lib/google/apis/places_v1/classes.rb', line 379 def @viewport end |
#website_uri ⇒ String
Output only. The authoritative website for this place, e.g. a business'
homepage. Note that for places that are part of a chain (e.g. an IKEA store),
this will usually be the website for the individual store, not the overall
chain.
Corresponds to the JSON property websiteUri
387 388 389 |
# File 'lib/google/apis/places_v1/classes.rb', line 387 def website_uri @website_uri end |
#wheelchair_accessible_entrance ⇒ Boolean Also known as: wheelchair_accessible_entrance?
Output only. [Deprecated!] Specifies if the place has an entrance that is
wheelchair-accessible.
Corresponds to the JSON property wheelchairAccessibleEntrance
393 394 395 |
# File 'lib/google/apis/places_v1/classes.rb', line 393 def wheelchair_accessible_entrance @wheelchair_accessible_entrance end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 |
# File 'lib/google/apis/places_v1/classes.rb', line 401 def update!(**args) @address_components = args[:address_components] if args.key?(:address_components) @adr_format_address = args[:adr_format_address] if args.key?(:adr_format_address) @attributions = args[:attributions] if args.key?(:attributions) @business_status = args[:business_status] if args.key?(:business_status) @curbside_pickup = args[:curbside_pickup] if args.key?(:curbside_pickup) @current_opening_hours = args[:current_opening_hours] if args.key?(:current_opening_hours) @current_secondary_opening_hours = args[:current_secondary_opening_hours] if args.key?(:current_secondary_opening_hours) @delivery = args[:delivery] if args.key?(:delivery) @dine_in = args[:dine_in] if args.key?(:dine_in) @display_name = args[:display_name] if args.key?(:display_name) @editorial_summary = args[:editorial_summary] if args.key?(:editorial_summary) @formatted_address = args[:formatted_address] if args.key?(:formatted_address) @google_maps_uri = args[:google_maps_uri] if args.key?(:google_maps_uri) @icon_background_color = args[:icon_background_color] if args.key?(:icon_background_color) @icon_mask_base_uri = args[:icon_mask_base_uri] if args.key?(:icon_mask_base_uri) @id = args[:id] if args.key?(:id) @international_phone_number = args[:international_phone_number] if args.key?(:international_phone_number) @location = args[:location] if args.key?(:location) @name = args[:name] if args.key?(:name) @national_phone_number = args[:national_phone_number] if args.key?(:national_phone_number) @opening_hours = args[:opening_hours] if args.key?(:opening_hours) @plus_code = args[:plus_code] if args.key?(:plus_code) @price_level = args[:price_level] if args.key?(:price_level) @rating = args[:rating] if args.key?(:rating) @reservable = args[:reservable] if args.key?(:reservable) @reviews = args[:reviews] if args.key?(:reviews) @secondary_opening_hours = args[:secondary_opening_hours] if args.key?(:secondary_opening_hours) @serves_beer = args[:serves_beer] if args.key?(:serves_beer) @serves_breakfast = args[:serves_breakfast] if args.key?(:serves_breakfast) @serves_brunch = args[:serves_brunch] if args.key?(:serves_brunch) @serves_dinner = args[:serves_dinner] if args.key?(:serves_dinner) @serves_lunch = args[:serves_lunch] if args.key?(:serves_lunch) @serves_vegetarian_food = args[:serves_vegetarian_food] if args.key?(:serves_vegetarian_food) @serves_wine = args[:serves_wine] if args.key?(:serves_wine) @takeout = args[:takeout] if args.key?(:takeout) @types = args[:types] if args.key?(:types) @user_rating_count = args[:user_rating_count] if args.key?(:user_rating_count) @utc_offset_minutes = args[:utc_offset_minutes] if args.key?(:utc_offset_minutes) @viewport = args[:viewport] if args.key?(:viewport) @website_uri = args[:website_uri] if args.key?(:website_uri) @wheelchair_accessible_entrance = args[:wheelchair_accessible_entrance] if args.key?(:wheelchair_accessible_entrance) end |