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

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

Overview

A contributor of information to new FamilySearch.

Direct Known Subclasses

User

Instance Attribute Summary collapse

Attributes inherited from Contact

#address, #cisId, #contactName, #email, #fullName, #id, #phone, #requestedId

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Contact

#to_json

Instance Attribute Details

#aliasesObject

The user aliases.



7373
7374
7375
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 7373

def aliases
  @aliases
end

#versionObject

the contributor version.



7371
7372
7373
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 7371

def version
  @version
end

Class Method Details

.from_json(o) ⇒ Object

constructs a Contributor from a (parsed) JSON hash



7399
7400
7401
7402
7403
7404
7405
7406
7407
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 7399

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 Contributor with a json hash



7388
7389
7390
7391
7392
7393
7394
7395
7396
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 7388

def init_jaxb_json_hash(_o)
  super _o
  @version = String.from_json(_o['version']) unless _o['version'].nil?
  if !_o['aliases'].nil?
    @aliases = Array.new
    _oa = _o['aliases']
    _oa.each { | _item | @aliases.push Org::Familysearch::Ws::Familytree::V2::Schema::ContributorAlias.from_json(_item) }
  end
end

#to_jaxb_json_hashObject

the json hash for this Contributor



7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
# File 'lib/ruby-fs-stack/enunciate/familytree.rb', line 7376

def to_jaxb_json_hash
  _h = super
  _h['version'] = version.to_jaxb_json_hash unless version.nil?
  if !aliases.nil?
    _ha = Array.new
    aliases.each { | _item | _ha.push _item.to_jaxb_json_hash }
    _h['aliases'] = _ha
  end
  return _h
end