ultracart_api 4.1.106 → 4.1.110

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,287 @@
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 BulkUploadUrlResponse
18
+ attr_accessor :error
19
+
20
+ # When the presigned URL expires
21
+ attr_accessor :expires_at
22
+
23
+ # Per-job record cap
24
+ attr_accessor :max_records
25
+
26
+ attr_accessor :metadata
27
+
28
+ # Opaque reference to pass back on POST /rest/v2/bulk/{object}
29
+ attr_accessor :s3_key
30
+
31
+ # Indicates if API call was successful
32
+ attr_accessor :success
33
+
34
+ # Presigned S3 PUT URL (short-lived)
35
+ attr_accessor :upload_url
36
+
37
+ attr_accessor :warning
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'error' => :'error',
43
+ :'expires_at' => :'expires_at',
44
+ :'max_records' => :'max_records',
45
+ :'metadata' => :'metadata',
46
+ :'s3_key' => :'s3_key',
47
+ :'success' => :'success',
48
+ :'upload_url' => :'upload_url',
49
+ :'warning' => :'warning'
50
+ }
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'error' => :'Error',
62
+ :'expires_at' => :'String',
63
+ :'max_records' => :'Integer',
64
+ :'metadata' => :'ResponseMetadata',
65
+ :'s3_key' => :'String',
66
+ :'success' => :'Boolean',
67
+ :'upload_url' => :'String',
68
+ :'warning' => :'Warning'
69
+ }
70
+ end
71
+
72
+ # List of attributes with nullable: true
73
+ def self.openapi_nullable
74
+ Set.new([
75
+ ])
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::BulkUploadUrlResponse` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ attributes = attributes.each_with_object({}) { |(k, v), h|
87
+ if (!self.class.attribute_map.key?(k.to_sym))
88
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::BulkUploadUrlResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
89
+ end
90
+ h[k.to_sym] = v
91
+ }
92
+
93
+ if attributes.key?(:'error')
94
+ self.error = attributes[:'error']
95
+ end
96
+
97
+ if attributes.key?(:'expires_at')
98
+ self.expires_at = attributes[:'expires_at']
99
+ end
100
+
101
+ if attributes.key?(:'max_records')
102
+ self.max_records = attributes[:'max_records']
103
+ end
104
+
105
+ if attributes.key?(:'metadata')
106
+ self.metadata = attributes[:'metadata']
107
+ end
108
+
109
+ if attributes.key?(:'s3_key')
110
+ self.s3_key = attributes[:'s3_key']
111
+ end
112
+
113
+ if attributes.key?(:'success')
114
+ self.success = attributes[:'success']
115
+ end
116
+
117
+ if attributes.key?(:'upload_url')
118
+ self.upload_url = attributes[:'upload_url']
119
+ end
120
+
121
+ if attributes.key?(:'warning')
122
+ self.warning = attributes[:'warning']
123
+ end
124
+ end
125
+
126
+ # Show invalid properties with the reasons. Usually used together with valid?
127
+ # @return Array for valid properties with the reasons
128
+ def list_invalid_properties
129
+ invalid_properties = Array.new
130
+ invalid_properties
131
+ end
132
+
133
+ # Check to see if the all the properties in the model are valid
134
+ # @return true if the model is valid
135
+ def valid?
136
+ true
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ error == o.error &&
145
+ expires_at == o.expires_at &&
146
+ max_records == o.max_records &&
147
+ metadata == o.metadata &&
148
+ s3_key == o.s3_key &&
149
+ success == o.success &&
150
+ upload_url == o.upload_url &&
151
+ warning == o.warning
152
+ end
153
+
154
+ # @see the `==` method
155
+ # @param [Object] Object to be compared
156
+ def eql?(o)
157
+ self == o
158
+ end
159
+
160
+ # Calculates hash code according to all attributes.
161
+ # @return [Integer] Hash code
162
+ def hash
163
+ [error, expires_at, max_records, metadata, s3_key, success, upload_url, warning].hash
164
+ end
165
+
166
+ # Builds the object from hash
167
+ # @param [Hash] attributes Model attributes in the form of hash
168
+ # @return [Object] Returns the model itself
169
+ def self.build_from_hash(attributes)
170
+ new.build_from_hash(attributes)
171
+ end
172
+
173
+ # Builds the object from hash
174
+ # @param [Hash] attributes Model attributes in the form of hash
175
+ # @return [Object] Returns the model itself
176
+ def build_from_hash(attributes)
177
+ return nil unless attributes.is_a?(Hash)
178
+ attributes = attributes.transform_keys(&:to_sym)
179
+ self.class.openapi_types.each_pair do |key, type|
180
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
181
+ self.send("#{key}=", nil)
182
+ elsif type =~ /\AArray<(.*)>/i
183
+ # check to ensure the input is an array given that the attribute
184
+ # is documented as an array but the input is not
185
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
186
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
187
+ end
188
+ elsif !attributes[self.class.attribute_map[key]].nil?
189
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
190
+ end
191
+ end
192
+
193
+ self
194
+ end
195
+
196
+ # Deserializes the data based on type
197
+ # @param string type Data type
198
+ # @param string value Value to be deserialized
199
+ # @return [Object] Deserialized data
200
+ def _deserialize(type, value)
201
+ case type.to_sym
202
+ when :Time
203
+ Time.parse(value)
204
+ when :Date
205
+ Date.parse(value)
206
+ when :String
207
+ value.to_s
208
+ when :Integer
209
+ value.to_i
210
+ when :Float
211
+ value.to_f
212
+ when :Boolean
213
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
214
+ true
215
+ else
216
+ false
217
+ end
218
+ when :Object
219
+ # generic object (usually a Hash), return directly
220
+ value
221
+ when /\AArray<(?<inner_type>.+)>\z/
222
+ inner_type = Regexp.last_match[:inner_type]
223
+ value.map { |v| _deserialize(inner_type, v) }
224
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
225
+ k_type = Regexp.last_match[:k_type]
226
+ v_type = Regexp.last_match[:v_type]
227
+ {}.tap do |hash|
228
+ value.each do |k, v|
229
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
230
+ end
231
+ end
232
+ else # model
233
+ # models (e.g. Pet) or oneOf
234
+ klass = UltracartClient.const_get(type)
235
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
236
+ end
237
+ end
238
+
239
+ # Returns the string representation of the object
240
+ # @return [String] String presentation of the object
241
+ def to_s
242
+ to_hash.to_s
243
+ end
244
+
245
+ # to_body is an alias to to_hash (backward compatibility)
246
+ # @return [Hash] Returns the object in the form of hash
247
+ def to_body
248
+ to_hash
249
+ end
250
+
251
+ # Returns the object in the form of hash
252
+ # @return [Hash] Returns the object in the form of hash
253
+ def to_hash
254
+ hash = {}
255
+ self.class.attribute_map.each_pair do |attr, param|
256
+ value = self.send(attr)
257
+ if value.nil?
258
+ is_nullable = self.class.openapi_nullable.include?(attr)
259
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
260
+ end
261
+
262
+ hash[param] = _to_hash(value)
263
+ end
264
+ hash
265
+ end
266
+
267
+ # Outputs non-array value in the form of hash
268
+ # For object, use to_hash. Otherwise, just return the value
269
+ # @param [Object] value Any valid value
270
+ # @return [Hash] Returns the value in the form of hash
271
+ def _to_hash(value)
272
+ if value.is_a?(Array)
273
+ value.compact.map { |v| _to_hash(v) }
274
+ elsif value.is_a?(Hash)
275
+ {}.tap do |hash|
276
+ value.each { |k, v| hash[k] = _to_hash(v) }
277
+ end
278
+ elsif value.respond_to? :to_hash
279
+ value.to_hash
280
+ else
281
+ value
282
+ end
283
+ end
284
+
285
+ end
286
+
287
+ end
@@ -226,7 +226,7 @@ module UltracartClient
226
226
  # Check to see if the all the properties in the model are valid
227
227
  # @return true if the model is valid
228
228
  def valid?
229
- type_validator = EnumAttributeValidator.new('String', ["message", "notice", "engagement prompt"])
229
+ type_validator = EnumAttributeValidator.new('String', ["message", "notice", "engagement prompt", "tool call"])
230
230
  return false unless type_validator.valid?(@type)
231
231
  true
232
232
  end
@@ -234,7 +234,7 @@ module UltracartClient
234
234
  # Custom attribute writer method checking allowed values (enum).
235
235
  # @param [Object] type Object to be assigned
236
236
  def type=(type)
237
- validator = EnumAttributeValidator.new('String', ["message", "notice", "engagement prompt"])
237
+ validator = EnumAttributeValidator.new('String', ["message", "notice", "engagement prompt", "tool call"])
238
238
  unless validator.valid?(type)
239
239
  fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
240
240
  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.106'
14
+ VERSION = '4.1.110'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -76,6 +76,13 @@ require 'ultracart_api/models/browser'
76
76
  require 'ultracart_api/models/browser_device'
77
77
  require 'ultracart_api/models/browser_os'
78
78
  require 'ultracart_api/models/browser_user_agent'
79
+ require 'ultracart_api/models/bulk_job'
80
+ require 'ultracart_api/models/bulk_job_request'
81
+ require 'ultracart_api/models/bulk_job_response'
82
+ require 'ultracart_api/models/bulk_jobs_response'
83
+ require 'ultracart_api/models/bulk_record'
84
+ require 'ultracart_api/models/bulk_records_response'
85
+ require 'ultracart_api/models/bulk_upload_url_response'
79
86
  require 'ultracart_api/models/cart'
80
87
  require 'ultracart_api/models/cart_affiliate'
81
88
  require 'ultracart_api/models/cart_affirm_checkout_response'
@@ -1035,6 +1042,7 @@ require 'ultracart_api/models/zoho_desk_ticket_summary'
1035
1042
  # APIs
1036
1043
  require 'ultracart_api/api/affiliate_api'
1037
1044
  require 'ultracart_api/api/auto_order_api'
1045
+ require 'ultracart_api/api/bulk_api'
1038
1046
  require 'ultracart_api/api/channel_partner_api'
1039
1047
  require 'ultracart_api/api/checkout_api'
1040
1048
  require 'ultracart_api/api/conversation_api'
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.106
4
+ version: 4.1.110
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-03 00:00:00.000000000 Z
11
+ date: 2026-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -122,6 +122,14 @@ files:
122
122
  - docs/BrowserDevice.md
123
123
  - docs/BrowserOS.md
124
124
  - docs/BrowserUserAgent.md
125
+ - docs/BulkApi.md
126
+ - docs/BulkJob.md
127
+ - docs/BulkJobRequest.md
128
+ - docs/BulkJobResponse.md
129
+ - docs/BulkJobsResponse.md
130
+ - docs/BulkRecord.md
131
+ - docs/BulkRecordsResponse.md
132
+ - docs/BulkUploadUrlResponse.md
125
133
  - docs/Cart.md
126
134
  - docs/CartAffiliate.md
127
135
  - docs/CartAffirmCheckoutResponse.md
@@ -1101,6 +1109,7 @@ files:
1101
1109
  - lib/ultracart_api.rb
1102
1110
  - lib/ultracart_api/api/affiliate_api.rb
1103
1111
  - lib/ultracart_api/api/auto_order_api.rb
1112
+ - lib/ultracart_api/api/bulk_api.rb
1104
1113
  - lib/ultracart_api/api/channel_partner_api.rb
1105
1114
  - lib/ultracart_api/api/checkout_api.rb
1106
1115
  - lib/ultracart_api/api/conversation_api.rb
@@ -1183,6 +1192,13 @@ files:
1183
1192
  - lib/ultracart_api/models/browser_device.rb
1184
1193
  - lib/ultracart_api/models/browser_os.rb
1185
1194
  - lib/ultracart_api/models/browser_user_agent.rb
1195
+ - lib/ultracart_api/models/bulk_job.rb
1196
+ - lib/ultracart_api/models/bulk_job_request.rb
1197
+ - lib/ultracart_api/models/bulk_job_response.rb
1198
+ - lib/ultracart_api/models/bulk_jobs_response.rb
1199
+ - lib/ultracart_api/models/bulk_record.rb
1200
+ - lib/ultracart_api/models/bulk_records_response.rb
1201
+ - lib/ultracart_api/models/bulk_upload_url_response.rb
1186
1202
  - lib/ultracart_api/models/cart.rb
1187
1203
  - lib/ultracart_api/models/cart_affiliate.rb
1188
1204
  - lib/ultracart_api/models/cart_affirm_checkout_response.rb