Exception: DPay::RateLimitError

Inherits:
ApiError
  • Object
show all
Defined in:
lib/dpay/errors.rb,
sig/dpay/errors.rbs

Instance Attribute Summary collapse

Attributes inherited from ApiError

#error_code, #field_errors, #http_status, #raw_body

Instance Method Summary collapse

Constructor Details

#initialize(message, http_status, retry_after = nil, limit = nil, remaining = nil, raw_body = "") ⇒ RateLimitError

Returns a new instance of RateLimitError.



45
46
47
48
49
50
# File 'lib/dpay/errors.rb', line 45

def initialize(message, http_status, retry_after = nil, limit = nil, remaining = nil, raw_body = "")
  super(message, http_status, nil, {}, raw_body)
  @retry_after = retry_after
  @limit = limit
  @remaining = remaining
end

Instance Attribute Details

#limitInteger? (readonly)

Returns the value of attribute limit.

Returns:

  • (Integer, nil)


43
44
45
# File 'lib/dpay/errors.rb', line 43

def limit
  @limit
end

#remainingInteger? (readonly)

Returns the value of attribute remaining.

Returns:

  • (Integer, nil)


43
44
45
# File 'lib/dpay/errors.rb', line 43

def remaining
  @remaining
end

#retry_afterInteger? (readonly)

Returns the value of attribute retry_after.

Returns:

  • (Integer, nil)


43
44
45
# File 'lib/dpay/errors.rb', line 43

def retry_after
  @retry_after
end