Sha256: 1cdfe5924ecb0e2d103186ab00b66ce220019af7a22a70f45e27a06dc6987220

Contents?: true

Size: 525 Bytes

Versions: 5

Compression:

Stored size: 525 Bytes

Contents

module TrackerApi
  module Endpoints
    class Review
      attr_accessor :client

      def initialize(client)
        @client = client
      end

      def update(review, params = {})
        raise ArgumentError, 'Valid review required to update.' unless review.instance_of?(Resources::Review)

        data = client.put("/projects/#{review.project_id}/stories/#{review.story_id}/reviews/#{review.id}", params: params).body

        review.attributes = data
        review.clean!
        review
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tracker_api-1.16.0 lib/tracker_api/endpoints/review.rb
tracker_api-1.15.0 lib/tracker_api/endpoints/review.rb
tracker_api-1.14.0 lib/tracker_api/endpoints/review.rb
tracker_api-1.13.0 lib/tracker_api/endpoints/review.rb
tracker_api-1.12.0 lib/tracker_api/endpoints/review.rb