class ZendeskAPI::App
Public Class Methods
create!(client, attributes = {}, &block)
click to toggle source
Calls superclass method
# File lib/zendesk_api/resources.rb, line 1034 def self.create!(client, attributes = {}, &block) if file_path = attributes.delete(:upload) attributes[:upload_id] = client.apps.uploads.create!(:file => file_path).id end super end
installations(client, *args, &block)
click to toggle source
# File lib/zendesk_api/resources.rb, line 1082 def self.installations(client, *args, &block) ZendeskAPI::Collection.new(client, AppInstallation, *args, &block) end
new(client, attributes = {})
click to toggle source
Calls superclass method
ZendeskAPI::Data::new
# File lib/zendesk_api/resources.rb, line 1028 def initialize(client, attributes = {}) attributes[:upload_id] ||= nil super end
uploads(client, *args, &block)
click to toggle source
# File lib/zendesk_api/resources.rb, line 1078 def self.uploads(client, *args, &block) ZendeskAPI::Collection.new(client, Upload, *args, &block) end
Public Instance Methods
attributes_for_save()
click to toggle source
Don’t nest attributes
# File lib/zendesk_api/resources.rb, line 1090 def attributes_for_save attributes.changes end
handle_response(response)
click to toggle source
# File lib/zendesk_api/resources.rb, line 1094 def handle_response(response) @attributes.replace(response.body) if response.body end