Class: ZendeskAPI::Ticket
- Inherits:
-
Resource
- Object
- Data
- DataResource
- Resource
- ZendeskAPI::Ticket
- Extended by:
- CreateMany, DestroyMany, UpdateMany
- Defined in:
- lib/zendesk_api/resources.rb,
lib/zendesk_api/resources.rb
Defined Under Namespace
Classes: Audit, Comment, SatisfactionRating
Instance Attribute Summary
Attributes inherited from DataResource
Attributes inherited from Data
#association, #attributes, #errors, #response
Class Method Summary collapse
-
.import(client, attributes) ⇒ Ticket
Imports a ticket through the imports/tickets endpoint.
-
.import!(client, attributes) ⇒ Ticket
Imports a ticket through the imports/tickets endpoint using save!.
-
.incremental_export(client, start_time) ⇒ Collection
Gets a incremental export of tickets from the start_time until now.
Methods included from CreateMany
Methods included from UpdateMany
Methods included from DestroyMany
Methods included from Destroy
#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 Create
Methods included from Read
Methods included from Sideloading
Methods included from Verbs
Methods inherited from Data
#==, #id, inherited, #initialize, #loaded_associations, #method_missing, namespace, new_from_response, #new_record?, #path, resource_name, resource_path, 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
.import(client, attributes) ⇒ Ticket
Imports a ticket through the imports/tickets endpoint
485 486 487 488 489 |
# File 'lib/zendesk_api/resources.rb', line 485 def self.import(client, attributes) ticket = new(client, attributes) return unless ticket.save(:path => "imports/tickets") ticket end |
.import!(client, attributes) ⇒ Ticket
Imports a ticket through the imports/tickets endpoint using save!
475 476 477 478 479 |
# File 'lib/zendesk_api/resources.rb', line 475 def self.import!(client, attributes) new(client, attributes).tap do |ticket| ticket.save!(:path => "imports/tickets") end end |
.incremental_export(client, start_time) ⇒ Collection
Gets a incremental export of tickets from the start_time until now.
467 468 469 |
# File 'lib/zendesk_api/resources.rb', line 467 def self.incremental_export(client, start_time) ZendeskAPI::Collection.new(client, self, :path => "exports/tickets?start_time=#{start_time.to_i}") end |