Sha256: 7287a0f671636bbf09235df126065e79e04ae4095dab76e3ba7196388ba14875

Contents?: true

Size: 645 Bytes

Versions: 1

Compression:

Stored size: 645 Bytes

Contents

module Cryptoprocessing
  class APIResponse
    attr_reader :received_at
    attr_accessor :client
    attr_accessor :method
    attr_accessor :params

    def initialize(resp)
      @received_at = Time.now
      @response = resp
    end

    def raw
      @response
    end

    def body
      raise NotImplementedError
    end

    alias_method :data, :body

    def body=(body)
      raise NotImplementedError
    end

    def headers
      raise NotImplementedError
    end

    def status
      raise NotImplementedError
    end

    def has_more?
      body.has_key?('pagination') && body['pagination']['next_uri'] != nil
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cryptoprocessing-0.6.1 lib/cryptoprocessing/client/api_response.rb