Exception: Fopost::PaymentRequiredError
- Defined in:
- lib/fopost/errors.rb
Overview
402 — no active subscription, or AI credits exhausted.
Instance Attribute Summary
Attributes inherited from Error
#body, #code, #message, #status
Instance Method Summary collapse
-
#upgrade_url ⇒ Object
The page the API suggests sending the user to.
Methods inherited from Error
Constructor Details
This class inherits a constructor from Fopost::Error
Instance Method Details
#upgrade_url ⇒ Object
The page the API suggests sending the user to.
47 48 49 50 |
# File 'lib/fopost/errors.rb', line 47 def upgrade_url value = body.is_a?(Hash) ? (body['upgrade_url'] || body[:upgrade_url]) : nil value.is_a?(String) ? value : nil end |