Sha256: a05a7605c94986345a01e5a653b4425b13ec9ac55e5e222593f48b969b726963

Contents?: true

Size: 752 Bytes

Versions: 3

Compression:

Stored size: 752 Bytes

Contents

module Eligible
  class Claim < APIResource

    class << self

      def get(params, api_key = nil)
        response, api_key = Eligible.request(:get, "/claims/acknowledgements/#{params[:reference_id]}.json", api_key, params)
        Util.convert_to_eligible_object(response, api_key)
      end

      def post(params, api_key = nil)
        response, api_key = Eligible.request(:post, '/claims.json', api_key, params)
        Util.convert_to_eligible_object(response, api_key)
      end

      def all(api_key = nil)
        response, api_key = Eligible.request(:get, '/claims/acknowledgements.json', api_key)
        Util.convert_to_eligible_object(response, api_key)
      end

    end

    def status
      error ? nil : to_hash
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
eligible-2.4.3 lib/eligible/claim.rb
eligible-2.4.2 lib/eligible/claim.rb
eligible-2.4.1 lib/eligible/claim.rb