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
201 202 203 |
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 201 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
145 146 147 |
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 145 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
163 164 165 |
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 163 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
169 170 171 |
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 169 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
179 180 181 |
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 179 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
186 187 188 |
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 186 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
199 200 201 |
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 199 def sub_locality @sub_locality end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
206 207 208 209 210 211 212 213 |
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 206 def update!(**args) @address_lines = args[:address_lines] if args.key?(:address_lines) @administrative_area = args[:administrative_area] if args.key?(:administrative_area) @country = args[:country] if args.key?(:country) @locality = args[:locality] if args.key?(:locality) @postal_code = args[:postal_code] if args.key?(:postal_code) @sub_locality = args[:sub_locality] if args.key?(:sub_locality) end |