purecloud 0.40.1 → 0.41.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/config-ruby.json +1 -1
- data/doc_out/AdditionalInfo.html.md +12 -0
- data/doc_out/{Entity.html.md → AuthzPerm.html.md} +3 -5
- data/doc_out/AuthzPermissionContext.html.md +1 -1
- data/doc_out/CallableTimeSet.html.md +1 -1
- data/doc_out/Callback.html.md +1 -0
- data/doc_out/CallbackIdentifier.html.md +14 -0
- data/doc_out/CallbackMediaParticipant.html.md +1 -0
- data/doc_out/ContentManagementApi.html.md +51 -0
- data/doc_out/ConversationsApi.html.md +120 -0
- data/doc_out/CreateCallbackCommand.html.md +2 -0
- data/doc_out/CreateCallbackResponse.html.md +14 -0
- data/doc_out/Dependency.html.md +1 -0
- data/doc_out/DependencyObject.html.md +1 -0
- data/doc_out/DomainEdgeSoftwareVersionDto.html.md +1 -1
- data/doc_out/GroupSearchCriteria.html.md +20 -0
- data/doc_out/GroupSearchRequest.html.md +19 -0
- data/doc_out/GroupsApi.html.md +2 -2
- data/doc_out/GroupsSearchResponse.html.md +1 -0
- data/doc_out/Integration.html.md +20 -0
- data/doc_out/IntegrationConfiguration.html.md +20 -0
- data/doc_out/{DeletedResourceConsumerEntityListing.html.md → IntegrationEntityListing.html.md} +3 -3
- data/doc_out/IntegrationStatusInfo.html.md +16 -0
- data/doc_out/IntegrationType.html.md +5 -3
- data/doc_out/JsonNode.html.md +1 -1
- data/doc_out/JsonNodeSearchResponse.html.md +1 -0
- data/doc_out/LocationSearchCriteria.html.md +20 -0
- data/doc_out/LocationSearchRequest.html.md +19 -0
- data/doc_out/LocationsApi.html.md +6 -6
- data/doc_out/LocationsSearchResponse.html.md +22 -0
- data/doc_out/NumberOrder.html.md +27 -0
- data/doc_out/PortBillingAddress.html.md +17 -0
- data/doc_out/PortContact.html.md +14 -0
- data/doc_out/PresenceApi.html.md +1 -1
- data/doc_out/QualityAudit.html.md +1 -1
- data/doc_out/RecordingApi.html.md +4 -2
- data/doc_out/ResponseSet.html.md +1 -1
- data/doc_out/RoutingData.html.md +17 -0
- data/doc_out/RuleSet.html.md +1 -1
- data/doc_out/SearchAggregation.html.md +3 -0
- data/doc_out/SearchApi.html.md +12 -12
- data/doc_out/SearchCriteria.html.md +1 -1
- data/doc_out/SearchRequest.html.md +3 -3
- data/doc_out/SuggestApi.html.md +2 -2
- data/doc_out/SuggestSearchCriteria.html.md +19 -0
- data/doc_out/SuggestSearchRequest.html.md +14 -0
- data/doc_out/Usage.html.md +13 -0
- data/doc_out/UsageItem.html.md +15 -0
- data/doc_out/UserSearchCriteria.html.md +20 -0
- data/doc_out/UserSearchRequest.html.md +19 -0
- data/doc_out/UsersApi.html.md +2 -120
- data/doc_out/UsersSearchResponse.html.md +1 -0
- data/doc_out/VoicemailMessageEntityListing.html.md +0 -7
- data/doc_out/Workspace.html.md +1 -0
- data/doc_out/WorkspaceCreate.html.md +1 -0
- data/doc_out/WorkspaceSummary.html.md +1 -0
- data/doc_out/index.html.md +3 -3
- data/lib/purecloud/api/content_management_api.rb +55 -0
- data/lib/purecloud/api/conversations_api.rb +121 -0
- data/lib/purecloud/api/groups_api.rb +6 -6
- data/lib/purecloud/api/languages_api.rb +2 -2
- data/lib/purecloud/api/locations_api.rb +8 -8
- data/lib/purecloud/api/presence_api.rb +2 -2
- data/lib/purecloud/api/recording_api.rb +5 -2
- data/lib/purecloud/api/routing_api.rb +2 -2
- data/lib/purecloud/api/search_api.rb +14 -14
- data/lib/purecloud/api/suggest_api.rb +2 -2
- data/lib/purecloud/api/users_api.rb +6 -128
- data/lib/purecloud/api_client.rb +1 -1
- data/lib/purecloud/models/additional_info.rb +155 -0
- data/lib/purecloud/models/authz_perm.rb +177 -0
- data/lib/purecloud/models/authz_permission_context.rb +7 -7
- data/lib/purecloud/models/callback.rb +15 -4
- data/lib/purecloud/models/{entity.rb → callback_identifier.rb} +15 -24
- data/lib/purecloud/models/callback_media_participant.rb +15 -4
- data/lib/purecloud/models/contact.rb +1 -1
- data/lib/purecloud/models/create_callback_command.rb +24 -4
- data/lib/purecloud/models/create_callback_response.rb +179 -0
- data/lib/purecloud/models/dependency.rb +13 -1
- data/lib/purecloud/models/dependency_object.rb +13 -1
- data/lib/purecloud/models/domain_edge_software_version_dto.rb +13 -13
- data/lib/purecloud/models/group_search_criteria.rb +260 -0
- data/lib/purecloud/models/group_search_request.rb +240 -0
- data/lib/purecloud/models/groups_search_response.rb +16 -4
- data/lib/purecloud/models/integration.rb +252 -0
- data/lib/purecloud/models/integration_configuration.rb +243 -0
- data/lib/purecloud/models/{deleted_resource_consumer_entity_listing.rb → integration_entity_listing.rb} +2 -2
- data/lib/purecloud/models/integration_status_info.rb +209 -0
- data/lib/purecloud/models/integration_type.rb +27 -1
- data/lib/purecloud/models/json_node.rb +13 -13
- data/lib/purecloud/models/json_node_search_response.rb +14 -4
- data/lib/purecloud/models/location_search_criteria.rb +260 -0
- data/lib/purecloud/models/location_search_request.rb +240 -0
- data/lib/purecloud/models/locations_search_response.rb +261 -0
- data/lib/purecloud/models/number_order.rb +339 -0
- data/lib/purecloud/models/number_order_request.rb +1 -1
- data/lib/purecloud/models/port_billing_address.rb +205 -0
- data/lib/purecloud/models/port_contact.rb +175 -0
- data/lib/purecloud/models/quality_audit.rb +1 -1
- data/lib/purecloud/models/reservation.rb +1 -1
- data/lib/purecloud/models/routing_data.rb +209 -0
- data/lib/purecloud/models/search_aggregation.rb +37 -5
- data/lib/purecloud/models/search_criteria.rb +22 -22
- data/lib/purecloud/models/search_request.rb +40 -39
- data/lib/purecloud/models/suggest_search_criteria.rb +240 -0
- data/lib/purecloud/models/suggest_search_request.rb +180 -0
- data/lib/purecloud/models/usage.rb +167 -0
- data/lib/purecloud/models/usage_item.rb +194 -0
- data/lib/purecloud/models/user_search_criteria.rb +260 -0
- data/lib/purecloud/models/user_search_request.rb +240 -0
- data/lib/purecloud/models/users_search_response.rb +16 -4
- data/lib/purecloud/models/voicemail_message_entity_listing.rb +4 -74
- data/lib/purecloud/models/workspace.rb +11 -1
- data/lib/purecloud/models/workspace_create.rb +14 -4
- data/lib/purecloud/models/workspace_summary.rb +14 -4
- data/lib/purecloud/version.rb +1 -1
- data/lib/purecloud.rb +23 -2
- data/newVersion.md +1 -1
- data/swagger.json +1 -1
- data/version.json +1 -1
- metadata +48 -6
@@ -0,0 +1,252 @@
|
|
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
|
+
# Details for an Integration
|
21
|
+
class Integration
|
22
|
+
# The globally unique identifier for the object.
|
23
|
+
attr_accessor :id
|
24
|
+
|
25
|
+
attr_accessor :name
|
26
|
+
|
27
|
+
# Type of the integration.
|
28
|
+
attr_accessor :integration_type
|
29
|
+
|
30
|
+
# Configured state of the integration.
|
31
|
+
attr_accessor :state
|
32
|
+
|
33
|
+
# Configuration for the integration.
|
34
|
+
attr_accessor :config
|
35
|
+
|
36
|
+
# Last reported status of the integration.
|
37
|
+
attr_accessor :last_status
|
38
|
+
|
39
|
+
# Version number required for updates.
|
40
|
+
attr_accessor :version
|
41
|
+
|
42
|
+
# The URI for this object
|
43
|
+
attr_accessor :self_uri
|
44
|
+
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
46
|
+
def self.attribute_map
|
47
|
+
{
|
48
|
+
|
49
|
+
:'id' => :'id',
|
50
|
+
|
51
|
+
:'name' => :'name',
|
52
|
+
|
53
|
+
:'integration_type' => :'integrationType',
|
54
|
+
|
55
|
+
:'state' => :'state',
|
56
|
+
|
57
|
+
:'config' => :'config',
|
58
|
+
|
59
|
+
:'last_status' => :'lastStatus',
|
60
|
+
|
61
|
+
:'version' => :'version',
|
62
|
+
|
63
|
+
:'self_uri' => :'selfUri'
|
64
|
+
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Attribute type mapping.
|
69
|
+
def self.swagger_types
|
70
|
+
{
|
71
|
+
:'id' => :'String',
|
72
|
+
:'name' => :'String',
|
73
|
+
:'integration_type' => :'IntegrationType',
|
74
|
+
:'state' => :'String',
|
75
|
+
:'config' => :'IntegrationConfiguration',
|
76
|
+
:'last_status' => :'IntegrationStatusInfo',
|
77
|
+
:'version' => :'Integer',
|
78
|
+
:'self_uri' => :'String'
|
79
|
+
|
80
|
+
}
|
81
|
+
end
|
82
|
+
|
83
|
+
def initialize(attributes = {})
|
84
|
+
return unless attributes.is_a?(Hash)
|
85
|
+
|
86
|
+
# convert string to symbol for hash key
|
87
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
88
|
+
|
89
|
+
|
90
|
+
if attributes[:'id']
|
91
|
+
self.id = attributes[:'id']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes[:'name']
|
95
|
+
self.name = attributes[:'name']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes[:'integrationType']
|
99
|
+
self.integration_type = attributes[:'integrationType']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes[:'state']
|
103
|
+
self.state = attributes[:'state']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes[:'config']
|
107
|
+
self.config = attributes[:'config']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes[:'lastStatus']
|
111
|
+
self.last_status = attributes[:'lastStatus']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes[:'version']
|
115
|
+
self.version = attributes[:'version']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes[:'selfUri']
|
119
|
+
self.self_uri = attributes[:'selfUri']
|
120
|
+
end
|
121
|
+
|
122
|
+
end
|
123
|
+
|
124
|
+
# Custom attribute writer method checking allowed values (enum).
|
125
|
+
def state=(state)
|
126
|
+
allowed_values = ["ENABLED", "DISABLED", "DELETED"]
|
127
|
+
if state && !allowed_values.include?(state)
|
128
|
+
fail "invalid value for 'state', must be one of #{allowed_values}"
|
129
|
+
end
|
130
|
+
@state = state
|
131
|
+
end
|
132
|
+
|
133
|
+
# Check equality by comparing each attribute.
|
134
|
+
def ==(o)
|
135
|
+
return true if self.equal?(o)
|
136
|
+
self.class == o.class &&
|
137
|
+
id == o.id &&
|
138
|
+
name == o.name &&
|
139
|
+
integration_type == o.integration_type &&
|
140
|
+
state == o.state &&
|
141
|
+
config == o.config &&
|
142
|
+
last_status == o.last_status &&
|
143
|
+
version == o.version &&
|
144
|
+
self_uri == o.self_uri
|
145
|
+
end
|
146
|
+
|
147
|
+
# @see the `==` method
|
148
|
+
def eql?(o)
|
149
|
+
self == o
|
150
|
+
end
|
151
|
+
|
152
|
+
# Calculate hash code according to all attributes.
|
153
|
+
def hash
|
154
|
+
[id, name, integration_type, state, config, last_status, version, self_uri].hash
|
155
|
+
end
|
156
|
+
|
157
|
+
# build the object from hash
|
158
|
+
def build_from_hash(attributes)
|
159
|
+
return nil unless attributes.is_a?(Hash)
|
160
|
+
self.class.swagger_types.each_pair do |key, type|
|
161
|
+
if type =~ /^Array<(.*)>/i
|
162
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
163
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
164
|
+
else
|
165
|
+
#TODO show warning in debug mode
|
166
|
+
end
|
167
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
168
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
169
|
+
else
|
170
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
self
|
175
|
+
end
|
176
|
+
|
177
|
+
def _deserialize(type, value)
|
178
|
+
case type.to_sym
|
179
|
+
when :DateTime
|
180
|
+
DateTime.parse(value)
|
181
|
+
when :Date
|
182
|
+
Date.parse(value)
|
183
|
+
when :String
|
184
|
+
value.to_s
|
185
|
+
when :Integer
|
186
|
+
value.to_i
|
187
|
+
when :Float
|
188
|
+
value.to_f
|
189
|
+
when :BOOLEAN
|
190
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
191
|
+
true
|
192
|
+
else
|
193
|
+
false
|
194
|
+
end
|
195
|
+
when :Object
|
196
|
+
# generic object (usually a Hash), return directly
|
197
|
+
value
|
198
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
199
|
+
inner_type = Regexp.last_match[:inner_type]
|
200
|
+
value.map { |v| _deserialize(inner_type, v) }
|
201
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
202
|
+
k_type = Regexp.last_match[:k_type]
|
203
|
+
v_type = Regexp.last_match[:v_type]
|
204
|
+
{}.tap do |hash|
|
205
|
+
value.each do |k, v|
|
206
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
else # model
|
210
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
211
|
+
_model.build_from_hash(value)
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
def to_s
|
216
|
+
to_hash.to_s
|
217
|
+
end
|
218
|
+
|
219
|
+
# to_body is an alias to to_body (backward compatibility))
|
220
|
+
def to_body
|
221
|
+
to_hash
|
222
|
+
end
|
223
|
+
|
224
|
+
# return the object in the form of hash
|
225
|
+
def to_hash
|
226
|
+
hash = {}
|
227
|
+
self.class.attribute_map.each_pair do |attr, param|
|
228
|
+
value = self.send(attr)
|
229
|
+
next if value.nil?
|
230
|
+
hash[param] = _to_hash(value)
|
231
|
+
end
|
232
|
+
hash
|
233
|
+
end
|
234
|
+
|
235
|
+
# Method to output non-array value in the form of hash
|
236
|
+
# For object, use to_hash. Otherwise, just return the value
|
237
|
+
def _to_hash(value)
|
238
|
+
if value.is_a?(Array)
|
239
|
+
value.compact.map{ |v| _to_hash(v) }
|
240
|
+
elsif value.is_a?(Hash)
|
241
|
+
{}.tap do |hash|
|
242
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
243
|
+
end
|
244
|
+
elsif value.respond_to? :to_hash
|
245
|
+
value.to_hash
|
246
|
+
else
|
247
|
+
value
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
end
|
252
|
+
end
|
@@ -0,0 +1,243 @@
|
|
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
|
+
# Configuration for an Integration
|
21
|
+
class IntegrationConfiguration
|
22
|
+
# The globally unique identifier for the object.
|
23
|
+
attr_accessor :id
|
24
|
+
|
25
|
+
attr_accessor :name
|
26
|
+
|
27
|
+
# Version number required for updates.
|
28
|
+
attr_accessor :version
|
29
|
+
|
30
|
+
# URI for the JSON Schema describing the configuration properties in the properties field.
|
31
|
+
attr_accessor :properties_schema_uri
|
32
|
+
|
33
|
+
# URI for the JSON Schema describing the advanced configuration
|
34
|
+
attr_accessor :advanced_schema_uri
|
35
|
+
|
36
|
+
# Key-value configuration settings described by the schema in the propertiesSchemaUri field.
|
37
|
+
attr_accessor :properties
|
38
|
+
|
39
|
+
# Advanced configuration described by the schema in the advancedSchemaUri field.
|
40
|
+
attr_accessor :advanced
|
41
|
+
|
42
|
+
# The URI for this object
|
43
|
+
attr_accessor :self_uri
|
44
|
+
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
46
|
+
def self.attribute_map
|
47
|
+
{
|
48
|
+
|
49
|
+
:'id' => :'id',
|
50
|
+
|
51
|
+
:'name' => :'name',
|
52
|
+
|
53
|
+
:'version' => :'version',
|
54
|
+
|
55
|
+
:'properties_schema_uri' => :'propertiesSchemaUri',
|
56
|
+
|
57
|
+
:'advanced_schema_uri' => :'advancedSchemaUri',
|
58
|
+
|
59
|
+
:'properties' => :'properties',
|
60
|
+
|
61
|
+
:'advanced' => :'advanced',
|
62
|
+
|
63
|
+
:'self_uri' => :'selfUri'
|
64
|
+
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Attribute type mapping.
|
69
|
+
def self.swagger_types
|
70
|
+
{
|
71
|
+
:'id' => :'String',
|
72
|
+
:'name' => :'String',
|
73
|
+
:'version' => :'Integer',
|
74
|
+
:'properties_schema_uri' => :'String',
|
75
|
+
:'advanced_schema_uri' => :'String',
|
76
|
+
:'properties' => :'Object',
|
77
|
+
:'advanced' => :'Object',
|
78
|
+
:'self_uri' => :'String'
|
79
|
+
|
80
|
+
}
|
81
|
+
end
|
82
|
+
|
83
|
+
def initialize(attributes = {})
|
84
|
+
return unless attributes.is_a?(Hash)
|
85
|
+
|
86
|
+
# convert string to symbol for hash key
|
87
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
88
|
+
|
89
|
+
|
90
|
+
if attributes[:'id']
|
91
|
+
self.id = attributes[:'id']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes[:'name']
|
95
|
+
self.name = attributes[:'name']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes[:'version']
|
99
|
+
self.version = attributes[:'version']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes[:'propertiesSchemaUri']
|
103
|
+
self.properties_schema_uri = attributes[:'propertiesSchemaUri']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes[:'advancedSchemaUri']
|
107
|
+
self.advanced_schema_uri = attributes[:'advancedSchemaUri']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes[:'properties']
|
111
|
+
self.properties = attributes[:'properties']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes[:'advanced']
|
115
|
+
self.advanced = attributes[:'advanced']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes[:'selfUri']
|
119
|
+
self.self_uri = attributes[:'selfUri']
|
120
|
+
end
|
121
|
+
|
122
|
+
end
|
123
|
+
|
124
|
+
# Check equality by comparing each attribute.
|
125
|
+
def ==(o)
|
126
|
+
return true if self.equal?(o)
|
127
|
+
self.class == o.class &&
|
128
|
+
id == o.id &&
|
129
|
+
name == o.name &&
|
130
|
+
version == o.version &&
|
131
|
+
properties_schema_uri == o.properties_schema_uri &&
|
132
|
+
advanced_schema_uri == o.advanced_schema_uri &&
|
133
|
+
properties == o.properties &&
|
134
|
+
advanced == o.advanced &&
|
135
|
+
self_uri == o.self_uri
|
136
|
+
end
|
137
|
+
|
138
|
+
# @see the `==` method
|
139
|
+
def eql?(o)
|
140
|
+
self == o
|
141
|
+
end
|
142
|
+
|
143
|
+
# Calculate hash code according to all attributes.
|
144
|
+
def hash
|
145
|
+
[id, name, version, properties_schema_uri, advanced_schema_uri, properties, advanced, self_uri].hash
|
146
|
+
end
|
147
|
+
|
148
|
+
# build the object from hash
|
149
|
+
def build_from_hash(attributes)
|
150
|
+
return nil unless attributes.is_a?(Hash)
|
151
|
+
self.class.swagger_types.each_pair do |key, type|
|
152
|
+
if type =~ /^Array<(.*)>/i
|
153
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
154
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
155
|
+
else
|
156
|
+
#TODO show warning in debug mode
|
157
|
+
end
|
158
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
159
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
160
|
+
else
|
161
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
self
|
166
|
+
end
|
167
|
+
|
168
|
+
def _deserialize(type, value)
|
169
|
+
case type.to_sym
|
170
|
+
when :DateTime
|
171
|
+
DateTime.parse(value)
|
172
|
+
when :Date
|
173
|
+
Date.parse(value)
|
174
|
+
when :String
|
175
|
+
value.to_s
|
176
|
+
when :Integer
|
177
|
+
value.to_i
|
178
|
+
when :Float
|
179
|
+
value.to_f
|
180
|
+
when :BOOLEAN
|
181
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
182
|
+
true
|
183
|
+
else
|
184
|
+
false
|
185
|
+
end
|
186
|
+
when :Object
|
187
|
+
# generic object (usually a Hash), return directly
|
188
|
+
value
|
189
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
190
|
+
inner_type = Regexp.last_match[:inner_type]
|
191
|
+
value.map { |v| _deserialize(inner_type, v) }
|
192
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
193
|
+
k_type = Regexp.last_match[:k_type]
|
194
|
+
v_type = Regexp.last_match[:v_type]
|
195
|
+
{}.tap do |hash|
|
196
|
+
value.each do |k, v|
|
197
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
198
|
+
end
|
199
|
+
end
|
200
|
+
else # model
|
201
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
202
|
+
_model.build_from_hash(value)
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
def to_s
|
207
|
+
to_hash.to_s
|
208
|
+
end
|
209
|
+
|
210
|
+
# to_body is an alias to to_body (backward compatibility))
|
211
|
+
def to_body
|
212
|
+
to_hash
|
213
|
+
end
|
214
|
+
|
215
|
+
# return the object in the form of hash
|
216
|
+
def to_hash
|
217
|
+
hash = {}
|
218
|
+
self.class.attribute_map.each_pair do |attr, param|
|
219
|
+
value = self.send(attr)
|
220
|
+
next if value.nil?
|
221
|
+
hash[param] = _to_hash(value)
|
222
|
+
end
|
223
|
+
hash
|
224
|
+
end
|
225
|
+
|
226
|
+
# Method to output non-array value in the form of hash
|
227
|
+
# For object, use to_hash. Otherwise, just return the value
|
228
|
+
def _to_hash(value)
|
229
|
+
if value.is_a?(Array)
|
230
|
+
value.compact.map{ |v| _to_hash(v) }
|
231
|
+
elsif value.is_a?(Hash)
|
232
|
+
{}.tap do |hash|
|
233
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
234
|
+
end
|
235
|
+
elsif value.respond_to? :to_hash
|
236
|
+
value.to_hash
|
237
|
+
else
|
238
|
+
value
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
end
|
243
|
+
end
|
@@ -17,7 +17,7 @@ Terms of Service: https://developer.mypurecloud.com/tos
|
|
17
17
|
require 'date'
|
18
18
|
|
19
19
|
module PureCloud
|
20
|
-
class
|
20
|
+
class IntegrationEntityListing
|
21
21
|
attr_accessor :page_size
|
22
22
|
|
23
23
|
attr_accessor :page_number
|
@@ -71,7 +71,7 @@ module PureCloud
|
|
71
71
|
:'page_size' => :'Integer',
|
72
72
|
:'page_number' => :'Integer',
|
73
73
|
:'total' => :'Integer',
|
74
|
-
:'entities' => :'Array<
|
74
|
+
:'entities' => :'Array<Integration>',
|
75
75
|
:'self_uri' => :'String',
|
76
76
|
:'first_uri' => :'String',
|
77
77
|
:'previous_uri' => :'String',
|