ultracart_api 4.1.51 → 4.1.54

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 +26 -2
  3. data/docs/ConversationApi.md +111 -0
  4. data/docs/ConversationPbxAgent.md +2 -0
  5. data/docs/ConversationPbxCall.md +60 -0
  6. data/docs/ConversationPbxCallAgent.md +34 -0
  7. data/docs/ConversationPbxCallAiCost.md +24 -0
  8. data/docs/ConversationPbxCallAiEngagement.md +36 -0
  9. data/docs/ConversationPbxCallAiToolCall.md +34 -0
  10. data/docs/ConversationPbxCallAiWhisper.md +24 -0
  11. data/docs/ConversationPbxCallCaller.md +26 -0
  12. data/docs/ConversationPbxCallFinancial.md +30 -0
  13. data/docs/ConversationPbxCallHold.md +24 -0
  14. data/docs/ConversationPbxCallQueue.md +28 -0
  15. data/docs/ConversationPbxCallRecording.md +30 -0
  16. data/docs/ConversationPbxCallResponse.md +26 -0
  17. data/docs/ConversationPbxCallRouting.md +22 -0
  18. data/docs/ConversationPbxCallSearchRequest.md +48 -0
  19. data/docs/ConversationPbxCallSearchResponse.md +26 -0
  20. data/docs/ConversationPbxCallTimeline.md +28 -0
  21. data/docs/ConversationPbxCallTranscript.md +30 -0
  22. data/docs/ConversationPbxCallTranscriptSegment.md +30 -0
  23. data/docs/ConversationPbxCallTransfer.md +26 -0
  24. data/docs/ConversationPbxPhoneNumber.md +2 -0
  25. data/lib/ultracart_api/api/conversation_api.rb +142 -0
  26. data/lib/ultracart_api/models/conversation_pbx_agent.rb +11 -1
  27. data/lib/ultracart_api/models/conversation_pbx_call.rb +438 -0
  28. data/lib/ultracart_api/models/conversation_pbx_call_agent.rb +300 -0
  29. data/lib/ultracart_api/models/conversation_pbx_call_ai_cost.rb +250 -0
  30. data/lib/ultracart_api/models/conversation_pbx_call_ai_engagement.rb +347 -0
  31. data/lib/ultracart_api/models/conversation_pbx_call_ai_tool_call.rb +300 -0
  32. data/lib/ultracart_api/models/conversation_pbx_call_ai_whisper.rb +250 -0
  33. data/lib/ultracart_api/models/conversation_pbx_call_caller.rb +260 -0
  34. data/lib/ultracart_api/models/conversation_pbx_call_financial.rb +280 -0
  35. data/lib/ultracart_api/models/conversation_pbx_call_hold.rb +250 -0
  36. data/lib/ultracart_api/models/conversation_pbx_call_queue.rb +270 -0
  37. data/lib/ultracart_api/models/conversation_pbx_call_recording.rb +279 -0
  38. data/lib/ultracart_api/models/conversation_pbx_call_response.rb +256 -0
  39. data/lib/ultracart_api/models/conversation_pbx_call_routing.rb +239 -0
  40. data/lib/ultracart_api/models/conversation_pbx_call_search_request.rb +376 -0
  41. data/lib/ultracart_api/models/conversation_pbx_call_search_response.rb +259 -0
  42. data/lib/ultracart_api/models/conversation_pbx_call_timeline.rb +270 -0
  43. data/lib/ultracart_api/models/conversation_pbx_call_transcript.rb +282 -0
  44. data/lib/ultracart_api/models/conversation_pbx_call_transcript_segment.rb +314 -0
  45. data/lib/ultracart_api/models/conversation_pbx_call_transfer.rb +260 -0
  46. data/lib/ultracart_api/models/conversation_pbx_phone_number.rb +11 -1
  47. data/lib/ultracart_api/version.rb +1 -1
  48. data/lib/ultracart_api.rb +19 -0
  49. metadata +40 -2
