Class: Zm::Client::DistributionListsCollection
- Inherits:
-
Base::AdminObjectsCollection
- Object
- Base::ObjectsCollection
- Base::AdminObjectsCollection
- Zm::Client::DistributionListsCollection
- Defined in:
- lib/zm/client/distributionlist/distributionlists_collection.rb
Overview
Collection Resources
Direct Known Subclasses
Constant Summary
Constants inherited from Base::ObjectsCollection
Base::ObjectsCollection::METHODS_MISSING_LIST
Instance Attribute Summary
Attributes inherited from Base::ObjectsCollection
Instance Method Summary collapse
- #find_by!(hash) ⇒ Object
-
#initialize(parent) ⇒ DistributionListsCollection
constructor
A new instance of DistributionListsCollection.
Methods inherited from Base::AdminObjectsCollection
#attrs, #clear, #count, #find_by, #find_by_or_nil, #find_each, #ldap, #where
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) ⇒ DistributionListsCollection
Returns a new instance of DistributionListsCollection.
7 8 9 10 11 12 |
# File 'lib/zm/client/distributionlist/distributionlists_collection.rb', line 7 def initialize(parent) @child_class = DistributionList @builder_class = DistributionListsBuilder @search_type = SearchType::DL super(parent) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Zm::Client::Base::ObjectsCollection
Instance Method Details
#find_by!(hash) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/zm/client/distributionlist/distributionlists_collection.rb', line 14 def find_by!(hash) soap_request = SoapElement.admin(SoapAdminConstants::GET_DISTRIBUTION_LIST_REQUEST) node_dl = SoapElement.create(SoapConstants::DL).add_attribute(SoapConstants::BY, hash.keys.first).add_content(hash.values.first) soap_request.add_node(node_dl) soap_request.add_attribute(SoapConstants::ATTRS, attrs_comma) entry = sac.invoke(soap_request)[:GetDistributionListResponse][:dl].first reset_query_params DistributionListJsnsInitializer.create(@parent, entry) end |