purecloud 0.37.1 → 0.38.1

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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/config-ruby.json +1 -1
  4. data/doc_out/AuthorizationApi.html.md +57 -0
  5. data/doc_out/AuthzGrant.html.md +15 -0
  6. data/doc_out/AuthzGrantPolicy.html.md +16 -0
  7. data/doc_out/AuthzGrantRole.html.md +17 -0
  8. data/doc_out/AuthzObject.html.md +17 -0
  9. data/doc_out/AuthzPermissionContext.html.md +14 -0
  10. data/doc_out/AuthzSubject.html.md +16 -0
  11. data/doc_out/CreateUser.html.md +0 -1
  12. data/doc_out/ExportUri.html.md +14 -0
  13. data/doc_out/FaxSendRequest.html.md +5 -5
  14. data/doc_out/GroupsApi.html.md +119 -0
  15. data/doc_out/JsonNode.html.md +2 -2
  16. data/doc_out/Location.html.md +20 -0
  17. data/doc_out/LocationAddress.html.md +19 -0
  18. data/doc_out/LocationEmergencyNumber.html.md +15 -0
  19. data/doc_out/LocationsApi.html.md +249 -0
  20. data/doc_out/ObjectsApi.html.md +69 -0
  21. data/doc_out/OrganizationCreate.html.md +5 -5
  22. data/doc_out/OutboundApi.html.md +122 -0
  23. data/doc_out/SearchApi.html.md +254 -12
  24. data/doc_out/SuggestApi.html.md +254 -0
  25. data/doc_out/User.html.md +1 -1
  26. data/doc_out/UserMe.html.md +1 -1
  27. data/doc_out/UserPresence.html.md +1 -0
  28. data/doc_out/index.html.md +3 -3
  29. data/lib/purecloud.rb +13 -1
  30. data/lib/purecloud/api/authorization_api.rb +60 -0
  31. data/lib/purecloud/api/groups_api.rb +126 -0
  32. data/lib/purecloud/api/locations_api.rb +273 -0
  33. data/lib/purecloud/api/objects_api.rb +87 -0
  34. data/lib/purecloud/api/outbound_api.rb +126 -0
  35. data/lib/purecloud/api/search_api.rb +259 -14
  36. data/lib/purecloud/api/suggest_api.rb +272 -0
  37. data/lib/purecloud/api_client.rb +1 -1
  38. data/lib/purecloud/models/authz_grant.rb +186 -0
  39. data/lib/purecloud/models/authz_grant_policy.rb +197 -0
  40. data/lib/purecloud/models/authz_grant_role.rb +209 -0
  41. data/lib/purecloud/models/authz_object.rb +210 -0
  42. data/lib/purecloud/models/authz_permission_context.rb +175 -0
  43. data/lib/purecloud/models/authz_subject.rb +199 -0
  44. data/lib/purecloud/models/callback.rb +1 -1
  45. data/lib/purecloud/models/create_user.rb +4 -15
  46. data/lib/purecloud/models/export_uri.rb +176 -0
  47. data/lib/purecloud/models/fax_send_request.rb +21 -7
  48. data/lib/purecloud/models/group.rb +1 -1
  49. data/lib/purecloud/models/json_node.rb +25 -25
  50. data/lib/purecloud/models/location.rb +249 -0
  51. data/lib/purecloud/models/location_address.rb +225 -0
  52. data/lib/purecloud/models/location_emergency_number.rb +195 -0
  53. data/lib/purecloud/models/organization_create.rb +5 -5
  54. data/lib/purecloud/models/search_criteria.rb +1 -1
  55. data/lib/purecloud/models/user.rb +1 -1
  56. data/lib/purecloud/models/user_me.rb +1 -1
  57. data/lib/purecloud/models/user_presence.rb +12 -1
  58. data/lib/purecloud/version.rb +1 -1
  59. data/newVersion.md +1 -1
  60. data/swagger.json +1 -1
  61. data/version.json +1 -1
  62. metadata +28 -4
  63. data/doc_out/ExternalContactsApi.html.md +0 -1594
  64. data/lib/purecloud/api/external_contacts_api.rb +0 -1679
