Class: Google::Apis::PeopleV1::Address

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

Overview

A person's physical address. May be a P.O. box or street address. All fields are optional.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Address

Returns a new instance of Address.



748
749
750
# File 'generated/google/apis/people_v1/classes.rb', line 748

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

Instance Attribute Details

#cityString

The city of the address. Corresponds to the JSON property city

Returns:

  • (String)


725
726
727
# File 'generated/google/apis/people_v1/classes.rb', line 725

def city
  @city
end

#countryString

The country of the address. Corresponds to the JSON property country

Returns:

  • (String)


740
741
742
# File 'generated/google/apis/people_v1/classes.rb', line 740

def country
  @country
end

#country_codeString

The ISO 3166-1 alpha-2 country code of the address. Corresponds to the JSON property countryCode

Returns:

  • (String)


746
747
748
# File 'generated/google/apis/people_v1/classes.rb', line 746

def country_code
  @country_code
end

#extended_addressString

The extended address of the address; for example, the apartment number. Corresponds to the JSON property extendedAddress

Returns:

  • (String)


720
721
722
# File 'generated/google/apis/people_v1/classes.rb', line 720

def extended_address
  @extended_address
end

#formatted_typeString

The read-only type of the address translated and formatted in the viewer's account locale or the Accept-Language HTTP header locale. Corresponds to the JSON property formattedType

Returns:

  • (String)


705
706
707
# File 'generated/google/apis/people_v1/classes.rb', line 705

def formatted_type
  @formatted_type
end

#formatted_valueString

The read-only value of the address formatted in the viewer's account locale or the Accept-Language HTTP header locale. Corresponds to the JSON property formattedValue

Returns:

  • (String)


693
694
695
# File 'generated/google/apis/people_v1/classes.rb', line 693

def formatted_value
  @formatted_value
end

#metadataGoogle::Apis::PeopleV1::FieldMetadata

Metadata about a field. Corresponds to the JSON property metadata



687
688
689
# File 'generated/google/apis/people_v1/classes.rb', line 687

def 
  @metadata
end

#po_boxString

The P.O. box of the address. Corresponds to the JSON property poBox

Returns:

  • (String)


710
711
712
# File 'generated/google/apis/people_v1/classes.rb', line 710

def po_box
  @po_box
end

#postal_codeString

The postal code of the address. Corresponds to the JSON property postalCode

Returns:

  • (String)


735
736
737
# File 'generated/google/apis/people_v1/classes.rb', line 735

def postal_code
  @postal_code
end

#regionString

The region of the address; for example, the state or province. Corresponds to the JSON property region

Returns:

  • (String)


730
731
732
# File 'generated/google/apis/people_v1/classes.rb', line 730

def region
  @region
end

#street_addressString

The street address. Corresponds to the JSON property streetAddress

Returns:

  • (String)


715
716
717
# File 'generated/google/apis/people_v1/classes.rb', line 715

def street_address
  @street_address
end

#typeString

The type of the address. The type can be custom or predefined. Possible values include, but are not limited to, the following: * home * work * other Corresponds to the JSON property type

Returns:

  • (String)


699
700
701
# File 'generated/google/apis/people_v1/classes.rb', line 699

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



753
754
755
756
757
758
759
760
761
762
763
764
765
766
# File 'generated/google/apis/people_v1/classes.rb', line 753

def update!(**args)
  @metadata = args[:metadata] if args.key?(:metadata)
  @formatted_value = args[:formatted_value] if args.key?(:formatted_value)
  @type = args[:type] if args.key?(:type)
  @formatted_type = args[:formatted_type] if args.key?(:formatted_type)
  @po_box = args[:po_box] if args.key?(:po_box)
  @street_address = args[:street_address] if args.key?(:street_address)
  @extended_address = args[:extended_address] if args.key?(:extended_address)
  @city = args[:city] if args.key?(:city)
  @region = args[:region] if args.key?(:region)
  @postal_code = args[:postal_code] if args.key?(:postal_code)
  @country = args[:country] if args.key?(:country)
  @country_code = args[:country_code] if args.key?(:country_code)
end