purecloud 0.18.0 → 0.25.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/Gemfile.lock +2 -2
- data/README.md +1 -7
- data/config-ruby.json +1 -1
- data/extensions/auth.rb +2 -2
- data/lib/purecloud.rb +110 -75
- data/lib/purecloud/api/architect_api.rb +3127 -74
- data/lib/purecloud/api/attributes_api.rb +33 -33
- data/lib/purecloud/api/authorization_api.rb +83 -83
- data/lib/purecloud/api/compliance_api.rb +5 -5
- data/lib/purecloud/api/configuration_api.rb +594 -397
- data/lib/purecloud/api/content_management_api.rb +183 -183
- data/lib/purecloud/api/conversations_api.rb +289 -159
- data/lib/purecloud/api/downloads_api.rb +6 -6
- data/lib/purecloud/api/external_contacts_api.rb +1693 -0
- data/lib/purecloud/api/fax_api.rb +24 -24
- data/lib/purecloud/api/geolocation_api.rb +14 -14
- data/lib/purecloud/api/greetings_api.rb +68 -68
- data/lib/purecloud/api/groups_api.rb +31 -20
- data/lib/purecloud/api/languages_api.rb +18 -11
- data/lib/purecloud/api/licensing_api.rb +5 -5
- data/lib/purecloud/api/locations_api.rb +11 -11
- data/lib/purecloud/api/notifications_api.rb +41 -41
- data/lib/purecloud/api/o_auth_api.rb +69 -69
- data/lib/purecloud/api/outbound_api.rb +505 -325
- data/lib/purecloud/api/presence_api.rb +65 -65
- data/lib/purecloud/api/quality_api.rb +66 -639
- data/lib/purecloud/api/recording_api.rb +1343 -0
- data/lib/purecloud/api/response_management_api.rb +687 -0
- data/lib/purecloud/api/routing_api.rb +224 -170
- data/lib/purecloud/api/scripts_api.rb +52 -52
- data/lib/purecloud/api/search_api.rb +5 -5
- data/lib/purecloud/api/stations_api.rb +8 -8
- data/lib/purecloud/api/telephony_providers_edge_api.rb +138 -138
- data/lib/purecloud/api/user_recordings_api.rb +29 -29
- data/lib/purecloud/api/users_api.rb +123 -123
- data/lib/purecloud/api/utilities_api.rb +71 -15
- data/lib/purecloud/api/voicemail_api.rb +42 -42
- data/lib/purecloud/api_client.rb +1 -1
- data/lib/purecloud/models/address.rb +49 -51
- data/lib/purecloud/models/attribute_filter_item.rb +177 -0
- data/lib/purecloud/models/automate_queue_member_entity_listing.rb +238 -0
- data/lib/purecloud/models/available_additional_service.rb +40 -1
- data/lib/purecloud/models/{topic_entity_listing.rb → available_topic_entity_listing.rb} +1 -1
- data/lib/purecloud/models/call.rb +36 -5
- data/lib/purecloud/models/{line_properties.rb → call_command.rb} +13 -3
- data/lib/purecloud/models/callback.rb +15 -4
- data/lib/purecloud/models/campaign.rb +219 -17
- data/lib/purecloud/models/campaign_progress.rb +186 -0
- data/lib/purecloud/models/channel_topic_entity_listing.rb +238 -0
- data/lib/purecloud/models/charge.rb +14 -4
- data/lib/purecloud/models/{attribute_value.rb → client_text_table_transform.rb} +52 -82
- data/lib/purecloud/models/contact.rb +1 -1
- data/lib/purecloud/models/contact_list.rb +111 -1
- data/lib/purecloud/models/contact_listing.rb +238 -0
- data/lib/purecloud/models/content_attribute_filter_item.rb +177 -0
- data/lib/purecloud/models/content_facet_filter_item.rb +1 -1
- data/lib/purecloud/models/content_query_request.rb +16 -4
- data/lib/purecloud/models/control.rb +221 -0
- data/lib/purecloud/models/{flow_activate_request.rb → control_options.rb} +18 -12
- data/lib/purecloud/models/create_callback_command.rb +200 -0
- data/lib/purecloud/models/discount.rb +220 -0
- data/lib/purecloud/models/document.rb +13 -1
- data/lib/purecloud/models/document_attribute.rb +158 -0
- data/lib/purecloud/models/document_update.rb +28 -16
- data/lib/purecloud/models/document_upload.rb +4 -16
- data/lib/purecloud/models/domain_voice_rate_extended_response_item_entity_listing.rb +238 -0
- data/lib/purecloud/models/domain_voice_rate_international_response_item_entity_listing.rb +238 -0
- data/lib/purecloud/models/domain_voice_rate_response_item_entity_listing.rb +1 -1
- data/lib/purecloud/models/edge_line.rb +1 -1
- data/lib/purecloud/models/edge_logs_job.rb +181 -0
- data/lib/purecloud/models/edge_logs_job_file.rb +243 -0
- data/lib/purecloud/models/edge_logs_job_request.rb +168 -0
- data/lib/purecloud/models/{backend_work_item_data_element.rb → edge_logs_job_response.rb} +16 -24
- data/lib/purecloud/models/{flow_lock_request.rb → edge_logs_job_upload_request.rb} +10 -12
- data/lib/purecloud/models/email.rb +15 -4
- data/lib/purecloud/models/endpoint.rb +1 -1
- data/lib/purecloud/models/{flow_associate_workspaces_request.rb → estimated_wait_time_predictions.rb} +10 -11
- data/lib/purecloud/models/external_contact.rb +320 -0
- data/lib/purecloud/models/external_organization.rb +306 -0
- data/lib/purecloud/models/external_organization_listing.rb +238 -0
- data/lib/purecloud/models/facet_filter_item.rb +1 -1
- data/lib/purecloud/models/flow_body.rb +1 -1
- data/lib/purecloud/models/flow_body_format.rb +10 -20
- data/lib/purecloud/models/flow_terminate_request.rb +3 -16
- data/lib/purecloud/models/form.rb +148 -0
- data/lib/purecloud/models/group.rb +11 -1
- data/lib/purecloud/models/health_check_info.rb +268 -0
- data/lib/purecloud/models/{body_2.rb → inline_response_200.rb} +1 -1
- data/lib/purecloud/models/integration_type.rb +209 -0
- data/lib/purecloud/models/integration_type_entity_listing.rb +238 -0
- data/lib/purecloud/models/key_rotation_schedule.rb +1 -0
- data/lib/purecloud/models/language.rb +41 -1
- data/lib/purecloud/models/line.rb +1 -1
- data/lib/purecloud/models/line_base.rb +1 -1
- data/lib/purecloud/models/media_policies.rb +169 -0
- data/lib/purecloud/models/media_policy.rb +171 -0
- data/lib/purecloud/models/note.rb +200 -0
- data/lib/purecloud/models/{user_station_resource.rb → note_listing.rb} +68 -58
- data/lib/purecloud/models/o_auth_client.rb +1 -1
- data/lib/purecloud/models/page.rb +2 -2
- data/lib/purecloud/models/{byte_buffer.rb → payment_method.rb} +48 -61
- data/lib/purecloud/models/payment_method_listing.rb +238 -0
- data/lib/purecloud/models/payment_token_provider.rb +180 -0
- data/lib/purecloud/models/phone.rb +1 -1
- data/lib/purecloud/models/phone_base.rb +1 -1
- data/lib/purecloud/models/phone_number.rb +198 -0
- data/lib/purecloud/models/phones_reboot.rb +14 -4
- data/lib/purecloud/models/policy.rb +14 -1
- data/lib/purecloud/models/prediction_results.rb +167 -0
- data/lib/purecloud/models/query_request.rb +16 -4
- data/lib/purecloud/models/queue_member_entity_listing.rb +1 -1
- data/lib/purecloud/models/quote.rb +13 -1
- data/lib/purecloud/models/recording_settings.rb +146 -0
- data/lib/purecloud/models/relationship.rb +201 -0
- data/lib/purecloud/models/relationship_listing.rb +238 -0
- data/lib/purecloud/models/report_schedule.rb +3 -2
- data/lib/purecloud/models/service_type.rb +12 -1
- data/lib/purecloud/models/social_expression.rb +25 -4
- data/lib/purecloud/models/spreadsheet_transform_entity_listing.rb +1 -1
- data/lib/purecloud/models/template.rb +1 -1
- data/lib/purecloud/models/text_table_transform_entity_listing.rb +1 -1
- data/lib/purecloud/models/ticker.rb +158 -0
- data/lib/purecloud/models/time_slot.rb +1 -0
- data/lib/purecloud/models/trunk_base.rb +1 -1
- data/lib/purecloud/models/vendor_connection_request.rb +166 -0
- data/lib/purecloud/models/video.rb +15 -4
- data/lib/purecloud/models/work_item_definition.rb +8 -10
- data/lib/purecloud/version.rb +1 -1
- data/ossindex.json +17 -0
- data/purecloud.gemspec +4 -3
- data/rakefile +3 -15
- data/spec/test.rb +6 -3
- data/swagger.json +1 -1
- data/swagger_template/api_client.mustache +304 -0
- data/swagger_template/base_object.mustache +90 -0
- data/{PureCloud.gemspec → swagger_template/gemspec.mustache} +12 -11
- data/version.json +1 -1
- metadata +76 -25
- data/lib/purecloud/api/analytics_api.rb +0 -1554
- data/lib/purecloud/api/orphaned_recordings_api.rb +0 -205
- data/newVersion.md +0 -1
@@ -0,0 +1,201 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module PureCloud
|
4
|
+
class Relationship
|
5
|
+
# The globally unique identifier for the object.
|
6
|
+
attr_accessor :id
|
7
|
+
|
8
|
+
attr_accessor :name
|
9
|
+
|
10
|
+
# The user associated with the external organization
|
11
|
+
attr_accessor :user
|
12
|
+
|
13
|
+
# The external organization this relationship is attached to
|
14
|
+
attr_accessor :external_organization
|
15
|
+
|
16
|
+
# The relationship or role of the user to this external organization.Examples: Account Manager, Sales Engineer, Implementation Consultant
|
17
|
+
attr_accessor :relationship
|
18
|
+
|
19
|
+
# The URI for this object
|
20
|
+
attr_accessor :self_uri
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
|
26
|
+
:'id' => :'id',
|
27
|
+
|
28
|
+
:'name' => :'name',
|
29
|
+
|
30
|
+
:'user' => :'user',
|
31
|
+
|
32
|
+
:'external_organization' => :'externalOrganization',
|
33
|
+
|
34
|
+
:'relationship' => :'relationship',
|
35
|
+
|
36
|
+
:'self_uri' => :'selfUri'
|
37
|
+
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.swagger_types
|
43
|
+
{
|
44
|
+
:'id' => :'String',
|
45
|
+
:'name' => :'String',
|
46
|
+
:'user' => :'User',
|
47
|
+
:'external_organization' => :'ExternalOrganization',
|
48
|
+
:'relationship' => :'String',
|
49
|
+
:'self_uri' => :'String'
|
50
|
+
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
def initialize(attributes = {})
|
55
|
+
return unless attributes.is_a?(Hash)
|
56
|
+
|
57
|
+
# convert string to symbol for hash key
|
58
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
59
|
+
|
60
|
+
|
61
|
+
if attributes[:'id']
|
62
|
+
self.id = attributes[:'id']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes[:'name']
|
66
|
+
self.name = attributes[:'name']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes[:'user']
|
70
|
+
self.user = attributes[:'user']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes[:'externalOrganization']
|
74
|
+
self.external_organization = attributes[:'externalOrganization']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes[:'relationship']
|
78
|
+
self.relationship = attributes[:'relationship']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes[:'selfUri']
|
82
|
+
self.self_uri = attributes[:'selfUri']
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
86
|
+
|
87
|
+
# Check equality by comparing each attribute.
|
88
|
+
def ==(o)
|
89
|
+
return true if self.equal?(o)
|
90
|
+
self.class == o.class &&
|
91
|
+
id == o.id &&
|
92
|
+
name == o.name &&
|
93
|
+
user == o.user &&
|
94
|
+
external_organization == o.external_organization &&
|
95
|
+
relationship == o.relationship &&
|
96
|
+
self_uri == o.self_uri
|
97
|
+
end
|
98
|
+
|
99
|
+
# @see the `==` method
|
100
|
+
def eql?(o)
|
101
|
+
self == o
|
102
|
+
end
|
103
|
+
|
104
|
+
# Calculate hash code according to all attributes.
|
105
|
+
def hash
|
106
|
+
[id, name, user, external_organization, relationship, self_uri].hash
|
107
|
+
end
|
108
|
+
|
109
|
+
# build the object from hash
|
110
|
+
def build_from_hash(attributes)
|
111
|
+
return nil unless attributes.is_a?(Hash)
|
112
|
+
self.class.swagger_types.each_pair do |key, type|
|
113
|
+
if type =~ /^Array<(.*)>/i
|
114
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
115
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
116
|
+
else
|
117
|
+
#TODO show warning in debug mode
|
118
|
+
end
|
119
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
120
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
121
|
+
else
|
122
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
self
|
127
|
+
end
|
128
|
+
|
129
|
+
def _deserialize(type, value)
|
130
|
+
case type.to_sym
|
131
|
+
when :DateTime
|
132
|
+
DateTime.parse(value)
|
133
|
+
when :Date
|
134
|
+
Date.parse(value)
|
135
|
+
when :String
|
136
|
+
value.to_s
|
137
|
+
when :Integer
|
138
|
+
value.to_i
|
139
|
+
when :Float
|
140
|
+
value.to_f
|
141
|
+
when :BOOLEAN
|
142
|
+
if value =~ /^(true|t|yes|y|1)$/i
|
143
|
+
true
|
144
|
+
else
|
145
|
+
false
|
146
|
+
end
|
147
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
148
|
+
inner_type = Regexp.last_match[:inner_type]
|
149
|
+
value.map { |v| _deserialize(inner_type, v) }
|
150
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
151
|
+
k_type = Regexp.last_match[:k_type]
|
152
|
+
v_type = Regexp.last_match[:v_type]
|
153
|
+
{}.tap do |hash|
|
154
|
+
value.each do |k, v|
|
155
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
else # model
|
159
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
160
|
+
_model.build_from_hash(value)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
def to_s
|
165
|
+
to_hash.to_s
|
166
|
+
end
|
167
|
+
|
168
|
+
# to_body is an alias to to_body (backward compatibility))
|
169
|
+
def to_body
|
170
|
+
to_hash
|
171
|
+
end
|
172
|
+
|
173
|
+
# return the object in the form of hash
|
174
|
+
def to_hash
|
175
|
+
hash = {}
|
176
|
+
self.class.attribute_map.each_pair do |attr, param|
|
177
|
+
value = self.send(attr)
|
178
|
+
next if value.nil?
|
179
|
+
hash[param] = _to_hash(value)
|
180
|
+
end
|
181
|
+
hash
|
182
|
+
end
|
183
|
+
|
184
|
+
# Method to output non-array value in the form of hash
|
185
|
+
# For object, use to_hash. Otherwise, just return the value
|
186
|
+
def _to_hash(value)
|
187
|
+
if value.is_a?(Array)
|
188
|
+
value.compact.map{ |v| _to_hash(v) }
|
189
|
+
elsif value.is_a?(Hash)
|
190
|
+
{}.tap do |hash|
|
191
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
192
|
+
end
|
193
|
+
elsif value.respond_to? :to_hash
|
194
|
+
value.to_hash
|
195
|
+
else
|
196
|
+
value
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
end
|
201
|
+
end
|
@@ -0,0 +1,238 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module PureCloud
|
4
|
+
class RelationshipListing
|
5
|
+
attr_accessor :page_size
|
6
|
+
|
7
|
+
attr_accessor :page_number
|
8
|
+
|
9
|
+
attr_accessor :total
|
10
|
+
|
11
|
+
attr_accessor :entities
|
12
|
+
|
13
|
+
attr_accessor :self_uri
|
14
|
+
|
15
|
+
attr_accessor :first_uri
|
16
|
+
|
17
|
+
attr_accessor :previous_uri
|
18
|
+
|
19
|
+
attr_accessor :next_uri
|
20
|
+
|
21
|
+
attr_accessor :last_uri
|
22
|
+
|
23
|
+
attr_accessor :page_count
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
|
29
|
+
:'page_size' => :'pageSize',
|
30
|
+
|
31
|
+
:'page_number' => :'pageNumber',
|
32
|
+
|
33
|
+
:'total' => :'total',
|
34
|
+
|
35
|
+
:'entities' => :'entities',
|
36
|
+
|
37
|
+
:'self_uri' => :'selfUri',
|
38
|
+
|
39
|
+
:'first_uri' => :'firstUri',
|
40
|
+
|
41
|
+
:'previous_uri' => :'previousUri',
|
42
|
+
|
43
|
+
:'next_uri' => :'nextUri',
|
44
|
+
|
45
|
+
:'last_uri' => :'lastUri',
|
46
|
+
|
47
|
+
:'page_count' => :'pageCount'
|
48
|
+
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Attribute type mapping.
|
53
|
+
def self.swagger_types
|
54
|
+
{
|
55
|
+
:'page_size' => :'Integer',
|
56
|
+
:'page_number' => :'Integer',
|
57
|
+
:'total' => :'Integer',
|
58
|
+
:'entities' => :'Array<Relationship>',
|
59
|
+
:'self_uri' => :'String',
|
60
|
+
:'first_uri' => :'String',
|
61
|
+
:'previous_uri' => :'String',
|
62
|
+
:'next_uri' => :'String',
|
63
|
+
:'last_uri' => :'String',
|
64
|
+
:'page_count' => :'Integer'
|
65
|
+
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
def initialize(attributes = {})
|
70
|
+
return unless attributes.is_a?(Hash)
|
71
|
+
|
72
|
+
# convert string to symbol for hash key
|
73
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
74
|
+
|
75
|
+
|
76
|
+
if attributes[:'pageSize']
|
77
|
+
self.page_size = attributes[:'pageSize']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes[:'pageNumber']
|
81
|
+
self.page_number = attributes[:'pageNumber']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes[:'total']
|
85
|
+
self.total = attributes[:'total']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes[:'entities']
|
89
|
+
if (value = attributes[:'entities']).is_a?(Array)
|
90
|
+
self.entities = value
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes[:'selfUri']
|
95
|
+
self.self_uri = attributes[:'selfUri']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes[:'firstUri']
|
99
|
+
self.first_uri = attributes[:'firstUri']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes[:'previousUri']
|
103
|
+
self.previous_uri = attributes[:'previousUri']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes[:'nextUri']
|
107
|
+
self.next_uri = attributes[:'nextUri']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes[:'lastUri']
|
111
|
+
self.last_uri = attributes[:'lastUri']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes[:'pageCount']
|
115
|
+
self.page_count = attributes[:'pageCount']
|
116
|
+
end
|
117
|
+
|
118
|
+
end
|
119
|
+
|
120
|
+
# Check equality by comparing each attribute.
|
121
|
+
def ==(o)
|
122
|
+
return true if self.equal?(o)
|
123
|
+
self.class == o.class &&
|
124
|
+
page_size == o.page_size &&
|
125
|
+
page_number == o.page_number &&
|
126
|
+
total == o.total &&
|
127
|
+
entities == o.entities &&
|
128
|
+
self_uri == o.self_uri &&
|
129
|
+
first_uri == o.first_uri &&
|
130
|
+
previous_uri == o.previous_uri &&
|
131
|
+
next_uri == o.next_uri &&
|
132
|
+
last_uri == o.last_uri &&
|
133
|
+
page_count == o.page_count
|
134
|
+
end
|
135
|
+
|
136
|
+
# @see the `==` method
|
137
|
+
def eql?(o)
|
138
|
+
self == o
|
139
|
+
end
|
140
|
+
|
141
|
+
# Calculate hash code according to all attributes.
|
142
|
+
def hash
|
143
|
+
[page_size, page_number, total, entities, self_uri, first_uri, previous_uri, next_uri, last_uri, page_count].hash
|
144
|
+
end
|
145
|
+
|
146
|
+
# build the object from hash
|
147
|
+
def build_from_hash(attributes)
|
148
|
+
return nil unless attributes.is_a?(Hash)
|
149
|
+
self.class.swagger_types.each_pair do |key, type|
|
150
|
+
if type =~ /^Array<(.*)>/i
|
151
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
152
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
153
|
+
else
|
154
|
+
#TODO show warning in debug mode
|
155
|
+
end
|
156
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
157
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
158
|
+
else
|
159
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
self
|
164
|
+
end
|
165
|
+
|
166
|
+
def _deserialize(type, value)
|
167
|
+
case type.to_sym
|
168
|
+
when :DateTime
|
169
|
+
DateTime.parse(value)
|
170
|
+
when :Date
|
171
|
+
Date.parse(value)
|
172
|
+
when :String
|
173
|
+
value.to_s
|
174
|
+
when :Integer
|
175
|
+
value.to_i
|
176
|
+
when :Float
|
177
|
+
value.to_f
|
178
|
+
when :BOOLEAN
|
179
|
+
if value =~ /^(true|t|yes|y|1)$/i
|
180
|
+
true
|
181
|
+
else
|
182
|
+
false
|
183
|
+
end
|
184
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
185
|
+
inner_type = Regexp.last_match[:inner_type]
|
186
|
+
value.map { |v| _deserialize(inner_type, v) }
|
187
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
188
|
+
k_type = Regexp.last_match[:k_type]
|
189
|
+
v_type = Regexp.last_match[:v_type]
|
190
|
+
{}.tap do |hash|
|
191
|
+
value.each do |k, v|
|
192
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
else # model
|
196
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
197
|
+
_model.build_from_hash(value)
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
def to_s
|
202
|
+
to_hash.to_s
|
203
|
+
end
|
204
|
+
|
205
|
+
# to_body is an alias to to_body (backward compatibility))
|
206
|
+
def to_body
|
207
|
+
to_hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# return the object in the form of hash
|
211
|
+
def to_hash
|
212
|
+
hash = {}
|
213
|
+
self.class.attribute_map.each_pair do |attr, param|
|
214
|
+
value = self.send(attr)
|
215
|
+
next if value.nil?
|
216
|
+
hash[param] = _to_hash(value)
|
217
|
+
end
|
218
|
+
hash
|
219
|
+
end
|
220
|
+
|
221
|
+
# Method to output non-array value in the form of hash
|
222
|
+
# For object, use to_hash. Otherwise, just return the value
|
223
|
+
def _to_hash(value)
|
224
|
+
if value.is_a?(Array)
|
225
|
+
value.compact.map{ |v| _to_hash(v) }
|
226
|
+
elsif value.is_a?(Hash)
|
227
|
+
{}.tap do |hash|
|
228
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
229
|
+
end
|
230
|
+
elsif value.respond_to? :to_hash
|
231
|
+
value.to_hash
|
232
|
+
else
|
233
|
+
value
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
end
|
238
|
+
end
|
@@ -24,6 +24,7 @@ module PureCloud
|
|
24
24
|
|
25
25
|
attr_accessor :time_period
|
26
26
|
|
27
|
+
# Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss
|
27
28
|
attr_accessor :interval
|
28
29
|
|
29
30
|
attr_accessor :report_format
|
@@ -94,12 +95,12 @@ module PureCloud
|
|
94
95
|
:'description' => :'String',
|
95
96
|
:'time_zone' => :'String',
|
96
97
|
:'time_period' => :'String',
|
97
|
-
:'interval' => :'
|
98
|
+
:'interval' => :'DateTime',
|
98
99
|
:'report_format' => :'String',
|
99
100
|
:'locale' => :'String',
|
100
101
|
:'enabled' => :'BOOLEAN',
|
101
102
|
:'report_id' => :'String',
|
102
|
-
:'parameters' => :'Hash<String,
|
103
|
+
:'parameters' => :'Hash<String, inline_response_200>',
|
103
104
|
:'last_run' => :'ReportRunEntry',
|
104
105
|
:'self_uri' => :'String'
|
105
106
|
|