Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::GetPricingInsightsRequest

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

Overview

GetPricingInsightsRequest 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(filter = nil, search_criteria = nil, sort = nil, page_number = nil) ⇒ GetPricingInsightsRequest

Returns a new instance of GetPricingInsightsRequest.



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

def initialize(filter = nil, search_criteria = nil, sort = nil,
               page_number = nil)
  @filter = filter
  @search_criteria = search_criteria
  @sort = sort
  @page_number = page_number
end

Instance Attribute Details

#filterArray[Filter1]

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

def filter
  @filter
end

#page_numberInteger

TODO: Write general description for this method

Returns:

  • (Integer)


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

def page_number
  @page_number
end

#search_criteriaSearchCriteria

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/get_pricing_insights_request.rb', line 19

def search_criteria
  @search_criteria
end

#sortSort1

TODO: Write general description for this method

Returns:



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

def sort
  @sort
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
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/get_pricing_insights_request.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
  filter = nil
  unless hash['filter'].nil?
    filter = []
    hash['filter'].each do |structure|
      filter << (Filter1.from_hash(structure) if structure)
    end
  end

  filter = nil unless hash.key?('filter')
  search_criteria = SearchCriteria.from_hash(hash['searchCriteria']) if hash['searchCriteria']
  sort = Sort1.from_hash(hash['sort']) if hash['sort']
  page_number = hash.key?('pageNumber') ? hash['pageNumber'] : nil

  # Create object from extracted values.
  GetPricingInsightsRequest.new(filter,
                                search_criteria,
                                sort,
                                page_number)
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/get_pricing_insights_request.rb', line 30

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['filter'] = 'filter'
  @_hash['search_criteria'] = 'searchCriteria'
  @_hash['sort'] = 'sort'
  @_hash['page_number'] = 'pageNumber'
  @_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/get_pricing_insights_request.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/get_pricing_insights_request.rb', line 40

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



91
92
93
94
95
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/get_pricing_insights_request.rb', line 91

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} filter: #{@filter.inspect}, search_criteria: #{@search_criteria.inspect},"\
  " sort: #{@sort.inspect}, page_number: #{@page_number.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



84
85
86
87
88
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/models/get_pricing_insights_request.rb', line 84

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} filter: #{@filter}, search_criteria: #{@search_criteria}, sort: #{@sort},"\
  " page_number: #{@page_number}>"
end