Exception: ScreenshotAPI::InsufficientCreditsError
- Defined in:
- lib/screenshotapi/errors.rb
Instance Attribute Summary collapse
-
#balance ⇒ Object
readonly
Returns the value of attribute balance.
Attributes inherited from APIError
Instance Method Summary collapse
-
#initialize(message, balance: 0) ⇒ InsufficientCreditsError
constructor
A new instance of InsufficientCreditsError.
Constructor Details
#initialize(message, balance: 0) ⇒ InsufficientCreditsError
Returns a new instance of InsufficientCreditsError.
21 22 23 24 |
# File 'lib/screenshotapi/errors.rb', line 21 def initialize(, balance: 0) super(, status: 402, code: "insufficient_credits") @balance = balance end |
Instance Attribute Details
#balance ⇒ Object (readonly)
Returns the value of attribute balance.
19 20 21 |
# File 'lib/screenshotapi/errors.rb', line 19 def balance @balance end |