Class: Raas::FullNameEmailModel
- Defined in:
- lib/raas/models/full_name_email_model.rb
Overview
Represents a full name and an email address
Instance Attribute Summary collapse
-
#email_address ⇒ String
The email address.
-
#full_name ⇒ String
The full name.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
Instance Method Summary collapse
-
#initialize(full_name = nil, email_address = nil) ⇒ FullNameEmailModel
constructor
A new instance of FullNameEmailModel.
Methods inherited from BaseModel
Constructor Details
#initialize(full_name = nil, email_address = nil) ⇒ FullNameEmailModel
Returns a new instance of FullNameEmailModel.
23 24 25 26 27 |
# File 'lib/raas/models/full_name_email_model.rb', line 23 def initialize(full_name = nil, email_address = nil) @full_name = full_name @email_address = email_address end |
Instance Attribute Details
#email_address ⇒ String
The email address
13 14 15 |
# File 'lib/raas/models/full_name_email_model.rb', line 13 def email_address @email_address end |
#full_name ⇒ String
The full name
9 10 11 |
# File 'lib/raas/models/full_name_email_model.rb', line 9 def full_name @full_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/raas/models/full_name_email_model.rb', line 30 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. full_name = hash['fullName'] email_address = hash['emailAddress'] # Create object from extracted values. FullNameEmailModel.new(full_name, email_address) end |
.names ⇒ Object
A mapping from model property names to API property names.
16 17 18 19 20 21 |
# File 'lib/raas/models/full_name_email_model.rb', line 16 def self.names @_hash = {} if @_hash.nil? @_hash['full_name'] = 'fullName' @_hash['email_address'] = 'emailAddress' @_hash end |