Class: Google::Apis::MybusinessV3::Address
- Inherits:
-
Object
- Object
- Google::Apis::MybusinessV3::Address
- 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
-
#address_lines ⇒ Array<String>
The precise address information for the business below the sub-locality level.
-
#administrative_area ⇒ String
The state or province where the business is located.
-
#country ⇒ String
The ISO 3166-1 alpha-2 country code where the business is located.
-
#locality ⇒ String
The city or town where the business is located.
-
#postal_code ⇒ String
The postal code of the business.
-
#sub_locality ⇒ String
The suburb where the business is located.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Address
constructor
A new instance of Address.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
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_lines ⇒ Array<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
503 504 505 |
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 503 def address_lines @address_lines end |
#administrative_area ⇒ String
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
544 545 546 |
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 544 def administrative_area @administrative_area end |
#country ⇒ String
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
550 551 552 |
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 550 def country @country end |
#locality ⇒ String
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
526 527 528 |
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 526 def locality @locality end |
#postal_code ⇒ String
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
557 558 559 |
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 557 def postal_code @postal_code end |
#sub_locality ⇒ String
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
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 |