ultracart_api 4.1.80 → 4.1.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +34 -2
  3. data/docs/AgentSummary.md +30 -0
  4. data/docs/ConversationAgentCallEvent.md +30 -0
  5. data/docs/ConversationAgentChatEvent.md +26 -0
  6. data/docs/ConversationAgentStatusConfig.md +42 -0
  7. data/docs/ConversationAgentStatusConfigResponse.md +26 -0
  8. data/docs/ConversationAgentStatusConfigsResponse.md +26 -0
  9. data/docs/ConversationAgentStatusEvent.md +48 -0
  10. data/docs/ConversationAgentStatusHeatmapRequest.md +24 -0
  11. data/docs/ConversationAgentStatusHeatmapResponse.md +30 -0
  12. data/docs/ConversationAgentStatusHistorySearchRequest.md +28 -0
  13. data/docs/ConversationAgentStatusHistorySearchResponse.md +28 -0
  14. data/docs/ConversationAgentStatusRollup.md +38 -0
  15. data/docs/ConversationAgentStatusRollupSearchRequest.md +24 -0
  16. data/docs/ConversationAgentStatusRollupSearchResponse.md +26 -0
  17. data/docs/ConversationAgentStatusSummaryResponse.md +32 -0
  18. data/docs/ConversationAgentStatusTimelineResponse.md +32 -0
  19. data/docs/ConversationApi.md +600 -0
  20. data/docs/ConversationPbxDefaultTimezoneResponse.md +26 -0
  21. data/docs/ConversationPbxDefaultTimezoneUpdateRequest.md +18 -0
  22. data/docs/ConversationWebchatQueueStatusAgent.md +6 -0
  23. data/docs/ConversationWebchatQueueStatusUpdateRequest.md +5 -1
  24. data/docs/TimelineSummary.md +26 -0
  25. data/lib/ultracart_api/api/conversation_api.rb +766 -2
  26. data/lib/ultracart_api/models/agent_summary.rb +279 -0
  27. data/lib/ultracart_api/models/conversation_agent_call_event.rb +314 -0
  28. data/lib/ultracart_api/models/conversation_agent_chat_event.rb +260 -0
  29. data/lib/ultracart_api/models/conversation_agent_status_config.rb +461 -0
  30. data/lib/ultracart_api/models/conversation_agent_status_config_response.rb +256 -0
  31. data/lib/ultracart_api/models/conversation_agent_status_configs_response.rb +259 -0
  32. data/lib/ultracart_api/models/conversation_agent_status_event.rb +512 -0
  33. data/lib/ultracart_api/models/conversation_agent_status_heatmap_request.rb +296 -0
  34. data/lib/ultracart_api/models/conversation_agent_status_heatmap_response.rb +283 -0
  35. data/lib/ultracart_api/models/conversation_agent_status_history_search_request.rb +316 -0
  36. data/lib/ultracart_api/models/conversation_agent_status_history_search_response.rb +269 -0
  37. data/lib/ultracart_api/models/conversation_agent_status_rollup.rb +353 -0
  38. data/lib/ultracart_api/models/conversation_agent_status_rollup_search_request.rb +284 -0
  39. data/lib/ultracart_api/models/conversation_agent_status_rollup_search_response.rb +259 -0
  40. data/lib/ultracart_api/models/conversation_agent_status_summary_response.rb +288 -0
  41. data/lib/ultracart_api/models/conversation_agent_status_timeline_response.rb +292 -0
  42. data/lib/ultracart_api/models/conversation_pbx_default_timezone_response.rb +272 -0
  43. data/lib/ultracart_api/models/conversation_pbx_default_timezone_update_request.rb +235 -0
  44. data/lib/ultracart_api/models/conversation_webchat_queue_status_agent.rb +31 -1
  45. data/lib/ultracart_api/models/conversation_webchat_queue_status_update_request.rb +24 -4
  46. data/lib/ultracart_api/models/timeline_summary.rb +260 -0
  47. data/lib/ultracart_api/version.rb +1 -1
  48. data/lib/ultracart_api.rb +19 -0
  49. metadata +40 -2
@@ -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 ConversationAgentChatEvent
18
+ # Conversation UUID
19
+ attr_accessor :conversation_uuid
20
+
21
+ # Customer display name (when known)
22
+ attr_accessor :customer_name
23
+
24
+ # Chat ended
25
+ attr_accessor :end_dts
26
+
27
+ # Total messages in the conversation
28
+ attr_accessor :message_count
29
+
30
+ # Chat started
31
+ attr_accessor :start_dts
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'conversation_uuid' => :'conversation_uuid',
37
+ :'customer_name' => :'customer_name',
38
+ :'end_dts' => :'end_dts',
39
+ :'message_count' => :'message_count',
40
+ :'start_dts' => :'start_dts'
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
+ :'conversation_uuid' => :'String',
53
+ :'customer_name' => :'String',
54
+ :'end_dts' => :'String',
55
+ :'message_count' => :'Integer',
56
+ :'start_dts' => :'String'
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::ConversationAgentChatEvent` 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::ConversationAgentChatEvent`. 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?(:'conversation_uuid')
82
+ self.conversation_uuid = attributes[:'conversation_uuid']
83
+ end
84
+
85
+ if attributes.key?(:'customer_name')
86
+ self.customer_name = attributes[:'customer_name']
87
+ end
88
+
89
+ if attributes.key?(:'end_dts')
90
+ self.end_dts = attributes[:'end_dts']
91
+ end
92
+
93
+ if attributes.key?(:'message_count')
94
+ self.message_count = attributes[:'message_count']
95
+ end
96
+
97
+ if attributes.key?(:'start_dts')
98
+ self.start_dts = attributes[:'start_dts']
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
+ conversation_uuid == o.conversation_uuid &&
121
+ customer_name == o.customer_name &&
122
+ end_dts == o.end_dts &&
123
+ message_count == o.message_count &&
124
+ start_dts == o.start_dts
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
+ [conversation_uuid, customer_name, end_dts, message_count, start_dts].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