Exception: ZuoraAPI::Exceptions::ZuoraAPIError
- Defined in:
- lib/zuora_api/exceptions.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#default_message ⇒ Object
writeonly
Sets the attribute default_message.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#successes ⇒ Object
readonly
Returns the value of attribute successes.
Instance Method Summary collapse
-
#initialize(message = nil, response = nil, errors = [], successes = [], *args) ⇒ ZuoraAPIError
constructor
A new instance of ZuoraAPIError.
- #to_s ⇒ Object
Methods inherited from Error
Constructor Details
#initialize(message = nil, response = nil, errors = [], successes = [], *args) ⇒ ZuoraAPIError
Returns a new instance of ZuoraAPIError.
80 81 82 83 84 85 86 87 |
# File 'lib/zuora_api/exceptions.rb', line 80 def initialize( = nil,response=nil, errors = [], successes = [], *args) @code = response.class.to_s == "HTTParty::Response" ? response.code : nil @message = () @response = response @default_message = "Error communicating with Zuora." @errors = errors @successes = successes end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
77 78 79 |
# File 'lib/zuora_api/exceptions.rb', line 77 def code @code end |
#default_message=(value) ⇒ Object (writeonly)
Sets the attribute default_message
78 79 80 |
# File 'lib/zuora_api/exceptions.rb', line 78 def (value) @default_message = value end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
77 78 79 |
# File 'lib/zuora_api/exceptions.rb', line 77 def errors @errors end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
77 78 79 |
# File 'lib/zuora_api/exceptions.rb', line 77 def response @response end |
#successes ⇒ Object (readonly)
Returns the value of attribute successes.
77 78 79 |
# File 'lib/zuora_api/exceptions.rb', line 77 def successes @successes end |
Instance Method Details
#to_s ⇒ Object
89 90 91 |
# File 'lib/zuora_api/exceptions.rb', line 89 def to_s @message || @default_message end |