Class: Api::Dimass::Operations::Stock

Inherits:
Base
  • Object
show all
Defined in:
app/services/api/dimass/operations/stock.rb

Constant Summary collapse

PATH =
"/papi/stock/1.0"
NAMESPACE =
"stoc"
WSDL =
"v1/stock"

Instance Attribute Summary

Attributes inherited from Base

#api_key, #api_secret, #api_url, #endpoint_url, #namespace, #wsdl, #wsdl_content

Instance Method Summary collapse

Methods inherited from Base

#authenticated_endpoint_url, #client, #nonce, #operations, #refresh_wsdl, #retrieve_wsdl_content, #signature_params, #timestamp, #wsdl_local_path

Constructor Details

#initializeStock

Returns a new instance of Stock.



7
8
9
# File 'app/services/api/dimass/operations/stock.rb', line 7

def initialize
  super(PATH, NAMESPACE, WSDL)
end

Instance Method Details

#get_stockObject



11
12
13
14
# File 'app/services/api/dimass/operations/stock.rb', line 11

def get_stock
  response = client.call(:get_stock, message: { since: nil }) # Passing a message is important or dimass's soap interface will break
  response.body[:get_stock_response]
end

#stock_correctionObject



16
17
18
# File 'app/services/api/dimass/operations/stock.rb', line 16

def stock_correction
  raise "Not implemented"
end