class ZendeskAPI::App
Public Class Methods
create!(client, attributes = {}, &block)
click to toggle source
Calls superclass method
# File lib/zendesk_api/resources.rb, line 884 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 932 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 878 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 928 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 940 def attributes_for_save attributes.changes end
handle_response(response)
click to toggle source
# File lib/zendesk_api/resources.rb, line 944 def handle_response(response) @attributes.replace(response.body) if response.body end