Sha256: a974b4b1abcc12d4ad577f03ce1d6e55918aa2f61ef6141e719ca4ffdea5c9d4

Contents?: true

Size: 356 Bytes

Versions: 3

Compression:

Stored size: 356 Bytes

Contents

# frozen_string_literal: true

module Payture::Cheques
  module Responses
    class Base
      attr_reader :body

      def initialize(body)
        @body = body
      end

      def success?
        body['Success'] == 'True'
      end

      def error?
        !success?
      end

      def error_code
        body['ErrCode']
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
payture-cheques-0.1.3 lib/payture/cheques/responses/base.rb
payture-cheques-0.1.2 lib/payture/cheques/responses/base.rb
payture-cheques-0.1.0 lib/payture/cheques/responses/base.rb