Class: Zm::Client::MtaQueueItemsCollection

Inherits:
Base::ObjectsCollection show all
Defined in:
lib/zm/client/mta_queue_item/mta_queue_items_collection.rb

Overview

Collection MtaQueues

Constant Summary

Constants inherited from Base::ObjectsCollection

Base::ObjectsCollection::METHODS_MISSING_LIST

Instance Attribute Summary collapse

Attributes inherited from Base::ObjectsCollection

#parent

Instance Method Summary collapse

Methods inherited from Base::ObjectsCollection

#all, #all!, #find, #first, #logger, #method_missing, #new, #order, #page, #per_page, #respond_to_missing?

Methods included from Inspector

#inspect, #instance_variables_map, #to_h, #to_s

Constructor Details

#initialize(parent) ⇒ MtaQueueItemsCollection

Returns a new instance of MtaQueueItemsCollection.



9
10
11
12
# File 'lib/zm/client/mta_queue_item/mta_queue_items_collection.rb', line 9

def initialize(parent)
  @parent = parent
  reset_query_params
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Zm::Client::Base::ObjectsCollection

Instance Attribute Details

#fieldsObject (readonly)

Returns the value of attribute fields.



7
8
9
# File 'lib/zm/client/mta_queue_item/mta_queue_items_collection.rb', line 7

def fields
  @fields
end

#limitObject (readonly)

Returns the value of attribute limit.



7
8
9
# File 'lib/zm/client/mta_queue_item/mta_queue_items_collection.rb', line 7

def limit
  @limit
end

#offsetObject (readonly)

Returns the value of attribute offset.



7
8
9
# File 'lib/zm/client/mta_queue_item/mta_queue_items_collection.rb', line 7

def offset
  @offset
end

Instance Method Details

#fromdomain(value) ⇒ Object



27
28
29
30
# File 'lib/zm/client/mta_queue_item/mta_queue_items_collection.rb', line 27

def fromdomain(value)
  @fields[:fromdomain] = value
  self
end

#idsObject



37
38
39
# File 'lib/zm/client/mta_queue_item/mta_queue_items_collection.rb', line 37

def ids
  all.map(&:id)
end

#mta_queueObject



14
15
16
# File 'lib/zm/client/mta_queue_item/mta_queue_items_collection.rb', line 14

def mta_queue
  parent
end

#serverObject



18
19
20
# File 'lib/zm/client/mta_queue_item/mta_queue_items_collection.rb', line 18

def server
  mta_queue.parent
end

#todomain(value) ⇒ Object



32
33
34
35
# File 'lib/zm/client/mta_queue_item/mta_queue_items_collection.rb', line 32

def todomain(value)
  @fields[:todomain] = value
  self
end

#where(fields) ⇒ Object



22
23
24
25
# File 'lib/zm/client/mta_queue_item/mta_queue_items_collection.rb', line 22

def where(fields)
  @fields = fields
  self
end