Sha256: 75981277cb4a0d6cf1b64850d9fc9b06185d11c58e69601f8d594933fad16a23

Contents?: true

Size: 465 Bytes

Versions: 71

Compression:

Stored size: 465 Bytes

Contents

module Pay
  # https://avdi.codes/exception-causes-in-ruby-2-1/
  class Error < StandardError
  end

  class PaymentError < StandardError
    attr_reader :payment

    def initialize(payment)
      @payment = payment
    end
  end

  class ActionRequired < PaymentError
    def message
      I18n.t("pay.errors.action_required")
    end
  end

  class InvalidPaymentMethod < PaymentError
    def message
      I18n.t("pay.errors.invalid_payment")
    end
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
pay-5.0.4 lib/pay/errors.rb
pay-5.0.3 lib/pay/errors.rb
pay-5.0.2 lib/pay/errors.rb
pay-5.0.1 lib/pay/errors.rb
pay-5.0.0 lib/pay/errors.rb
pay-4.2.1 lib/pay/errors.rb
pay-4.2.0 lib/pay/errors.rb
pay-4.1.1 lib/pay/errors.rb
pay-4.1.0 lib/pay/errors.rb
pay-4.0.4 lib/pay/errors.rb
pay-4.0.2 lib/pay/errors.rb
pay-4.0.1 lib/pay/errors.rb
pay-4.0.0 lib/pay/errors.rb
pay-3.0.24 lib/pay/errors.rb
pay-3.0.23 lib/pay/errors.rb
pay-3.0.22 lib/pay/errors.rb
pay-3.0.21 lib/pay/errors.rb
pay-3.0.20 lib/pay/errors.rb
pay-3.0.19 lib/pay/errors.rb
pay-3.0.18 lib/pay/errors.rb