@@ -23,14 +23,19 @@ module PureCloud
23
23
 
24
24
  attr_accessor :name
25
25
 
26
+ # A list of outbound fax dialing addresses. E.g. +13175555555 or 3175555555
26
27
  attr_accessor :addresses
27
28
 
28
- attr_accessor :original_filename
29
+ # DocumentId of Content Management artifact. If Content Management document is not used for faxing, documentId should be null
30
+ attr_accessor :document_id
29
31
 
32
+ # The content type that is going to be uploaded. If Content Management document is used for faxing, contentType will be ignored
30
33
  attr_accessor :content_type
31
34
 
35
+ # Workspace in which the document should be stored. If Content Management document is used for faxing, workspace will be ignored
32
36
  attr_accessor :workspace
33
37
 
38
+ # Data for coversheet generation.
34
39
  attr_accessor :cover_sheet
35
40
 
36
41
  # The URI for this object
@@ -46,7 +51,7 @@ module PureCloud
46
51
 
47
52
  :'addresses' => :'addresses',
48
53
 
49
- :'original_filename' => :'originalFilename',
54
+ :'document_id' => :'documentId',
50
55
 
51
56
  :'content_type' => :'contentType',
52
57
 
@@ -65,7 +70,7 @@ module PureCloud
65
70
  :'id' => :'String',
66
71
  :'name' => :'String',
67
72
  :'addresses' => :'Array<String>',
68
- :'original_filename' => :'String',
73
+ :'document_id' => :'String',
69
74
  :'content_type' => :'String',
70
75
  :'workspace' => :'Workspace',
71
76
  :'cover_sheet' => :'CoverSheet',
@@ -95,8 +100,8 @@ module PureCloud
95
100
  end
96
101
  end
97
102
 
98
- if attributes[:'originalFilename']
99
- self.original_filename = attributes[:'originalFilename']
103
+ if attributes[:'documentId']
104
+ self.document_id = attributes[:'documentId']
100
105
  end
101
106
 
102
107
  if attributes[:'contentType']
@@ -117,6 +122,15 @@ module PureCloud
117
122
 
118
123
  end
119
124
 
