purecloudplatformclientv2 36.0.0 → 36.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.
@@ -37,10 +37,10 @@ module PureCloud
37
37
  # Optional unless patch operation.
38
38
  attr_accessor :role_needs_update
39
39
 
40
- attr_accessor :base
41
-
42
40
  attr_accessor :default
43
41
 
42
+ attr_accessor :base
43
+
44
44
  # The URI for this object
45
45
  attr_accessor :self_uri
46
46
 
@@ -64,10 +64,10 @@ module PureCloud
64
64
 
65
65
  :'role_needs_update' => :'roleNeedsUpdate',
66
66
 
67
- :'base' => :'base',
68
-
69
67
  :'default' => :'default',
70
68
 
69
+ :'base' => :'base',
70
+
71
71
  :'self_uri' => :'selfUri'
72
72
 
73
73
  }
@@ -93,10 +93,10 @@ module PureCloud
93
93
 
94
94
  :'role_needs_update' => :'BOOLEAN',
95
95
 
96
- :'base' => :'BOOLEAN',
97
-
98
96
  :'default' => :'BOOLEAN',
99
97
 
98
+ :'base' => :'BOOLEAN',
99
+
100
100
  :'self_uri' => :'String'
101
101
 
102
102
  }
@@ -187,19 +187,19 @@ module PureCloud
187
187
  end
188
188
 
189
189
 
190
- if attributes.has_key?(:'base')
190
+ if attributes.has_key?(:'default')
191
191
 
192
192
 
193
- self.base = attributes[:'base']
193
+ self.default = attributes[:'default']
194
194
 
195
195
 
196
196
  end
197
197
 
198
198
 
199
- if attributes.has_key?(:'default')
199
+ if attributes.has_key?(:'base')
200
200
 
201
201
 
202
- self.default = attributes[:'default']
202
+ self.base = attributes[:'base']
203
203
 
204
204
 
205
205
  end
@@ -349,8 +349,8 @@ module PureCloud
349
349
  permission_policies == o.permission_policies &&
350
350
  user_count == o.user_count &&
351
351
  role_needs_update == o.role_needs_update &&
352
- base == o.base &&
353
352
  default == o.default &&
353
+ base == o.base &&
354
354
  self_uri == o.self_uri
355
355
  end
356
356
 
@@ -363,7 +363,7 @@ module PureCloud
363
363
  # Calculates hash code according to all attributes.
364
364
  # @return [Fixnum] Hash code
365
365
  def hash
366
- [id, name, description, default_role_id, permissions, permission_policies, user_count, role_needs_update, base, default, self_uri].hash
366
+ [id, name, description, default_role_id, permissions, permission_policies, user_count, role_needs_update, default, base, self_uri].hash
367
367
  end
368
368
 
369
369
  # build the object from hash
@@ -18,6 +18,10 @@ require 'date'
18
18
 
19
19
  module PureCloud
20
20
  class JsonNode
21
+ attr_accessor :array
22
+
23
+ attr_accessor :null
24
+
21
25
  attr_accessor :node_type
22
26
 
23
27
  attr_accessor :object
@@ -56,14 +60,14 @@ module PureCloud
56
60
 
57
61
  attr_accessor :binary
58
62
 
59
- attr_accessor :array
60
-
61
- attr_accessor :null
62
-
63
63
  # Attribute mapping from ruby-style variable name to JSON key.
64
64
  def self.attribute_map
65
65
  {
66
66
 
67
+ :'array' => :'array',
68
+
69
+ :'null' => :'null',
70
+
67
71
  :'node_type' => :'nodeType',
68
72
 
69
73
  :'object' => :'object',
@@ -100,11 +104,7 @@ module PureCloud
100
104
 
101
105
  :'textual' => :'textual',
102
106
 
103
- :'binary' => :'binary',
104
-
105
- :'array' => :'array',
106
-
107
- :'null' => :'null'
107
+ :'binary' => :'binary'
108
108
 
109
109
  }
110
110
  end
@@ -113,6 +113,10 @@ module PureCloud
113
113
  def self.swagger_types
114
114
  {
115
115
 
116
+ :'array' => :'BOOLEAN',
117
+
118
+ :'null' => :'BOOLEAN',
119
+
116
120
  :'node_type' => :'String',
117
121
 
118
122
  :'object' => :'BOOLEAN',
@@ -149,11 +153,7 @@ module PureCloud
149
153
 
150
154
  :'textual' => :'BOOLEAN',
151
155
 
152
- :'binary' => :'BOOLEAN',
153
-
154
- :'array' => :'BOOLEAN',
155
-
156
- :'null' => :'BOOLEAN'
156
+ :'binary' => :'BOOLEAN'
157
157
 
158
158
  }