@@ -0,0 +1,270 @@
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 ConversationPbxCallQueue
18
+ # Timestamp when the call was answered from the queue
19
+ attr_accessor :answered_at_dts
20
+
21
+ # Timestamp when the call entered the queue
22
+ attr_accessor :entered_at_dts
23
+
24
+ # Display name of the queue
25
+ attr_accessor :queue_name
26
+
27
+ # Unique identifier for the queue
28
+ attr_accessor :queue_uuid
29
+
30
+ # Result of queue routing (e.g., answered, abandoned, timeout)
31
+ attr_accessor :result
32
+
33
+ # Number of seconds the caller waited in the queue
34
+ attr_accessor :wait_seconds
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'answered_at_dts' => :'answered_at_dts',
40
+ :'entered_at_dts' => :'entered_at_dts',
41
+ :'queue_name' => :'queue_name',
42
+ :'queue_uuid' => :'queue_uuid',
43
+ :'result' => :'result',
44
+ :'wait_seconds' => :'wait_seconds'
45
+ }
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'answered_at_dts' => :'String',
57
+ :'entered_at_dts' => :'String',
58
+ :'queue_name' => :'String',
59
+ :'queue_uuid' => :'String',
60
+ :'result' => :'String',
61
+ :'wait_seconds' => :'Integer'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationPbxCallQueue` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!self.class.attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationPbxCallQueue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'answered_at_dts')
87
+ self.answered_at_dts = attributes[:'answered_at_dts']
88
+ end
89
+
90
+ if attributes.key?(:'entered_at_dts')
91
+ self.entered_at_dts = attributes[:'entered_at_dts']
92
+ end
93
+
94
+ if attributes.key?(:'queue_name')
95
+ self.queue_name = attributes[:'queue_name']
96
+ end
97
+
98
+ if attributes.key?(:'queue_uuid')
99
+ self.queue_uuid = attributes[:'queue_uuid']
100
+ end
101
+
102
+ if attributes.key?(:'result')
103
+ self.result = attributes[:'result']
104
+ end
105
+
106
+ if attributes.key?(:'wait_seconds')
107
+ self.wait_seconds = attributes[:'wait_seconds']
108
+ end
109
+ end
110
+
111
+ # Show invalid properties with the reasons. Usually used together with valid?
112
+ # @return Array for valid properties with the reasons
113
+ def list_invalid_properties
114
+ invalid_properties = Array.new
115
+ invalid_properties
116
+ end
117
+
118
+ # Check to see if the all the properties in the model are valid
119
+ # @return true if the model is valid
120
+ def valid?
121
+ true
122
+ end
123
+
124
+ # Checks equality by comparing each attribute.
125
+ # @param [Object] Object to be compared
126
+ def ==(o)
127
+ return true if self.equal?(o)
128
+ self.class == o.class &&
129
+ answered_at_dts == o.answered_at_dts &&
130
+ entered_at_dts == o.entered_at_dts &&
131
+ queue_name == o.queue_name &&
132
+ queue_uuid == o.queue_uuid &&
133
+ result == o.result &&
134
+ wait_seconds == o.wait_seconds
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ def hash
146
+ [answered_at_dts, entered_at_dts, queue_name, queue_uuid, result, wait_seconds].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def self.build_from_hash(attributes)
153
+ new.build_from_hash(attributes)
154
+ end
155
+
156
+ # Builds the object from hash
157
+ # @param [Hash] attributes Model attributes in the form of hash
158
+ # @return [Object] Returns the model itself
159
+ def build_from_hash(attributes)
160
+ return nil unless attributes.is_a?(Hash)
161
+ attributes = attributes.transform_keys(&:to_sym)
162
+ self.class.openapi_types.each_pair do |key, type|
163
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
164
+ self.send("#{key}=", nil)
165
+ elsif type =~ /\AArray<(.*)>/i
166
+ # check to ensure the input is an array given that the attribute
167
+ # is documented as an array but the input is not
168
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
169
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
170
+ end
171
+ elsif !attributes[self.class.attribute_map[key]].nil?
172
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
173
+ end
174
+ end
175
+
176
+ self
177
+ end
178
+
179
+ # Deserializes the data based on type
180
+ # @param string type Data type
181
+ # @param string value Value to be deserialized
182
+ # @return [Object] Deserialized data
183
+ def _deserialize(type, value)
184
+ case type.to_sym
185
+ when :Time
186
+ Time.parse(value)
187
+ when :Date
188
+ Date.parse(value)
189
+ when :String
190
+ value.to_s
191
+ when :Integer
192
+ value.to_i
193
+ when :Float
194
+ value.to_f
195
+ when :Boolean
196
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
197
+ true
198
+ else
199
+ false
200
+ end
201
+ when :Object
202
+ # generic object (usually a Hash), return directly
203
+ value
204
+ when /\AArray<(?<inner_type>.+)>\z/
205
+ inner_type = Regexp.last_match[:inner_type]
206
+ value.map { |v| _deserialize(inner_type, v) }
207
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
208
+ k_type = Regexp.last_match[:k_type]
209
+ v_type = Regexp.last_match[:v_type]
210
+ {}.tap do |hash|
211
+ value.each do |k, v|
212
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
213
+ end
214
+ end
215
+ else # model
216
+ # models (e.g. Pet) or oneOf
217
+ klass = UltracartClient.const_get(type)
218
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
219
+ end
220
+ end
221
+
222
+ # Returns the string representation of the object
223
+ # @return [String] String presentation of the object
224
+ def to_s
225
+ to_hash.to_s
226
+ end
227
+
228
+ # to_body is an alias to to_hash (backward compatibility)
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_body
231
+ to_hash
232
+ end
233
+
234
+ # Returns the object in the form of hash
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_hash
237
+ hash = {}
238
+ self.class.attribute_map.each_pair do |attr, param|
239
+ value = self.send(attr)
240
+ if value.nil?
241
+ is_nullable = self.class.openapi_nullable.include?(attr)
242
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
243
+ end
244
+
245
+ hash[param] = _to_hash(value)
246
+ end
247
+ hash
248
+ end
249
+
250
+ # Outputs non-array value in the form of hash
251
+ # For object, use to_hash. Otherwise, just return the value
252
+ # @param [Object] value Any valid value
253
+ # @return [Hash] Returns the value in the form of hash
254
+ def _to_hash(value)
255
+ if value.is_a?(Array)
256
+ value.compact.map { |v| _to_hash(v) }
257
+ elsif value.is_a?(Hash)
258
+ {}.tap do |hash|
259
+ value.each { |k, v| hash[k] = _to_hash(v) }
260
+ end
261
+ elsif value.respond_to? :to_hash
262
+ value.to_hash
263
+ else
264
+ value
265
+ end
266
+ end
267
+
268
+ end
269
+
270
+ end
@@ -0,0 +1,279 @@
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 ConversationPbxCallRecording
18
+ # Number of audio channels in the recording (1 for mono, 2 for stereo/dual-channel)
19
+ attr_accessor :channels
20
+
21
+ # Duration of the recording in seconds
22
+ attr_accessor :duration_seconds
23
+
24
+ # Whether this is the primary recording for the call
25
+ attr_accessor :is_primary
26
+
27
+ # Twilio recording SID
28
+ attr_accessor :recording_sid
29
+
30
+ # URL to access the recording
31
+ attr_accessor :recording_url
32
+
33
+ # Status of the recording
34
+ attr_accessor :status
35
+
36
+ attr_accessor :transcript
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'channels' => :'channels',
42
+ :'duration_seconds' => :'duration_seconds',
43
+ :'is_primary' => :'is_primary',
44
+ :'recording_sid' => :'recording_sid',
45
+ :'recording_url' => :'recording_url',
46
+ :'status' => :'status',
47
+ :'transcript' => :'transcript'
48
+ }
49
+ end
50
+
51
+ # Returns all the JSON keys this model knows about
52
+ def self.acceptable_attributes
53
+ attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.openapi_types
58
+ {
59
+ :'channels' => :'Integer',
60
+ :'duration_seconds' => :'Integer',
61
+ :'is_primary' => :'Boolean',
62
+ :'recording_sid' => :'String',
63
+ :'recording_url' => :'String',
64
+ :'status' => :'String',
65
+ :'transcript' => :'ConversationPbxCallTranscript'
66
+ }
67
+ end
68
+
69
+ # List of attributes with nullable: true
70
+ def self.openapi_nullable
71
+ Set.new([
72
+ ])
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ def initialize(attributes = {})
78
+ if (!attributes.is_a?(Hash))
79
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationPbxCallRecording` initialize method"
80
+ end
81
+
82
+ # check to see if the attribute exists and convert string to symbol for hash key
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!self.class.attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationPbxCallRecording`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'channels')
91
+ self.channels = attributes[:'channels']
92
+ end
93
+
94
+ if attributes.key?(:'duration_seconds')
95
+ self.duration_seconds = attributes[:'duration_seconds']
96
+ end
97
+
98
+ if attributes.key?(:'is_primary')
99
+ self.is_primary = attributes[:'is_primary']
100
+ end
101
+
102
+ if attributes.key?(:'recording_sid')
103
+ self.recording_sid = attributes[:'recording_sid']
104
+ end
105
+
106
+ if attributes.key?(:'recording_url')
107
+ self.recording_url = attributes[:'recording_url']
108
+ end
109
+
110
+ if attributes.key?(:'status')
111
+ self.status = attributes[:'status']
112
+ end
113
+
114
+ if attributes.key?(:'transcript')
115
+ self.transcript = attributes[:'transcript']
116
+ end
117
+ end
118
+
119
+ # Show invalid properties with the reasons. Usually used together with valid?
120
+ # @return Array for valid properties with the reasons
121
+ def list_invalid_properties
122
+ invalid_properties = Array.new
123
+ invalid_properties
124
+ end
125
+
126
+ # Check to see if the all the properties in the model are valid
127
+ # @return true if the model is valid
128
+ def valid?
129
+ true
130
+ end
131
+
132
+ # Checks equality by comparing each attribute.
133
+ # @param [Object] Object to be compared
134
+ def ==(o)
135
+ return true if self.equal?(o)
136
+ self.class == o.class &&
137
+ channels == o.channels &&
138
+ duration_seconds == o.duration_seconds &&
139
+ is_primary == o.is_primary &&
140
+ recording_sid == o.recording_sid &&
141
+ recording_url == o.recording_url &&
142
+ status == o.status &&
143
+ transcript == o.transcript
144
+ end
145
+
146
+ # @see the `==` method
147
+ # @param [Object] Object to be compared
148
+ def eql?(o)
149
+ self == o
150
+ end
151
+
152
+ # Calculates hash code according to all attributes.
153
+ # @return [Integer] Hash code
154
+ def hash
155
+ [channels, duration_seconds, is_primary, recording_sid, recording_url, status, transcript].hash
156
+ end
157
+
158
+ # Builds the object from hash
159
+ # @param [Hash] attributes Model attributes in the form of hash
160
+ # @return [Object] Returns the model itself
161
+ def self.build_from_hash(attributes)
162
+ new.build_from_hash(attributes)
163
+ end
164
+
165
+ # Builds the object from hash
166
+ # @param [Hash] attributes Model attributes in the form of hash
167
+ # @return [Object] Returns the model itself
168
+ def build_from_hash(attributes)
169
+ return nil unless attributes.is_a?(Hash)
170
+ attributes = attributes.transform_keys(&:to_sym)
171
+ self.class.openapi_types.each_pair do |key, type|
172
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
173
+ self.send("#{key}=", nil)
174
+ elsif type =~ /\AArray<(.*)>/i
175
+ # check to ensure the input is an array given that the attribute
176
+ # is documented as an array but the input is not
177
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
178
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
179
+ end
180
+ elsif !attributes[self.class.attribute_map[key]].nil?
181
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
182
+ end
183
+ end
184
+
185
+ self
186
+ end
187
+
188
+ # Deserializes the data based on type
189
+ # @param string type Data type
190
+ # @param string value Value to be deserialized
191
+ # @return [Object] Deserialized data
192
+ def _deserialize(type, value)
193
+ case type.to_sym
194
+ when :Time
195
+ Time.parse(value)
196
+ when :Date
197
+ Date.parse(value)
198
+ when :String
199
+ value.to_s
200
+ when :Integer
201
+ value.to_i
202
+ when :Float
203
+ value.to_f
204
+ when :Boolean
205
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
206
+ true
207
+ else
208
+ false
209
+ end
210
+ when :Object
211
+ # generic object (usually a Hash), return directly
212
+ value
213
+ when /\AArray<(?<inner_type>.+)>\z/
214
+ inner_type = Regexp.last_match[:inner_type]
215
+ value.map { |v| _deserialize(inner_type, v) }
216
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
217
+ k_type = Regexp.last_match[:k_type]
218
+ v_type = Regexp.last_match[:v_type]
219
+ {}.tap do |hash|
220
+ value.each do |k, v|
221
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
222
+ end
223
+ end
224
+ else # model
225
+ # models (e.g. Pet) or oneOf
226
+ klass = UltracartClient.const_get(type)
227
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
228
+ end
229
+ end
230
+
231
+ # Returns the string representation of the object
232
+ # @return [String] String presentation of the object
233
+ def to_s
234
+ to_hash.to_s
235
+ end
236
+
237
+ # to_body is an alias to to_hash (backward compatibility)
238
+ # @return [Hash] Returns the object in the form of hash
239
+ def to_body
240
+ to_hash
241
+ end
242
+
243
+ # Returns the object in the form of hash
244
+ # @return [Hash] Returns the object in the form of hash
245
+ def to_hash
246
+ hash = {}
247
+ self.class.attribute_map.each_pair do |attr, param|
248
+ value = self.send(attr)
249
+ if value.nil?
250
+ is_nullable = self.class.openapi_nullable.include?(attr)
251
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
252
+ end
253
+
254
+ hash[param] = _to_hash(value)
255
+ end
256
+ hash
257
+ end
258
+
259
+ # Outputs non-array value in the form of hash
260
+ # For object, use to_hash. Otherwise, just return the value
261
+ # @param [Object] value Any valid value
262
+ # @return [Hash] Returns the value in the form of hash
263
+ def _to_hash(value)
264
+ if value.is_a?(Array)
265
+ value.compact.map { |v| _to_hash(v) }
266
+ elsif value.is_a?(Hash)
267
+ {}.tap do |hash|
268
+ value.each { |k, v| hash[k] = _to_hash(v) }
269
+ end
270
+ elsif value.respond_to? :to_hash
271
+ value.to_hash
272
+ else
273
+ value
274
+ end
275
+ end
276
+
277
+ end
278
+
279
+ end