Sha256: 02a811a8afc1c2405567226bbb7e704db5fde6bd6c1a169d894ff0216ea07486

Contents?: true

Size: 993 Bytes

Versions: 24

Compression:

Stored size: 993 Bytes

Contents

module Eligible
  class Claim < APIResource
    def self.ack(params, api_key = nil)
      reference_id = Util.value(params, :reference_id)
      send_request(:get, "/claims/#{reference_id}/acknowledgements.json", api_key, params, :reference_id)
    end

    def self.post(params, api_key = nil)
      send_request(:post, '/claims.json', api_key, params)
    end

    def self.acks(params, api_key = nil)
      send_request(:get, '/claims/acknowledgements.json', api_key, params)
    end

    def self.payment_report(params, api_key = nil)
      reference_id = Util.value(params, :reference_id)
      require_param(reference_id, 'Reference id')
      id = Util.value(params, :id)
      url = id.nil? ? "/claims/#{reference_id}/payment_reports" : "/claims/#{reference_id}/payment_reports/#{id}"
      send_request(:get, url, api_key, params)
    end

    def self.payment_reports(params, api_key = nil)
      send_request(:get, '/claims/payment_reports.json', api_key, params)
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
eligible-2.9.17 lib/eligible/claim.rb
eligible-2.9.16 lib/eligible/claim.rb
eligible-2.9.15 lib/eligible/claim.rb
eligible-2.9.14 lib/eligible/claim.rb
eligible-2.9.13 lib/eligible/claim.rb
eligible-2.9.12 lib/eligible/claim.rb
eligible-2.9.11 lib/eligible/claim.rb
eligible-2.9.10 lib/eligible/claim.rb
eligible-2.9.9 lib/eligible/claim.rb
eligible-2.9.8 lib/eligible/claim.rb
eligible-2.9.7 lib/eligible/claim.rb
eligible-2.9.6 lib/eligible/claim.rb
eligible-2.9.5 lib/eligible/claim.rb
eligible-2.9.4 lib/eligible/claim.rb
eligible-2.9.3 lib/eligible/claim.rb
eligible-2.9.2 lib/eligible/claim.rb
eligible-2.9.1 lib/eligible/claim.rb
eligible-2.8.2 lib/eligible/claim.rb
eligible-2.8.1 lib/eligible/claim.rb
eligible-2.8.0 lib/eligible/claim.rb