159
159
  end
@@ -167,6 +167,24 @@ module PureCloud
167
167
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
168
168
 
169
169
 
170
+ if attributes.has_key?(:'array')
171
+
172
+
173
+ self.array = attributes[:'array']
174
+
175
+
176
+ end
177
+
178
+
179
+ if attributes.has_key?(:'null')
180
+
181
+
182
+ self.null = attributes[:'null']
183
+
184
+
185
+ end
186
+
187
+
170
188
  if attributes.has_key?(:'nodeType')
171
189
 
172
190
 
@@ -338,24 +356,6 @@ module PureCloud
338
356
  end
339
357
 
340
358
 
341
- if attributes.has_key?(:'array')
342
-
343
-
344
- self.array = attributes[:'array']
345
-
346
-
347
- end
348
-
349
-
350
- if attributes.has_key?(:'null')
351
-
352
-
353
- self.null = attributes[:'null']
354
-
355
-
356
- end
357
-
358
-
359
359
  end
360
360
 
361
361
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -373,10 +373,6 @@ module PureCloud
373
373
 
374
374
 
375
375
 
376
- allowed_values = ["ARRAY", "BINARY", "BOOLEAN", "MISSING", "NULL", "NUMBER", "OBJECT", "POJO", "STRING"]
377
- if @node_type && !allowed_values.include?(@node_type)
378
- return false
379
- end
380
376
 
381
377
 
382
378
 
@@ -385,6 +381,10 @@ module PureCloud
385
381
 
386
382
 
387
383
 
384
+ allowed_values = ["ARRAY", "BINARY", "BOOLEAN", "MISSING", "NULL", "NUMBER", "OBJECT", "POJO", "STRING"]
385
+ if @node_type && !allowed_values.include?(@node_type)
386
+ return false
387
+ end
388
388
 
389
389
 
390
390
 
@@ -464,16 +464,6 @@ module PureCloud
464
464
 
465
465
 
466
466
 
467
- # Custom attribute writer method checking allowed values (enum).
468
- # @param [Object] node_type Object to be assigned
469
- def node_type=(node_type)
470
- allowed_values = ["ARRAY", "BINARY", "BOOLEAN", "MISSING", "NULL", "NUMBER", "OBJECT", "POJO", "STRING"]
471
- if node_type && !allowed_values.include?(node_type)
472
- fail ArgumentError, "invalid value for 'node_type', must be one of #{allowed_values}."
473
- end
474
- @node_type = node_type
475
- end
476
-
477
467
 
478
468
 
479
469
 
@@ -484,6 +474,16 @@ module PureCloud
484
474
 
485
475
 
486
476
 
477
+ # Custom attribute writer method checking allowed values (enum).
478
+ # @param [Object] node_type Object to be assigned
479
+ def node_type=(node_type)
480
+ allowed_values = ["ARRAY", "BINARY", "BOOLEAN", "MISSING", "NULL", "NUMBER", "OBJECT", "POJO", "STRING"]
481
+ if node_type && !allowed_values.include?(node_type)
482
+ fail ArgumentError, "invalid value for 'node_type', must be one of #{allowed_values}."
483
+ end
484
+ @node_type = node_type
485
+ end
486
+
487
487
 
488
488
 
489
489
 
@@ -582,6 +582,8 @@ module PureCloud
582
582
  def ==(o)
583
583
  return true if self.equal?(o)
584
584
  self.class == o.class &&
585
+ array == o.array &&
586
+ null == o.null &&
585
587
  node_type == o.node_type &&
586
588
  object == o.object &&
587
589
  boolean == o.boolean &&
@@ -600,9 +602,7 @@ module PureCloud
600
602
  big_decimal == o.big_decimal &&
601
603
  big_integer == o.big_integer &&
602
604
  textual == o.textual &&
603
- binary == o.binary &&
604
- array == o.array &&
605
- null == o.null
605
+ binary == o.binary
606
606
  end
607
607
 
608
608
  # @see the `==` method
@@ -614,7 +614,7 @@ module PureCloud
614
614
  # Calculates hash code according to all attributes.
615
615
  # @return [Fixnum] Hash code
616
616
  def hash
