Class: Google::Apis::AddressvalidationV1::GoogleMapsAddressvalidationV1PlusCode

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/addressvalidation_v1/classes.rb,
lib/google/apis/addressvalidation_v1/representations.rb,
lib/google/apis/addressvalidation_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) ⇒ GoogleMapsAddressvalidationV1PlusCode

Returns a new instance of GoogleMapsAddressvalidationV1PlusCode.



412
413
414
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 412

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)


404
405
406
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 404

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)


410
411
412
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 410

def global_code
  @global_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



417
418
419
420
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 417

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