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.



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

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)


401
402
403
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 401

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)


407
408
409
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 407

def global_code
  @global_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



414
415
416
417
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 414

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