Class: Org::Familysearch::Ws::Identity::V2a::Schema::Email

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#typeObject

name type.



74
75
76
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 74

def type
  @type
end

#valueObject

name value.



76
77
78
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 76

def value
  @value
end

Class Method Details

.from_json(o) ⇒ Object

constructs a Email from a (parsed) JSON hash



98
99
100
101
102
103
104
105
106
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 98

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



92
93
94
95
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 92

def init_jaxb_json_hash(_o)
  @type = String.from_json(_o['type']) unless _o['type'].nil?
  @value = String.from_json(_o['value']) unless _o['value'].nil?
end

#to_jaxb_json_hashObject

the json hash for this Email



79
80
81
82
83
84
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 79

def to_jaxb_json_hash
  _h = {}
  _h['type'] = type.to_jaxb_json_hash unless type.nil?
  _h['value'] = value.to_jaxb_json_hash unless value.nil?
  return _h
end

#to_jsonObject

the json (string form) for this Email



87
88
89
# File 'lib/ruby-fs-stack/enunciate/identity.rb', line 87

def to_json
  to_jaxb_json_hash.to_json
end