Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::Name
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::Name
- Defined in:
- lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb
Overview
Name Model.
Instance Attribute Summary collapse
-
#complete_name ⇒ String
TODO: Write general description for this method.
-
#empty ⇒ String
TODO: Write general description for this method.
-
#first_name ⇒ String
TODO: Write general description for this method.
-
#general_suffix ⇒ String
TODO: Write general description for this method.
-
#last_name ⇒ String
TODO: Write general description for this method.
-
#maturity_suffix ⇒ String
TODO: Write general description for this method.
-
#middle_name ⇒ String
TODO: Write general description for this method.
-
#title_of_respect ⇒ 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(complete_name = nil, first_name = nil, middle_name = nil, last_name = nil, general_suffix = nil, maturity_suffix = nil, title_of_respect = nil, empty = nil) ⇒ Name
constructor
A new instance of Name.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(complete_name = nil, first_name = nil, middle_name = nil, last_name = nil, general_suffix = nil, maturity_suffix = nil, title_of_respect = nil, empty = nil) ⇒ Name
Returns a new instance of Name.
69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb', line 69 def initialize(complete_name = nil, first_name = nil, middle_name = nil, last_name = nil, general_suffix = nil, maturity_suffix = nil, title_of_respect = nil, empty = nil) @complete_name = complete_name @first_name = first_name @middle_name = middle_name @last_name = last_name @general_suffix = general_suffix @maturity_suffix = maturity_suffix @title_of_respect = title_of_respect @empty = empty end |
Instance Attribute Details
#complete_name ⇒ String
TODO: Write general description for this method
15 16 17 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb', line 15 def complete_name @complete_name end |
#empty ⇒ String
TODO: Write general description for this method
43 44 45 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb', line 43 def empty @empty end |
#first_name ⇒ String
TODO: Write general description for this method
19 20 21 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb', line 19 def first_name @first_name end |
#general_suffix ⇒ String
TODO: Write general description for this method
31 32 33 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb', line 31 def general_suffix @general_suffix end |
#last_name ⇒ String
TODO: Write general description for this method
27 28 29 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb', line 27 def last_name @last_name end |
#maturity_suffix ⇒ String
TODO: Write general description for this method
35 36 37 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb', line 35 def maturity_suffix @maturity_suffix end |
#middle_name ⇒ String
TODO: Write general description for this method
23 24 25 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb', line 23 def middle_name @middle_name end |
#title_of_respect ⇒ String
TODO: Write general description for this method
39 40 41 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb', line 39 def title_of_respect @title_of_respect end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb', line 83 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. complete_name = hash.key?('completeName') ? hash['completeName'] : nil first_name = hash.key?('firstName') ? hash['firstName'] : nil middle_name = hash.key?('middleName') ? hash['middleName'] : nil last_name = hash.key?('lastName') ? hash['lastName'] : nil general_suffix = hash.key?('generalSuffix') ? hash['generalSuffix'] : nil maturity_suffix = hash.key?('maturitySuffix') ? hash['maturitySuffix'] : nil title_of_respect = hash.key?('titleOfRespect') ? hash['titleOfRespect'] : nil empty = hash.key?('empty') ? hash['empty'] : nil # Create object from extracted values. Name.new(complete_name, first_name, middle_name, last_name, general_suffix, maturity_suffix, title_of_respect, empty) end |
.names ⇒ Object
A mapping from model property names to API property names.
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb', line 46 def self.names @_hash = {} if @_hash.nil? @_hash['complete_name'] = 'completeName' @_hash['first_name'] = 'firstName' @_hash['middle_name'] = 'middleName' @_hash['last_name'] = 'lastName' @_hash['general_suffix'] = 'generalSuffix' @_hash['maturity_suffix'] = 'maturitySuffix' @_hash['title_of_respect'] = 'titleOfRespect' @_hash['empty'] = 'empty' @_hash end |
.nullables ⇒ Object
An array for nullable fields
65 66 67 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb', line 65 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb', line 60 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
119 120 121 122 123 124 125 126 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb', line 119 def inspect class_name = self.class.name.split('::').last "<#{class_name} complete_name: #{@complete_name.inspect}, first_name:"\ " #{@first_name.inspect}, middle_name: #{@middle_name.inspect}, last_name:"\ " #{@last_name.inspect}, general_suffix: #{@general_suffix.inspect}, maturity_suffix:"\ " #{@maturity_suffix.inspect}, title_of_respect: #{@title_of_respect.inspect}, empty:"\ " #{@empty.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
110 111 112 113 114 115 116 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/name.rb', line 110 def to_s class_name = self.class.name.split('::').last "<#{class_name} complete_name: #{@complete_name}, first_name: #{@first_name}, middle_name:"\ " #{@middle_name}, last_name: #{@last_name}, general_suffix: #{@general_suffix},"\ " maturity_suffix: #{@maturity_suffix}, title_of_respect: #{@title_of_respect}, empty:"\ " #{@empty}>" end |