purecloudplatformclientv2 21.0.0 → 22.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/docs/Entity.md +0 -1
  4. data/docs/GroupProfile.md +18 -0
  5. data/docs/GroupsApi.md +60 -0
  6. data/docs/InboundRoute.md +1 -1
  7. data/docs/JsonNode.md +1 -1
  8. data/docs/MediaPolicies.md +1 -0
  9. data/docs/MessageMediaPolicy.md +14 -0
  10. data/docs/MessageMediaPolicyConditions.md +17 -0
  11. data/docs/NamedEntity.md +14 -0
  12. data/docs/OrgOAuthClient.md +1 -1
  13. data/docs/RoutingApi.md +2 -2
  14. data/docs/TokenInfo.md +2 -2
  15. data/docs/UserConversationSummary.md +1 -0
  16. data/docs/UserExpands.md +19 -0
  17. data/docs/UserProfile.md +19 -0
  18. data/docs/UserProfileEntityListing.md +22 -0
  19. data/docs/UsersApi.md +137 -0
  20. data/docs/WorkforceManagementApi.md +5 -3
  21. data/lib/purecloudplatformclientv2.rb +7 -0
  22. data/lib/purecloudplatformclientv2/api/groups_api.rb +65 -0
  23. data/lib/purecloudplatformclientv2/api/users_api.rb +200 -0
  24. data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +14 -1
  25. data/lib/purecloudplatformclientv2/api_client.rb +1 -1
  26. data/lib/purecloudplatformclientv2/models/entity.rb +4 -29
  27. data/lib/purecloudplatformclientv2/models/event_log.rb +2 -2
  28. data/lib/purecloudplatformclientv2/models/event_message.rb +2 -2
  29. data/lib/purecloudplatformclientv2/models/group_profile.rb +350 -0
  30. data/lib/purecloudplatformclientv2/models/inbound_route.rb +7 -7
  31. data/lib/purecloudplatformclientv2/models/json_node.rb +17 -17
  32. data/lib/purecloudplatformclientv2/models/media_policies.rb +30 -4
  33. data/lib/purecloudplatformclientv2/models/message_media_policy.rb +228 -0
  34. data/lib/purecloudplatformclientv2/models/message_media_policy_conditions.rb +309 -0
  35. data/lib/purecloudplatformclientv2/models/named_entity.rb +228 -0
  36. data/lib/purecloudplatformclientv2/models/org_o_auth_client.rb +1 -1
  37. data/lib/purecloudplatformclientv2/models/token_info.rb +2 -2
  38. data/lib/purecloudplatformclientv2/models/user_conversation_summary.rb +26 -1
  39. data/lib/purecloudplatformclientv2/models/user_expands.rb +358 -0
  40. data/lib/purecloudplatformclientv2/models/user_profile.rb +376 -0
  41. data/lib/purecloudplatformclientv2/models/user_profile_entity_listing.rb +428 -0
  42. data/lib/purecloudplatformclientv2/version.rb +1 -1
  43. metadata +16 -2
@@ -27,6 +27,9 @@ module PureCloud
27
27
  # Conditions and actions for emails
28
28
  attr_accessor :email_policy
29
29
 
30
+ # Conditions and actions for messages
31
+ attr_accessor :message_policy
32
+
30
33
  # Attribute mapping from ruby-style variable name to JSON key.
31
34
  def self.attribute_map
32
35
  {
@@ -35,7 +38,9 @@ module PureCloud
35
38
 
36
39
  :'chat_policy' => :'chatPolicy',
37
40
 
38
- :'email_policy' => :'emailPolicy'
41
+ :'email_policy' => :'emailPolicy',
42
+
43
+ :'message_policy' => :'messagePolicy'
39
44
 
40
45
  }
41
46
  end
@@ -48,7 +53,9 @@ module PureCloud
48
53
 
49
54
  :'chat_policy' => :'ChatMediaPolicy',
50
55
 
51
- :'email_policy' => :'EmailMediaPolicy'
56
+ :'email_policy' => :'EmailMediaPolicy',
57
+
58
+ :'message_policy' => :'MessageMediaPolicy'
52
59
 
