Class: Google::Apis::ContentV2_1::Address
- Inherits:
-
Object
- Object
- Google::Apis::ContentV2_1::Address
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/content_v2_1/classes.rb,
lib/google/apis/content_v2_1/representations.rb,
lib/google/apis/content_v2_1/representations.rb
Instance Attribute Summary collapse
-
#administrative_area ⇒ String
Required.
-
#city ⇒ String
Required.
-
#country ⇒ String
Required.
-
#postal_code ⇒ String
Required.
-
#street_address ⇒ String
Street-level part of the address.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Address
constructor
A new instance of Address.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Address
Returns a new instance of Address.
2386 2387 2388 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 2386 def initialize(**args) update!(**args) end |
Instance Attribute Details
#administrative_area ⇒ String
Required. Top-level administrative subdivision of the country. For example, a
state like California ("CA") or a province like Quebec ("QC").
Corresponds to the JSON property administrativeArea
2362 2363 2364 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 2362 def administrative_area @administrative_area end |
#city ⇒ String
Required. City, town or commune. May also include dependent localities or
sublocalities (for example, neighborhoods or suburbs).
Corresponds to the JSON property city
2368 2369 2370 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 2368 def city @city end |
#country ⇒ String
Required. CLDR country code (for example, "US").
Corresponds to the JSON property country
2374 2375 2376 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 2374 def country @country end |
#postal_code ⇒ String
Required. Postal code or ZIP (for example, "94043").
Corresponds to the JSON property postalCode
2379 2380 2381 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 2379 def postal_code @postal_code end |
#street_address ⇒ String
Street-level part of the address. Use \n to add a second line.
Corresponds to the JSON property streetAddress
2384 2385 2386 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 2384 def street_address @street_address end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2391 2392 2393 2394 2395 2396 2397 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 2391 def update!(**args) @administrative_area = args[:administrative_area] if args.key?(:administrative_area) @city = args[:city] if args.key?(:city) @country = args[:country] if args.key?(:country) @postal_code = args[:postal_code] if args.key?(:postal_code) @street_address = args[:street_address] if args.key?(:street_address) end |