Exception: ZuoraConnect::Exceptions::ConnectCommunicationError

Inherits:
Error
  • Object
show all
Defined in:
lib/zuora_connect/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, response = nil, code = nil) ⇒ ConnectCommunicationError

Returns a new instance of ConnectCommunicationError.



25
26
27
28
29
30
# File 'lib/zuora_connect/exceptions.rb', line 25

def initialize(message = nil,response=nil, code =nil)
  @code = code
  @message = message
  @response = response
  @default_message = "Error communication with Connect."
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



22
23
24
# File 'lib/zuora_connect/exceptions.rb', line 22

def code
  @code
end

#default_message=(value) ⇒ Object (writeonly)

Sets the attribute default_message

Parameters:

  • value

    the value to set the attribute default_message to.



23
24
25
# File 'lib/zuora_connect/exceptions.rb', line 23

def default_message=(value)
  @default_message = value
end

#responseObject (readonly)

Returns the value of attribute response.



22
23
24
# File 'lib/zuora_connect/exceptions.rb', line 22

def response
  @response
end

Instance Method Details

#to_sObject



32
33
34
# File 'lib/zuora_connect/exceptions.rb', line 32

def to_s
  @message || @default_message
end