Sha256: abff160fbdf1644723e2f6a0f073dc9b859147ab5dc2258d341434fce1db13e3

Contents?: true

Size: 882 Bytes

Versions: 5

Compression:

Stored size: 882 Bytes

Contents

# frozen_string_literal: true

module Veryfi
  module Api
    class LineItem
      attr_reader :request

      def initialize(request)
        @request = request
      end

      def all(document_id, params = {})
        response = request.get("/partner/documents/#{document_id}/line-items/", params)

        response["line_items"]
      end

      def create(document_id, params)
        request.post("/partner/documents/#{document_id}/line-items/", params)
      end

      def get(document_id, id, params = {})
        request.get("/partner/documents/#{document_id}/line-items/#{id}", params)
      end

      def update(document_id, id, params)
        request.put("/partner/documents/#{document_id}/line-items/#{id}", params)
      end

      def delete(document_id, id)
        request.delete("/partner/documents/#{document_id}/line-items/#{id}")
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
veryfi-0.1.4 lib/veryfi/api/line_item.rb
veryfi-0.1.3 lib/veryfi/api/line_item.rb
veryfi-0.1.2 lib/veryfi/api/line_item.rb
veryfi-0.1.1 lib/veryfi/api/line_item.rb
veryfi-0.1.0 lib/veryfi/api/line_item.rb