53
60
  }
54
61
  end
@@ -89,6 +96,15 @@ module PureCloud
89
96
  end
90
97
 
91
98
 
99
+ if attributes.has_key?(:'messagePolicy')
100
+
101
+
102
+ self.message_policy = attributes[:'messagePolicy']
103
+
104
+
105
+ end
106
+
107
+
92
108
  end
93
109
 
94
110
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -116,6 +132,10 @@ module PureCloud
116
132
 
117
133
 
118
134
 
135
+
136
+
137
+
138
+
119
139
  end
120
140
 
121
141
 
@@ -132,6 +152,11 @@ module PureCloud
132
152
 
133
153
 
134
154
 
155
+
156
+
157
+
158
+
159
+
135
160
 
136
161
 
137
162
  # Checks equality by comparing each attribute.
@@ -141,7 +166,8 @@ module PureCloud
141
166
  self.class == o.class &&
142
167
  call_policy == o.call_policy &&
143
168
  chat_policy == o.chat_policy &&
144
- email_policy == o.email_policy
169
+ email_policy == o.email_policy &&
170
+ message_policy == o.message_policy
145
171
  end
146
172
 
147
173
  # @see the `==` method
@@ -153,7 +179,7 @@ module PureCloud
153
179
  # Calculates hash code according to all attributes.
154
180
  # @return [Fixnum] Hash code
155
181
  def hash
156
- [call_policy, chat_policy, email_policy].hash
182
+ [call_policy, chat_policy, email_policy, message_policy].hash
157
183
  end
158
184
 
159
185
  # build the object from hash
