Class: Org::Familysearch::Ws::Familytree::V2::Schema::Contact

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-fs-stack/enunciate/familytree.rb

Overview

A contributor of information to new FamilySearch.

Direct Known Subclasses

Contributor

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addressObject

The address number of the user.



346
347
348
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 346

def address
  @address
end

#cisIdObject

The id of the CIS user.



338
339
340
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 338

def cisId
  @cisId
end

#contactNameObject

The contact name of the user.



340
341
342
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 340

def contactName
  @contactName
end

#emailObject

The email of the user.



344
345
346
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 344

def email
  @email
end

#fullNameObject

The full name of the user.



342
343
344
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 342

def fullName
  @fullName
end

#idObject

The id of the contributor.



334
335
336
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 334

def id
  @id
end

#phoneObject

The phone number of the user.



348
349
350
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 348

def phone
  @phone
end

#requestedIdObject

The requested id of the contributor.



336
337
338
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 336

def requestedId
  @requestedId
end

Class Method Details

.from_json(o) ⇒ Object

constructs a Contact from a (parsed) JSON hash



382
383
384
385
386
387
388
389
390
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 382

def self.from_json(o)
  if o.nil?
    return nil
  else
    inst = new
    inst.init_jaxb_json_hash o
    return inst
  end
end

Instance Method Details

#init_jaxb_json_hash(_o) ⇒ Object

initializes this Contact with a json hash



370
371
372
373
374
375
376
377
378
379
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 370

def init_jaxb_json_hash(_o)
  @id = String.from_json(_o['id']) unless _o['id'].nil?
  @requestedId = String.from_json(_o['requestedId']) unless _o['requestedId'].nil?
  @cisId = String.from_json(_o['cisId']) unless _o['cisId'].nil?
  @contactName = String.from_json(_o['contactName']) unless _o['contactName'].nil?
  @fullName = String.from_json(_o['fullName']) unless _o['fullName'].nil?
  @email = String.from_json(_o['email']) unless _o['email'].nil?
  @address = Org::Familysearch::Ws::Familytree::V2::Schema::PostalAddress.from_json(_o['address']) unless _o['address'].nil?
  @phone = String.from_json(_o['phone']) unless _o['phone'].nil?
end

#to_jaxb_json_hashObject

the json hash for this Contact



351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 351

def to_jaxb_json_hash
  _h = {}
  _h['id'] = id.to_jaxb_json_hash unless id.nil?
  _h['requestedId'] = requestedId.to_jaxb_json_hash unless requestedId.nil?
  _h['cisId'] = cisId.to_jaxb_json_hash unless cisId.nil?
  _h['contactName'] = contactName.to_jaxb_json_hash unless contactName.nil?
  _h['fullName'] = fullName.to_jaxb_json_hash unless fullName.nil?
  _h['email'] = email.to_jaxb_json_hash unless email.nil?
  _h['address'] = address.to_jaxb_json_hash unless address.nil?
  _h['phone'] = phone.to_jaxb_json_hash unless phone.nil?
  return _h
end

#to_jsonObject

the json (string form) for this Contact



365
366
367
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 365

def to_json
  to_jaxb_json_hash.to_json
end