Class: Google::Apis::MerchantapiAccountsV1beta::Address

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

Overview

Shipping address of the warehouse.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Address

Returns a new instance of Address.



298
299
300
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 298

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)


274
275
276
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 274

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)


280
281
282
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 280

def city
  @city
end

#postal_codeString

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

Returns:

  • (String)


285
286
287
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 285

def postal_code
  @postal_code
end

#region_codeString

Required. CLDR country code (For example "US"). Corresponds to the JSON property regionCode

Returns:

  • (String)


291
292
293
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 291

def region_code
  @region_code
end

#street_addressString

Street-level part of the address. For example: 111w 31st Street. Corresponds to the JSON property streetAddress

Returns:

  • (String)


296
297
298
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 296

def street_address
  @street_address
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



303
304
305
306
307
308
309
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 303

def update!(**args)
  @administrative_area = args[:administrative_area] if args.key?(:administrative_area)
  @city = args[:city] if args.key?(:city)
  @postal_code = args[:postal_code] if args.key?(:postal_code)
  @region_code = args[:region_code] if args.key?(:region_code)
  @street_address = args[:street_address] if args.key?(:street_address)
end