Class: Google::Apis::PeopleV1::PhoneNumber

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 phone number.

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) ⇒ PhoneNumber

Returns a new instance of PhoneNumber



1383
1384
1385
# File 'generated/google/apis/people_v1/classes.rb', line 1383

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

Instance Attribute Details

#canonical_formString

The read-only canonicalized ITU-T E.164 form of the phone number. Corresponds to the JSON property canonicalForm

Returns:

  • (String)


1381
1382
1383
# File 'generated/google/apis/people_v1/classes.rb', line 1381

def canonical_form
  @canonical_form
end

#formatted_typeString

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

Returns:

  • (String)


1374
1375
1376
# File 'generated/google/apis/people_v1/classes.rb', line 1374

def formatted_type
  @formatted_type
end

#metadataGoogle::Apis::PeopleV1::FieldMetadata

Metadata about a field. Corresponds to the JSON property metadata



1363
1364
1365
# File 'generated/google/apis/people_v1/classes.rb', line 1363

def 
  @metadata
end

#typeString

The type of the phone number. The type can be custom or predefined. Possible values include, but are not limited to, the following:

  • home
  • work
  • mobile
  • homeFax
  • workFax
  • otherFax
  • pager
  • workMobile
  • workPager
  • main
  • googleVoice
  • other Corresponds to the JSON property type

Returns:

  • (String)


1358
1359
1360
# File 'generated/google/apis/people_v1/classes.rb', line 1358

def type
  @type
end

#valueString

The phone number. Corresponds to the JSON property value

Returns:

  • (String)


1368
1369
1370
# File 'generated/google/apis/people_v1/classes.rb', line 1368

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1388
1389
1390
1391
1392
1393
1394
# File 'generated/google/apis/people_v1/classes.rb', line 1388

def update!(**args)
  @type = args[:type] if args.key?(:type)
  @metadata = args[:metadata] if args.key?(:metadata)
  @value = args[:value] if args.key?(:value)
  @formatted_type = args[:formatted_type] if args.key?(:formatted_type)
  @canonical_form = args[:canonical_form] if args.key?(:canonical_form)
end