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



1775
1776
1777
# File 'generated/google/apis/people_v1/classes.rb', line 1775

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

Instance Attribute Details

#cityString

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

Returns:

  • (String)


1717
1718
1719
# File 'generated/google/apis/people_v1/classes.rb', line 1717

def city
  @city
end

#countryString

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

Returns:

  • (String)


1728
1729
1730
# File 'generated/google/apis/people_v1/classes.rb', line 1728

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)


1773
1774
1775
# File 'generated/google/apis/people_v1/classes.rb', line 1773

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)


1742
1743
1744
# File 'generated/google/apis/people_v1/classes.rb', line 1742

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)


1712
1713
1714
# File 'generated/google/apis/people_v1/classes.rb', line 1712

def formatted_type
  @formatted_type
end

#formatted_valueString

The unstructured value of the address. If this is not set by the user it will be automatically constructed from structured values. Corresponds to the JSON property formattedValue

Returns:

  • (String)


1723
1724
1725
# File 'generated/google/apis/people_v1/classes.rb', line 1723

def formatted_value
  @formatted_value
end

#metadataGoogle::Apis::PeopleV1::FieldMetadata

Metadata about a field. Corresponds to the JSON property metadata



1767
1768
1769
# File 'generated/google/apis/people_v1/classes.rb', line 1767

def 
  @metadata
end

#po_boxString

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

Returns:

  • (String)


1747
1748
1749
# File 'generated/google/apis/people_v1/classes.rb', line 1747

def po_box
  @po_box
end

#postal_codeString

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

Returns:

  • (String)


1752
1753
1754
# File 'generated/google/apis/people_v1/classes.rb', line 1752

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)


1757
1758
1759
# File 'generated/google/apis/people_v1/classes.rb', line 1757

def region
  @region
end

#street_addressString

The street address. Corresponds to the JSON property streetAddress

Returns:

  • (String)


1762
1763
1764
# File 'generated/google/apis/people_v1/classes.rb', line 1762

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)


1737
1738
1739
# File 'generated/google/apis/people_v1/classes.rb', line 1737

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
# File 'generated/google/apis/people_v1/classes.rb', line 1780

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