zm-ruby-client 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +96 -0
- data/README.md +128 -27
- data/VERSION +1 -1
- data/lib/zm/client/account/account.rb +12 -19
- data/lib/zm/client/account/account_aliases_collection.rb +6 -4
- data/lib/zm/client/account/account_dls_membership_collection.rb +4 -3
- data/lib/zm/client/account/account_dls_owner_collection.rb +3 -2
- data/lib/zm/client/account/account_jsns_builder.rb +10 -10
- data/lib/zm/client/account/accounts_collection.rb +27 -16
- data/lib/zm/client/ace/ace.rb +3 -6
- data/lib/zm/client/ace/ace_jsns_builder.rb +6 -6
- data/lib/zm/client/appointment/appointment.rb +32 -14
- data/lib/zm/client/appointment/appointment_jsns_builder.rb +5 -5
- data/lib/zm/client/appointment/appointment_jsns_initializer.rb +6 -1
- data/lib/zm/client/appointment/appointments_collection.rb +12 -9
- data/lib/zm/client/backup/backup.rb +5 -2
- data/lib/zm/client/backup/backups_collection.rb +3 -2
- data/lib/zm/client/base/account_objects_collection.rb +1 -0
- data/lib/zm/client/base/account_search_objects_collection.rb +6 -6
- data/lib/zm/client/base/admin_objects_collection.rb +60 -7
- data/lib/zm/client/base/base_account_jsns_builder.rb +89 -87
- data/lib/zm/client/base/base_jsns_builder.rb +3 -3
- data/lib/zm/client/base/base_jsns_initializer.rb +20 -15
- data/lib/zm/client/base/mailbox_infos_collection.rb +92 -90
- data/lib/zm/client/base/mailbox_object.rb +49 -160
- data/lib/zm/client/base/mailbox_prefs_collection.rb +54 -52
- data/lib/zm/client/base/object.rb +19 -2
- data/lib/zm/client/base/objects_collection.rb +10 -10
- data/lib/zm/client/base/zimbra_attribute.rb +28 -42
- data/lib/zm/client/base/zimbra_attributes_collection.rb +38 -24
- data/lib/zm/client/{cluster/batch_request.rb → batch_request.rb} +1 -1
- data/lib/zm/client/cluster/cluster.rb +24 -61
- data/lib/zm/client/cluster/cluster_config.rb +35 -15
- data/lib/zm/client/contact/contact.rb +15 -13
- data/lib/zm/client/contact/contact_jsns_builder.rb +9 -6
- data/lib/zm/client/contact/contact_jsns_initializer.rb +2 -2
- data/lib/zm/client/contact/contact_member.rb +3 -3
- data/lib/zm/client/contact/contact_members_collection.rb +3 -3
- data/lib/zm/client/contact/contacts_builder.rb +1 -1
- data/lib/zm/client/contact/contacts_collection.rb +2 -2
- data/lib/zm/client/contact/group_contact_jsns_builder.rb +18 -14
- data/lib/zm/client/contact/mod_group_contact.rb +12 -8
- data/lib/zm/client/cos/cos.rb +15 -31
- data/lib/zm/client/cos/cos_jsns_builder.rb +21 -21
- data/lib/zm/client/cos/coses_collection.rb +11 -6
- data/lib/zm/client/datasource/datasource.rb +3 -9
- data/lib/zm/client/datasource/datasource_jsns_builder.rb +4 -4
- data/lib/zm/client/datasource/datasources_builder.rb +1 -1
- data/lib/zm/client/datasource/datasources_collection.rb +2 -2
- data/lib/zm/client/deprecated_constants.rb +36 -0
- data/lib/zm/client/distributionlist/distributionlist.rb +15 -47
- data/lib/zm/client/distributionlist/distributionlist_aces_collection.rb +4 -4
- data/lib/zm/client/distributionlist/distributionlist_aliases_collection.rb +7 -5
- data/lib/zm/client/distributionlist/distributionlist_jsns_builder.rb +29 -41
- data/lib/zm/client/distributionlist/distributionlist_jsns_initializer.rb +14 -3
- data/lib/zm/client/distributionlist/distributionlist_members_collection.rb +14 -10
- data/lib/zm/client/distributionlist/distributionlist_owners_collection.rb +13 -13
- data/lib/zm/client/distributionlist/distributionlists_collection.rb +15 -7
- data/lib/zm/client/distributionlist/dls_membership_collection.rb +8 -6
- data/lib/zm/client/document/document.rb +5 -11
- data/lib/zm/client/document/document_jsns_builder.rb +2 -2
- data/lib/zm/client/document/documents_collection.rb +4 -4
- data/lib/zm/client/domain/domain.rb +8 -25
- data/lib/zm/client/domain/domain_jsns_builder.rb +13 -13
- data/lib/zm/client/domain/domains_collection.rb +13 -6
- data/lib/zm/client/filter_rules/filter_rules_collection.rb +1 -1
- data/lib/zm/client/filter_rules/outgoing_filter_rules_collection.rb +1 -1
- data/lib/zm/client/folder/folder.rb +34 -21
- data/lib/zm/client/folder/folder_default.rb +39 -0
- data/lib/zm/client/folder/folder_grant_jsns_builder.rb +3 -3
- data/lib/zm/client/folder/folder_grants_collection.rb +1 -1
- data/lib/zm/client/folder/folder_jsns_builder.rb +12 -12
- data/lib/zm/client/folder/folder_jsns_initializer.rb +1 -1
- data/lib/zm/client/folder/folder_retention_policies_collection.rb +6 -2
- data/lib/zm/client/folder/folder_view.rb +15 -0
- data/lib/zm/client/folder/folders_jsns_builder.rb +1 -1
- data/lib/zm/client/folder/mod_document_folder.rb +16 -12
- data/lib/zm/client/identity/identities_collection.rb +1 -1
- data/lib/zm/client/identity/identity.rb +3 -9
- data/lib/zm/client/identity/identity_jsns_builder.rb +8 -8
- data/lib/zm/client/{base/ldap_filter.rb → ldap_filter.rb} +1 -1
- data/lib/zm/client/license/licenses_collection.rb +1 -1
- data/lib/zm/client/mailbox/mailbox_item_concern.rb +0 -2
- data/lib/zm/client/message/message.rb +14 -19
- data/lib/zm/client/message/message_attachments_collection.rb +39 -0
- data/lib/zm/client/message/message_flags_collection.rb +130 -0
- data/lib/zm/client/message/message_jsns_builder.rb +4 -8
- data/lib/zm/client/message/message_jsns_initializer.rb +4 -4
- data/lib/zm/client/message/message_recipients.rb +19 -43
- data/lib/zm/client/message/messages_collection.rb +20 -4
- data/lib/zm/client/mountpoint/{mountpoint.rb → mount_point.rb} +4 -10
- data/lib/zm/client/mountpoint/{mountpoint_jsns_builder.rb → mount_point_jsns_builder.rb} +3 -3
- data/lib/zm/client/mountpoint/{mountpoint_jsns_initializer.rb → mount_point_jsns_initializer.rb} +1 -1
- data/lib/zm/client/mountpoint/{mountpoints_builder.rb → mount_points_builder.rb} +1 -1
- data/lib/zm/client/mta_queue/mta_queue.rb +4 -16
- data/lib/zm/client/mta_queue/mta_queue_action.rb +12 -0
- data/lib/zm/client/mta_queue/mta_queue_jsns_builder.rb +7 -7
- data/lib/zm/client/mta_queue/mta_queue_name.rb +14 -0
- data/lib/zm/client/mta_queue/mta_queues_collection.rb +4 -3
- data/lib/zm/client/mta_queue_item/mta_queue_items_collection.rb +1 -0
- data/lib/zm/client/recipient.rb +21 -0
- data/lib/zm/client/{common/recipients.rb → recipients.rb} +0 -16
- data/lib/zm/client/resource/resource.rb +3 -7
- data/lib/zm/client/resource/resource_jsns_builder.rb +13 -13
- data/lib/zm/client/resource/resources_collection.rb +20 -7
- data/lib/zm/client/search_folder/search_folder.rb +4 -11
- data/lib/zm/client/search_folder/search_folder_jsns_builder.rb +6 -6
- data/lib/zm/client/search_folder/search_folders_collection.rb +1 -1
- data/lib/zm/client/server/server.rb +16 -22
- data/lib/zm/client/server/server_services.rb +26 -0
- data/lib/zm/client/server/servers_collection.rb +6 -6
- data/lib/zm/client/share/share.rb +2 -5
- data/lib/zm/client/share/shares_builder.rb +1 -1
- data/lib/zm/client/share/shares_collection.rb +5 -4
- data/lib/zm/client/signature/signature.rb +7 -13
- data/lib/zm/client/signature/signature_jsns_builder.rb +13 -13
- data/lib/zm/client/signature/signature_jsns_initializer.rb +2 -2
- data/lib/zm/client/signature/signatures_collection.rb +1 -1
- data/lib/zm/client/tag/account_object_tags_collection.rb +45 -47
- data/lib/zm/client/tag/tag.rb +3 -9
- data/lib/zm/client/tag/tag_jsns_builder.rb +3 -3
- data/lib/zm/client/tag/tags_builder.rb +1 -1
- data/lib/zm/client/tag/tags_collection.rb +2 -2
- data/lib/zm/client/task/task.rb +2 -2
- data/lib/zm/client/task/tasks_collection.rb +2 -2
- data/lib/zm/client/token.rb +4 -1
- data/lib/zm/client/upload.rb +179 -1
- data/lib/zm/client/{common/utils.rb → utils.rb} +6 -3
- data/lib/zm/client/zm_logger.rb +1 -1
- data/lib/zm/client.rb +227 -10
- data/lib/zm/connector/network_error_handler.rb +18 -0
- data/lib/zm/{client/connector → connector}/rest_connector.rb +46 -40
- data/lib/zm/{client/connector/soap_account.rb → connector/soap_account_connector.rb} +15 -17
- data/lib/zm/{client/connector/soap_admin.rb → connector/soap_admin_connector.rb} +3 -5
- data/lib/zm/connector/soap_base_connector.rb +115 -0
- data/lib/zm/connector.rb +13 -0
- data/lib/zm/error/auth_error.rb +8 -0
- data/lib/zm/error/connection_error.rb +8 -0
- data/lib/zm/error/rest_error.rb +8 -0
- data/lib/zm/{client/connector → error}/soap_error.rb +1 -10
- data/lib/zm/error/zm_error.rb +8 -0
- data/lib/zm/error.rb +11 -0
- data/lib/zm/relationship/has_many.rb +22 -0
- data/lib/zm/relationship/jsns_builder.rb +21 -0
- data/lib/zm/relationship/relationship.rb +113 -0
- data/lib/zm/relationship/schema.rb +32 -0
- data/lib/zm/relationship.rb +5 -0
- data/lib/zm/{client/soap_request → soap_request}/request_methods_admin.rb +11 -5
- data/lib/zm/{client/soap_request → soap_request}/request_methods_mailbox.rb +1 -1
- data/lib/zm/{client/soap_request/account_soap_constants.rb → soap_request/soap_account_constants.rb} +1 -1
- data/lib/zm/{client/soap_request/admin_soap_constants.rb → soap_request/soap_admin_constants.rb} +1 -1
- data/lib/zm/{client/soap_request → soap_request}/soap_constants.rb +1 -1
- data/lib/zm/{client/soap_request → soap_request}/soap_context.rb +13 -5
- data/lib/zm/{client/soap_request → soap_request}/soap_element.rb +1 -1
- data/lib/zm/{client/soap_request/mail_soap_constants.rb → soap_request/soap_mail_constants.rb} +1 -1
- data/lib/zm/soap_request.rb +14 -0
- data/lib/zm/support/cache/entry.rb +3 -3
- data/lib/zm/support/cache/file_store.rb +4 -6
- data/lib/zm/support/cache/null_store.rb +2 -4
- data/lib/zm/support/cache/store.rb +17 -9
- data/lib/zm/support/cache.rb +13 -8
- data/lib/zm/support.rb +7 -0
- data/lib/zm/{modules → utils}/belongs_to_folder.rb +1 -1
- data/lib/zm/{modules → utils}/belongs_to_tag.rb +2 -2
- data/lib/zm/utils/content_part.rb +9 -0
- data/lib/zm/utils/content_type.rb +11 -0
- data/lib/zm/{modules → utils}/has_soap_admin_connector.rb +1 -1
- data/lib/zm/utils/inspector.rb +26 -0
- data/lib/zm/utils/log_filter.rb +30 -0
- data/lib/zm/utils/missing_method_static_collection.rb +17 -0
- data/lib/zm/utils/regex.rb +11 -0
- data/lib/zm/utils/search_utils.rb +13 -0
- data/lib/zm/utils.rb +16 -0
- data/lib/zm-ruby-client.rb +12 -0
- data/sig/zm/client/admin_objects.rbs +261 -0
- data/sig/zm/client/base.rbs +191 -0
- data/sig/zm/client/cluster.rbs +152 -0
- data/sig/zm/client/mailbox.rbs +766 -0
- data/sig/zm/error.rbs +23 -0
- metadata +99 -91
- data/.gitignore +0 -59
- data/.rubocop.yml +0 -6
- data/.ruby-version +0 -1
- data/Gemfile +0 -11
- data/SECURITY.md +0 -21
- data/bin/console +0 -11
- data/lib/zm/client/account.rb +0 -9
- data/lib/zm/client/ace.rb +0 -7
- data/lib/zm/client/appointment.rb +0 -7
- data/lib/zm/client/backup.rb +0 -6
- data/lib/zm/client/base.rb +0 -21
- data/lib/zm/client/cluster.rb +0 -4
- data/lib/zm/client/common/message.rb +0 -10
- data/lib/zm/client/common.rb +0 -5
- data/lib/zm/client/connector/soap_base.rb +0 -104
- data/lib/zm/client/constant.rb +0 -229
- data/lib/zm/client/contact.rb +0 -11
- data/lib/zm/client/cos.rb +0 -10
- data/lib/zm/client/datasource.rb +0 -7
- data/lib/zm/client/distributionlist.rb +0 -8
- data/lib/zm/client/document.rb +0 -7
- data/lib/zm/client/domain.rb +0 -10
- data/lib/zm/client/filter_rule.rb +0 -7
- data/lib/zm/client/folder.rb +0 -14
- data/lib/zm/client/identity.rb +0 -7
- data/lib/zm/client/license.rb +0 -5
- data/lib/zm/client/message/attachments_collection.rb +0 -55
- data/lib/zm/client/message/message_flags.rb +0 -115
- data/lib/zm/client/message.rb +0 -10
- data/lib/zm/client/mountpoint.rb +0 -7
- data/lib/zm/client/mta_queue.rb +0 -7
- data/lib/zm/client/mta_queue_item.rb +0 -6
- data/lib/zm/client/resource.rb +0 -7
- data/lib/zm/client/search_folder.rb +0 -7
- data/lib/zm/client/server.rb +0 -7
- data/lib/zm/client/share.rb +0 -7
- data/lib/zm/client/signature.rb +0 -7
- data/lib/zm/client/soap_request.rb +0 -11
- data/lib/zm/client/tag.rb +0 -8
- data/lib/zm/client/task.rb +0 -6
- data/lib/zm/client/upload/upload.rb +0 -160
- data/lib/zm/modules/base.rb +0 -9
- data/lib/zm/modules/common/zimbra-attrs.json +0 -58
- data/lib/zm/modules/inspector.rb +0 -24
- data/lib/zm/modules/missing_method_static_collection.rb +0 -13
- data/lib/zm/modules/zm_model.rb +0 -43
- data/zm-ruby-client.gemspec +0 -27
- /data/lib/zm/client/mountpoint/{mountpoints_collection.rb → mount_points_collection.rb} +0 -0
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'yaml'
|
|
4
|
-
|
|
5
3
|
module Zm
|
|
6
4
|
module Client
|
|
7
5
|
# class config for cluster connection
|
|
@@ -11,7 +9,8 @@ module Zm
|
|
|
11
9
|
attr_reader :zimbra_admin_url, :zimbra_public_url
|
|
12
10
|
attr_writer :logger, :colorize_logging
|
|
13
11
|
attr_accessor :zimbra_admin_login, :zimbra_admin_password,
|
|
14
|
-
:domains, :zimbra_version, :log_path, :timeout
|
|
12
|
+
:domains, :zimbra_version, :log_path, :timeout,
|
|
13
|
+
:ssl_verify, :ssl_ca_file, :ssl_ca_path
|
|
15
14
|
|
|
16
15
|
def initialize(parameters = nil)
|
|
17
16
|
@domains = []
|
|
@@ -20,6 +19,7 @@ module Zm
|
|
|
20
19
|
@log_level = Logger::INFO
|
|
21
20
|
@colorize_logging = false
|
|
22
21
|
@timeout = 300
|
|
22
|
+
@ssl_verify = false
|
|
23
23
|
|
|
24
24
|
init_from_parameters(parameters)
|
|
25
25
|
|
|
@@ -27,11 +27,11 @@ module Zm
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def cache
|
|
30
|
-
@cache
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
@cache ||= Zm::Support::Cache.storage(cache_store_key)
|
|
31
|
+
.new(**cache_store_options)
|
|
32
|
+
.tap do |store|
|
|
33
|
+
store.logger = logger
|
|
34
|
+
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
def cache_store_key
|
|
@@ -47,14 +47,13 @@ module Zm
|
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
def cache_store=(options)
|
|
50
|
-
store_key = options
|
|
51
|
-
store_options
|
|
52
|
-
store_class = Zm::Support::Cache.
|
|
50
|
+
store_key, store_options = options
|
|
51
|
+
store_options ||= {}
|
|
52
|
+
store_class = Zm::Support::Cache.storage(store_key)
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
raise ClusterConfigError, 'invalid cache_store'
|
|
56
|
-
end
|
|
54
|
+
raise ClusterConfigError, 'invalid cache_store' unless store_class&.valid_options?(store_options)
|
|
57
55
|
|
|
56
|
+
@cache = nil
|
|
58
57
|
@cache_store = [store_key, store_options]
|
|
59
58
|
end
|
|
60
59
|
|
|
@@ -78,6 +77,7 @@ module Zm
|
|
|
78
77
|
end
|
|
79
78
|
|
|
80
79
|
def init_from_yml(file_config_path)
|
|
80
|
+
require 'yaml'
|
|
81
81
|
YAML.safe_load_file(file_config_path, symbolize_names: true)
|
|
82
82
|
end
|
|
83
83
|
|
|
@@ -101,9 +101,29 @@ module Zm
|
|
|
101
101
|
@timeout = p_timeout.to_i
|
|
102
102
|
end
|
|
103
103
|
|
|
104
|
+
init_ssl_from_parameters(parameters)
|
|
105
|
+
|
|
104
106
|
init_domains_from_parameters(parameters)
|
|
105
107
|
end
|
|
106
108
|
|
|
109
|
+
def init_ssl_from_parameters(parameters)
|
|
110
|
+
@ssl_verify = parameters.delete(:ssl_verify) == true if parameters.key?(:ssl_verify)
|
|
111
|
+
@ssl_ca_file = parameters.delete(:ssl_ca_file) if parameters.key?(:ssl_ca_file)
|
|
112
|
+
@ssl_ca_path = parameters.delete(:ssl_ca_path) if parameters.key?(:ssl_ca_path)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def ssl_options
|
|
116
|
+
return Zm::Connector::SSL_VERIFY_NONE unless @ssl_verify
|
|
117
|
+
|
|
118
|
+
{
|
|
119
|
+
verify: true,
|
|
120
|
+
verify_hostname: true,
|
|
121
|
+
verify_mode: OpenSSL::SSL::VERIFY_PEER,
|
|
122
|
+
ca_file: @ssl_ca_file,
|
|
123
|
+
ca_path: @ssl_ca_path
|
|
124
|
+
}.compact
|
|
125
|
+
end
|
|
126
|
+
|
|
107
127
|
def init_domains_from_parameters(parameters)
|
|
108
128
|
if (config_domains = parameters.delete(:domains))
|
|
109
129
|
@domains = config_domains.map do |h|
|
|
@@ -167,7 +187,7 @@ module Zm
|
|
|
167
187
|
end
|
|
168
188
|
|
|
169
189
|
def zimbra_attributes_path
|
|
170
|
-
@zimbra_attributes_path ||=
|
|
190
|
+
@zimbra_attributes_path ||= File.expand_path('../../modules/common/zimbra-attrs.csv', __dir__)
|
|
171
191
|
end
|
|
172
192
|
|
|
173
193
|
def zimbra_attributes_path=(path)
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module Zm
|
|
4
4
|
module Client
|
|
5
|
-
# class account
|
|
5
|
+
# class account Contact
|
|
6
6
|
class Contact < Base::Object
|
|
7
|
-
include BelongsToFolder
|
|
8
|
-
include BelongsToTag
|
|
9
|
-
include RequestMethodsMailbox
|
|
7
|
+
include Zm::Utils::BelongsToFolder
|
|
8
|
+
include Zm::Utils::BelongsToTag
|
|
9
|
+
include SoapRequest::RequestMethodsMailbox
|
|
10
10
|
include MailboxItemConcern
|
|
11
|
+
extend Zm::Relationship
|
|
12
|
+
has_jsns_builder
|
|
11
13
|
|
|
12
14
|
GROUP_PATTERN = 'group'
|
|
13
15
|
|
|
@@ -19,11 +21,11 @@ module Zm
|
|
|
19
21
|
:maidenName, :middleName, :mobilePhone, :namePrefix, :nameSuffix, :nickname, :notes,
|
|
20
22
|
:otherCity, :otherCountry, :otherFax, :otherPhone, :otherPostalCode, :otherState,
|
|
21
23
|
:otherStreet, :otherURL, :pager, :workCity, :workCountry, :workFax, :workPhone,
|
|
22
|
-
:workPostalCode, :workState, :workStreet, :workURL, :image, :name, :type,
|
|
24
|
+
:workPostalCode, :workState, :workStreet, :workURL, :image, :name, :type, :fileAs,
|
|
23
25
|
:tn, :shared_account_id, :shared_folder_account_id
|
|
24
26
|
|
|
25
27
|
def initialize(parent)
|
|
26
|
-
|
|
28
|
+
self.l = FolderDefault::CONTACTS.id
|
|
27
29
|
@shared_account_id = nil
|
|
28
30
|
@shared_folder_account_id = nil
|
|
29
31
|
super
|
|
@@ -60,13 +62,13 @@ module Zm
|
|
|
60
62
|
raise NotImplementedError
|
|
61
63
|
end
|
|
62
64
|
|
|
63
|
-
private
|
|
64
|
-
|
|
65
|
-
def jsns_builder
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
end
|
|
65
|
+
# private
|
|
66
|
+
#
|
|
67
|
+
# def jsns_builder
|
|
68
|
+
# return @jsns_builder if defined? @jsns_builder
|
|
69
|
+
#
|
|
70
|
+
# @jsns_builder = ContactJsnsBuilder.new(self)
|
|
71
|
+
# end
|
|
70
72
|
end
|
|
71
73
|
end
|
|
72
74
|
end
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
module Zm
|
|
4
4
|
module Client
|
|
5
5
|
# class for account contact jsns builder
|
|
6
|
-
class ContactJsnsBuilder < BaseAccountJsnsBuilder
|
|
7
|
-
EXCLUDE_INSTANCE_VARIABLE_KEYS = %i[
|
|
6
|
+
class ContactJsnsBuilder < Base::BaseAccountJsnsBuilder
|
|
7
|
+
EXCLUDE_INSTANCE_VARIABLE_KEYS = %i[
|
|
8
|
+
@id @name @parent @l @type @tn @jsns_builder @updated @token @tags @folder
|
|
9
|
+
@shared_account_id @shared_folder_account_id
|
|
10
|
+
].freeze
|
|
8
11
|
|
|
9
12
|
def to_jsns
|
|
10
13
|
jsns = {
|
|
@@ -14,7 +17,7 @@ module Zm
|
|
|
14
17
|
}
|
|
15
18
|
}
|
|
16
19
|
|
|
17
|
-
SoapElement.mail(SoapMailConstants::CREATE_CONTACT_REQUEST).add_attributes(jsns)
|
|
20
|
+
SoapRequest::SoapElement.mail(SoapRequest::SoapMailConstants::CREATE_CONTACT_REQUEST).add_attributes(jsns)
|
|
18
21
|
end
|
|
19
22
|
|
|
20
23
|
def to_update
|
|
@@ -25,18 +28,18 @@ module Zm
|
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
30
|
|
|
28
|
-
SoapElement.mail(SoapMailConstants::MODIFY_CONTACT_REQUEST).add_attributes(jsns)
|
|
31
|
+
SoapRequest::SoapElement.mail(SoapRequest::SoapMailConstants::MODIFY_CONTACT_REQUEST).add_attributes(jsns)
|
|
29
32
|
end
|
|
30
33
|
|
|
31
34
|
def to_patch(hash)
|
|
32
35
|
jsns = {
|
|
33
36
|
cn: {
|
|
34
37
|
id: @item.id,
|
|
35
|
-
a: hash.
|
|
38
|
+
a: hash.flat_map(&Utils::A_ARRAY_PROC).map(&Utils::A_NODE_PROC)
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
|
|
39
|
-
SoapElement.mail(SoapMailConstants::MODIFY_CONTACT_REQUEST).add_attributes(jsns)
|
|
42
|
+
SoapRequest::SoapElement.mail(SoapRequest::SoapMailConstants::MODIFY_CONTACT_REQUEST).add_attributes(jsns)
|
|
40
43
|
end
|
|
41
44
|
|
|
42
45
|
def instance_variables_array(zcs_attrs)
|
|
@@ -22,7 +22,7 @@ module Zm
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
if item.group?
|
|
25
|
-
item.extend(
|
|
25
|
+
item.extend(Zm::Client::ModGroupContact)
|
|
26
26
|
init_members_from_json(json[:m], item)
|
|
27
27
|
end
|
|
28
28
|
|
|
@@ -48,7 +48,7 @@ module Zm
|
|
|
48
48
|
def init_members_from_json(m, item)
|
|
49
49
|
return if m.nil?
|
|
50
50
|
|
|
51
|
-
item.members.all = m.map { |m| Zm::Client::
|
|
51
|
+
item.members.all = m.map { |m| Zm::Client::ContactMember.new(m[:type], m[:value]) }
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
54
|
end
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Zm
|
|
4
4
|
module Client
|
|
5
|
-
class
|
|
6
|
-
include Zm::Inspector
|
|
5
|
+
class ContactMember
|
|
6
|
+
include Zm::Utils::Inspector
|
|
7
7
|
|
|
8
8
|
INTERNAL = 'C'
|
|
9
9
|
FREE = 'I'
|
|
@@ -22,7 +22,7 @@ module Zm
|
|
|
22
22
|
|
|
23
23
|
if !value_int.zero?
|
|
24
24
|
@value = value_int
|
|
25
|
-
elsif Zm::
|
|
25
|
+
elsif Zm::Utils::Regex::SHARED_CONTACT.match(value)
|
|
26
26
|
part_value = value.split(':')
|
|
27
27
|
@shared_account_id = part_value.first
|
|
28
28
|
@value = part_value.last.to_i
|
|
@@ -11,7 +11,7 @@ module Zm
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def add(new_member)
|
|
14
|
-
return false unless new_member.is_a?(Zm::Client::
|
|
14
|
+
return false unless new_member.is_a?(Zm::Client::ContactMember)
|
|
15
15
|
|
|
16
16
|
current_member = @all.find { |m| m.type == new_member.type && m.value == new_member.value }
|
|
17
17
|
|
|
@@ -21,7 +21,7 @@ module Zm
|
|
|
21
21
|
return true
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
if current_member.op == Zm::Client::
|
|
24
|
+
if current_member.op == Zm::Client::ContactMember::DEL
|
|
25
25
|
current_member.add!
|
|
26
26
|
return true
|
|
27
27
|
end
|
|
@@ -30,7 +30,7 @@ module Zm
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
def remove(new_member)
|
|
33
|
-
return false unless new_member.is_a?(Zm::Client::
|
|
33
|
+
return false unless new_member.is_a?(Zm::Client::ContactMember)
|
|
34
34
|
|
|
35
35
|
current_member = @all.find { |m| m.type == new_member.type && m.value == new_member.value }
|
|
36
36
|
return false if current_member.nil?
|
|
@@ -7,8 +7,8 @@ module Zm
|
|
|
7
7
|
def initialize(parent)
|
|
8
8
|
super
|
|
9
9
|
@child_class = Contact
|
|
10
|
-
@builder_class =
|
|
11
|
-
@type = SoapConstants::CONTACT
|
|
10
|
+
@builder_class = ContactsBuilder
|
|
11
|
+
@type = SoapRequest::SoapConstants::CONTACT
|
|
12
12
|
@folder_ids = [FolderDefault::CONTACTS.id]
|
|
13
13
|
end
|
|
14
14
|
end
|
|
@@ -3,20 +3,18 @@
|
|
|
3
3
|
module Zm
|
|
4
4
|
module Client
|
|
5
5
|
# class for account contact jsns builder
|
|
6
|
-
class GroupContactJsnsBuilder < BaseAccountJsnsBuilder
|
|
7
|
-
EXCLUDE_INSTANCE_VARIABLE_KEYS = %i[@id @name @parent @l @type @tn @jsns_builder].freeze
|
|
8
|
-
|
|
6
|
+
class GroupContactJsnsBuilder < Base::BaseAccountJsnsBuilder
|
|
9
7
|
def to_jsns
|
|
10
|
-
{
|
|
8
|
+
jsns = {
|
|
11
9
|
cn: {
|
|
12
10
|
a: instance_variables_array.map(&Utils::A_NODE_PROC),
|
|
13
|
-
l: @item.
|
|
14
|
-
m:
|
|
11
|
+
l: @item.l || Zm::Client::FolderDefault::CONTACTS.id,
|
|
12
|
+
m: new_members_node
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
15
|
|
|
18
|
-
SoapElement.mail(SoapMailConstants::CREATE_CONTACT_REQUEST)
|
|
19
|
-
|
|
16
|
+
SoapRequest::SoapElement.mail(SoapRequest::SoapMailConstants::CREATE_CONTACT_REQUEST)
|
|
17
|
+
.add_attributes(jsns)
|
|
20
18
|
end
|
|
21
19
|
|
|
22
20
|
def to_update
|
|
@@ -28,24 +26,30 @@ module Zm
|
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
|
|
31
|
-
SoapElement.mail(SoapMailConstants::MODIFY_CONTACT_REQUEST)
|
|
32
|
-
|
|
29
|
+
SoapRequest::SoapElement.mail(SoapRequest::SoapMailConstants::MODIFY_CONTACT_REQUEST)
|
|
30
|
+
.add_attributes(jsns)
|
|
33
31
|
end
|
|
34
32
|
|
|
35
33
|
def to_patch(hash)
|
|
36
|
-
{
|
|
34
|
+
jsns = {
|
|
37
35
|
cn: {
|
|
38
36
|
id: @item.id,
|
|
39
|
-
a: hash.
|
|
37
|
+
a: hash.flat_map(&Utils::A_ARRAY_PROC).map(&Utils::A_NODE_PROC)
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
SoapElement.mail(SoapMailConstants::MODIFY_CONTACT_REQUEST)
|
|
44
|
-
|
|
41
|
+
SoapRequest::SoapElement.mail(SoapRequest::SoapMailConstants::MODIFY_CONTACT_REQUEST)
|
|
42
|
+
.add_attributes(jsns)
|
|
45
43
|
end
|
|
46
44
|
|
|
47
45
|
alias to_create to_jsns
|
|
48
46
|
|
|
47
|
+
def new_members_node
|
|
48
|
+
@item.members.all.reject { |m| m.op == ContactMember::DEL }.map do |m|
|
|
49
|
+
{ type: m.type, value: m.value }
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
49
53
|
def members_node
|
|
50
54
|
@item.members.all.reject(&:current?).map do |m|
|
|
51
55
|
{ type: m.type, value: m.value, op: m.op }
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
module Zm
|
|
4
|
+
module Client
|
|
5
|
+
module ModGroupContact
|
|
6
|
+
def members
|
|
7
|
+
return @members if defined? @members
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
@members = Zm::Client::ContactMembersCollection.new(self)
|
|
10
|
+
end
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
def jsns_builder
|
|
13
|
+
return @jsns_builder if defined? @jsns_builder
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
@jsns_builder = Zm::Client::GroupContactJsnsBuilder.new(self)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
14
18
|
end
|
|
15
19
|
end
|
data/lib/zm/client/cos/cos.rb
CHANGED
|
@@ -4,7 +4,10 @@ module Zm
|
|
|
4
4
|
module Client
|
|
5
5
|
# objectClass: zimbraCos
|
|
6
6
|
class Cos < Base::Object
|
|
7
|
-
|
|
7
|
+
extend Relationship
|
|
8
|
+
has_jsns_builder
|
|
9
|
+
|
|
10
|
+
include Zm::Utils::HasSoapAdminConnector
|
|
8
11
|
|
|
9
12
|
def modify!
|
|
10
13
|
sac.invoke(build_modify)
|
|
@@ -15,16 +18,21 @@ module Zm
|
|
|
15
18
|
jsns_builder.to_update
|
|
16
19
|
end
|
|
17
20
|
|
|
18
|
-
def update!(hash)
|
|
21
|
+
def update!(hash = nil, update_attributes: true, **attrs)
|
|
22
|
+
hash = hash.nil? ? attrs : hash.merge(attrs)
|
|
19
23
|
return false if hash.delete_if { |k, v| v.nil? || !respond_to?(k) }.empty?
|
|
20
24
|
|
|
21
25
|
do_update!(hash)
|
|
22
26
|
|
|
27
|
+
do_update_attributes(hash) if update_attributes
|
|
28
|
+
|
|
29
|
+
@updated = true
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def do_update_attributes(hash)
|
|
23
33
|
hash.each do |key, value|
|
|
24
34
|
update_attribute(key, value)
|
|
25
35
|
end
|
|
26
|
-
|
|
27
|
-
true
|
|
28
36
|
end
|
|
29
37
|
|
|
30
38
|
def create!
|
|
@@ -54,38 +62,14 @@ module Zm
|
|
|
54
62
|
jsns_builder.to_copy(new_name)
|
|
55
63
|
end
|
|
56
64
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
@servers = CosServersCollection.new(self)
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
def domains
|
|
64
|
-
return if @id.nil?
|
|
65
|
-
|
|
66
|
-
return @domains if defined? @domains
|
|
67
|
-
|
|
68
|
-
@domains = CosDomainsCollection.new(self)
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
def accounts
|
|
72
|
-
return if @id.nil?
|
|
73
|
-
|
|
74
|
-
return @accounts if defined? @accounts
|
|
75
|
-
|
|
76
|
-
@accounts = CosAccountsCollection.new(self)
|
|
77
|
-
end
|
|
65
|
+
has_many :servers, klass: :'Zm::Client::CosServersCollection'
|
|
66
|
+
has_many :domains, klass: :'Zm::Client::CosDomainsCollection'
|
|
67
|
+
has_many :accounts, klass: :'Zm::Client::CosAccountsCollection'
|
|
78
68
|
|
|
79
69
|
def attrs_write
|
|
80
70
|
@parent.zimbra_attributes.all_cos_attrs_writable_names
|
|
81
71
|
end
|
|
82
72
|
|
|
83
|
-
def jsns_builder
|
|
84
|
-
return @jsns_builder if defined? @jsns_builder
|
|
85
|
-
|
|
86
|
-
@jsns_builder = CosJsnsBuilder.new(self)
|
|
87
|
-
end
|
|
88
|
-
|
|
89
73
|
private
|
|
90
74
|
|
|
91
75
|
def do_update!(hash)
|
|
@@ -9,14 +9,14 @@ module Zm
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def to_create
|
|
12
|
-
soap_request = SoapElement.admin(SoapAdminConstants::CREATE_COS_REQUEST)
|
|
13
|
-
node_cos = SoapElement.create(SoapConstants::NAME).add_content(@item.name)
|
|
12
|
+
soap_request = SoapRequest::SoapElement.admin(Zm::SoapRequest::SoapAdminConstants::CREATE_COS_REQUEST)
|
|
13
|
+
node_cos = SoapRequest::SoapElement.create(SoapRequest::SoapConstants::NAME).add_content(@item.name)
|
|
14
14
|
soap_request.add_node(node_cos)
|
|
15
15
|
|
|
16
16
|
attrs_only_set_h.each do |key, values|
|
|
17
17
|
values.each do |value|
|
|
18
|
-
node_attr = SoapElement.create(SoapConstants::A)
|
|
19
|
-
.add_attribute(SoapConstants::N, key)
|
|
18
|
+
node_attr = SoapRequest::SoapElement.create(SoapRequest::SoapConstants::A)
|
|
19
|
+
.add_attribute(SoapRequest::SoapConstants::N, key)
|
|
20
20
|
.add_content(value)
|
|
21
21
|
soap_request.add_node(node_attr)
|
|
22
22
|
end
|
|
@@ -26,15 +26,15 @@ module Zm
|
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
def to_update
|
|
29
|
-
soap_request = SoapElement.admin(SoapAdminConstants::MODIFY_COS_REQUEST)
|
|
30
|
-
node_cos = SoapElement.create(SoapConstants::ID)
|
|
29
|
+
soap_request = SoapRequest::SoapElement.admin(Zm::SoapRequest::SoapAdminConstants::MODIFY_COS_REQUEST)
|
|
30
|
+
node_cos = SoapRequest::SoapElement.create(SoapRequest::SoapConstants::ID)
|
|
31
31
|
.add_content(@item.id)
|
|
32
32
|
soap_request.add_node(node_cos)
|
|
33
33
|
|
|
34
34
|
attrs_only_set_h.each do |key, values|
|
|
35
35
|
values.each do |value|
|
|
36
|
-
node_attr = SoapElement.create(SoapConstants::A)
|
|
37
|
-
.add_attribute(SoapConstants::N, key)
|
|
36
|
+
node_attr = SoapRequest::SoapElement.create(SoapRequest::SoapConstants::A)
|
|
37
|
+
.add_attribute(SoapRequest::SoapConstants::N, key)
|
|
38
38
|
.add_content(value)
|
|
39
39
|
soap_request.add_node(node_attr)
|
|
40
40
|
end
|
|
@@ -44,16 +44,16 @@ module Zm
|
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
def to_patch(hash)
|
|
47
|
-
soap_request = SoapElement.admin(SoapAdminConstants::MODIFY_COS_REQUEST)
|
|
48
|
-
node_cos = SoapElement.create(SoapConstants::ID)
|
|
47
|
+
soap_request = SoapRequest::SoapElement.admin(Zm::SoapRequest::SoapAdminConstants::MODIFY_COS_REQUEST)
|
|
48
|
+
node_cos = SoapRequest::SoapElement.create(SoapRequest::SoapConstants::ID)
|
|
49
49
|
.add_content(@item.id)
|
|
50
50
|
soap_request.add_node(node_cos)
|
|
51
51
|
|
|
52
52
|
hash.each do |key, values|
|
|
53
53
|
values = [values] unless values.is_a?(Array)
|
|
54
54
|
values.each do |value|
|
|
55
|
-
node_attr = SoapElement.create(SoapConstants::A)
|
|
56
|
-
.add_attribute(SoapConstants::N, key)
|
|
55
|
+
node_attr = SoapRequest::SoapElement.create(SoapRequest::SoapConstants::A)
|
|
56
|
+
.add_attribute(SoapRequest::SoapConstants::N, key)
|
|
57
57
|
.add_content(value)
|
|
58
58
|
soap_request.add_node(node_attr)
|
|
59
59
|
end
|
|
@@ -63,20 +63,20 @@ module Zm
|
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
def to_copy(new_name)
|
|
66
|
-
soap_request = SoapElement.admin(SoapAdminConstants::COPY_COS_REQUEST)
|
|
67
|
-
node_name = SoapElement.create(SoapConstants::NAME)
|
|
66
|
+
soap_request = SoapRequest::SoapElement.admin(Zm::SoapRequest::SoapAdminConstants::COPY_COS_REQUEST)
|
|
67
|
+
node_name = SoapRequest::SoapElement.create(SoapRequest::SoapConstants::NAME)
|
|
68
68
|
.add_content(new_name)
|
|
69
69
|
|
|
70
70
|
if @item.id
|
|
71
|
-
node_cos = SoapElement.create(SoapConstants::COS)
|
|
72
|
-
.add_attribute(SoapConstants::BY, SoapConstants::ID)
|
|
71
|
+
node_cos = SoapRequest::SoapElement.create(SoapRequest::SoapConstants::COS)
|
|
72
|
+
.add_attribute(SoapRequest::SoapConstants::BY, SoapRequest::SoapConstants::ID)
|
|
73
73
|
.add_content(@item.id)
|
|
74
74
|
elsif @item.name
|
|
75
|
-
node_cos = SoapElement.create(SoapConstants::COS)
|
|
76
|
-
.add_attribute(SoapConstants::BY, SoapConstants::NAME)
|
|
75
|
+
node_cos = SoapRequest::SoapElement.create(SoapRequest::SoapConstants::COS)
|
|
76
|
+
.add_attribute(SoapRequest::SoapConstants::BY, SoapRequest::SoapConstants::NAME)
|
|
77
77
|
.add_content(@item.name)
|
|
78
78
|
else
|
|
79
|
-
raise Zm::
|
|
79
|
+
raise Zm::Error::ZmError, 'id or name attributes are required to clone cos'
|
|
80
80
|
end
|
|
81
81
|
|
|
82
82
|
soap_request.add_node(node_name)
|
|
@@ -85,8 +85,8 @@ module Zm
|
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
def to_delete
|
|
88
|
-
SoapElement.admin(SoapAdminConstants::DELETE_COS_REQUEST).add_node(
|
|
89
|
-
SoapElement.create(SoapConstants::ID).add_content(@item.id)
|
|
88
|
+
SoapRequest::SoapElement.admin(Zm::SoapRequest::SoapAdminConstants::DELETE_COS_REQUEST).add_node(
|
|
89
|
+
SoapRequest::SoapElement.create(SoapRequest::SoapConstants::ID).add_content(@item.id)
|
|
90
90
|
)
|
|
91
91
|
end
|
|
92
92
|
|
|
@@ -7,17 +7,17 @@ module Zm
|
|
|
7
7
|
def initialize(parent)
|
|
8
8
|
@child_class = Cos
|
|
9
9
|
@builder_class = CosesBuilder
|
|
10
|
-
@search_type =
|
|
10
|
+
@search_type = :coses
|
|
11
11
|
super
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def find_by!(hash)
|
|
15
|
-
soap_request = SoapElement.admin(SoapAdminConstants::GET_COS_REQUEST)
|
|
16
|
-
node_cos = SoapElement.create(SoapConstants::COS)
|
|
17
|
-
.add_attribute(SoapConstants::BY, hash.keys.first)
|
|
15
|
+
soap_request = SoapRequest::SoapElement.admin(Zm::SoapRequest::SoapAdminConstants::GET_COS_REQUEST)
|
|
16
|
+
node_cos = SoapRequest::SoapElement.create(SoapRequest::SoapConstants::COS)
|
|
17
|
+
.add_attribute(SoapRequest::SoapConstants::BY, hash.keys.first)
|
|
18
18
|
.add_content(hash.values.first)
|
|
19
19
|
soap_request.add_node(node_cos)
|
|
20
|
-
soap_request.add_attribute(SoapConstants::ATTRS, attrs_comma)
|
|
20
|
+
soap_request.add_attribute(SoapRequest::SoapConstants::ATTRS, attrs_comma)
|
|
21
21
|
entry = sac.invoke(soap_request)[:GetCosResponse][:cos].first
|
|
22
22
|
|
|
23
23
|
reset_query_params
|
|
@@ -33,7 +33,12 @@ module Zm
|
|
|
33
33
|
|
|
34
34
|
def reset_query_params
|
|
35
35
|
super
|
|
36
|
-
@attrs =
|
|
36
|
+
@attrs = %w[
|
|
37
|
+
cn
|
|
38
|
+
description
|
|
39
|
+
zimbraMailHostPool
|
|
40
|
+
zimbraMailQuota
|
|
41
|
+
]
|
|
37
42
|
end
|
|
38
43
|
end
|
|
39
44
|
end
|
|
@@ -4,7 +4,9 @@ module Zm
|
|
|
4
4
|
module Client
|
|
5
5
|
# class account data source
|
|
6
6
|
class DataSource < Base::Object
|
|
7
|
-
include RequestMethodsMailbox
|
|
7
|
+
include SoapRequest::RequestMethodsMailbox
|
|
8
|
+
extend Relationship
|
|
9
|
+
has_jsns_builder
|
|
8
10
|
|
|
9
11
|
TYPES = %i[cal caldav yab gal imap pop3 rss unknown].freeze
|
|
10
12
|
|
|
@@ -49,14 +51,6 @@ module Zm
|
|
|
49
51
|
def build_rename(*args)
|
|
50
52
|
raise NotImplementedError
|
|
51
53
|
end
|
|
52
|
-
|
|
53
|
-
private
|
|
54
|
-
|
|
55
|
-
def jsns_builder
|
|
56
|
-
return @jsns_builder if defined? @jsns_builder
|
|
57
|
-
|
|
58
|
-
@jsns_builder = DataSourceJsnsBuilder.new(self)
|
|
59
|
-
end
|
|
60
54
|
end
|
|
61
55
|
end
|
|
62
56
|
end
|
|
@@ -15,15 +15,15 @@ module Zm
|
|
|
15
15
|
|
|
16
16
|
attrs.compact!
|
|
17
17
|
|
|
18
|
-
soap_request = SoapElement.mail(SoapMailConstants::MODIFY_DATA_SOURCE_REQUEST)
|
|
19
|
-
node_action = SoapElement.create(@item.type).add_attributes(attrs)
|
|
18
|
+
soap_request = SoapRequest::SoapElement.mail(SoapRequest::SoapMailConstants::MODIFY_DATA_SOURCE_REQUEST)
|
|
19
|
+
node_action = SoapRequest::SoapElement.create(@item.type).add_attributes(attrs)
|
|
20
20
|
soap_request.add_node(node_action)
|
|
21
21
|
soap_request
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def to_delete
|
|
25
|
-
soap_request = SoapElement.mail(SoapMailConstants::DELETE_DATA_SOURCE_REQUEST)
|
|
26
|
-
node_action = SoapElement.create(@item.type).add_attributes(id: @item.id)
|
|
25
|
+
soap_request = SoapRequest::SoapElement.mail(SoapRequest::SoapMailConstants::DELETE_DATA_SOURCE_REQUEST)
|
|
26
|
+
node_action = SoapRequest::SoapElement.create(@item.type).add_attributes(id: @item.id)
|
|
27
27
|
soap_request.add_node(node_action)
|
|
28
28
|
soap_request
|
|
29
29
|
end
|