ultracart_api 4.1.80 → 4.1.83
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.
- checksums.yaml +4 -4
- data/README.md +35 -2
- data/docs/AgentSummary.md +30 -0
- data/docs/AutoOrderItemCancelRequest.md +3 -1
- data/docs/ConversationAgentCallEvent.md +30 -0
- data/docs/ConversationAgentChatEvent.md +26 -0
- data/docs/ConversationAgentStatusConfig.md +42 -0
- data/docs/ConversationAgentStatusConfigResponse.md +26 -0
- data/docs/ConversationAgentStatusConfigsResponse.md +26 -0
- data/docs/ConversationAgentStatusEvent.md +50 -0
- data/docs/ConversationAgentStatusHeatmapRequest.md +24 -0
- data/docs/ConversationAgentStatusHeatmapResponse.md +30 -0
- data/docs/ConversationAgentStatusHistorySearchRequest.md +28 -0
- data/docs/ConversationAgentStatusHistorySearchResponse.md +28 -0
- data/docs/ConversationAgentStatusRollup.md +38 -0
- data/docs/ConversationAgentStatusRollupSearchRequest.md +24 -0
- data/docs/ConversationAgentStatusRollupSearchResponse.md +26 -0
- data/docs/ConversationAgentStatusSummaryResponse.md +32 -0
- data/docs/ConversationAgentStatusTimelineResponse.md +32 -0
- data/docs/ConversationApi.md +600 -0
- data/docs/ConversationPbxCallAgent.md +2 -0
- data/docs/ConversationPbxDefaultTimezoneResponse.md +26 -0
- data/docs/ConversationPbxDefaultTimezoneUpdateRequest.md +18 -0
- data/docs/ConversationWebchatQueueStatusAgent.md +6 -0
- data/docs/ConversationWebchatQueueStatusUpdateRequest.md +5 -1
- data/docs/TimelineSummary.md +26 -0
- data/lib/ultracart_api/api/conversation_api.rb +766 -2
- data/lib/ultracart_api/models/agent_summary.rb +279 -0
- data/lib/ultracart_api/models/auto_order_item_cancel_request.rb +14 -2
- data/lib/ultracart_api/models/conversation_agent_call_event.rb +314 -0
- data/lib/ultracart_api/models/conversation_agent_chat_event.rb +260 -0
- data/lib/ultracart_api/models/conversation_agent_status_config.rb +461 -0
- data/lib/ultracart_api/models/conversation_agent_status_config_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_agent_status_configs_response.rb +259 -0
- data/lib/ultracart_api/models/conversation_agent_status_event.rb +522 -0
- data/lib/ultracart_api/models/conversation_agent_status_heatmap_request.rb +296 -0
- data/lib/ultracart_api/models/conversation_agent_status_heatmap_response.rb +283 -0
- data/lib/ultracart_api/models/conversation_agent_status_history_search_request.rb +316 -0
- data/lib/ultracart_api/models/conversation_agent_status_history_search_response.rb +269 -0
- data/lib/ultracart_api/models/conversation_agent_status_rollup.rb +353 -0
- data/lib/ultracart_api/models/conversation_agent_status_rollup_search_request.rb +284 -0
- data/lib/ultracart_api/models/conversation_agent_status_rollup_search_response.rb +259 -0
- data/lib/ultracart_api/models/conversation_agent_status_summary_response.rb +288 -0
- data/lib/ultracart_api/models/conversation_agent_status_timeline_response.rb +292 -0
- data/lib/ultracart_api/models/conversation_pbx_call_agent.rb +11 -1
- data/lib/ultracart_api/models/conversation_pbx_default_timezone_response.rb +272 -0
- data/lib/ultracart_api/models/conversation_pbx_default_timezone_update_request.rb +235 -0
- data/lib/ultracart_api/models/conversation_webchat_queue_status_agent.rb +31 -1
- data/lib/ultracart_api/models/conversation_webchat_queue_status_update_request.rb +24 -4
- data/lib/ultracart_api/models/timeline_summary.rb +260 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +19 -0
- metadata +40 -2
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#UltraCart Rest API V2
|
|
3
|
+
|
|
4
|
+
#UltraCart REST API Version 2
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
|
+
Contact: support@ultracart.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module UltracartClient
|
|
17
|
+
class ConversationPbxDefaultTimezoneUpdateRequest
|
|
18
|
+
# Merchant default timezone (IANA name, e.g. 'America/New_York')
|
|
19
|
+
attr_accessor :default_timezone
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'default_timezone' => :'default_timezone'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns all the JSON keys this model knows about
|
|
29
|
+
def self.acceptable_attributes
|
|
30
|
+
attribute_map.values
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Attribute type mapping.
|
|
34
|
+
def self.openapi_types
|
|
35
|
+
{
|
|
36
|
+
:'default_timezone' => :'String'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# List of attributes with nullable: true
|
|
41
|
+
def self.openapi_nullable
|
|
42
|
+
Set.new([
|
|
43
|
+
])
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Initializes the object
|
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
48
|
+
def initialize(attributes = {})
|
|
49
|
+
if (!attributes.is_a?(Hash))
|
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationPbxDefaultTimezoneUpdateRequest` initialize method"
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationPbxDefaultTimezoneUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
57
|
+
end
|
|
58
|
+
h[k.to_sym] = v
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if attributes.key?(:'default_timezone')
|
|
62
|
+
self.default_timezone = attributes[:'default_timezone']
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
67
|
+
# @return Array for valid properties with the reasons
|
|
68
|
+
def list_invalid_properties
|
|
69
|
+
invalid_properties = Array.new
|
|
70
|
+
if !@default_timezone.nil? && @default_timezone.to_s.length > 60
|
|
71
|
+
invalid_properties.push('invalid value for "default_timezone", the character length must be smaller than or equal to 60.')
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
invalid_properties
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Check to see if the all the properties in the model are valid
|
|
78
|
+
# @return true if the model is valid
|
|
79
|
+
def valid?
|
|
80
|
+
return false if !@default_timezone.nil? && @default_timezone.to_s.length > 60
|
|
81
|
+
true
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Custom attribute writer method with validation
|
|
85
|
+
# @param [Object] default_timezone Value to be assigned
|
|
86
|
+
def default_timezone=(default_timezone)
|
|
87
|
+
if !default_timezone.nil? && default_timezone.to_s.length > 60
|
|
88
|
+
fail ArgumentError, 'invalid value for "default_timezone", the character length must be smaller than or equal to 60.'
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
@default_timezone = default_timezone
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Checks equality by comparing each attribute.
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
default_timezone == o.default_timezone
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# @see the `==` method
|
|
103
|
+
# @param [Object] Object to be compared
|
|
104
|
+
def eql?(o)
|
|
105
|
+
self == o
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Calculates hash code according to all attributes.
|
|
109
|
+
# @return [Integer] Hash code
|
|
110
|
+
def hash
|
|
111
|
+
[default_timezone].hash
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Builds the object from hash
|
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
116
|
+
# @return [Object] Returns the model itself
|
|
117
|
+
def self.build_from_hash(attributes)
|
|
118
|
+
new.build_from_hash(attributes)
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Builds the object from hash
|
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
123
|
+
# @return [Object] Returns the model itself
|
|
124
|
+
def build_from_hash(attributes)
|
|
125
|
+
return nil unless attributes.is_a?(Hash)
|
|
126
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
127
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
128
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
129
|
+
self.send("#{key}=", nil)
|
|
130
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
131
|
+
# check to ensure the input is an array given that the attribute
|
|
132
|
+
# is documented as an array but the input is not
|
|
133
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
134
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
135
|
+
end
|
|
136
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
137
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
self
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Deserializes the data based on type
|
|
145
|
+
# @param string type Data type
|
|
146
|
+
# @param string value Value to be deserialized
|
|
147
|
+
# @return [Object] Deserialized data
|
|
148
|
+
def _deserialize(type, value)
|
|
149
|
+
case type.to_sym
|
|
150
|
+
when :Time
|
|
151
|
+
Time.parse(value)
|
|
152
|
+
when :Date
|
|
153
|
+
Date.parse(value)
|
|
154
|
+
when :String
|
|
155
|
+
value.to_s
|
|
156
|
+
when :Integer
|
|
157
|
+
value.to_i
|
|
158
|
+
when :Float
|
|
159
|
+
value.to_f
|
|
160
|
+
when :Boolean
|
|
161
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
162
|
+
true
|
|
163
|
+
else
|
|
164
|
+
false
|
|
165
|
+
end
|
|
166
|
+
when :Object
|
|
167
|
+
# generic object (usually a Hash), return directly
|
|
168
|
+
value
|
|
169
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
170
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
171
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
172
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
173
|
+
k_type = Regexp.last_match[:k_type]
|
|
174
|
+
v_type = Regexp.last_match[:v_type]
|
|
175
|
+
{}.tap do |hash|
|
|
176
|
+
value.each do |k, v|
|
|
177
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
else # model
|
|
181
|
+
# models (e.g. Pet) or oneOf
|
|
182
|
+
klass = UltracartClient.const_get(type)
|
|
183
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Returns the string representation of the object
|
|
188
|
+
# @return [String] String presentation of the object
|
|
189
|
+
def to_s
|
|
190
|
+
to_hash.to_s
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
|
195
|
+
def to_body
|
|
196
|
+
to_hash
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Returns the object in the form of hash
|
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
|
201
|
+
def to_hash
|
|
202
|
+
hash = {}
|
|
203
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
204
|
+
value = self.send(attr)
|
|
205
|
+
if value.nil?
|
|
206
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
207
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
hash[param] = _to_hash(value)
|
|
211
|
+
end
|
|
212
|
+
hash
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Outputs non-array value in the form of hash
|
|
216
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
217
|
+
# @param [Object] value Any valid value
|
|
218
|
+
# @return [Hash] Returns the value in the form of hash
|
|
219
|
+
def _to_hash(value)
|
|
220
|
+
if value.is_a?(Array)
|
|
221
|
+
value.compact.map { |v| _to_hash(v) }
|
|
222
|
+
elsif value.is_a?(Hash)
|
|
223
|
+
{}.tap do |hash|
|
|
224
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
225
|
+
end
|
|
226
|
+
elsif value.respond_to? :to_hash
|
|
227
|
+
value.to_hash
|
|
228
|
+
else
|
|
229
|
+
value
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
end
|
|
@@ -18,10 +18,19 @@ module UltracartClient
|
|
|
18
18
|
# Status of the agent
|
|
19
19
|
attr_accessor :agent_status
|
|
20
20
|
|
|
21
|
+
# Agent user id (populated by Java so the dispatch-scheduler Lambda can read it directly without parsing conversation_participant_arn)
|
|
22
|
+
attr_accessor :agent_user_id
|
|
23
|
+
|
|
21
24
|
attr_accessor :conversation_participant_arn
|
|
22
25
|
|
|
23
26
|
attr_accessor :conversation_participant_name
|
|
24
27
|
|
|
28
|
+
# Active custom status display name for this agent (denormalized)
|
|
29
|
+
attr_accessor :custom_status_name
|
|
30
|
+
|
|
31
|
+
# Active custom status uuid for this agent (null when on a system status)
|
|
32
|
+
attr_accessor :custom_status_uuid
|
|
33
|
+
|
|
25
34
|
# Date/time that this agent took their last chat
|
|
26
35
|
attr_accessor :last_chat_dts
|
|
27
36
|
|
|
@@ -56,8 +65,11 @@ module UltracartClient
|
|
|
56
65
|
def self.attribute_map
|
|
57
66
|
{
|
|
58
67
|
:'agent_status' => :'agent_status',
|
|
68
|
+
:'agent_user_id' => :'agent_user_id',
|
|
59
69
|
:'conversation_participant_arn' => :'conversation_participant_arn',
|
|
60
70
|
:'conversation_participant_name' => :'conversation_participant_name',
|
|
71
|
+
:'custom_status_name' => :'custom_status_name',
|
|
72
|
+
:'custom_status_uuid' => :'custom_status_uuid',
|
|
61
73
|
:'last_chat_dts' => :'last_chat_dts',
|
|
62
74
|
:'next_round_robin' => :'next_round_robin',
|
|
63
75
|
:'profile_image_url' => :'profile_image_url'
|
|
@@ -73,8 +85,11 @@ module UltracartClient
|
|
|
73
85
|
def self.openapi_types
|
|
74
86
|
{
|
|
75
87
|
:'agent_status' => :'String',
|
|
88
|
+
:'agent_user_id' => :'String',
|
|
76
89
|
:'conversation_participant_arn' => :'String',
|
|
77
90
|
:'conversation_participant_name' => :'String',
|
|
91
|
+
:'custom_status_name' => :'String',
|
|
92
|
+
:'custom_status_uuid' => :'String',
|
|
78
93
|
:'last_chat_dts' => :'String',
|
|
79
94
|
:'next_round_robin' => :'Boolean',
|
|
80
95
|
:'profile_image_url' => :'String'
|
|
@@ -106,6 +121,10 @@ module UltracartClient
|
|
|
106
121
|
self.agent_status = attributes[:'agent_status']
|
|
107
122
|
end
|
|
108
123
|
|
|
124
|
+
if attributes.key?(:'agent_user_id')
|
|
125
|
+
self.agent_user_id = attributes[:'agent_user_id']
|
|
126
|
+
end
|
|
127
|
+
|
|
109
128
|
if attributes.key?(:'conversation_participant_arn')
|
|
110
129
|
self.conversation_participant_arn = attributes[:'conversation_participant_arn']
|
|
111
130
|
end
|
|
@@ -114,6 +133,14 @@ module UltracartClient
|
|
|
114
133
|
self.conversation_participant_name = attributes[:'conversation_participant_name']
|
|
115
134
|
end
|
|
116
135
|
|
|
136
|
+
if attributes.key?(:'custom_status_name')
|
|
137
|
+
self.custom_status_name = attributes[:'custom_status_name']
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.key?(:'custom_status_uuid')
|
|
141
|
+
self.custom_status_uuid = attributes[:'custom_status_uuid']
|
|
142
|
+
end
|
|
143
|
+
|
|
117
144
|
if attributes.key?(:'last_chat_dts')
|
|
118
145
|
self.last_chat_dts = attributes[:'last_chat_dts']
|
|
119
146
|
end
|
|
@@ -158,8 +185,11 @@ module UltracartClient
|
|
|
158
185
|
return true if self.equal?(o)
|
|
159
186
|
self.class == o.class &&
|
|
160
187
|
agent_status == o.agent_status &&
|
|
188
|
+
agent_user_id == o.agent_user_id &&
|
|
161
189
|
conversation_participant_arn == o.conversation_participant_arn &&
|
|
162
190
|
conversation_participant_name == o.conversation_participant_name &&
|
|
191
|
+
custom_status_name == o.custom_status_name &&
|
|
192
|
+
custom_status_uuid == o.custom_status_uuid &&
|
|
163
193
|
last_chat_dts == o.last_chat_dts &&
|
|
164
194
|
next_round_robin == o.next_round_robin &&
|
|
165
195
|
profile_image_url == o.profile_image_url
|
|
@@ -174,7 +204,7 @@ module UltracartClient
|
|
|
174
204
|
# Calculates hash code according to all attributes.
|
|
175
205
|
# @return [Integer] Hash code
|
|
176
206
|
def hash
|
|
177
|
-
[agent_status, conversation_participant_arn, conversation_participant_name, last_chat_dts, next_round_robin, profile_image_url].hash
|
|
207
|
+
[agent_status, agent_user_id, conversation_participant_arn, conversation_participant_name, custom_status_name, custom_status_uuid, last_chat_dts, next_round_robin, profile_image_url].hash
|
|
178
208
|
end
|
|
179
209
|
|
|
180
210
|
# Builds the object from hash
|
|
@@ -18,6 +18,12 @@ module UltracartClient
|
|
|
18
18
|
# Status of the agent
|
|
19
19
|
attr_accessor :agent_status
|
|
20
20
|
|
|
21
|
+
# Custom status display name (denormalized so the queue panel can render without a config lookup)
|
|
22
|
+
attr_accessor :custom_status_name
|
|
23
|
+
|
|
24
|
+
# Custom status uuid (when picking a custom status). Pair with custom_status_name.
|
|
25
|
+
attr_accessor :custom_status_uuid
|
|
26
|
+
|
|
21
27
|
class EnumAttributeValidator
|
|
22
28
|
attr_reader :datatype
|
|
23
29
|
attr_reader :allowable_values
|
|
@@ -43,7 +49,9 @@ module UltracartClient
|
|
|
43
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
44
50
|
def self.attribute_map
|
|
45
51
|
{
|
|
46
|
-
:'agent_status' => :'agent_status'
|
|
52
|
+
:'agent_status' => :'agent_status',
|
|
53
|
+
:'custom_status_name' => :'custom_status_name',
|
|
54
|
+
:'custom_status_uuid' => :'custom_status_uuid'
|
|
47
55
|
}
|
|
48
56
|
end
|
|
49
57
|
|
|
@@ -55,7 +63,9 @@ module UltracartClient
|
|
|
55
63
|
# Attribute type mapping.
|
|
56
64
|
def self.openapi_types
|
|
57
65
|
{
|
|
58
|
-
:'agent_status' => :'String'
|
|
66
|
+
:'agent_status' => :'String',
|
|
67
|
+
:'custom_status_name' => :'String',
|
|
68
|
+
:'custom_status_uuid' => :'String'
|
|
59
69
|
}
|
|
60
70
|
end
|
|
61
71
|
|
|
@@ -83,6 +93,14 @@ module UltracartClient
|
|
|
83
93
|
if attributes.key?(:'agent_status')
|
|
84
94
|
self.agent_status = attributes[:'agent_status']
|
|
85
95
|
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'custom_status_name')
|
|
98
|
+
self.custom_status_name = attributes[:'custom_status_name']
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'custom_status_uuid')
|
|
102
|
+
self.custom_status_uuid = attributes[:'custom_status_uuid']
|
|
103
|
+
end
|
|
86
104
|
end
|
|
87
105
|
|
|
88
106
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -115,7 +133,9 @@ module UltracartClient
|
|
|
115
133
|
def ==(o)
|
|
116
134
|
return true if self.equal?(o)
|
|
117
135
|
self.class == o.class &&
|
|
118
|
-
agent_status == o.agent_status
|
|
136
|
+
agent_status == o.agent_status &&
|
|
137
|
+
custom_status_name == o.custom_status_name &&
|
|
138
|
+
custom_status_uuid == o.custom_status_uuid
|
|
119
139
|
end
|
|
120
140
|
|
|
121
141
|
# @see the `==` method
|
|
@@ -127,7 +147,7 @@ module UltracartClient
|
|
|
127
147
|
# Calculates hash code according to all attributes.
|
|
128
148
|
# @return [Integer] Hash code
|
|
129
149
|
def hash
|
|
130
|
-
[agent_status].hash
|
|
150
|
+
[agent_status, custom_status_name, custom_status_uuid].hash
|
|
131
151
|
end
|
|
132
152
|
|
|
133
153
|
# Builds the object from hash
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#UltraCart Rest API V2
|
|
3
|
+
|
|
4
|
+
#UltraCart REST API Version 2
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
|
+
Contact: support@ultracart.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module UltracartClient
|
|
17
|
+
class TimelineSummary
|
|
18
|
+
# Seconds the agent was Available (incl. Busy)
|
|
19
|
+
attr_accessor :available_seconds
|
|
20
|
+
|
|
21
|
+
# Average handle time across calls and chats, in seconds
|
|
22
|
+
attr_accessor :avg_handle_time_seconds
|
|
23
|
+
|
|
24
|
+
# Calls the agent missed (inbound, disposition=missed)
|
|
25
|
+
attr_accessor :calls_missed
|
|
26
|
+
|
|
27
|
+
# Calls the agent took
|
|
28
|
+
attr_accessor :calls_taken
|
|
29
|
+
|
|
30
|
+
# Chats the agent handled
|
|
31
|
+
attr_accessor :chats_handled
|
|
32
|
+
|
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
|
+
def self.attribute_map
|
|
35
|
+
{
|
|
36
|
+
:'available_seconds' => :'available_seconds',
|
|
37
|
+
:'avg_handle_time_seconds' => :'avg_handle_time_seconds',
|
|
38
|
+
:'calls_missed' => :'calls_missed',
|
|
39
|
+
:'calls_taken' => :'calls_taken',
|
|
40
|
+
:'chats_handled' => :'chats_handled'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'available_seconds' => :'Integer',
|
|
53
|
+
:'avg_handle_time_seconds' => :'Integer',
|
|
54
|
+
:'calls_missed' => :'Integer',
|
|
55
|
+
:'calls_taken' => :'Integer',
|
|
56
|
+
:'chats_handled' => :'Integer'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::TimelineSummary` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::TimelineSummary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
77
|
+
end
|
|
78
|
+
h[k.to_sym] = v
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'available_seconds')
|
|
82
|
+
self.available_seconds = attributes[:'available_seconds']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'avg_handle_time_seconds')
|
|
86
|
+
self.avg_handle_time_seconds = attributes[:'avg_handle_time_seconds']
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'calls_missed')
|
|
90
|
+
self.calls_missed = attributes[:'calls_missed']
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'calls_taken')
|
|
94
|
+
self.calls_taken = attributes[:'calls_taken']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'chats_handled')
|
|
98
|
+
self.chats_handled = attributes[:'chats_handled']
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
103
|
+
# @return Array for valid properties with the reasons
|
|
104
|
+
def list_invalid_properties
|
|
105
|
+
invalid_properties = Array.new
|
|
106
|
+
invalid_properties
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Check to see if the all the properties in the model are valid
|
|
110
|
+
# @return true if the model is valid
|
|
111
|
+
def valid?
|
|
112
|
+
true
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Checks equality by comparing each attribute.
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def ==(o)
|
|
118
|
+
return true if self.equal?(o)
|
|
119
|
+
self.class == o.class &&
|
|
120
|
+
available_seconds == o.available_seconds &&
|
|
121
|
+
avg_handle_time_seconds == o.avg_handle_time_seconds &&
|
|
122
|
+
calls_missed == o.calls_missed &&
|
|
123
|
+
calls_taken == o.calls_taken &&
|
|
124
|
+
chats_handled == o.chats_handled
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# @see the `==` method
|
|
128
|
+
# @param [Object] Object to be compared
|
|
129
|
+
def eql?(o)
|
|
130
|
+
self == o
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Calculates hash code according to all attributes.
|
|
134
|
+
# @return [Integer] Hash code
|
|
135
|
+
def hash
|
|
136
|
+
[available_seconds, avg_handle_time_seconds, calls_missed, calls_taken, chats_handled].hash
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Builds the object from hash
|
|
140
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
141
|
+
# @return [Object] Returns the model itself
|
|
142
|
+
def self.build_from_hash(attributes)
|
|
143
|
+
new.build_from_hash(attributes)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Builds the object from hash
|
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
148
|
+
# @return [Object] Returns the model itself
|
|
149
|
+
def build_from_hash(attributes)
|
|
150
|
+
return nil unless attributes.is_a?(Hash)
|
|
151
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
152
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
153
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
154
|
+
self.send("#{key}=", nil)
|
|
155
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
156
|
+
# check to ensure the input is an array given that the attribute
|
|
157
|
+
# is documented as an array but the input is not
|
|
158
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
159
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
160
|
+
end
|
|
161
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
162
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
self
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Deserializes the data based on type
|
|
170
|
+
# @param string type Data type
|
|
171
|
+
# @param string value Value to be deserialized
|
|
172
|
+
# @return [Object] Deserialized data
|
|
173
|
+
def _deserialize(type, value)
|
|
174
|
+
case type.to_sym
|
|
175
|
+
when :Time
|
|
176
|
+
Time.parse(value)
|
|
177
|
+
when :Date
|
|
178
|
+
Date.parse(value)
|
|
179
|
+
when :String
|
|
180
|
+
value.to_s
|
|
181
|
+
when :Integer
|
|
182
|
+
value.to_i
|
|
183
|
+
when :Float
|
|
184
|
+
value.to_f
|
|
185
|
+
when :Boolean
|
|
186
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
187
|
+
true
|
|
188
|
+
else
|
|
189
|
+
false
|
|
190
|
+
end
|
|
191
|
+
when :Object
|
|
192
|
+
# generic object (usually a Hash), return directly
|
|
193
|
+
value
|
|
194
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
195
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
196
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
197
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
198
|
+
k_type = Regexp.last_match[:k_type]
|
|
199
|
+
v_type = Regexp.last_match[:v_type]
|
|
200
|
+
{}.tap do |hash|
|
|
201
|
+
value.each do |k, v|
|
|
202
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
else # model
|
|
206
|
+
# models (e.g. Pet) or oneOf
|
|
207
|
+
klass = UltracartClient.const_get(type)
|
|
208
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Returns the string representation of the object
|
|
213
|
+
# @return [String] String presentation of the object
|
|
214
|
+
def to_s
|
|
215
|
+
to_hash.to_s
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
219
|
+
# @return [Hash] Returns the object in the form of hash
|
|
220
|
+
def to_body
|
|
221
|
+
to_hash
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Returns the object in the form of hash
|
|
225
|
+
# @return [Hash] Returns the object in the form of hash
|
|
226
|
+
def to_hash
|
|
227
|
+
hash = {}
|
|
228
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
229
|
+
value = self.send(attr)
|
|
230
|
+
if value.nil?
|
|
231
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
232
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
hash[param] = _to_hash(value)
|
|
236
|
+
end
|
|
237
|
+
hash
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Outputs non-array value in the form of hash
|
|
241
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
242
|
+
# @param [Object] value Any valid value
|
|
243
|
+
# @return [Hash] Returns the value in the form of hash
|
|
244
|
+
def _to_hash(value)
|
|
245
|
+
if value.is_a?(Array)
|
|
246
|
+
value.compact.map { |v| _to_hash(v) }
|
|
247
|
+
elsif value.is_a?(Hash)
|
|
248
|
+
{}.tap do |hash|
|
|
249
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
250
|
+
end
|
|
251
|
+
elsif value.respond_to? :to_hash
|
|
252
|
+
value.to_hash
|
|
253
|
+
else
|
|
254
|
+
value
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
end
|