125
+ # Custom attribute writer method checking allowed values (enum).
126
+ def content_type=(content_type)
127
+ allowed_values = ["application/pdf", "image/tiff", "application/msword", "application/vnd.oasis.opendocument.text", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"]
128
+ if content_type && !allowed_values.include?(content_type)
129
+ fail "invalid value for 'content_type', must be one of #{allowed_values}"
130
+ end
131
+ @content_type = content_type
132
+ end
133
+
120
134
  # Check equality by comparing each attribute.
121
135
  def ==(o)
122
136
  return true if self.equal?(o)
@@ -124,7 +138,7 @@ module PureCloud
124
138
  id == o.id &&
125
139
  name == o.name &&
126
140
  addresses == o.addresses &&
127
- original_filename == o.original_filename &&
141
+ document_id == o.document_id &&
128
142
  content_type == o.content_type &&
129
143
  workspace == o.workspace &&
130
144
  cover_sheet == o.cover_sheet &&
@@ -138,7 +152,7 @@ module PureCloud
138
152
 
139
153
  # Calculate hash code according to all attributes.
140
154
  def hash
141
- [id, name, addresses, original_filename, content_type, workspace, cover_sheet, self_uri].hash
155
+ [id, name, addresses, document_id, content_type, workspace, cover_sheet, self_uri].hash
142
156
  end
143
157
 
144
158
  # build the object from hash
@@ -184,7 +184,7 @@ module PureCloud
184
184
 
185
185
  # Custom attribute writer method checking allowed values (enum).
186
186
  def type=(type)
187
- allowed_values = ["official", "social"]
187
+ allowed_values = ["social", "official"]
188
188
  if type && !allowed_values.include?(type)
189
189
  fail "invalid value for 'type', must be one of #{allowed_values}"
190
190
  end
@@ -22,15 +22,13 @@ module PureCloud
22
22
 
23
23
  attr_accessor :float
24
24
 
25
- attr_accessor :object
26
-
27
25
  attr_accessor :boolean
28
26
 
29
27
  attr_accessor :number
30
28
 
31
- attr_accessor :value_node
29
+ attr_accessor :object
32
30
 
33
- attr_accessor :floating_point_number
31
+ attr_accessor :value_node
34
32
 
35
33
  attr_accessor :container_node
36
34
 
@@ -40,6 +38,8 @@ module PureCloud
40
38
 
41
39
  attr_accessor :integral_number
42
40
 
41
+ attr_accessor :floating_point_number
42
+
43
43
  attr_accessor :short
44
44
 
45
45
  attr_accessor :int
@@ -68,15 +68,13 @@ module PureCloud
68
68
 
69
69
  :'float' => :'float',
70
70
 
71
- :'object' => :'object',
72
-
73
71
  :'boolean' => :'boolean',
74
72
 
75
73
  :'number' => :'number',
76
74
 
77
- :'value_node' => :'valueNode',
75
+ :'object' => :'object',
78
76
 
79
- :'floating_point_number' => :'floatingPointNumber',
77
+ :'value_node' => :'valueNode',
80
78
 
81
79
  :'container_node' => :'containerNode',
82
80
 
@@ -86,6 +84,8 @@ module PureCloud
86
84
 
87
85
  :'integral_number' => :'integralNumber',
88
86
 
87
+ :'floating_point_number' => :'floatingPointNumber',
88
+
89
89
  :'short' => :'short',
90
90
 
91
91
  :'int' => :'int',
@@ -114,15 +114,15 @@ module PureCloud
114
114
  {
115
115
  :'node_type' => :'String',
116
116
  :'float' => :'BOOLEAN',
117
- :'object' => :'BOOLEAN',
118
117
  :'boolean' => :'BOOLEAN',
119
118
  :'number' => :'BOOLEAN',
119
+ :'object' => :'BOOLEAN',
120
120
  :'value_node' => :'BOOLEAN',
121
- :'floating_point_number' => :'BOOLEAN',
122
121
  :'container_node' => :'BOOLEAN',
123
122
  :'missing_node' => :'BOOLEAN',
124
123
  :'pojo' => :'BOOLEAN',
125
124
  :'integral_number' => :'BOOLEAN',
125
+ :'floating_point_number' => :'BOOLEAN',
126
126
  :'short' => :'BOOLEAN',
127
127
  :'int' => :'BOOLEAN',
128
128
  :'long' => :'BOOLEAN',
@@ -154,12 +154,6 @@ module PureCloud
154
154
  self.float = false
155
155
  end
156
156
 
157
- if attributes[:'object']
158
- self.object = attributes[:'object']
159
- else
160
- self.object = false
161
- end
162
-
163
157
  if attributes[:'boolean']
164
158
  self.boolean = attributes[:'boolean']
165
159
  else
@@ -172,16 +166,16 @@ module PureCloud
172
166
  self.number = false
173
167
  end
174
168
 
175
- if attributes[:'valueNode']
176
- self.value_node = attributes[:'valueNode']
169
+ if attributes[:'object']
170
+ self.object = attributes[:'object']
177
171
  else
178
- self.value_node = false
172
+ self.object = false
179
173
  end
180
174
 
181
- if attributes[:'floatingPointNumber']
182
- self.floating_point_number = attributes[:'floatingPointNumber']
175
+ if attributes[:'valueNode']
176
+ self.value_node = attributes[:'valueNode']
183
177
  else
184
- self.floating_point_number = false
178
+ self.value_node = false
185
179
  end
186
180
 
187
181
  if attributes[:'containerNode']
@@ -208,6 +202,12 @@ module PureCloud
208
202
  self.integral_number = false
209
203
  end
210
204
 
205
+ if attributes[:'floatingPointNumber']
206
+ self.floating_point_number = attributes[:'floatingPointNumber']
207
+ else
208
+ self.floating_point_number = false
209
+ end
210
+
211
211
  if attributes[:'short']
212
212
  self.short = attributes[:'short']
213
213
  else
@@ -285,15 +285,15 @@ module PureCloud
285
285
  self.class == o.class &&
286
286
  node_type == o.node_type &&
287
287
  float == o.float &&
288
- object == o.object &&
289
288
  boolean == o.boolean &&
290
289
  number == o.number &&
290
+ object == o.object &&
291
291
  value_node == o.value_node &&
292
- floating_point_number == o.floating_point_number &&
293
292
  container_node == o.container_node &&
294
293
  missing_node == o.missing_node &&
295
294
  pojo == o.pojo &&
296
295
  integral_number == o.integral_number &&
296
+ floating_point_number == o.floating_point_number &&
297
297
  short == o.short &&
298
298
  int == o.int &&
299
299
  long == o.long &&
@@ -313,7 +313,7 @@ module PureCloud
313
313
 
314
314
  # Calculate hash code according to all attributes.
315
315
  def hash
316
- [node_type, float, object, boolean, number, value_node, floating_point_number, container_node, missing_node, pojo, integral_number, short, int, long, double, big_decimal, big_integer, textual, binary, array, null].hash
316
+ [node_type, float, boolean, number, object, value_node, container_node, missing_node, pojo, integral_number, floating_point_number, short, int, long, double, big_decimal, big_integer, textual, binary, array, null].hash
317
317
  end
318
318
 
319
319
  # build the object from hash
@@ -0,0 +1,249 @@
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@inin.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 Location
21
+ # The globally unique identifier for the object.
22
+ attr_accessor :id
23
+
24
+ attr_accessor :name
25
+
26
+ attr_accessor :address
27
+
28
+ attr_accessor :address_verified
29
+
30
+ attr_accessor :emergency_number
31
+
32
+ # Current activity status of the location.
33
+ attr_accessor :state
34
+
35
+ attr_accessor :version
36
+
37
+ # The URI for this object
38
+ attr_accessor :self_uri
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+
44
+ :'id' => :'id',
45
+
46
+ :'name' => :'name',
47
+
48
+ :'address' => :'address',
49
+
50
+ :'address_verified' => :'addressVerified',
51
+
52
+ :'emergency_number' => :'emergencyNumber',
53
+
54
+ :'state' => :'state',
55
+
56
+ :'version' => :'version',
57
+
58
+ :'self_uri' => :'selfUri'
59
+
60
+ }
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.swagger_types
65
+ {
66
+ :'id' => :'String',
67
+ :'name' => :'String',
68
+ :'address' => :'LocationAddress',
69
+ :'address_verified' => :'BOOLEAN',
70
+ :'emergency_number' => :'LocationEmergencyNumber',
71
+ :'state' => :'String',
72
+ :'version' => :'Integer',
73
+ :'self_uri' => :'String'
74
+
75
+ }
76
+ end
77
+
78
+ def initialize(attributes = {})
79
+ return unless attributes.is_a?(Hash)
80
+
81
+ # convert string to symbol for hash key
82
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
83
+
84
+
85
+ if attributes[:'id']
86
+ self.id = attributes[:'id']
87
+ end
88
+
89
+ if attributes[:'name']
90
+ self.name = attributes[:'name']
91
+ end
92
+
93
+ if attributes[:'address']
94
+ self.address = attributes[:'address']
95
+ end
96
+
97
+ if attributes[:'addressVerified']
98
+ self.address_verified = attributes[:'addressVerified']
99
+ else
100
+ self.address_verified = false
101
+ end
102
+
103
+ if attributes[:'emergencyNumber']
104
+ self.emergency_number = attributes[:'emergencyNumber']
105
+ end
106
+
107
+ if attributes[:'state']
108
+ self.state = attributes[:'state']
109
+ end
110
+
111
+ if attributes[:'version']
112
+ self.version = attributes[:'version']
113
+ end
114
+
115
+ if attributes[:'selfUri']
116
+ self.self_uri = attributes[:'selfUri']
117
+ end
118
+
119
+ end
120
+
121
+ # Custom attribute writer method checking allowed values (enum).
122
+ def state=(state)
123
+ allowed_values = ["active", "deleted"]
124
+ if state && !allowed_values.include?(state)
125
+ fail "invalid value for 'state', must be one of #{allowed_values}"
126
+ end
127
+ @state = state
128
+ end
129
+
130
+ # Check equality by comparing each attribute.
131
+ def ==(o)
132
+ return true if self.equal?(o)
133
+ self.class == o.class &&
134
+ id == o.id &&
135
+ name == o.name &&
136
+ address == o.address &&
137
+ address_verified == o.address_verified &&
138
+ emergency_number == o.emergency_number &&
139
+ state == o.state &&
140
+ version == o.version &&
141
+ self_uri == o.self_uri
142
+ end
143
+
144
+ # @see the `==` method
145
+ def eql?(o)
146
+ self == o
147
+ end
148
+
149
+ # Calculate hash code according to all attributes.
150
+ def hash
151
+ [id, name, address, address_verified, emergency_number, state, version, self_uri].hash
152
+ end
153
+
154
+ # build the object from hash
155
+ def build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ self.class.swagger_types.each_pair do |key, type|
158
+ if type =~ /^Array<(.*)>/i
159
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
160
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
161
+ else
162
+ #TODO show warning in debug mode
163
+ end
164
+ elsif !attributes[self.class.attribute_map[key]].nil?
165
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
166
+ else
167
+ # data not found in attributes(hash), not an issue as the data can be optional
168
+ end
169
+ end
170
+
171
+ self
172
+ end
173
+
174
+ def _deserialize(type, value)
175
+ case type.to_sym
176
+ when :DateTime
177
+ DateTime.parse(value)
178
+ when :Date
179
+ Date.parse(value)
180
+ when :String
181
+ value.to_s
182
+ when :Integer
183
+ value.to_i
184
+ when :Float
185
+ value.to_f
186
+ when :BOOLEAN
187
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
188
+ true
189
+ else
190
+ false
191
+ end
192
+ when :Object
193
+ # generic object (usually a Hash), return directly
194
+ value
195
+ when /\AArray<(?<inner_type>.+)>\z/
196
+ inner_type = Regexp.last_match[:inner_type]
197
+ value.map { |v| _deserialize(inner_type, v) }
198
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
199
+ k_type = Regexp.last_match[:k_type]
200
+ v_type = Regexp.last_match[:v_type]
201
+ {}.tap do |hash|
202
+ value.each do |k, v|
203
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
204
+ end
205
+ end
206
+ else # model
207
+ _model = Object.const_get("PureCloud").const_get(type).new
208
+ _model.build_from_hash(value)
209
+ end
210
+ end
211
+
212
+ def to_s
213
+ to_hash.to_s
214
+ end
215
+
216
+ # to_body is an alias to to_body (backward compatibility))
217
+ def to_body
218
+ to_hash
219
+ end
220
+
221
+ # return the object in the form of hash
222
+ def to_hash
223
+ hash = {}
224
+ self.class.attribute_map.each_pair do |attr, param|
225
+ value = self.send(attr)
226
+ next if value.nil?
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ # Method to output non-array value in the form of hash
233
+ # For object, use to_hash. Otherwise, just return the value
234
+ def _to_hash(value)
235
+ if value.is_a?(Array)
236
+ value.compact.map{ |v| _to_hash(v) }
237
+ elsif value.is_a?(Hash)
238
+ {}.tap do |hash|
239
+ value.each { |k, v| hash[k] = _to_hash(v) }
240
+ end
241
+ elsif value.respond_to? :to_hash
242
+ value.to_hash
243
+ else
244
+ value
245
+ end
246
+ end
247
+
248
+ end
249
+ end