Class: RmsApiRuby::Orders::Client
- Inherits:
-
Object
- Object
- RmsApiRuby::Orders::Client
- Includes:
- Waterfall
- Defined in:
- lib/rms_api_ruby/orders.rb
Constant Summary collapse
- AUTH_ERRORCODE =
/^E02-00/
Instance Method Summary collapse
-
#call ⇒ Object
rubocop:disable Metrics/AbcSize.
-
#initialize(operation, args) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(operation, args) ⇒ Client
Returns a new instance of Client.
52 53 54 55 |
# File 'lib/rms_api_ruby/orders.rb', line 52 def initialize(operation, args) @operation = operation @args = args end |
Instance Method Details
#call ⇒ Object
rubocop:disable Metrics/AbcSize
57 58 59 60 61 62 63 64 65 |
# File 'lib/rms_api_ruby/orders.rb', line 57 def call # rubocop:disable Metrics/AbcSize chain { RmsApiRuby::Chain::Logger.new(:info, ) } chain(response: :response) do RmsApiRuby::Chain::SoapClient.new(wsdl, @operation, ) end when_truthy { |outflow| outflow.response.error_code =~ AUTH_ERRORCODE }. dam { |outflow| auth_error(outflow.response) } chain { RmsApiRuby::Chain::Logger.new(:info, ) } end |