Class: ZendeskAPI::AppNotification

Inherits:
CreateResource show all
Defined in:
lib/zendesk_api/resources.rb

Instance Attribute Summary

Attributes inherited from DataResource

#error, #error_message

Attributes inherited from Data

#association, #attributes, #errors, #response

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Create

included

Methods included from Save

#clear_associations, #save, #save!, #save_associations

Methods inherited from DataResource

cbp_path_regexes

Methods included from Verbs

#any, #delete, #post, #put

Methods inherited from Data

#==, #account_data, #id, inherited, #initialize, #inspect, #loaded_associations, #method_missing, namespace, new_from_response, #new_record?, #path, #refresh_custom_fields_metadata, resource_name, #respond_to_missing?, singular_resource_name, subclasses, #to_json, #to_s

Methods included from Associations

included, #wrap_resource

Constructor Details

This class inherits a constructor from ZendeskAPI::Data

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ZendeskAPI::Data

Class Method Details

.resource_pathObject



1057
1058
1059
# File 'lib/zendesk_api/resources.rb', line 1057

def resource_path
  "apps/notify"
end

Instance Method Details

#attributes_for_saveObject

Don't nest attributes



1063
1064
1065
# File 'lib/zendesk_api/resources.rb', line 1063

def attributes_for_save
  attributes.changes
end

#handle_response(response) ⇒ Object



1067
1068
1069
# File 'lib/zendesk_api/resources.rb', line 1067

def handle_response(response)
  @attributes.replace(response.body) if response.body.is_a?(Hash)
end