Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::SuccessfulOperation11

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

Overview

SuccessfulOperation11 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(status = nil, payload = nil, total_items = nil, limit = nil, next_cursor = nil) ⇒ SuccessfulOperation11

Returns a new instance of SuccessfulOperation11.



54
55
56
57
58
59
60
61
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/successful_operation11.rb', line 54

def initialize(status = nil, payload = nil, total_items = nil, limit = nil,
               next_cursor = nil)
  @status = status
  @payload = payload
  @total_items = total_items
  @limit = limit
  @next_cursor = next_cursor
end

Instance Attribute Details

#limitString

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

def limit
  @limit
end

#next_cursorString

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/successful_operation11.rb', line 31

def next_cursor
  @next_cursor
end

#payloadArray[Payload1]

TODO: Write general description for this method

Returns:



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

def payload
  @payload
end

#statusString

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/successful_operation11.rb', line 15

def status
  @status
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_operation11.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.



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/successful_operation11.rb', line 64

def self.from_hash(hash)
  return nil unless hash

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

  payload = nil unless hash.key?('payload')
  total_items = hash.key?('totalItems') ? hash['totalItems'] : nil
  limit = hash.key?('limit') ? hash['limit'] : nil
  next_cursor = hash.key?('nextCursor') ? hash['nextCursor'] : nil

  # Create object from extracted values.
  SuccessfulOperation11.new(status,
                            payload,
                            total_items,
                            limit,
                            next_cursor)
end

.namesObject

A mapping from model property names to API property names.



34
35
36
37
38
39
40
41
42
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/successful_operation11.rb', line 34

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['status'] = 'status'
  @_hash['payload'] = 'payload'
  @_hash['total_items'] = 'totalItems'
  @_hash['limit'] = 'limit'
  @_hash['next_cursor'] = 'nextCursor'
  @_hash
end

.nullablesObject

An array for nullable fields



50
51
52
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/successful_operation11.rb', line 50

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



99
100
101
102
103
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/successful_operation11.rb', line 99

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

#to_sObject

Provides a human-readable string representation of the object.



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

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