Sha256: 409e4eaab7dd17f4ed0a1f1dbaa912c7d129f3940ce2769e30c542f7dec3813b

Contents?: true

Size: 901 Bytes

Versions: 4

Compression:

Stored size: 901 Bytes

Contents

module PostmanMta
  class Conversation < ApplicationModel
    def index(params = {})
      get('/conversations', body: params)
    end

    def folder(folder, params = {})
      params = {
        folder: folder
      }.merge(params)

      get('/conversations', body: params)
    end

    def find(conversation_id)
      get("/conversations/#{conversation_id}")
    end

    def move_to_trash(conversation_id)
      delete("/conversations/#{conversation_id}/trash")
    end

    def mark_as_read(params = {})
      patch('/conversations/mark', body: params.merge(event: 'mark_as_read'))
    end

    def mark_as_unread(params = {})
      patch('/conversations/mark', body: params.merge(event: 'mark_as_unread'))
    end

    def move(params = {})
      patch('/conversations/move', body: params)
    end

    def search(params = {})
      get('/search/conversations', body: params)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
postman_mta-0.2.1 app/models/postman_mta/conversation.rb
postman_mta-0.2.0 app/models/postman_mta/conversation.rb
postman_mta-0.1.9 app/models/postman_mta/conversation.rb
postman_mta-0.1.8 app/models/postman_mta/conversation.rb