Sha256: 7dd4f02020616eda590c83dafb31a35f9bb25ba9046fef050e502488746ac372

Contents?: true

Size: 580 Bytes

Versions: 7

Compression:

Stored size: 580 Bytes

Contents

module PostmanMta
  class Label < ApplicationModel
    attr_reader :conversation_id

    def initialize(conversation_id)
      @conversation_id = conversation_id
    end

    def index(params = {})
      get('/labels', body: params)
    end

    def create(params)
      post("/conversations/#{conversation_id}/labels", body: params)
    end

    def update(label_id, params)
      patch("/conversations/#{conversation_id}/labels/#{label_id}", body: params)
    end

    def destroy(label_id)
      delete("/conversations/#{conversation_id}/labels/#{label_id}")
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
postman_mta-0.2.8 app/models/postman_mta/label.rb
postman_mta-0.2.7 app/models/postman_mta/label.rb
postman_mta-0.2.6 app/models/postman_mta/label.rb
postman_mta-0.2.4 app/models/postman_mta/label.rb
postman_mta-0.2.3 app/models/postman_mta/label.rb
postman_mta-0.2.2 app/models/postman_mta/label.rb
postman_mta-0.2.1 app/models/postman_mta/label.rb