module Paperdrive::Client::MailThreads

Instance methods related to MailThreads to embed into Paperdrive::Client
arguments are compatible with the Pipedribe API.

@see developers.pipedrive.com/docs/api/v1/#!/MailThreads

Public Instance Methods

all_mail_threads(**args) click to toggle source
GET

Get mail threads

@see developers.pipedrive.com/docs/api/v1/#!/MailThreads/get_mailbox_mailThreads @return [Paperdrive::Response]

# File lib/paperdrive/client/mail_threads.rb, line 18
def all_mail_threads(**args)
  params = parameters(args) do
    required_params :folder
    optional_params :folder, :start, :limit
  end
  request(:get, 'mailbox/mailThreads', params)
end
delete_mail_thread(id:, **args) click to toggle source
DELETE

Delete mail thread

@param [integer] id: @see developers.pipedrive.com/docs/api/v1/#!/MailThreads/delete_mailbox_mailThreads_id @return [Paperdrive::Response]

# File lib/paperdrive/client/mail_threads.rb, line 67
def delete_mail_thread(id:, **args)
  params = parameters(args) do
    optional_params
  end
  request(:delete, "mailbox/mailThreads/#{id}", params)
end
mail_thread(id:, **args) click to toggle source
GET

Get one mail thread

@param [integer] id: @see developers.pipedrive.com/docs/api/v1/#!/MailThreads/get_mailbox_mailThreads_id @return [Paperdrive::Response]

# File lib/paperdrive/client/mail_threads.rb, line 31
def mail_thread(id:, **args)
  params = parameters(args) do
    optional_params
  end
  request(:get, "mailbox/mailThreads/#{id}", params)
end
mail_thread_mail_messages(id:, **args) click to toggle source
GET

Get all mail messages of mail thread

@param [integer] id: @see developers.pipedrive.com/docs/api/v1/#!/MailThreads/get_mailbox_mailThreads_id_mailMessages @return [Paperdrive::Response]

# File lib/paperdrive/client/mail_threads.rb, line 43
def mail_thread_mail_messages(id:, **args)
  params = parameters(args) do
    optional_params
  end
  request(:get, "mailbox/mailThreads/#{id}/mailMessages", params)
end
update_mail_thread(id:, **args) click to toggle source
PUT

Update mail thread details

@param [integer] id: @see developers.pipedrive.com/docs/api/v1/#!/MailThreads/put_mailbox_mailThreads_id @return [Paperdrive::Response]

# File lib/paperdrive/client/mail_threads.rb, line 55
def update_mail_thread(id:, **args)
  params = parameters(args) do
    optional_params :deal_id, :shared_flag, :read_flag, :archived_flag
  end
  request(:put, "mailbox/mailThreads/#{id}", params)
end