ultracart_api 4.1.22 → 4.1.23

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 (27) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -2
  3. data/docs/ConversationApi.md +219 -0
  4. data/docs/ConversationDeleteKnowledgeBaseDocumentResponse.md +26 -0
  5. data/docs/ConversationInsertKnowledgeBaseDocumentRequest.md +18 -0
  6. data/docs/ConversationInsertKnowledgeBaseDocumentResponse.md +30 -0
  7. data/docs/ConversationKnowledgeBaseDocument.md +30 -0
  8. data/docs/ConversationKnowledgeBaseDocumentUploadUrl.md +20 -0
  9. data/docs/ConversationKnowledgeBaseDocumentUploadUrlResponse.md +26 -0
  10. data/docs/ConversationKnowledgeBaseDocumentsResponse.md +26 -0
  11. data/docs/CustomReportAccountConfig.md +2 -0
  12. data/docs/CustomReportUsageBreakdown.md +20 -0
  13. data/docs/CustomerApi.md +5 -5
  14. data/lib/ultracart_api/api/conversation_api.rb +279 -0
  15. data/lib/ultracart_api/api/customer_api.rb +5 -5
  16. data/lib/ultracart_api/models/conversation_delete_knowledge_base_document_response.rb +256 -0
  17. data/lib/ultracart_api/models/conversation_insert_knowledge_base_document_request.rb +219 -0
  18. data/lib/ultracart_api/models/conversation_insert_knowledge_base_document_response.rb +276 -0
  19. data/lib/ultracart_api/models/conversation_knowledge_base_document.rb +274 -0
  20. data/lib/ultracart_api/models/conversation_knowledge_base_document_upload_url.rb +228 -0
  21. data/lib/ultracart_api/models/conversation_knowledge_base_document_upload_url_response.rb +256 -0
  22. data/lib/ultracart_api/models/conversation_knowledge_base_documents_response.rb +259 -0
  23. data/lib/ultracart_api/models/custom_report_account_config.rb +12 -1
  24. data/lib/ultracart_api/models/custom_report_usage_breakdown.rb +229 -0
  25. data/lib/ultracart_api/version.rb +1 -1
  26. data/lib/ultracart_api.rb +8 -0
  27. metadata +18 -2
@@ -0,0 +1,229 @@
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 CustomReportUsageBreakdown
18
+ attr_accessor :usage
19
+
20
+ # Date/time that usage occurred
21
+ attr_accessor :usage_date
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'usage' => :'usage',
27
+ :'usage_date' => :'usage_date'
28
+ }
29
+ end
30
+
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'usage' => :'Float',
40
+ :'usage_date' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CustomReportUsageBreakdown` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CustomReportUsageBreakdown`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'usage')
66
+ self.usage = attributes[:'usage']
67
+ end
68
+
69
+ if attributes.key?(:'usage_date')
70
+ self.usage_date = attributes[:'usage_date']
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = Array.new
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ usage == o.usage &&
93
+ usage_date == o.usage_date
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [usage, usage_date].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ new.build_from_hash(attributes)
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ attributes = attributes.transform_keys(&:to_sym)
121
+ self.class.openapi_types.each_pair do |key, type|
122
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
123
+ self.send("#{key}=", nil)
124
+ elsif type =~ /\AArray<(.*)>/i
125
+ # check to ensure the input is an array given that the attribute
126
+ # is documented as an array but the input is not
127
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
129
+ end
130
+ elsif !attributes[self.class.attribute_map[key]].nil?
131
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
+ end
133
+ end
134
+
135
+ self
136
+ end
137
+
138
+ # Deserializes the data based on type
139
+ # @param string type Data type
140
+ # @param string value Value to be deserialized
141
+ # @return [Object] Deserialized data
142
+ def _deserialize(type, value)
143
+ case type.to_sym
144
+ when :Time
145
+ Time.parse(value)
146
+ when :Date
147
+ Date.parse(value)
148
+ when :String
149
+ value.to_s
150
+ when :Integer
151
+ value.to_i
152
+ when :Float
153
+ value.to_f
154
+ when :Boolean
155
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
156
+ true
157
+ else
158
+ false
159
+ end
160
+ when :Object
161
+ # generic object (usually a Hash), return directly
162
+ value
163
+ when /\AArray<(?<inner_type>.+)>\z/
164
+ inner_type = Regexp.last_match[:inner_type]
165
+ value.map { |v| _deserialize(inner_type, v) }
166
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
167
+ k_type = Regexp.last_match[:k_type]
168
+ v_type = Regexp.last_match[:v_type]
169
+ {}.tap do |hash|
170
+ value.each do |k, v|
171
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
172
+ end
173
+ end
174
+ else # model
175
+ # models (e.g. Pet) or oneOf
176
+ klass = UltracartClient.const_get(type)
177
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
178
+ end
179
+ end
180
+
181
+ # Returns the string representation of the object
182
+ # @return [String] String presentation of the object
183
+ def to_s
184
+ to_hash.to_s
185
+ end
186
+
187
+ # to_body is an alias to to_hash (backward compatibility)
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_body
190
+ to_hash
191
+ end
192
+
193
+ # Returns the object in the form of hash
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_hash
196
+ hash = {}
197
+ self.class.attribute_map.each_pair do |attr, param|
198
+ value = self.send(attr)
199
+ if value.nil?
200
+ is_nullable = self.class.openapi_nullable.include?(attr)
201
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
202
+ end
203
+
204
+ hash[param] = _to_hash(value)
205
+ end
206
+ hash
207
+ end
208
+
209
+ # Outputs non-array value in the form of hash
210
+ # For object, use to_hash. Otherwise, just return the value
211
+ # @param [Object] value Any valid value
212
+ # @return [Hash] Returns the value in the form of hash
213
+ def _to_hash(value)
214
+ if value.is_a?(Array)
215
+ value.compact.map { |v| _to_hash(v) }
216
+ elsif value.is_a?(Hash)
217
+ {}.tap do |hash|
218
+ value.each { |k, v| hash[k] = _to_hash(v) }
219
+ end
220
+ elsif value.respond_to? :to_hash
221
+ value.to_hash
222
+ else
223
+ value
224
+ end
225
+ end
226
+
227
+ end
228
+
229
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.22'
14
+ VERSION = '4.1.23'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -157,6 +157,7 @@ require 'ultracart_api/models/conversation_canned_message'
157
157
  require 'ultracart_api/models/conversation_canned_message_response'
