Sha256: 5ed1d19ce60fbc71518ffd2ef1d99431ad70b161129d117a0f45094c2e2a4792

Contents?: true

Size: 429 Bytes

Versions: 1

Compression:

Stored size: 429 Bytes

Contents

class Datatrans::JSON::Transaction
  class Response
    attr_accessor :params, :datatrans

    def initialize(datatrans, params)
      @datatrans = datatrans
      @params = params
    end

    def successful?
      raise "overwrite in subclass!"
    end

    def error_code
      params["error"]["code"]
    rescue
      nil
    end

    def error_message
      params["error"]["message"]
    rescue
      nil
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datatrans-5.2.0 lib/datatrans/json/transaction/response.rb