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

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

Overview

Service object: stock.

Constant Summary collapse

PATH =

Path.

"/papi/stock/1.0".freeze
NAMESPACE =

Namespace.

"stoc".freeze
WSDL =

Wsdl.

"v1/stock".freeze

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.



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

def initialize
  super(PATH, NAMESPACE, WSDL)
end

Instance Method Details

#get_stockObject



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

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



21
22
23
# File 'app/services/api/dimass/operations/stock.rb', line 21

def stock_correction
  raise "Not implemented"
end