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-8.3.0 lib/pay/errors.rb
pay-8.2.2 lib/pay/errors.rb
pay-8.2.1 lib/pay/errors.rb
pay-8.2.0 lib/pay/errors.rb
pay-8.1.3 lib/pay/errors.rb
pay-8.1.2 lib/pay/errors.rb
pay-8.1.1 lib/pay/errors.rb
pay-8.1.0 lib/pay/errors.rb
pay-8.0.0 lib/pay/errors.rb
pay-7.3.0 lib/pay/errors.rb
pay-7.2.1 lib/pay/errors.rb
pay-7.1.1 lib/pay/errors.rb
pay-7.1.0 lib/pay/errors.rb
pay-7.0.0 lib/pay/errors.rb
pay-6.8.1 lib/pay/errors.rb
pay-6.8.0 lib/pay/errors.rb
pay-6.7.2 lib/pay/errors.rb
pay-6.7.1 lib/pay/errors.rb
pay-6.7.0 lib/pay/errors.rb
pay-6.6.1 lib/pay/errors.rb