Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::SuccessfulOperation9

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

Overview

SuccessfulOperation9 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(item_response = nil, additional_attributes = nil, total_items = nil, next_cursor = nil) ⇒ SuccessfulOperation9

Returns a new instance of SuccessfulOperation9.



49
50
51
52
53
54
55
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/successful_operation9.rb', line 49

def initialize(item_response = nil, additional_attributes = nil,
               total_items = nil, next_cursor = nil)
  @item_response = item_response
  @additional_attributes = additional_attributes
  @total_items = total_items
  @next_cursor = next_cursor
end

Instance Attribute Details

#additional_attributesAdditionalAttributes

TODO: Write general description for this method



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

def additional_attributes
  @additional_attributes
end

#item_responseArray[ItemResponse]

TODO: Write general description for this method

Returns:



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

def item_response
  @item_response
end

#next_cursorString

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/successful_operation9.rb', line 27

def next_cursor
  @next_cursor
end

#total_itemsString

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/successful_operation9.rb', line 23

def total_items
  @total_items
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/successful_operation9.rb', line 58

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  # Parameter is an array, so we need to iterate through it
  item_response = nil
  unless hash['ItemResponse'].nil?
    item_response = []
    hash['ItemResponse'].each do |structure|
      item_response << (ItemResponse.from_hash(structure) if structure)
    end
  end

  item_response = nil unless hash.key?('ItemResponse')
  additional_attributes = AdditionalAttributes.from_hash(hash['additionalAttributes']) if
    hash['additionalAttributes']
  total_items = hash.key?('totalItems') ? hash['totalItems'] : nil
  next_cursor = hash.key?('nextCursor') ? hash['nextCursor'] : nil

  # Create object from extracted values.
  SuccessfulOperation9.new(item_response,
                           additional_attributes,
                           total_items,
                           next_cursor)
end

.namesObject

A mapping from model property names to API property names.



30
31
32
33
34
35
36
37
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/successful_operation9.rb', line 30

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['item_response'] = 'ItemResponse'
  @_hash['additional_attributes'] = 'additionalAttributes'
  @_hash['total_items'] = 'totalItems'
  @_hash['next_cursor'] = 'nextCursor'
  @_hash
end

.nullablesObject

An array for nullable fields



45
46
47
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/successful_operation9.rb', line 45

def self.nullables
  []
end

.optionalsObject

An array for optional fields



40
41
42
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/successful_operation9.rb', line 40

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



92
93
94
95
96
97
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/successful_operation9.rb', line 92

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} item_response: #{@item_response.inspect}, additional_attributes:"\
  " #{@additional_attributes.inspect}, total_items: #{@total_items.inspect}, next_cursor:"\
  " #{@next_cursor.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



85
86
87
88
89
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/successful_operation9.rb', line 85

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} item_response: #{@item_response}, additional_attributes:"\
  " #{@additional_attributes}, total_items: #{@total_items}, next_cursor: #{@next_cursor}>"
end