Exception: ZuoraAPI::Exceptions::ZuoraAPILockCompetition

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

#parse_message

Constructor Details

#initialize(message = nil, response = nil, errors = [], successes = [], *args) ⇒ ZuoraAPILockCompetition

Returns a new instance of ZuoraAPILockCompetition.



149
150
151
152
153
154
# File 'lib/zuora_api/exceptions.rb', line 149

def initialize(message = nil,response=nil, errors = [], successes = [], *args)
  @code = response.class.to_s == "HTTParty::Response" ? response.code : nil
  @message = parse_message(message)
  @response = response
  @default_message = "Operation failed due to lock competition. Please retry"
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



146
147
148
# File 'lib/zuora_api/exceptions.rb', line 146

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.



147
148
149
# File 'lib/zuora_api/exceptions.rb', line 147

def default_message=(value)
  @default_message = value
end

#responseObject (readonly)

Returns the value of attribute response.



146
147
148
# File 'lib/zuora_api/exceptions.rb', line 146

def response
  @response
end

Instance Method Details

#to_sObject



156
157
158
# File 'lib/zuora_api/exceptions.rb', line 156

def to_s
  @message || @default_message
end