617
- [node_type, object, boolean, number, float, floating_point_number, value_node, container_node, missing_node, pojo, integral_number, short, int, long, double, big_decimal, big_integer, textual, binary, array, null].hash
617
+ [array, null, node_type, object, boolean, number, float, floating_point_number, value_node, container_node, missing_node, pojo, integral_number, short, int, long, double, big_decimal, big_integer, textual, binary].hash
618
618
  end
619
619
 
620
620
  # build the object from hash
@@ -79,6 +79,9 @@ module PureCloud
79
79
  # The groups the user is a member of
80
80
  attr_accessor :groups
81
81
 
82
+ # acd auto answer
83
+ attr_accessor :acd_auto_answer
84
+
82
85
  attr_accessor :organization
83
86
 
84
87
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -131,6 +134,8 @@ module PureCloud
131
134
 
132
135
  :'groups' => :'groups',
133
136
 
137
+ :'acd_auto_answer' => :'acdAutoAnswer',
138
+
134
139
  :'organization' => :'organization'
135
140
 
136
141
  }
@@ -186,6 +191,8 @@ module PureCloud
186
191
 
187
192
  :'groups' => :'Array<Group>',
188
193
 
194
+ :'acd_auto_answer' => :'BOOLEAN',
195
+
189
196
  :'organization' => :'Organization'
190
197
 
191
198
  }
@@ -419,6 +426,15 @@ module PureCloud
419
426
  end
420
427
 
421
428
 
429
+ if attributes.has_key?(:'acdAutoAnswer')
430
+
431
+
432
+ self.acd_auto_answer = attributes[:'acdAutoAnswer']
433
+
434
+
435
+ end
436
+
437
+
422
438
  if attributes.has_key?(:'organization')
423
439
 
424
440
 
@@ -544,6 +560,10 @@ module PureCloud
544
560
 
545
561
 
546
562
 
563
+
564
+
565
+
566
+
547
567
 
548
568
 
549
569
 
@@ -675,6 +695,11 @@ module PureCloud
675
695
 
676
696
 
677
697
 
698
+
699
+
700
+
701
+
702
+
678
703
 
679
704
 
680
705
 
@@ -709,6 +734,7 @@ module PureCloud
709
734
  profile_skills == o.profile_skills &&
710
735
  locations == o.locations &&
711
736
  groups == o.groups &&
737
+ acd_auto_answer == o.acd_auto_answer &&
712
738
  organization == o.organization
713
739
  end
714
740
 
@@ -721,7 +747,7 @@ module PureCloud
721
747
  # Calculates hash code according to all attributes.
722
748
  # @return [Fixnum] Hash code
723
749
  def hash
724
- [id, name, chat, department, email, primary_contact_info, addresses, state, title, username, manager, images, version, routing_status, presence, conversation_summary, out_of_office, geolocation, station, authorization, profile_skills, locations, groups, organization].hash
750
+ [id, name, chat, department, email, primary_contact_info, addresses, state, title, username, manager, images, version, routing_status, presence, conversation_summary, out_of_office, geolocation, station, authorization, profile_skills, locations, groups, acd_auto_answer, organization].hash
725
751
  end
726
752
 
727
753
  # build the object from hash
