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

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

Overview

A person's phone number.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PhoneNumber

Returns a new instance of PhoneNumber.



2259
2260
2261
# File 'lib/google/apis/people_v1/classes.rb', line 2259

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

Instance Attribute Details

#canonical_formString

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

Returns:

  • (String)


2233
2234
2235
# File 'lib/google/apis/people_v1/classes.rb', line 2233

def canonical_form
  @canonical_form
end

#formatted_typeString

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

Returns:

  • (String)


2239
2240
2241
# File 'lib/google/apis/people_v1/classes.rb', line 2239

def formatted_type
  @formatted_type
end

#metadataGoogle::Apis::PeopleV1::FieldMetadata

Metadata about a field. Corresponds to the JSON property metadata



2244
2245
2246
# File 'lib/google/apis/people_v1/classes.rb', line 2244

def 
  @metadata
end

#typeString

The type of the phone number. The type can be custom or one of these predefined values: * home * work * mobile * homeFax * workFax * otherFax * pager * workMobile * workPager * main * googleVoice * other Corresponds to the JSON property type

Returns:

  • (String)


2252
2253
2254
# File 'lib/google/apis/people_v1/classes.rb', line 2252

def type
  @type
end

#valueString

The phone number. Corresponds to the JSON property value

Returns:

  • (String)


2257
2258
2259
# File 'lib/google/apis/people_v1/classes.rb', line 2257

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2264
2265
2266
2267
2268
2269
2270
# File 'lib/google/apis/people_v1/classes.rb', line 2264

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