Exception: ChannelAdvisor::Error

Inherits:
Exception
  • Object
show all
Defined in:
lib/channel_advisor/errors.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Error) initialize(response, message_code)

Returns a new instance of Error



5
6
7
8
9
10
11
# File 'lib/channel_advisor/errors.rb', line 5

def initialize(response, message_code)
  @response = response
  @message_code = message_code
  if @message_code && @response
    super("[#{message_code.code}]: #{message_code.message} - #{response.message}")
  end
end

Instance Attribute Details

- (Object) message_code

Returns the value of attribute message_code



3
4
5
# File 'lib/channel_advisor/errors.rb', line 3

def message_code
  @message_code
end

- (Object) response

Returns the value of attribute response



3
4
5
# File 'lib/channel_advisor/errors.rb', line 3

def response
  @response
end