Class: Google::Apis::ContentV2_1::Address

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Address

Returns a new instance of Address.



2338
2339
2340
# File 'lib/google/apis/content_v2_1/classes.rb', line 2338

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

Instance Attribute Details

#administrative_areaString

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

Returns:

  • (String)


2314
2315
2316
# File 'lib/google/apis/content_v2_1/classes.rb', line 2314

def administrative_area
  @administrative_area
end

#cityString

Required. City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs). Corresponds to the JSON property city

Returns:

  • (String)


2320
2321
2322
# File 'lib/google/apis/content_v2_1/classes.rb', line 2320

def city
  @city
end

#countryString

Required. CLDR country code (for example, "US"). Corresponds to the JSON property country

Returns:

  • (String)


2326
2327
2328
# File 'lib/google/apis/content_v2_1/classes.rb', line 2326

def country
  @country
end

#postal_codeString

Required. Postal code or ZIP (for example, "94043"). Corresponds to the JSON property postalCode

Returns:

  • (String)


2331
2332
2333
# File 'lib/google/apis/content_v2_1/classes.rb', line 2331

def postal_code
  @postal_code
end

#street_addressString

Street-level part of the address. Use \n to add a second line. Corresponds to the JSON property streetAddress

Returns:

  • (String)


2336
2337
2338
# File 'lib/google/apis/content_v2_1/classes.rb', line 2336

def street_address
  @street_address
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2343
2344
2345
2346
2347
2348
2349
# File 'lib/google/apis/content_v2_1/classes.rb', line 2343

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