Class: ZendeskAPI::Tag
- Inherits:
-
DataResource
- Object
- Data
- DataResource
- ZendeskAPI::Tag
- Defined in:
- lib/zendesk_api/resources.rb
Defined Under Namespace
Modules: Update
Instance Attribute Summary
Attributes inherited from DataResource
Attributes inherited from Data
#association, #attributes, #errors, #response
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Destroy
#destroy, #destroyed?, included
Methods included from Update
Methods included from Save
#clear_associations, #save, #save!, #save_associations
Methods included from ResponseHandler
Methods included from Verbs
Methods inherited from Data
#==, #id, inherited, #initialize, #loaded_associations, #method_missing, namespace, new_from_response, #new_record?, resource_name, resource_path, #respond_to_missing?, singular_resource_name, subclasses, #to_json, #to_s
Methods included from Associations
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
.cbp_path_regexes ⇒ Object
143 144 145 |
# File 'lib/zendesk_api/resources.rb', line 143 def self.cbp_path_regexes [/^tags$/] end |
Instance Method Details
#attributes_for_save ⇒ Object
139 140 141 |
# File 'lib/zendesk_api/resources.rb', line 139 def attributes_for_save { self.class.resource_name => [id] } end |
#changed? ⇒ Boolean
111 112 113 |
# File 'lib/zendesk_api/resources.rb', line 111 def changed? true end |
#destroy! ⇒ Object
115 116 117 118 119 |
# File 'lib/zendesk_api/resources.rb', line 115 def destroy! super do |req| req.body = attributes_for_save end end |
#path(opts = {}) ⇒ Object
106 107 108 109 |
# File 'lib/zendesk_api/resources.rb', line 106 def path(opts = {}) raise "tags must have parent resource" unless association..parent super(opts.merge(:with_parent => true, :with_id => false)) end |