158
158
  require 'ultracart_api/models/conversation_canned_messages_response'
159
159
  require 'ultracart_api/models/conversation_canned_messages_search'
160
+ require 'ultracart_api/models/conversation_delete_knowledge_base_document_response'
160
161
  require 'ultracart_api/models/conversation_department'
161
162
  require 'ultracart_api/models/conversation_department_member'
162
163
  require 'ultracart_api/models/conversation_department_members_response'
@@ -175,7 +176,13 @@ require 'ultracart_api/models/conversation_event_rr_web'
175
176
  require 'ultracart_api/models/conversation_event_read_message'
176
177
  require 'ultracart_api/models/conversation_event_typing'
177
178
  require 'ultracart_api/models/conversation_event_webchat_context'
179
+ require 'ultracart_api/models/conversation_insert_knowledge_base_document_request'
180
+ require 'ultracart_api/models/conversation_insert_knowledge_base_document_response'
178
181
  require 'ultracart_api/models/conversation_join_request'
182
+ require 'ultracart_api/models/conversation_knowledge_base_document'
183
+ require 'ultracart_api/models/conversation_knowledge_base_document_upload_url'
184
+ require 'ultracart_api/models/conversation_knowledge_base_document_upload_url_response'
185
+ require 'ultracart_api/models/conversation_knowledge_base_documents_response'
179
186
  require 'ultracart_api/models/conversation_location_country'
180
187
  require 'ultracart_api/models/conversation_location_state_province'
181
188
  require 'ultracart_api/models/conversation_locations_response'
@@ -342,6 +349,7 @@ require 'ultracart_api/models/custom_report_parameter_option'
342
349
  require 'ultracart_api/models/custom_report_query'
343
350
  require 'ultracart_api/models/custom_report_response'
344
351
  require 'ultracart_api/models/custom_report_tooltip'
352
+ require 'ultracart_api/models/custom_report_usage_breakdown'
345
353
  require 'ultracart_api/models/custom_reports_execution_report_data'
346
354
  require 'ultracart_api/models/custom_reports_execution_request'
347
355
  require 'ultracart_api/models/custom_reports_execution_response'
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.22
4
+ version: 4.1.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-06 00:00:00.000000000 Z
11
+ date: 2025-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -206,6 +206,7 @@ files:
206
206
  - docs/ConversationCannedMessageResponse.md
