lib/zendesk2/client/collections/tickets.rb in zendesk2-1.5.12 vs lib/zendesk2/client/collections/tickets.rb in zendesk2-1.5.13
- old
+ new
@@ -9,14 +9,14 @@
attribute :collaborator_id, type: :integer
assoc_accessor :requester
assoc_accessor :collaborator
- self.collection_root = "tickets"
- self.model_method = :get_ticket
- self.model_root = "ticket"
- self.search_type = "ticket"
+ self.collection_root = "tickets"
+ self.model_method = :get_ticket
+ self.model_root = "ticket"
+ self.search_type = "ticket"
def collection_page(params={})
collection_method = if requester_id
:get_requested_tickets
elsif collaborator_id
@@ -29,6 +29,9 @@
self.load(body[collection_root]) # 'results' is the key for paged searches
self.merge_attributes(Cistern::Hash.slice(body, "count", "next_page", "previous_page"))
self
end
+
+ scopes << :requester_id
+ scopes << :collaborator_id
end