@@ -0,0 +1,279 @@
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 PatchUser
21
+ # The globally unique identifier for the object.
22
+ attr_accessor :id
23
+
24
+ attr_accessor :name
25
+
26
+ # The value that denotes if acdAutoAnswer is set on the user
27
+ attr_accessor :acd_auto_answer
28
+
29
+ # The URI for this object
30
+ attr_accessor :self_uri
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+
36
+ :'id' => :'id',
37
+
38
+ :'name' => :'name',
39
+
40
+ :'acd_auto_answer' => :'acdAutoAnswer',
41
+
42
+ :'self_uri' => :'selfUri'
43
+
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.swagger_types
49
+ {
50
+
51
+ :'id' => :'String',
52
+
53
+ :'name' => :'String',
54
+
55
+ :'acd_auto_answer' => :'BOOLEAN',
56
+
57
+ :'self_uri' => :'String'
58
+
59
+ }
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ return unless attributes.is_a?(Hash)
66
+
67
+ # convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
69
+
70
+
71
+ if attributes.has_key?(:'id')
72
+
73
+
74
+ self.id = attributes[:'id']
75
+
76
+
77
+ end
78
+
79
+
80
+ if attributes.has_key?(:'name')
81
+
82
+
83
+ self.name = attributes[:'name']
84
+
85
+
86
+ end
87
+
88
+
89
+ if attributes.has_key?(:'acdAutoAnswer')
90
+
91
+
92
+ self.acd_auto_answer = attributes[:'acdAutoAnswer']
93
+
94
+
95
+ end
96
+
97
+
98
+ if attributes.has_key?(:'selfUri')
99
+
100
+
101
+ self.self_uri = attributes[:'selfUri']
102
+
103
+
104
+ end
105
+
106
+
107
+ end
108
+
109
+ # Show invalid properties with the reasons. Usually used together with valid?
110
+ # @return Array for valid properies with the reasons
111
+ def list_invalid_properties
112
+ invalid_properties = Array.new
113
+
114
+
115
+ return invalid_properties
116
+ end
117
+
118
+ # Check to see if the all the properties in the model are valid
119
+ # @return true if the model is valid
120
+ def valid?
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+ end
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+ # Checks equality by comparing each attribute.
162
+ # @param [Object] Object to be compared
163
+ def ==(o)
164
+ return true if self.equal?(o)
165
+ self.class == o.class &&
166
+ id == o.id &&
167
+ name == o.name &&
168
+ acd_auto_answer == o.acd_auto_answer &&
169
+ self_uri == o.self_uri
170
+ end
171
+
172
+ # @see the `==` method
173
+ # @param [Object] Object to be compared
174
+ def eql?(o)
175
+ self == o
176
+ end
177
+
178
+ # Calculates hash code according to all attributes.
179
+ # @return [Fixnum] Hash code
180
+ def hash
181
+ [id, name, acd_auto_answer, self_uri].hash
182
+ end
183
+
184
+ # build the object from hash
185
+ def build_from_hash(attributes)
186
+ return nil unless attributes.is_a?(Hash)
187
+ self.class.swagger_types.each_pair do |key, type|
188
+ if type =~ /^Array<(.*)>/i
189
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
190
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
191
+ else
192
+ #TODO show warning in debug mode
193
+ end
194
+ elsif !attributes[self.class.attribute_map[key]].nil?
195
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
196
+ else
197
+ # data not found in attributes(hash), not an issue as the data can be optional
198
+ end
199
+ end
200
+
201
+ self
202
+ end
203
+
204
+ def _deserialize(type, value)
205
+ case type.to_sym
206
+ when :DateTime
207
+ DateTime.parse(value)
208
+ when :Date
209
+ Date.parse(value)
210
+ when :String
211
+ value.to_s
212
+ when :Integer
213
+ value.to_i
214
+ when :Float
215
+ value.to_f
216
+ when :BOOLEAN
217
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
218
+ true
219
+ else
220
+ false
221
+ end
222
+ when :Object
223
+ # generic object (usually a Hash), return directly
224
+ value
225
+ when /\AArray<(?<inner_type>.+)>\z/
226
+ inner_type = Regexp.last_match[:inner_type]
227
+ value.map { |v| _deserialize(inner_type, v) }
228
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
229
+ k_type = Regexp.last_match[:k_type]
230
+ v_type = Regexp.last_match[:v_type]
231
+ {}.tap do |hash|
232
+ value.each do |k, v|
233
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
234
+ end
235
+ end
236
+ else # model
237
+ _model = Object.const_get("PureCloud").const_get(type).new
238
+ _model.build_from_hash(value)
239
+ end
240
+ end
241
+
242
+ def to_s
243
+ to_hash.to_s
244
+ end
245
+
246
+ # to_body is an alias to to_body (backward compatibility))
247
+ def to_body
248
+ to_hash
249
+ end
250
+
251
+ # return the object in the form of hash
252
+ def to_hash
253
+ hash = {}
254
+ self.class.attribute_map.each_pair do |attr, param|
255
+ value = self.send(attr)
256
+ next if value.nil?
257
+ hash[param] = _to_hash(value)
258
+ end
259
+ hash
260
+ end
261
+
262
+ # Method to output non-array value in the form of hash
263
+ # For object, use to_hash. Otherwise, just return the value
264
+ def _to_hash(value)
265
+ if value.is_a?(Array)
266
+ value.compact.map{ |v| _to_hash(v) }
267
+ elsif value.is_a?(Hash)
268
+ {}.tap do |hash|
269
+ value.each { |k, v| hash[k] = _to_hash(v) }
270
+ end
271
+ elsif value.respond_to? :to_hash
272
+ value.to_hash
273
+ else
274
+ value
275
+ end
276
+ end
277
+
278
+ end
279
+ end