Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1PlacePlusCode

Inherits:
Object
  • Object
show all
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

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleMapsPlacesV1PlacePlusCode

Returns a new instance of GoogleMapsPlacesV1PlacePlusCode.



2205
2206
2207
# File 'lib/google/apis/places_v1/classes.rb', line 2205

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#compound_codeString

Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing the suffix of the global code and replacing the prefix with a formatted name of a reference entity. Corresponds to the JSON property compoundCode

Returns:

  • (String)


2197
2198
2199
# File 'lib/google/apis/places_v1/classes.rb', line 2197

def compound_code
  @compound_code
end

#global_codeString

Place's global (full) code, such as "9FWM33GV+HQ", representing an 1/8000 by 1/ 8000 degree area (~14 by 14 meters). Corresponds to the JSON property globalCode

Returns:

  • (String)


2203
2204
2205
# File 'lib/google/apis/places_v1/classes.rb', line 2203

def global_code
  @global_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2210
2211
2212
2213
# File 'lib/google/apis/places_v1/classes.rb', line 2210

def update!(**args)
  @compound_code = args[:compound_code] if args.key?(:compound_code)
  @global_code = args[:global_code] if args.key?(:global_code)
end