Class: PixiClient::Requests::GetChangedItemStock

Inherits:
Base
  • Object
show all
Defined in:
lib/pixi_client/requests/get_changed_item_stock.rb

Constant Summary

Constants inherited from Base

Base::FIVE_MINUTES, Base::TIME_STRING_FORMAT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#call

Constructor Details

#initialize(opts) ⇒ GetChangedItemStock

Returns a new instance of GetChangedItemStock.



7
8
9
10
11
12
# File 'lib/pixi_client/requests/get_changed_item_stock.rb', line 7

def initialize(opts)
  self.since = opts[:since]
  self.row_count = opts[:row_count]
  self.offset = opts[:offset]
  self.location_id = opts[:location_id]
end

Instance Attribute Details

#location_idObject

Returns the value of attribute location_id.



5
6
7
# File 'lib/pixi_client/requests/get_changed_item_stock.rb', line 5

def location_id
  @location_id
end

#offsetObject

Returns the value of attribute offset.



5
6
7
# File 'lib/pixi_client/requests/get_changed_item_stock.rb', line 5

def offset
  @offset
end

#row_countObject

Returns the value of attribute row_count.



5
6
7
# File 'lib/pixi_client/requests/get_changed_item_stock.rb', line 5

def row_count
  @row_count
end

#sinceObject

Returns the value of attribute since.



5
6
7
# File 'lib/pixi_client/requests/get_changed_item_stock.rb', line 5

def since
  @since
end

Instance Method Details

#api_methodObject



14
15
16
# File 'lib/pixi_client/requests/get_changed_item_stock.rb', line 14

def api_method
  :pixi_get_changed_item_stock
end

#messageObject



18
19
20
21
22
23
24
# File 'lib/pixi_client/requests/get_changed_item_stock.rb', line 18

def message
  { 'Since' => since.strftime(TIME_STRING_FORMAT) }.tap do |opts|
    opts['RowCount'] = row_count unless row_count.nil?
    opts['LocID'] = location_id unless location_id.nil?
    opts['Start'] = offset unless offset.nil?
  end
end