purecloud 0.38.1 → 0.39.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/AuthorizationApi.html.md +0 -57
- data/doc_out/AvailableLanguageList.html.md +13 -0
- data/doc_out/BillingContact.html.md +20 -0
- data/doc_out/{FlowHistoryResultItemEntityListing.html.md → BillingContactListing.html.md} +3 -3
- data/doc_out/CallRecord.html.md +2 -2
- data/doc_out/CallableContactsDiagnostic.html.md +3 -3
- data/doc_out/CallableTimeSet.html.md +3 -3
- data/doc_out/Campaign.html.md +3 -3
- data/doc_out/CampaignDiagnostics.html.md +3 -3
- data/doc_out/CampaignSchedule.html.md +6 -6
- data/doc_out/CampaignSequence.html.md +8 -8
- data/doc_out/CampaignStats.html.md +4 -4
- data/doc_out/Condition.html.md +7 -7
- data/doc_out/ConnectRate.html.md +3 -3
- data/doc_out/ContactCallbackRequest.html.md +5 -5
- data/doc_out/ContactList.html.md +9 -9
- data/doc_out/ContactPhoneNumberColumn.html.md +3 -3
- data/doc_out/CreateCallbackCommand.html.md +1 -0
- data/doc_out/CreateUser.html.md +1 -1
- data/doc_out/CustomerInteractionCenter.html.md +18 -0
- data/doc_out/DialerAction.html.md +4 -4
- data/doc_out/DialerContact.html.md +5 -5
- data/doc_out/DialerRule.html.md +6 -6
- data/doc_out/DncList.html.md +6 -7
- data/doc_out/ExternalContact.html.md +1 -0
- data/doc_out/ExternalDataSource.html.md +14 -0
- data/doc_out/ExternalOrganization.html.md +1 -0
- data/doc_out/IdentityProviderApi.html.md +1011 -0
- data/doc_out/ImportStatus.html.md +5 -5
- data/doc_out/InitiateScreenRecording.html.md +15 -0
- data/doc_out/JsonNode.html.md +3 -3
- data/doc_out/Keyword.html.md +19 -0
- data/doc_out/KeywordSet.html.md +21 -0
- data/doc_out/KeywordSetEntityListing.html.md +22 -0
- data/doc_out/OAuthApi.html.md +45 -886
- data/doc_out/OAuthClient.html.md +2 -2
- data/doc_out/Okta.html.md +1 -1
- data/doc_out/OneLogin.html.md +1 -1
- data/doc_out/OrgMediaUtilization.html.md +1 -0
- data/doc_out/OutboundApi.html.md +3 -3
- data/doc_out/PaymentMethod.html.md +3 -0
- data/doc_out/PhoneNumberStatus.html.md +1 -1
- data/doc_out/PolicyActions.html.md +1 -0
- data/doc_out/PresenceApi.html.md +68 -17
- data/doc_out/QualityApi.html.md +361 -0
- data/doc_out/QueueUtilizationDiagnostic.html.md +8 -8
- data/doc_out/ResponseSet.html.md +3 -3
- data/doc_out/RoutingApi.html.md +15 -12
- data/doc_out/RoutingSkill.html.md +1 -2
- data/doc_out/RuleSet.html.md +6 -6
- data/doc_out/Salesforce.html.md +1 -1
- data/doc_out/ScheduleInterval.html.md +14 -0
- data/doc_out/SequenceSchedule.html.md +6 -6
- data/doc_out/Station.html.md +1 -0
- data/doc_out/StationsApi.html.md +3 -1
- data/doc_out/SupportCredit.html.md +16 -0
- data/doc_out/SupportCreditListing.html.md +22 -0
- data/doc_out/SystemPresence.html.md +15 -0
- data/doc_out/TelephonyProvidersEdgeApi.html.md +112 -1
- data/doc_out/TrunkRecordingEnabledCount.html.md +14 -0
- data/doc_out/UserImage.html.md +1 -1
- data/doc_out/UserMe.html.md +5 -1
- data/doc_out/UserRoutingSkill.html.md +2 -2
- data/doc_out/UsersApi.html.md +182 -0
- data/doc_out/WrapUpCodeMapping.html.md +5 -5
- data/doc_out/index.html.md +3 -3
- data/lib/purecloud.rb +15 -3
- data/lib/purecloud/api/authorization_api.rb +0 -60
- data/lib/purecloud/api/identity_provider_api.rb +1072 -0
- data/lib/purecloud/api/o_auth_api.rb +26 -906
- data/lib/purecloud/api/outbound_api.rb +2 -2
- data/lib/purecloud/api/presence_api.rb +67 -12
- data/lib/purecloud/api/quality_api.rb +378 -0
- data/lib/purecloud/api/routing_api.rb +21 -16
- data/lib/purecloud/api/stations_api.rb +3 -0
- data/lib/purecloud/api/telephony_providers_edge_api.rb +120 -0
- data/lib/purecloud/api/users_api.rb +189 -0
- data/lib/purecloud/api_client.rb +1 -1
- data/lib/purecloud/models/analytics_session.rb +1 -1
- data/lib/purecloud/models/available_language_list.rb +167 -0
- data/lib/purecloud/models/billing_contact.rb +237 -0
- data/lib/purecloud/models/{flow_history_result_item_entity_listing.rb → billing_contact_listing.rb} +2 -2
- data/lib/purecloud/models/call_record.rb +2 -1
- data/lib/purecloud/models/callable_contacts_diagnostic.rb +3 -0
- data/lib/purecloud/models/callable_time_set.rb +3 -3
- data/lib/purecloud/models/campaign.rb +3 -3
- data/lib/purecloud/models/campaign_diagnostics.rb +3 -0
- data/lib/purecloud/models/campaign_schedule.rb +7 -4
- data/lib/purecloud/models/campaign_sequence.rb +8 -3
- data/lib/purecloud/models/campaign_stats.rb +4 -0
- data/lib/purecloud/models/condition.rb +16 -0
- data/lib/purecloud/models/connect_rate.rb +3 -0
- data/lib/purecloud/models/contact_callback_request.rb +5 -0
- data/lib/purecloud/models/contact_list.rb +9 -3
- data/lib/purecloud/models/contact_phone_number_column.rb +3 -0
- data/lib/purecloud/models/create_callback_command.rb +12 -1
- data/lib/purecloud/models/create_user.rb +1 -0
- data/lib/purecloud/models/customer_interaction_center.rb +217 -0
- data/lib/purecloud/models/dialer_action.rb +31 -0
- data/lib/purecloud/models/dialer_contact.rb +5 -0
- data/lib/purecloud/models/dialer_rule.rb +15 -0
- data/lib/purecloud/models/dnc_list.rb +7 -14
- data/lib/purecloud/models/external_contact.rb +14 -1
- data/lib/purecloud/models/external_data_source.rb +176 -0
- data/lib/purecloud/models/external_organization.rb +14 -1
- data/lib/purecloud/models/import_status.rb +5 -0
- data/lib/purecloud/models/initiate_screen_recording.rb +187 -0
- data/lib/purecloud/models/json_node.rb +37 -37
- data/lib/purecloud/models/keyword.rb +227 -0
- data/lib/purecloud/models/keyword_set.rb +253 -0
- data/lib/purecloud/models/keyword_set_entity_listing.rb +257 -0
- data/lib/purecloud/models/o_auth_client.rb +3 -3
- data/lib/purecloud/models/okta.rb +11 -11
- data/lib/purecloud/models/one_login.rb +11 -11
- data/lib/purecloud/models/org_media_utilization.rb +17 -4
- data/lib/purecloud/models/organization_presence.rb +0 -9
- data/lib/purecloud/models/payment_method.rb +42 -1
- data/lib/purecloud/models/phone_number_status.rb +1 -0
- data/lib/purecloud/models/policy_actions.rb +14 -4
- data/lib/purecloud/models/queue_utilization_diagnostic.rb +8 -0
- data/lib/purecloud/models/response_set.rb +3 -3
- data/lib/purecloud/models/routing_skill.rb +2 -12
- data/lib/purecloud/models/routing_status.rb +1 -1
- data/lib/purecloud/models/rule_set.rb +6 -3
- data/lib/purecloud/models/salesforce.rb +11 -11
- data/lib/purecloud/models/{campaign_schedule_intervals.rb → schedule_interval.rb} +5 -5
- data/lib/purecloud/models/sequence_schedule.rb +7 -4
- data/lib/purecloud/models/station.rb +11 -1
- data/lib/purecloud/models/support_credit.rb +197 -0
- data/lib/purecloud/models/support_credit_listing.rb +257 -0
- data/lib/purecloud/models/system_presence.rb +187 -0
- data/lib/purecloud/models/trunk_recording_enabled_count.rb +177 -0
- data/lib/purecloud/models/user_image.rb +1 -0
- data/lib/purecloud/models/user_me.rb +50 -2
- data/lib/purecloud/models/user_routing_skill.rb +18 -11
- data/lib/purecloud/models/wrap_up_code_mapping.rb +5 -3
- data/lib/purecloud/version.rb +1 -1
- data/newVersion.md +1 -1
- data/swagger.json +1 -1
- data/version.json +1 -1
- metadata +32 -8
- data/doc_out/CampaignScheduleIntervals.html.md +0 -14
- data/doc_out/ObjectsApi.html.md +0 -69
- data/lib/purecloud/api/objects_api.rb +0 -87
@@ -18,14 +18,19 @@ require 'date'
|
|
18
18
|
|
19
19
|
module PureCloud
|
20
20
|
class ImportStatus
|
21
|
+
# current status of the import
|
21
22
|
attr_accessor :state
|
22
23
|
|
24
|
+
# total number of records to be imported
|
23
25
|
attr_accessor :total_records
|
24
26
|
|
27
|
+
# number of records finished importing
|
25
28
|
attr_accessor :completed_records
|
26
29
|
|
30
|
+
# percentage of records finished importing
|
27
31
|
attr_accessor :percent_complete
|
28
32
|
|
33
|
+
# if the import has failed, the reason for the failure
|
29
34
|
attr_accessor :failure_reason
|
30
35
|
|
31
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -0,0 +1,187 @@
|
|
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 InitiateScreenRecording
|
21
|
+
attr_accessor :record_acw
|
22
|
+
|
23
|
+
attr_accessor :archive_retention
|
24
|
+
|
25
|
+
attr_accessor :delete_retention
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
|
31
|
+
:'record_acw' => :'recordACW',
|
32
|
+
|
33
|
+
:'archive_retention' => :'archiveRetention',
|
34
|
+
|
35
|
+
:'delete_retention' => :'deleteRetention'
|
36
|
+
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Attribute type mapping.
|
41
|
+
def self.swagger_types
|
42
|
+
{
|
43
|
+
:'record_acw' => :'BOOLEAN',
|
44
|
+
:'archive_retention' => :'ArchiveRetention',
|
45
|
+
:'delete_retention' => :'DeleteRetention'
|
46
|
+
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
def initialize(attributes = {})
|
51
|
+
return unless attributes.is_a?(Hash)
|
52
|
+
|
53
|
+
# convert string to symbol for hash key
|
54
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
55
|
+
|
56
|
+
|
57
|
+
if attributes[:'recordACW']
|
58
|
+
self.record_acw = attributes[:'recordACW']
|
59
|
+
else
|
60
|
+
self.record_acw = false
|
61
|
+
end
|
62
|
+
|
63
|
+
if attributes[:'archiveRetention']
|
64
|
+
self.archive_retention = attributes[:'archiveRetention']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes[:'deleteRetention']
|
68
|
+
self.delete_retention = attributes[:'deleteRetention']
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
# Check equality by comparing each attribute.
|
74
|
+
def ==(o)
|
75
|
+
return true if self.equal?(o)
|
76
|
+
self.class == o.class &&
|
77
|
+
record_acw == o.record_acw &&
|
78
|
+
archive_retention == o.archive_retention &&
|
79
|
+
delete_retention == o.delete_retention
|
80
|
+
end
|
81
|
+
|
82
|
+
# @see the `==` method
|
83
|
+
def eql?(o)
|
84
|
+
self == o
|
85
|
+
end
|
86
|
+
|
87
|
+
# Calculate hash code according to all attributes.
|
88
|
+
def hash
|
89
|
+
[record_acw, archive_retention, delete_retention].hash
|
90
|
+
end
|
91
|
+
|
92
|
+
# build the object from hash
|
93
|
+
def build_from_hash(attributes)
|
94
|
+
return nil unless attributes.is_a?(Hash)
|
95
|
+
self.class.swagger_types.each_pair do |key, type|
|
96
|
+
if type =~ /^Array<(.*)>/i
|
97
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
98
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
99
|
+
else
|
100
|
+
#TODO show warning in debug mode
|
101
|
+
end
|
102
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
103
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
104
|
+
else
|
105
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
self
|
110
|
+
end
|
111
|
+
|
112
|
+
def _deserialize(type, value)
|
113
|
+
case type.to_sym
|
114
|
+
when :DateTime
|
115
|
+
DateTime.parse(value)
|
116
|
+
when :Date
|
117
|
+
Date.parse(value)
|
118
|
+
when :String
|
119
|
+
value.to_s
|
120
|
+
when :Integer
|
121
|
+
value.to_i
|
122
|
+
when :Float
|
123
|
+
value.to_f
|
124
|
+
when :BOOLEAN
|
125
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
126
|
+
true
|
127
|
+
else
|
128
|
+
false
|
129
|
+
end
|
130
|
+
when :Object
|
131
|
+
# generic object (usually a Hash), return directly
|
132
|
+
value
|
133
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
134
|
+
inner_type = Regexp.last_match[:inner_type]
|
135
|
+
value.map { |v| _deserialize(inner_type, v) }
|
136
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
137
|
+
k_type = Regexp.last_match[:k_type]
|
138
|
+
v_type = Regexp.last_match[:v_type]
|
139
|
+
{}.tap do |hash|
|
140
|
+
value.each do |k, v|
|
141
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
else # model
|
145
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
146
|
+
_model.build_from_hash(value)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
def to_s
|
151
|
+
to_hash.to_s
|
152
|
+
end
|
153
|
+
|
154
|
+
# to_body is an alias to to_body (backward compatibility))
|
155
|
+
def to_body
|
156
|
+
to_hash
|
157
|
+
end
|
158
|
+
|
159
|
+
# return the object in the form of hash
|
160
|
+
def to_hash
|
161
|
+
hash = {}
|
162
|
+
self.class.attribute_map.each_pair do |attr, param|
|
163
|
+
value = self.send(attr)
|
164
|
+
next if value.nil?
|
165
|
+
hash[param] = _to_hash(value)
|
166
|
+
end
|
167
|
+
hash
|
168
|
+
end
|
169
|
+
|
170
|
+
# Method to output non-array value in the form of hash
|
171
|
+
# For object, use to_hash. Otherwise, just return the value
|
172
|
+
def _to_hash(value)
|
173
|
+
if value.is_a?(Array)
|
174
|
+
value.compact.map{ |v| _to_hash(v) }
|
175
|
+
elsif value.is_a?(Hash)
|
176
|
+
{}.tap do |hash|
|
177
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
178
|
+
end
|
179
|
+
elsif value.respond_to? :to_hash
|
180
|
+
value.to_hash
|
181
|
+
else
|
182
|
+
value
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
end
|
187
|
+
end
|
@@ -22,14 +22,12 @@ module PureCloud
|
|
22
22
|
|
23
23
|
attr_accessor :float
|
24
24
|
|
25
|
+
attr_accessor :object
|
26
|
+
|
25
27
|
attr_accessor :boolean
|
26
28
|
|
27
29
|
attr_accessor :number
|
28
30
|
|
29
|
-
attr_accessor :object
|
30
|
-
|
31
|
-
attr_accessor :value_node
|
32
|
-
|
33
31
|
attr_accessor :container_node
|
34
32
|
|
35
33
|
attr_accessor :missing_node
|
@@ -38,8 +36,6 @@ module PureCloud
|
|
38
36
|
|
39
37
|
attr_accessor :integral_number
|
40
38
|
|
41
|
-
attr_accessor :floating_point_number
|
42
|
-
|
43
39
|
attr_accessor :short
|
44
40
|
|
45
41
|
attr_accessor :int
|
@@ -56,6 +52,10 @@ module PureCloud
|
|
56
52
|
|
57
53
|
attr_accessor :binary
|
58
54
|
|
55
|
+
attr_accessor :value_node
|
56
|
+
|
57
|
+
attr_accessor :floating_point_number
|
58
|
+
|
59
59
|
attr_accessor :array
|
60
60
|
|
61
61
|
attr_accessor :null
|
@@ -68,14 +68,12 @@ module PureCloud
|
|
68
68
|
|
69
69
|
:'float' => :'float',
|
70
70
|
|
71
|
+
:'object' => :'object',
|
72
|
+
|
71
73
|
:'boolean' => :'boolean',
|
72
74
|
|
73
75
|
:'number' => :'number',
|
74
76
|
|
75
|
-
:'object' => :'object',
|
76
|
-
|
77
|
-
:'value_node' => :'valueNode',
|
78
|
-
|
79
77
|
:'container_node' => :'containerNode',
|
80
78
|
|
81
79
|
:'missing_node' => :'missingNode',
|
@@ -84,8 +82,6 @@ module PureCloud
|
|
84
82
|
|
85
83
|
:'integral_number' => :'integralNumber',
|
86
84
|
|
87
|
-
:'floating_point_number' => :'floatingPointNumber',
|
88
|
-
|
89
85
|
:'short' => :'short',
|
90
86
|
|
91
87
|
:'int' => :'int',
|
@@ -102,6 +98,10 @@ module PureCloud
|
|
102
98
|
|
103
99
|
:'binary' => :'binary',
|
104
100
|
|
101
|
+
:'value_node' => :'valueNode',
|
102
|
+
|
103
|
+
:'floating_point_number' => :'floatingPointNumber',
|
104
|
+
|
105
105
|
:'array' => :'array',
|
106
106
|
|
107
107
|
:'null' => :'null'
|
@@ -114,15 +114,13 @@ module PureCloud
|
|
114
114
|
{
|
115
115
|
:'node_type' => :'String',
|
116
116
|
:'float' => :'BOOLEAN',
|
117
|
+
:'object' => :'BOOLEAN',
|
117
118
|
:'boolean' => :'BOOLEAN',
|
118
119
|
:'number' => :'BOOLEAN',
|
119
|
-
:'object' => :'BOOLEAN',
|
120
|
-
:'value_node' => :'BOOLEAN',
|
121
120
|
:'container_node' => :'BOOLEAN',
|
122
121
|
:'missing_node' => :'BOOLEAN',
|
123
122
|
:'pojo' => :'BOOLEAN',
|
124
123
|
:'integral_number' => :'BOOLEAN',
|
125
|
-
:'floating_point_number' => :'BOOLEAN',
|
126
124
|
:'short' => :'BOOLEAN',
|
127
125
|
:'int' => :'BOOLEAN',
|
128
126
|
:'long' => :'BOOLEAN',
|
@@ -131,6 +129,8 @@ module PureCloud
|
|
131
129
|
:'big_integer' => :'BOOLEAN',
|
132
130
|
:'textual' => :'BOOLEAN',
|
133
131
|
:'binary' => :'BOOLEAN',
|
132
|
+
:'value_node' => :'BOOLEAN',
|
133
|
+
:'floating_point_number' => :'BOOLEAN',
|
134
134
|
:'array' => :'BOOLEAN',
|
135
135
|
:'null' => :'BOOLEAN'
|
136
136
|
|
@@ -154,6 +154,12 @@ 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
|
+
|
157
163
|
if attributes[:'boolean']
|
158
164
|
self.boolean = attributes[:'boolean']
|
159
165
|
else
|
@@ -166,18 +172,6 @@ module PureCloud
|
|
166
172
|
self.number = false
|
167
173
|
end
|
168
174
|
|
169
|
-
if attributes[:'object']
|
170
|
-
self.object = attributes[:'object']
|
171
|
-
else
|
172
|
-
self.object = false
|
173
|
-
end
|
174
|
-
|
175
|
-
if attributes[:'valueNode']
|
176
|
-
self.value_node = attributes[:'valueNode']
|
177
|
-
else
|
178
|
-
self.value_node = false
|
179
|
-
end
|
180
|
-
|
181
175
|
if attributes[:'containerNode']
|
182
176
|
self.container_node = attributes[:'containerNode']
|
183
177
|
else
|
@@ -202,12 +196,6 @@ module PureCloud
|
|
202
196
|
self.integral_number = false
|
203
197
|
end
|
204
198
|
|
205
|
-
if attributes[:'floatingPointNumber']
|
206
|
-
self.floating_point_number = attributes[:'floatingPointNumber']
|
207
|
-
else
|
208
|
-
self.floating_point_number = false
|
209
|
-
end
|
210
|
-
|
211
199
|
if attributes[:'short']
|
212
200
|
self.short = attributes[:'short']
|
213
201
|
else
|
@@ -256,6 +244,18 @@ module PureCloud
|
|
256
244
|
self.binary = false
|
257
245
|
end
|
258
246
|
|
247
|
+
if attributes[:'valueNode']
|
248
|
+
self.value_node = attributes[:'valueNode']
|
249
|
+
else
|
250
|
+
self.value_node = false
|
251
|
+
end
|
252
|
+
|
253
|
+
if attributes[:'floatingPointNumber']
|
254
|
+
self.floating_point_number = attributes[:'floatingPointNumber']
|
255
|
+
else
|
256
|
+
self.floating_point_number = false
|
257
|
+
end
|
258
|
+
|
259
259
|
if attributes[:'array']
|
260
260
|
self.array = attributes[:'array']
|
261
261
|
else
|
@@ -285,15 +285,13 @@ module PureCloud
|
|
285
285
|
self.class == o.class &&
|
286
286
|
node_type == o.node_type &&
|
287
287
|
float == o.float &&
|
288
|
+
object == o.object &&
|
288
289
|
boolean == o.boolean &&
|
289
290
|
number == o.number &&
|
290
|
-
object == o.object &&
|
291
|
-
value_node == o.value_node &&
|
292
291
|
container_node == o.container_node &&
|
293
292
|
missing_node == o.missing_node &&
|
294
293
|
pojo == o.pojo &&
|
295
294
|
integral_number == o.integral_number &&
|
296
|
-
floating_point_number == o.floating_point_number &&
|
297
295
|
short == o.short &&
|
298
296
|
int == o.int &&
|
299
297
|
long == o.long &&
|
@@ -302,6 +300,8 @@ module PureCloud
|
|
302
300
|
big_integer == o.big_integer &&
|
303
301
|
textual == o.textual &&
|
304
302
|
binary == o.binary &&
|
303
|
+
value_node == o.value_node &&
|
304
|
+
floating_point_number == o.floating_point_number &&
|
305
305
|
array == o.array &&
|
306
306
|
null == o.null
|
307
307
|
end
|
@@ -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, boolean, number,
|
316
|
+
[node_type, float, object, boolean, number, container_node, missing_node, pojo, integral_number, short, int, long, double, big_decimal, big_integer, textual, binary, value_node, floating_point_number, array, null].hash
|
317
317
|
end
|
318
318
|
|
319
319
|
# build the object from hash
|
@@ -0,0 +1,227 @@
|
|
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 Keyword
|
21
|
+
attr_accessor :id
|
22
|
+
|
23
|
+
attr_accessor :name
|
24
|
+
|
25
|
+
attr_accessor :phrase
|
26
|
+
|
27
|
+
attr_accessor :confidence
|
28
|
+
|
29
|
+
attr_accessor :agent_score_modifier
|
30
|
+
|
31
|
+
attr_accessor :customer_score_modifier
|
32
|
+
|
33
|
+
attr_accessor :alternate_spellings
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
|
39
|
+
:'id' => :'id',
|
40
|
+
|
41
|
+
:'name' => :'name',
|
42
|
+
|
43
|
+
:'phrase' => :'phrase',
|
44
|
+
|
45
|
+
:'confidence' => :'confidence',
|
46
|
+
|
47
|
+
:'agent_score_modifier' => :'agentScoreModifier',
|
48
|
+
|
49
|
+
:'customer_score_modifier' => :'customerScoreModifier',
|
50
|
+
|
51
|
+
:'alternate_spellings' => :'alternateSpellings'
|
52
|
+
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Attribute type mapping.
|
57
|
+
def self.swagger_types
|
58
|
+
{
|
59
|
+
:'id' => :'String',
|
60
|
+
:'name' => :'String',
|
61
|
+
:'phrase' => :'String',
|
62
|
+
:'confidence' => :'Integer',
|
63
|
+
:'agent_score_modifier' => :'Integer',
|
64
|
+
:'customer_score_modifier' => :'Integer',
|
65
|
+
:'alternate_spellings' => :'Array<String>'
|
66
|
+
|
67
|
+
}
|
68
|
+
end
|
69
|
+
|
70
|
+
def initialize(attributes = {})
|
71
|
+
return unless attributes.is_a?(Hash)
|
72
|
+
|
73
|
+
# convert string to symbol for hash key
|
74
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
75
|
+
|
76
|
+
|
77
|
+
if attributes[:'id']
|
78
|
+
self.id = attributes[:'id']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes[:'name']
|
82
|
+
self.name = attributes[:'name']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes[:'phrase']
|
86
|
+
self.phrase = attributes[:'phrase']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes[:'confidence']
|
90
|
+
self.confidence = attributes[:'confidence']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes[:'agentScoreModifier']
|
94
|
+
self.agent_score_modifier = attributes[:'agentScoreModifier']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes[:'customerScoreModifier']
|
98
|
+
self.customer_score_modifier = attributes[:'customerScoreModifier']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes[:'alternateSpellings']
|
102
|
+
if (value = attributes[:'alternateSpellings']).is_a?(Array)
|
103
|
+
self.alternate_spellings = value
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
end
|
108
|
+
|
109
|
+
# Check equality by comparing each attribute.
|
110
|
+
def ==(o)
|
111
|
+
return true if self.equal?(o)
|
112
|
+
self.class == o.class &&
|
113
|
+
id == o.id &&
|
114
|
+
name == o.name &&
|
115
|
+
phrase == o.phrase &&
|
116
|
+
confidence == o.confidence &&
|
117
|
+
agent_score_modifier == o.agent_score_modifier &&
|
118
|
+
customer_score_modifier == o.customer_score_modifier &&
|
119
|
+
alternate_spellings == o.alternate_spellings
|
120
|
+
end
|
121
|
+
|
122
|
+
# @see the `==` method
|
123
|
+
def eql?(o)
|
124
|
+
self == o
|
125
|
+
end
|
126
|
+
|
127
|
+
# Calculate hash code according to all attributes.
|
128
|
+
def hash
|
129
|
+
[id, name, phrase, confidence, agent_score_modifier, customer_score_modifier, alternate_spellings].hash
|
130
|
+
end
|
131
|
+
|
132
|
+
# build the object from hash
|
133
|
+
def build_from_hash(attributes)
|
134
|
+
return nil unless attributes.is_a?(Hash)
|
135
|
+
self.class.swagger_types.each_pair do |key, type|
|
136
|
+
if type =~ /^Array<(.*)>/i
|
137
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
138
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
139
|
+
else
|
140
|
+
#TODO show warning in debug mode
|
141
|
+
end
|
142
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
143
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
144
|
+
else
|
145
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
self
|
150
|
+
end
|
151
|
+
|
152
|
+
def _deserialize(type, value)
|
153
|
+
case type.to_sym
|
154
|
+
when :DateTime
|
155
|
+
DateTime.parse(value)
|
156
|
+
when :Date
|
157
|
+
Date.parse(value)
|
158
|
+
when :String
|
159
|
+
value.to_s
|
160
|
+
when :Integer
|
161
|
+
value.to_i
|
162
|
+
when :Float
|
163
|
+
value.to_f
|
164
|
+
when :BOOLEAN
|
165
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
166
|
+
true
|
167
|
+
else
|
168
|
+
false
|
169
|
+
end
|
170
|
+
when :Object
|
171
|
+
# generic object (usually a Hash), return directly
|
172
|
+
value
|
173
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
174
|
+
inner_type = Regexp.last_match[:inner_type]
|
175
|
+
value.map { |v| _deserialize(inner_type, v) }
|
176
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
177
|
+
k_type = Regexp.last_match[:k_type]
|
178
|
+
v_type = Regexp.last_match[:v_type]
|
179
|
+
{}.tap do |hash|
|
180
|
+
value.each do |k, v|
|
181
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
else # model
|
185
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
186
|
+
_model.build_from_hash(value)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
def to_s
|
191
|
+
to_hash.to_s
|
192
|
+
end
|
193
|
+
|
194
|
+
# to_body is an alias to to_body (backward compatibility))
|
195
|
+
def to_body
|
196
|
+
to_hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# return the object in the form of hash
|
200
|
+
def to_hash
|
201
|
+
hash = {}
|
202
|
+
self.class.attribute_map.each_pair do |attr, param|
|
203
|
+
value = self.send(attr)
|
204
|
+
next if value.nil?
|
205
|
+
hash[param] = _to_hash(value)
|
206
|
+
end
|
207
|
+
hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Method to output non-array value in the form of hash
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
212
|
+
def _to_hash(value)
|
213
|
+
if value.is_a?(Array)
|
214
|
+
value.compact.map{ |v| _to_hash(v) }
|
215
|
+
elsif value.is_a?(Hash)
|
216
|
+
{}.tap do |hash|
|
217
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
218
|
+
end
|
219
|
+
elsif value.respond_to? :to_hash
|
220
|
+
value.to_hash
|
221
|
+
else
|
222
|
+
value
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
end
|
227
|
+
end
|