Sha256: 919d1d7672d9fd724b3695feb629707490570c98ef73c7b2a9043f494dacbb62
Contents?: true
Size: 679 Bytes
Versions: 25
Compression:
Stored size: 679 Bytes
Contents
require 'restful_model' module Inbox class Draft < Message parameter :thread_id parameter :version parameter :reply_to_message_id def attach(file) file.save! unless file.id @file_ids.push(file.id) end def send! url = @_api.url_for_path("/n/#{@namespace_id}/send") if @id data = {:draft_id => @id, :version => @version} else data = as_json() end ::RestClient.post(url, data.to_json, :content_type => :json) do |response, request, result| json = Inbox.interpret_response(result, response, :expected_class => Object) self.inflate(json) end self end end end
Version data entries
25 entries across 25 versions & 2 rubygems