207
207
  - docs/ConversationCannedMessagesResponse.md
208
208
  - docs/ConversationCannedMessagesSearch.md
209
+ - docs/ConversationDeleteKnowledgeBaseDocumentResponse.md
209
210
  - docs/ConversationDepartment.md
210
211
  - docs/ConversationDepartmentMember.md
211
212
  - docs/ConversationDepartmentMembersResponse.md
@@ -224,7 +225,13 @@ files:
224
225
  - docs/ConversationEventReadMessage.md
225
226
  - docs/ConversationEventTyping.md
226
227
  - docs/ConversationEventWebchatContext.md
228
+ - docs/ConversationInsertKnowledgeBaseDocumentRequest.md
229
+ - docs/ConversationInsertKnowledgeBaseDocumentResponse.md
227
230
  - docs/ConversationJoinRequest.md
231
+ - docs/ConversationKnowledgeBaseDocument.md
232
+ - docs/ConversationKnowledgeBaseDocumentUploadUrl.md
233
+ - docs/ConversationKnowledgeBaseDocumentUploadUrlResponse.md
234
+ - docs/ConversationKnowledgeBaseDocumentsResponse.md
228
235
  - docs/ConversationLocationCountry.md
229
236
  - docs/ConversationLocationStateProvince.md
230
237
  - docs/ConversationLocationsResponse.md
@@ -392,6 +399,7 @@ files:
392
399
  - docs/CustomReportQuery.md
393
400
  - docs/CustomReportResponse.md
394
401
  - docs/CustomReportTooltip.md
402
+ - docs/CustomReportUsageBreakdown.md
395
403
  - docs/CustomReportsExecutionReportData.md
396
404
  - docs/CustomReportsExecutionRequest.md
397
405
  - docs/CustomReportsExecutionResponse.md
@@ -1136,6 +1144,7 @@ files:
1136
1144
  - lib/ultracart_api/models/conversation_canned_message_response.rb
1137
1145
  - lib/ultracart_api/models/conversation_canned_messages_response.rb
1138
1146
  - lib/ultracart_api/models/conversation_canned_messages_search.rb
1147
+ - lib/ultracart_api/models/conversation_delete_knowledge_base_document_response.rb
1139
1148
  - lib/ultracart_api/models/conversation_department.rb
1140
1149
  - lib/ultracart_api/models/conversation_department_member.rb
1141
1150
  - lib/ultracart_api/models/conversation_department_members_response.rb
@@ -1154,7 +1163,13 @@ files:
1154
1163
  - lib/ultracart_api/models/conversation_event_rr_web.rb
1155
1164
  - lib/ultracart_api/models/conversation_event_typing.rb
1156
1165
  - lib/ultracart_api/models/conversation_event_webchat_context.rb
1166
+ - lib/ultracart_api/models/conversation_insert_knowledge_base_document_request.rb
1167
+ - lib/ultracart_api/models/conversation_insert_knowledge_base_document_response.rb
1157
1168
  - lib/ultracart_api/models/conversation_join_request.rb
1169
+ - lib/ultracart_api/models/conversation_knowledge_base_document.rb
1170
+ - lib/ultracart_api/models/conversation_knowledge_base_document_upload_url.rb
1171
+ - lib/ultracart_api/models/conversation_knowledge_base_document_upload_url_response.rb
1172
+ - lib/ultracart_api/models/conversation_knowledge_base_documents_response.rb
1158
1173
  - lib/ultracart_api/models/conversation_location_country.rb
1159
1174
  - lib/ultracart_api/models/conversation_location_state_province.rb
1160
1175
  - lib/ultracart_api/models/conversation_locations_response.rb
@@ -1321,6 +1336,7 @@ files:
1321
1336
  - lib/ultracart_api/models/custom_report_query.rb
1322
1337
  - lib/ultracart_api/models/custom_report_response.rb
1323
1338
  - lib/ultracart_api/models/custom_report_tooltip.rb
1339
+ - lib/ultracart_api/models/custom_report_usage_breakdown.rb
1324
1340
  - lib/ultracart_api/models/custom_reports_execution_report_data.rb
1325
1341
  - lib/ultracart_api/models/custom_reports_execution_request.rb
1326
1342
  - lib/ultracart_api/models/custom_reports_execution_response.rb