Exception: ZuoraAPI::Exceptions::BadEntityError
- 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) ⇒ BadEntityError
constructor
A new instance of BadEntityError.
- #to_s ⇒ Object
Methods inherited from Error
Constructor Details
#initialize(message = nil, response = nil, errors = [], successes = [], *args) ⇒ BadEntityError
Returns a new instance of BadEntityError.
62 63 64 65 66 67 68 69 |
# File 'lib/zuora_api/exceptions.rb', line 62 def initialize( = nil,response=nil, errors = [], successes = [], *args) @code = response.class.to_s == "HTTParty::Response" ? response.code : nil @message = () @response = response @default_message = "Error with Zuora Entity" @errors = errors @successes = successes end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
59 60 61 |
# File 'lib/zuora_api/exceptions.rb', line 59 def code @code end |
#default_message=(value) ⇒ Object (writeonly)
Sets the attribute default_message
60 61 62 |
# File 'lib/zuora_api/exceptions.rb', line 60 def (value) @default_message = value end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
59 60 61 |
# File 'lib/zuora_api/exceptions.rb', line 59 def errors @errors end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
59 60 61 |
# File 'lib/zuora_api/exceptions.rb', line 59 def response @response end |
#successes ⇒ Object (readonly)
Returns the value of attribute successes.
59 60 61 |
# File 'lib/zuora_api/exceptions.rb', line 59 def successes @successes end |
Instance Method Details
#to_s ⇒ Object
71 72 73 |
# File 'lib/zuora_api/exceptions.rb', line 71 def to_s @message || @default_message end |