Sha256: 1e5588651ce671d9127a01e0e759a06f01de32e5a4acca43ae9b6df61930737c
Contents?: true
Size: 463 Bytes
Versions: 15
Compression:
Stored size: 463 Bytes
Contents
module Mollie class Exception < StandardError end class RequestError < Mollie::Exception attr_accessor :status, :title, :detail, :field, :links def initialize(error) exception.status = error['status'] exception.title = error['title'] exception.detail = error['detail'] exception.field = error['field'] exception.links = error['_links'] end def to_s "#{status} #{title}: #{detail}" end end end
Version data entries
15 entries across 15 versions & 1 rubygems