Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::BadRequest7

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/inventory_management_and_item_management_and_order_management_and_price_management/models/bad_request7.rb

Overview

BadRequest7 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(code = nil, description = nil, info = nil, severity = nil, category = nil, causes = nil, error_identifiers = nil) ⇒ BadRequest7

Returns a new instance of BadRequest7.



64
65
66
67
68
69
70
71
72
73
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/bad_request7.rb', line 64

def initialize(code = nil, description = nil, info = nil, severity = nil,
               category = nil, causes = nil, error_identifiers = nil)
  @code = code
  @description = description
  @info = info
  @severity = severity
  @category = category
  @causes = causes
  @error_identifiers = error_identifiers
end

Instance Attribute Details

#categoryString

TODO: Write general description for this method

Returns:

  • (String)


31
32
33
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/bad_request7.rb', line 31

def category
  @category
end

#causesArray[String]

TODO: Write general description for this method

Returns:

  • (Array[String])


35
36
37
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/bad_request7.rb', line 35

def causes
  @causes
end

#codeString

TODO: Write general description for this method

Returns:

  • (String)


15
16
17
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/bad_request7.rb', line 15

def code
  @code
end

#descriptionString

TODO: Write general description for this method

Returns:

  • (String)


19
20
21
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/bad_request7.rb', line 19

def description
  @description
end

#error_identifiersObject

TODO: Write general description for this method

Returns:

  • (Object)


39
40
41
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/bad_request7.rb', line 39

def error_identifiers
  @error_identifiers
end

#infoString

TODO: Write general description for this method

Returns:

  • (String)


23
24
25
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/bad_request7.rb', line 23

def info
  @info
end

#severityString

TODO: Write general description for this method

Returns:

  • (String)


27
28
29
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/bad_request7.rb', line 27

def severity
  @severity
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/bad_request7.rb', line 76

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  code = hash.key?('code') ? hash['code'] : nil
  description = hash.key?('description') ? hash['description'] : nil
  info = hash.key?('info') ? hash['info'] : nil
  severity = hash.key?('severity') ? hash['severity'] : nil
  category = hash.key?('category') ? hash['category'] : nil
  causes = hash.key?('causes') ? hash['causes'] : nil
  error_identifiers =
    hash.key?('errorIdentifiers') ? hash['errorIdentifiers'] : nil

  # Create object from extracted values.
  BadRequest7.new(code,
                  description,
                  info,
                  severity,
                  category,
                  causes,
                  error_identifiers)
end

.namesObject

A mapping from model property names to API property names.



42
43
44
45
46
47
48
49
50
51
52
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/bad_request7.rb', line 42

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['code'] = 'code'
  @_hash['description'] = 'description'
  @_hash['info'] = 'info'
  @_hash['severity'] = 'severity'
  @_hash['category'] = 'category'
  @_hash['causes'] = 'causes'
  @_hash['error_identifiers'] = 'errorIdentifiers'
  @_hash
end

.nullablesObject

An array for nullable fields



60
61
62
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/bad_request7.rb', line 60

def self.nullables
  []
end

.optionalsObject

An array for optional fields



55
56
57
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/bad_request7.rb', line 55

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



108
109
110
111
112
113
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/bad_request7.rb', line 108

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} code: #{@code.inspect}, description: #{@description.inspect}, info:"\
  " #{@info.inspect}, severity: #{@severity.inspect}, category: #{@category.inspect}, causes:"\
  " #{@causes.inspect}, error_identifiers: #{@error_identifiers.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



100
101
102
103
104
105
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/bad_request7.rb', line 100

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} code: #{@code}, description: #{@description}, info: #{@info}, severity:"\
  " #{@severity}, category: #{@category}, causes: #{@causes}, error_identifiers:"\
  " #{@error_identifiers}>"
end