Exception: ZuoraAPI::Exceptions::ZuoraAPIRequestLimit

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) ⇒ ZuoraAPIRequestLimit

Returns a new instance of ZuoraAPIRequestLimit.



117
118
119
120
121
122
# File 'lib/zuora_api/exceptions.rb', line 117

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 = "Your request limit has been exceeded for zuora."
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



113
114
115
# File 'lib/zuora_api/exceptions.rb', line 113

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.



114
115
116
# File 'lib/zuora_api/exceptions.rb', line 114

def default_message=(value)
  @default_message = value
end

#loggedObject

Returns the value of attribute logged.



115
116
117
# File 'lib/zuora_api/exceptions.rb', line 115

def logged
  @logged
end

#responseObject (readonly)

Returns the value of attribute response.



113
114
115
# File 'lib/zuora_api/exceptions.rb', line 113

def response
  @response
end

Instance Method Details

#to_sObject



124
125
126
# File 'lib/zuora_api/exceptions.rb', line 124

def to_s
  @message || @default_message
end