Exception: Fopost::PaymentRequiredError

Inherits:
Error
  • Object
show all
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

Methods inherited from Error

#initialize, #to_s

Constructor Details

This class inherits a constructor from Fopost::Error

Instance Method Details

#upgrade_urlObject

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