Class: Google::Apis::ContentV2::OrderAddress

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/content_v2/classes.rb,
generated/google/apis/content_v2/representations.rb,
generated/google/apis/content_v2/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ OrderAddress

Returns a new instance of OrderAddress.


2912
2913
2914
# File 'generated/google/apis/content_v2/classes.rb', line 2912

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

Instance Attribute Details

#countryString

CLDR country code (e.g. "US"). Corresponds to the JSON property country

Returns:

  • (String)

2868
2869
2870
# File 'generated/google/apis/content_v2/classes.rb', line 2868

def country
  @country
end

#full_addressArray<String>

Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States Corresponds to the JSON property fullAddress

Returns:

  • (Array<String>)

2878
2879
2880
# File 'generated/google/apis/content_v2/classes.rb', line 2878

def full_address
  @full_address
end

#is_post_office_boxBoolean Also known as: is_post_office_box?

Whether the address is a post office box. Corresponds to the JSON property isPostOfficeBox

Returns:

  • (Boolean)

2883
2884
2885
# File 'generated/google/apis/content_v2/classes.rb', line 2883

def is_post_office_box
  @is_post_office_box
end

#localityString

City, town or commune. May also include dependent localities or sublocalities ( e.g. neighborhoods or suburbs). Corresponds to the JSON property locality

Returns:

  • (String)

2890
2891
2892
# File 'generated/google/apis/content_v2/classes.rb', line 2890

def locality
  @locality
end

#postal_codeString

Postal Code or ZIP (e.g. "94043"). Corresponds to the JSON property postalCode

Returns:

  • (String)

2895
2896
2897
# File 'generated/google/apis/content_v2/classes.rb', line 2895

def postal_code
  @postal_code
end

#recipient_nameString

Name of the recipient. Corresponds to the JSON property recipientName

Returns:

  • (String)

2900
2901
2902
# File 'generated/google/apis/content_v2/classes.rb', line 2900

def recipient_name
  @recipient_name
end

#regionString

Top-level administrative subdivision of the country (e.g. "CA"). Corresponds to the JSON property region

Returns:

  • (String)

2905
2906
2907
# File 'generated/google/apis/content_v2/classes.rb', line 2905

def region
  @region
end

#street_addressArray<String>

Street-level part of the address. Corresponds to the JSON property streetAddress

Returns:

  • (Array<String>)

2910
2911
2912
# File 'generated/google/apis/content_v2/classes.rb', line 2910

def street_address
  @street_address
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
# File 'generated/google/apis/content_v2/classes.rb', line 2917

def update!(**args)
  @country = args[:country] if args.key?(:country)
  @full_address = args[:full_address] if args.key?(:full_address)
  @is_post_office_box = args[:is_post_office_box] if args.key?(:is_post_office_box)
  @locality = args[:locality] if args.key?(:locality)
  @postal_code = args[:postal_code] if args.key?(:postal_code)
  @recipient_name = args[:recipient_name] if args.key?(:recipient_name)
  @region = args[:region] if args.key?(:region)
  @street_address = args[:street_address] if args.key?(:street_address)
end