Class: RmsApiRuby::SoapApi::Client

Inherits:
Object
  • Object
show all
Includes:
Waterfall
Defined in:
lib/rms_api_ruby/soap_api/client.rb

Direct Known Subclasses

Inventory::Client, Order::Client

Constant Summary collapse

AUTH_ERRORCODE =
/^E02-00/

Instance Method Summary collapse

Constructor Details

#initialize(operation, args) ⇒ Client

Returns a new instance of Client.



11
12
13
14
# File 'lib/rms_api_ruby/soap_api/client.rb', line 11

def initialize(operation, args)
  @operation = operation
  @args = args
end

Instance Method Details

#callObject



16
17
18
19
20
21
22
# File 'lib/rms_api_ruby/soap_api/client.rb', line 16

def call
  chain { log :info, start_message }
  chain(response: :response) { execute_request }
  when_truthy { |outflow| authentication_error?(outflow) }.
    dam { |outflow| auth_error(outflow.response) }
  chain { log :info, complete_message }
end