Class: Google::Apis::PartnersV2::Location

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/partners_v2/classes.rb,
generated/google/apis/partners_v2/representations.rb,
generated/google/apis/partners_v2/representations.rb

Overview

A location with address and geographic coordinates. May optionally contain a detailed (multi-field) version of the address.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Location

Returns a new instance of Location



1505
1506
1507
# File 'generated/google/apis/partners_v2/classes.rb', line 1505

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

Instance Attribute Details

#addressString

The single string version of the address. Corresponds to the JSON property address

Returns:

  • (String)


1451
1452
1453
# File 'generated/google/apis/partners_v2/classes.rb', line 1451

def address
  @address
end

#address_lineArray<String>

The following address lines represent the most specific part of any address. Corresponds to the JSON property addressLine

Returns:

  • (Array<String>)


1457
1458
1459
# File 'generated/google/apis/partners_v2/classes.rb', line 1457

def address_line
  @address_line
end

#administrative_areaString

Top-level administrative subdivision of this country. Corresponds to the JSON property administrativeArea

Returns:

  • (String)


1462
1463
1464
# File 'generated/google/apis/partners_v2/classes.rb', line 1462

def administrative_area
  @administrative_area
end

#dependent_localityString

Dependent locality or sublocality. Used for UK dependent localities, or neighborhoods or boroughs in other locations. Corresponds to the JSON property dependentLocality

Returns:

  • (String)


1468
1469
1470
# File 'generated/google/apis/partners_v2/classes.rb', line 1468

def dependent_locality
  @dependent_locality
end

#language_codeString

Language code of the address. Should be in BCP 47 format. Corresponds to the JSON property languageCode

Returns:

  • (String)


1473
1474
1475
# File 'generated/google/apis/partners_v2/classes.rb', line 1473

def language_code
  @language_code
end

#lat_lngGoogle::Apis::PartnersV2::LatLng

An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. Corresponds to the JSON property latLng



1482
1483
1484
# File 'generated/google/apis/partners_v2/classes.rb', line 1482

def lat_lng
  @lat_lng
end

#localityString

Generally refers to the city/town portion of an address. Corresponds to the JSON property locality

Returns:

  • (String)


1487
1488
1489
# File 'generated/google/apis/partners_v2/classes.rb', line 1487

def locality
  @locality
end

#postal_codeString

Values are frequently alphanumeric. Corresponds to the JSON property postalCode

Returns:

  • (String)


1492
1493
1494
# File 'generated/google/apis/partners_v2/classes.rb', line 1492

def postal_code
  @postal_code
end

#region_codeString

CLDR (Common Locale Data Repository) region code . Corresponds to the JSON property regionCode

Returns:

  • (String)


1497
1498
1499
# File 'generated/google/apis/partners_v2/classes.rb', line 1497

def region_code
  @region_code
end

#sorting_codeString

Use of this code is very country-specific, but will refer to a secondary classification code for sorting mail. Corresponds to the JSON property sortingCode

Returns:

  • (String)


1503
1504
1505
# File 'generated/google/apis/partners_v2/classes.rb', line 1503

def sorting_code
  @sorting_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
# File 'generated/google/apis/partners_v2/classes.rb', line 1510

def update!(**args)
  @address = args[:address] if args.key?(:address)
  @address_line = args[:address_line] if args.key?(:address_line)
  @administrative_area = args[:administrative_area] if args.key?(:administrative_area)
  @dependent_locality = args[:dependent_locality] if args.key?(:dependent_locality)
  @language_code = args[:language_code] if args.key?(:language_code)
  @lat_lng = args[:lat_lng] if args.key?(:lat_lng)
  @locality = args[:locality] if args.key?(:locality)
  @postal_code = args[:postal_code] if args.key?(:postal_code)
  @region_code = args[:region_code] if args.key?(:region_code)
  @sorting_code = args[:sorting_code] if args.key?(:sorting_code)
end