Class: Google::Apis::MybusinessV3::Address

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

Overview

Represents the physical location of the business. Example addresses: address_lines: "1600 Amphitheatre Parkway" locality: Mountain View administrative_area: CA country: US postal_code: 94043 address_lines: "A-205, Natasha Apartments", "2, Inner Ring Road" sub_locality: Domlur locality: Bangalore administrative_area: Karnataka country: IN postal_code: 560071

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) ⇒ Address

Returns a new instance of Address



559
560
561
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 559

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

Instance Attribute Details

#address_linesArray<String>

The precise address information for the business below the sub-locality level. For most countries, the first line should include a street number and street name. Suite numbers, floors, building numbers, etc., may also be included. Imprecise information like cross-streets and nearby landmarks should only be included in regions where the official street address does not accurately pinpoint the business's location. Maximum 80 characters. Corresponds to the JSON property addressLines

Returns:

  • (Array<String>)


503
504
505
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 503

def address_lines
  @address_lines
end

#administrative_areaString

The state or province where the business is located. Using the common abbreviation is generally preferred, such as CA for California or NSW for New South Wales. Not all countries require this field. Use the address editor in the product to determine whether it is appropriate for an address in a particular country. Also known as: "area" (Hong Kong), "county" (Ireland, Taiwan, United Kingdom), "department" (Colombia, Nicaragua), "district" (Indonesia), "do/si" (South Korea), "emirate" (United Arab Emirates), "island," "oblast" (Russia, Ukraine), "parish," "prefecture" (Japan). Examples: California (United States), Ontario (Canada), Uttar Pradesh (India). Maximum 80 characters. Corresponds to the JSON property administrativeArea

Returns:

  • (String)


544
545
546
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 544

def administrative_area
  @administrative_area
end

#countryString

The ISO 3166-1 alpha-2 country code where the business is located. Once a location is created, the country cannot be changed. Corresponds to the JSON property country

Returns:

  • (String)


550
551
552
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 550

def country
  @country
end

#localityString

The city or town where the business is located. Also known as: "district" (Hong Kong, Turkey), "post town" (United Kingdom). Examples: Chicago (United States), Berlin (Germany), London (United Kingdom). Maximum 80 characters. Corresponds to the JSON property locality

Returns:

  • (String)


526
527
528
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 526

def locality
  @locality
end

#postal_codeString

The postal code of the business. If the postal code begins with zero, make sure that your formatting does not remove the zero as the first digit. Also known as: "zip code" (United States), "PIN code" (India). Corresponds to the JSON property postalCode

Returns:

  • (String)


557
558
559
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 557

def postal_code
  @postal_code
end

#sub_localityString

The suburb where the business is located. This is the division just smaller than a locality (city). Previously referred to in Google My Business Locations as "district". Maximum 80 characters. Also known as: "district" (South Korea), "neighborhood" (Brazil, Mexico), "village / township" (Malaysia). Examples: Manhattan (United States), Centro (Mexico), Songpa District (South Korea.) Corresponds to the JSON property subLocality

Returns:

  • (String)


516
517
518
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 516

def sub_locality
  @sub_locality
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



564
565
566
567
568
569
570
571
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 564

def update!(**args)
  @address_lines = args[:address_lines] if args.key?(:address_lines)
  @sub_locality = args[:sub_locality] if args.key?(:sub_locality)
  @locality = args[:locality] if args.key?(:locality)
  @administrative_area = args[:administrative_area] if args.key?(:administrative_area)
  @country = args[:country] if args.key?(:country)
  @postal_code = args[:postal_code] if args.key?(:postal_code)
end