Class: Verizon::M5gBiCustomerName
- Defined in:
- lib/verizon/models/m_5g_bi_customer_name.rb
Overview
M5gBiCustomerName Model.
Instance Attribute Summary collapse
-
#first_name ⇒ String
TODO: Write general description for this method.
-
#last_name ⇒ String
TODO: Write general description for this method.
-
#middle_name ⇒ String
TODO: Write general description for this method.
-
#suffex ⇒ String
TODO: Write general description for this method.
-
#title ⇒ String
TODO: Write general description for this method.
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.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(first_name = SKIP, last_name = SKIP, middle_name = SKIP, title = SKIP, suffex = SKIP) ⇒ M5gBiCustomerName
constructor
A new instance of M5gBiCustomerName.
Methods inherited from BaseModel
Constructor Details
#initialize(first_name = SKIP, last_name = SKIP, middle_name = SKIP, title = SKIP, suffex = SKIP) ⇒ M5gBiCustomerName
Returns a new instance of M5gBiCustomerName.
59 60 61 62 63 64 65 66 |
# File 'lib/verizon/models/m_5g_bi_customer_name.rb', line 59 def initialize(first_name = SKIP, last_name = SKIP, middle_name = SKIP, title = SKIP, suffex = SKIP) @first_name = first_name unless first_name == SKIP @last_name = last_name unless last_name == SKIP @middle_name = middle_name unless middle_name == SKIP @title = title unless title == SKIP @suffex = suffex unless suffex == SKIP end |
Instance Attribute Details
#first_name ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/verizon/models/m_5g_bi_customer_name.rb', line 14 def first_name @first_name end |
#last_name ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/verizon/models/m_5g_bi_customer_name.rb', line 18 def last_name @last_name end |
#middle_name ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/verizon/models/m_5g_bi_customer_name.rb', line 22 def middle_name @middle_name end |
#suffex ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/verizon/models/m_5g_bi_customer_name.rb', line 30 def suffex @suffex end |
#title ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/verizon/models/m_5g_bi_customer_name.rb', line 26 def title @title end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/verizon/models/m_5g_bi_customer_name.rb', line 69 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. first_name = hash.key?('firstName') ? hash['firstName'] : SKIP last_name = hash.key?('lastName') ? hash['lastName'] : SKIP middle_name = hash.key?('middleName') ? hash['middleName'] : SKIP title = hash.key?('title') ? hash['title'] : SKIP suffex = hash.key?('suffex') ? hash['suffex'] : SKIP # Create object from extracted values. M5gBiCustomerName.new(first_name, last_name, middle_name, title, suffex) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/verizon/models/m_5g_bi_customer_name.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['first_name'] = 'firstName' @_hash['last_name'] = 'lastName' @_hash['middle_name'] = 'middleName' @_hash['title'] = 'title' @_hash['suffex'] = 'suffex' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/verizon/models/m_5g_bi_customer_name.rb', line 55 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 51 52 |
# File 'lib/verizon/models/m_5g_bi_customer_name.rb', line 44 def self.optionals %w[ first_name last_name middle_name title suffex ] end |