@@ -0,0 +1,228 @@
1
+ =begin
2
+ PureCloud Platform API
3
+
4
+ With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.
5
+
6
+ OpenAPI spec version: v2
7
+ Contact: DeveloperEvangelists@genesys.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ License: ININ
11
+ http://www.inin.com
12
+
13
+ Terms of Service: https://developer.mypurecloud.com/tos
14
+
15
+ =end
16
+
17
+ require 'date'
18
+
19
+ module PureCloud
20
+ class MessageMediaPolicy
21
+ # Actions applied when specified conditions are met
22
+ attr_accessor :actions
23
+
24
+ # Conditions for when actions should be applied
25
+ attr_accessor :conditions
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+
31
+ :'actions' => :'actions',
32
+
33
+ :'conditions' => :'conditions'
34
+
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+
42
+ :'actions' => :'PolicyActions',
43
+
44
+ :'conditions' => :'MessageMediaPolicyConditions'
45
+
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ return unless attributes.is_a?(Hash)
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
56
+
57
+
58
+ if attributes.has_key?(:'actions')
59
+
60
+
61
+ self.actions = attributes[:'actions']
62
+
63
+
64
+ end
65
+
66
+
67
+ if attributes.has_key?(:'conditions')
68
+
69
+
70
+ self.conditions = attributes[:'conditions']
71
+
72
+
73
+ end
74
+
75
+
76
+ end
77
+
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properies with the reasons
80
+ def list_invalid_properties
81
+ invalid_properties = Array.new
82
+
83
+
84
+ return invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ end
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ actions == o.actions &&
118
+ conditions == o.conditions
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Fixnum] Hash code
129
+ def hash
130
+ [actions, conditions].hash
131
+ end
132
+
133
+ # build the object from hash
134
+ def build_from_hash(attributes)
135
+ return nil unless attributes.is_a?(Hash)
136
+ self.class.swagger_types.each_pair do |key, type|
137
+ if type =~ /^Array<(.*)>/i
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
140
+ else
141
+ #TODO show warning in debug mode
142
+ end
143
+ elsif !attributes[self.class.attribute_map[key]].nil?
144
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
145
+ else
146
+ # data not found in attributes(hash), not an issue as the data can be optional
147
+ end
148
+ end
149
+
150
+ self
151
+ end
152
+
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :DateTime
156
+ DateTime.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :BOOLEAN
166
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ _model = Object.const_get("PureCloud").const_get(type).new
187
+ _model.build_from_hash(value)
188
+ end
189
+ end
190
+
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_body (backward compatibility))
196
+ def to_body
197
+ to_hash
198
+ end
199
+
200
+ # return the object in the form of hash
201
+ def to_hash
202
+ hash = {}
203
+ self.class.attribute_map.each_pair do |attr, param|
204
+ value = self.send(attr)
205
+ next if value.nil?
206
+ hash[param] = _to_hash(value)
207
+ end
208
+ hash
209
+ end
210
+
211
+ # Method to output non-array value in the form of hash
212
+ # For object, use to_hash. Otherwise, just return the value
213
+ def _to_hash(value)
214
+ if value.is_a?(Array)
215
+ value.compact.map{ |v| _to_hash(v) }
216
+ elsif value.is_a?(Hash)
217
+ {}.tap do |hash|
218
+ value.each { |k, v| hash[k] = _to_hash(v) }
219
+ end
220
+ elsif value.respond_to? :to_hash
221
+ value.to_hash
222
+ else
223
+ value
224
+ end
225
+ end
226
+
227
+ end
228
+ end
@@ -0,0 +1,309 @@
1
+ =begin
2
+ PureCloud Platform API
3
+
4
+ With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.
5
+
6
+ OpenAPI spec version: v2
7
+ Contact: DeveloperEvangelists@genesys.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ License: ININ
11
+ http://www.inin.com
12
+
13
+ Terms of Service: https://developer.mypurecloud.com/tos
14
+
15
+ =end
16
+
17
+ require 'date'
18
+
19
+ module PureCloud
20
+ class MessageMediaPolicyConditions
21
+ attr_accessor :for_users
22
+
23
+ attr_accessor :date_ranges
24
+
25
+ attr_accessor :for_queues
26
+
27
+ attr_accessor :wrapup_codes
28
+
29
+ attr_accessor :time_allowed
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+
35
+ :'for_users' => :'forUsers',
36
+
37
+ :'date_ranges' => :'dateRanges',
38
+
39
+ :'for_queues' => :'forQueues',
40
+
41
+ :'wrapup_codes' => :'wrapupCodes',
42
+
43
+ :'time_allowed' => :'timeAllowed'
44
+
45
+ }
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.swagger_types
50
+ {
51
+
52
+ :'for_users' => :'Array<User>',
53
+
54
+ :'date_ranges' => :'Array<String>',
55
+
56
+ :'for_queues' => :'Array<Queue>',
57
+
58
+ :'wrapup_codes' => :'Array<WrapupCode>',
59
+
60
+ :'time_allowed' => :'TimeAllowed'
61
+
62
+ }
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ return unless attributes.is_a?(Hash)
69
+
70
+ # convert string to symbol for hash key
71
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
72
+
73
+
74
+ if attributes.has_key?(:'forUsers')
75
+
76
+ if (value = attributes[:'forUsers']).is_a?(Array)
77
+ self.for_users = value
78
+ end
79
+
80
+
81
+
82
+ end
83
+
84
+
85
+ if attributes.has_key?(:'dateRanges')
86
+
87
+ if (value = attributes[:'dateRanges']).is_a?(Array)
88
+ self.date_ranges = value
89
+ end
90
+
91
+
92
+
93
+ end
94
+
95
+
96
+ if attributes.has_key?(:'forQueues')
97
+
98
+ if (value = attributes[:'forQueues']).is_a?(Array)
99
+ self.for_queues = value
100
+ end
101
+
102
+
103
+
104
+ end
105
+
106
+
107
+ if attributes.has_key?(:'wrapupCodes')
108
+
109
+ if (value = attributes[:'wrapupCodes']).is_a?(Array)
110
+ self.wrapup_codes = value
111
+ end
112
+
113
+
114
+
115
+ end
116
+
117
+
118
+ if attributes.has_key?(:'timeAllowed')
119
+
120
+
121
+ self.time_allowed = attributes[:'timeAllowed']
122
+
123
+
124
+ end
125
+
126
+
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properies with the reasons
131
+ def list_invalid_properties
132
+ invalid_properties = Array.new
133
+
134
+
135
+ return invalid_properties
136
+ end
137
+
138
+ # Check to see if the all the properties in the model are valid
139
+ # @return true if the model is valid
140
+ def valid?
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+ end
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+ # Checks equality by comparing each attribute.
191
+ # @param [Object] Object to be compared
192
+ def ==(o)
193
+ return true if self.equal?(o)
194
+ self.class == o.class &&
195
+ for_users == o.for_users &&
196
+ date_ranges == o.date_ranges &&
197
+ for_queues == o.for_queues &&
198
+ wrapup_codes == o.wrapup_codes &&
199
+ time_allowed == o.time_allowed
200
+ end
201
+
202
+ # @see the `==` method
203
+ # @param [Object] Object to be compared
204
+ def eql?(o)
205
+ self == o
206
+ end
207
+
208
+ # Calculates hash code according to all attributes.
209
+ # @return [Fixnum] Hash code
210
+ def hash
211
+ [for_users, date_ranges, for_queues, wrapup_codes, time_allowed].hash
212
+ end
213
+
214
+ # build the object from hash
215
+ def build_from_hash(attributes)
216
+ return nil unless attributes.is_a?(Hash)
217
+ self.class.swagger_types.each_pair do |key, type|
218
+ if type =~ /^Array<(.*)>/i
219
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
220
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
221
+ else
222
+ #TODO show warning in debug mode
223
+ end
224
+ elsif !attributes[self.class.attribute_map[key]].nil?
225
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
226
+ else
227
+ # data not found in attributes(hash), not an issue as the data can be optional
228
+ end
229
+ end
230
+
231
+ self
232
+ end
233
+
234
+ def _deserialize(type, value)
235
+ case type.to_sym
236
+ when :DateTime
237
+ DateTime.parse(value)
238
+ when :Date
239
+ Date.parse(value)
240
+ when :String
241
+ value.to_s
242
+ when :Integer
243
+ value.to_i
244
+ when :Float
245
+ value.to_f
246
+ when :BOOLEAN
247
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
248
+ true
249
+ else
250
+ false
251
+ end
252
+ when :Object
253
+ # generic object (usually a Hash), return directly
254
+ value
255
+ when /\AArray<(?<inner_type>.+)>\z/
256
+ inner_type = Regexp.last_match[:inner_type]
257
+ value.map { |v| _deserialize(inner_type, v) }
258
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
259
+ k_type = Regexp.last_match[:k_type]
260
+ v_type = Regexp.last_match[:v_type]
261
+ {}.tap do |hash|
262
+ value.each do |k, v|
263
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
264
+ end
265
+ end
266
+ else # model
267
+ _model = Object.const_get("PureCloud").const_get(type).new
268
+ _model.build_from_hash(value)
269
+ end
270
+ end
271
+
272
+ def to_s
273
+ to_hash.to_s
274
+ end
275
+
276
+ # to_body is an alias to to_body (backward compatibility))
277
+ def to_body
278
+ to_hash
279
+ end
280
+
281
+ # return the object in the form of hash
282
+ def to_hash
283
+ hash = {}
284
+ self.class.attribute_map.each_pair do |attr, param|
285
+ value = self.send(attr)
286
+ next if value.nil?
287
+ hash[param] = _to_hash(value)
288
+ end
289
+ hash
290
+ end
291
+
292
+ # Method to output non-array value in the form of hash
293
+ # For object, use to_hash. Otherwise, just return the value
294
+ def _to_hash(value)
295
+ if value.is_a?(Array)
296
+ value.compact.map{ |v| _to_hash(v) }
297
+ elsif value.is_a?(Hash)
298
+ {}.tap do |hash|
299
+ value.each { |k, v| hash[k] = _to_hash(v) }
300
+ end
301
+ elsif value.respond_to? :to_hash
302
+ value.to_hash
303
+ else
304
+ value
305
+ end
306
+ end
307
+
308
+ end
309
+ end