ultracart_api 4.1.56 → 4.1.57

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.
@@ -0,0 +1,259 @@
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 ConversationPbxCosAuditLogsResponse
18
+ # Array of audit log entries
19
+ attr_accessor :audit_logs
20
+
21
+ attr_accessor :error
22
+
23
+ attr_accessor :metadata
24
+
25
+ # Indicates if API call was successful
26
+ attr_accessor :success
27
+
28
+ attr_accessor :warning
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'audit_logs' => :'audit_logs',
34
+ :'error' => :'error',
35
+ :'metadata' => :'metadata',
36
+ :'success' => :'success',
37
+ :'warning' => :'warning'
38
+ }
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'audit_logs' => :'Array<ConversationPbxCosAuditLog>',
50
+ :'error' => :'Error',
51
+ :'metadata' => :'ResponseMetadata',
52
+ :'success' => :'Boolean',
53
+ :'warning' => :'Warning'
54
+ }
55
+ end
56
+
57
+ # List of attributes with nullable: true
58
+ def self.openapi_nullable
59
+ Set.new([
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationPbxCosAuditLogsResponse` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!self.class.attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationPbxCosAuditLogsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'audit_logs')
79
+ if (value = attributes[:'audit_logs']).is_a?(Array)
80
+ self.audit_logs = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'error')
85
+ self.error = attributes[:'error']
86
+ end
87
+
88
+ if attributes.key?(:'metadata')
89
+ self.metadata = attributes[:'metadata']
90
+ end
91
+
92
+ if attributes.key?(:'success')
93
+ self.success = attributes[:'success']
94
+ end
95
+
96
+ if attributes.key?(:'warning')
97
+ self.warning = attributes[:'warning']
98
+ end
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ invalid_properties = Array.new
105
+ invalid_properties
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ def valid?
111
+ true
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ audit_logs == o.audit_logs &&
120
+ error == o.error &&
121
+ metadata == o.metadata &&
122
+ success == o.success &&
123
+ warning == o.warning
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Integer] Hash code
134
+ def hash
135
+ [audit_logs, error, metadata, success, warning].hash
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def self.build_from_hash(attributes)
142
+ new.build_from_hash(attributes)
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def build_from_hash(attributes)
149
+ return nil unless attributes.is_a?(Hash)
150
+ attributes = attributes.transform_keys(&:to_sym)
151
+ self.class.openapi_types.each_pair do |key, type|
152
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
153
+ self.send("#{key}=", nil)
154
+ elsif type =~ /\AArray<(.*)>/i
155
+ # check to ensure the input is an array given that the attribute
156
+ # is documented as an array but the input is not
157
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
158
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
159
+ end
160
+ elsif !attributes[self.class.attribute_map[key]].nil?
161
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
162
+ end
163
+ end
164
+
165
+ self
166
+ end
167
+
168
+ # Deserializes the data based on type
169
+ # @param string type Data type
170
+ # @param string value Value to be deserialized
171
+ # @return [Object] Deserialized data
172
+ def _deserialize(type, value)
173
+ case type.to_sym
174
+ when :Time
175
+ Time.parse(value)
176
+ when :Date
177
+ Date.parse(value)
178
+ when :String
179
+ value.to_s
180
+ when :Integer
181
+ value.to_i
182
+ when :Float
183
+ value.to_f
184
+ when :Boolean
185
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
186
+ true
187
+ else
188
+ false
189
+ end
190
+ when :Object
191
+ # generic object (usually a Hash), return directly
192
+ value
193
+ when /\AArray<(?<inner_type>.+)>\z/
194
+ inner_type = Regexp.last_match[:inner_type]
195
+ value.map { |v| _deserialize(inner_type, v) }
196
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
197
+ k_type = Regexp.last_match[:k_type]
198
+ v_type = Regexp.last_match[:v_type]
199
+ {}.tap do |hash|
200
+ value.each do |k, v|
201
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
202
+ end
203
+ end
204
+ else # model
205
+ # models (e.g. Pet) or oneOf
206
+ klass = UltracartClient.const_get(type)
207
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
208
+ end
209
+ end
210
+
211
+ # Returns the string representation of the object
212
+ # @return [String] String presentation of the object
213
+ def to_s
214
+ to_hash.to_s
215
+ end
216
+
217
+ # to_body is an alias to to_hash (backward compatibility)
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_body
220
+ to_hash
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
234
+ hash[param] = _to_hash(value)
235
+ end
236
+ hash
237
+ end
238
+
239
+ # Outputs non-array value in the form of hash
240
+ # For object, use to_hash. Otherwise, just return the value
241
+ # @param [Object] value Any valid value
242
+ # @return [Hash] Returns the value in the form of hash
243
+ def _to_hash(value)
244
+ if value.is_a?(Array)
245
+ value.compact.map { |v| _to_hash(v) }
246
+ elsif value.is_a?(Hash)
247
+ {}.tap do |hash|
248
+ value.each { |k, v| hash[k] = _to_hash(v) }
249
+ end
250
+ elsif value.respond_to? :to_hash
251
+ value.to_hash
252
+ else
253
+ value
254
+ end
255
+ end
256
+
257
+ end
258
+
259
+ end
@@ -348,8 +348,12 @@ module UltracartClient
348
348
  return false if !@merchant_id.nil? && @merchant_id.to_s.length > 5
349
349
  return false if !@name.nil? && @name.to_s.length > 50
350
350
  return false if !@no_agent_available_play_audio_uuid.nil? && @no_agent_available_play_audio_uuid.to_s.length > 50
351
+ no_agent_available_say_voice_validator = EnumAttributeValidator.new('String', ["man", "woman"])
352
+ return false unless no_agent_available_say_voice_validator.valid?(@no_agent_available_say_voice)
351
353
  return false if !@no_agent_available_say_voice.nil? && @no_agent_available_say_voice.to_s.length > 50
352
354
  return false if !@play_audio_uuid.nil? && @play_audio_uuid.to_s.length > 50
355
+ say_voice_validator = EnumAttributeValidator.new('String', ["man", "woman"])
356
+ return false unless say_voice_validator.valid?(@say_voice)
353
357
  return false if !@say_voice.nil? && @say_voice.to_s.length > 50
354
358
  return false if !@twilio_taskrouter_workflow_sid.nil? && @twilio_taskrouter_workflow_sid.to_s.length > 100
355
359
  return false if !@twilio_workspace_queue_sid.nil? && @twilio_workspace_queue_sid.to_s.length > 50
@@ -416,13 +420,13 @@ module UltracartClient
416
420
  @no_agent_available_play_audio_uuid = no_agent_available_play_audio_uuid
417
421
  end
418
422
 
419
- # Custom attribute writer method with validation
420
- # @param [Object] no_agent_available_say_voice Value to be assigned
423
+ # Custom attribute writer method checking allowed values (enum).
424
+ # @param [Object] no_agent_available_say_voice Object to be assigned
421
425
  def no_agent_available_say_voice=(no_agent_available_say_voice)
422
- if !no_agent_available_say_voice.nil? && no_agent_available_say_voice.to_s.length > 50
423
- fail ArgumentError, 'invalid value for "no_agent_available_say_voice", the character length must be smaller than or equal to 50.'
426
+ validator = EnumAttributeValidator.new('String', ["man", "woman"])
427
+ unless validator.valid?(no_agent_available_say_voice)
428
+ fail ArgumentError, "invalid value for \"no_agent_available_say_voice\", must be one of #{validator.allowable_values}."
424
429
  end
425
-
426
430
  @no_agent_available_say_voice = no_agent_available_say_voice
427
431
  end
428
432
 
@@ -436,13 +440,13 @@ module UltracartClient
436
440
  @play_audio_uuid = play_audio_uuid
437
441
  end
438
442
 
439
- # Custom attribute writer method with validation
440
- # @param [Object] say_voice Value to be assigned
443
+ # Custom attribute writer method checking allowed values (enum).
444
+ # @param [Object] say_voice Object to be assigned
441
445
  def say_voice=(say_voice)
442
- if !say_voice.nil? && say_voice.to_s.length > 50
443
- fail ArgumentError, 'invalid value for "say_voice", the character length must be smaller than or equal to 50.'
446
+ validator = EnumAttributeValidator.new('String', ["man", "woman"])
447
+ unless validator.valid?(say_voice)
448
+ fail ArgumentError, "invalid value for \"say_voice\", must be one of #{validator.allowable_values}."
444
449
  end
445
-
446
450
  @say_voice = say_voice
447
451
  end
448
452
 
@@ -17,6 +17,8 @@ module UltracartClient
17
17
  class Twilio
18
18
  attr_accessor :account_sid
19
19
 
20
+ attr_accessor :ai_twiml_app_sid
21
+
20
22
  attr_accessor :api_key_id
21
23
 
22
24
  attr_accessor :api_key_name
@@ -37,6 +39,7 @@ module UltracartClient
37
39
  def self.attribute_map
38
40
  {
39
41
  :'account_sid' => :'account_sid',
42
+ :'ai_twiml_app_sid' => :'ai_twiml_app_sid',
40
43
  :'api_key_id' => :'api_key_id',
41
44
  :'api_key_name' => :'api_key_name',
42
45
  :'auth_token' => :'auth_token',
@@ -57,6 +60,7 @@ module UltracartClient
57
60
  def self.openapi_types
58
61
  {
59
62
  :'account_sid' => :'String',
63
+ :'ai_twiml_app_sid' => :'String',
60
64
  :'api_key_id' => :'String',
61
65
  :'api_key_name' => :'String',
62
66
  :'auth_token' => :'String',
@@ -93,6 +97,10 @@ module UltracartClient
93
97
  self.account_sid = attributes[:'account_sid']
94
98
  end
95
99
 
100
+ if attributes.key?(:'ai_twiml_app_sid')
101
+ self.ai_twiml_app_sid = attributes[:'ai_twiml_app_sid']
102
+ end
103
+
96
104
  if attributes.key?(:'api_key_id')
97
105
  self.api_key_id = attributes[:'api_key_id']
98
106
  end
@@ -147,6 +155,7 @@ module UltracartClient
147
155
  return true if self.equal?(o)
148
156
  self.class == o.class &&
149
157
  account_sid == o.account_sid &&
158
+ ai_twiml_app_sid == o.ai_twiml_app_sid &&
150
159
  api_key_id == o.api_key_id &&
151
160
  api_key_name == o.api_key_name &&
152
161
  auth_token == o.auth_token &&
@@ -166,7 +175,7 @@ module UltracartClient
166
175
  # Calculates hash code according to all attributes.
167
176
  # @return [Integer] Hash code
168
177
  def hash
169
- [account_sid, api_key_id, api_key_name, auth_token, esp_twilio_uuid, inbound_twiml_app_sid, outbound_twiml_app_sid, phone_numbers, twilio_workspace_sid].hash
178
+ [account_sid, ai_twiml_app_sid, api_key_id, api_key_name, auth_token, esp_twilio_uuid, inbound_twiml_app_sid, outbound_twiml_app_sid, phone_numbers, twilio_workspace_sid].hash
170
179
  end
171
180
 
172
181
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.56'
14
+ VERSION = '4.1.57'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -231,6 +231,11 @@ require 'ultracart_api/models/conversation_pbx_call_timeline'
231
231
  require 'ultracart_api/models/conversation_pbx_call_transcript'
232
232
  require 'ultracart_api/models/conversation_pbx_call_transcript_segment'
233
233
  require 'ultracart_api/models/conversation_pbx_call_transfer'
234
+ require 'ultracart_api/models/conversation_pbx_class_of_service'
235
+ require 'ultracart_api/models/conversation_pbx_class_of_service_response'
236
+ require 'ultracart_api/models/conversation_pbx_class_of_services_response'
237
+ require 'ultracart_api/models/conversation_pbx_cos_audit_log'
238
+ require 'ultracart_api/models/conversation_pbx_cos_audit_logs_response'
234
239
  require 'ultracart_api/models/conversation_pbx_customer_snapshot_request'
235
240
  require 'ultracart_api/models/conversation_pbx_customer_snapshot_response'
236
241
  require 'ultracart_api/models/conversation_pbx_hardware_phone'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.56
4
+ version: 4.1.57
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-02 00:00:00.000000000 Z
11
+ date: 2026-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -280,6 +280,11 @@ files:
280
280
  - docs/ConversationPbxCallTranscript.md
281
281
  - docs/ConversationPbxCallTranscriptSegment.md
282
282
  - docs/ConversationPbxCallTransfer.md
283
+ - docs/ConversationPbxClassOfService.md
284
+ - docs/ConversationPbxClassOfServiceResponse.md
285
+ - docs/ConversationPbxClassOfServicesResponse.md
286
+ - docs/ConversationPbxCosAuditLog.md
287
+ - docs/ConversationPbxCosAuditLogsResponse.md
283
288
  - docs/ConversationPbxCustomerSnapshotRequest.md
284
289
  - docs/ConversationPbxCustomerSnapshotResponse.md
285
290
  - docs/ConversationPbxHardwarePhone.md
@@ -1258,6 +1263,11 @@ files:
1258
1263
  - lib/ultracart_api/models/conversation_pbx_call_transcript.rb
1259
1264
  - lib/ultracart_api/models/conversation_pbx_call_transcript_segment.rb
1260
1265
  - lib/ultracart_api/models/conversation_pbx_call_transfer.rb
1266
+ - lib/ultracart_api/models/conversation_pbx_class_of_service.rb
1267
+ - lib/ultracart_api/models/conversation_pbx_class_of_service_response.rb
1268
+ - lib/ultracart_api/models/conversation_pbx_class_of_services_response.rb
1269
+ - lib/ultracart_api/models/conversation_pbx_cos_audit_log.rb
1270
+ - lib/ultracart_api/models/conversation_pbx_cos_audit_logs_response.rb
1261
1271
  - lib/ultracart_api/models/conversation_pbx_customer_snapshot_request.rb
1262
1272
  - lib/ultracart_api/models/conversation_pbx_customer_snapshot_response.rb
1263
1273
  - lib/ultracart_api/models/conversation_pbx_hardware_phone.rb