Exception: Commons::Errors::PaymentRequired

Inherits:
ErrorBase
  • Object
show all
Defined in:
lib/commons/errors/payment_required.rb

Instance Attribute Summary

Attributes inherited from ErrorBase

#backtrace, #code, #detail, #message, #meta, #title

Instance Method Summary collapse

Methods inherited from ErrorBase

#status, #to_hash

Constructor Details

#initialize(message = nil, backtrace = nil, title: nil, code: nil, detail: nil, meta: {}) ⇒ PaymentRequired

Returns a new instance of PaymentRequired.



4
5
6
7
8
9
10
11
12
# File 'lib/commons/errors/payment_required.rb', line 4

def initialize(message = nil, backtrace = nil, title: nil, code: nil, detail: nil, meta: {})
  super message,
        backtrace,
        status: :payment_required,
        title: title || I18n.t('status_code.IER4009_payment_required.title'),
        code: code || I18n.t('status_code.IER4009_payment_required.code'),
        detail: detail || I18n.t('status_code.IER4009_payment_required.detail'),
        meta: meta
end