class HelpScout::Attachment

Public Class Methods

create(conversation_id, thread_id, params) click to toggle source
# File lib/help_scout/attachment.rb, line 6
def create(conversation_id, thread_id, params)
  HelpScout.api.post(
    create_path(conversation_id, thread_id),
    HelpScout::Util.camelize_keys(params)
  )
  true
end

Private Class Methods

base_path() click to toggle source
# File lib/help_scout/attachment.rb, line 16
def base_path
  'conversations/%<CONVERSATION_ID>/threads/%<THREAD_ID>/attachments'
end
create_path(conversation_id, thread_id) click to toggle source
# File lib/help_scout/attachment.rb, line 20
def create_path(conversation_id, thread_id)
  replacements = {
    '%<CONVERSATION_ID>' => conversation_id,
    '%<THREAD_ID>' => thread_id
  }

  HelpScout::Util.parse_path(base_path, replacements)
end