ultracart_api 4.1.154 → 4.1.156

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,290 @@
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 SfvbPreviewAccessResponse
18
+ # One time link on the storefront's own host. Opening it in any browser, including an agent's built in browser with no UltraCart login, gets past the storefront lock and applies the preview session and theme for the rest of that browser's session, then redirects to path. It is a credential until used, so do not paste it anywhere other than the browser that should open it.
19
+ attr_accessor :access_url
20
+
21
+ # Seconds left to open access_url. It stops working after that, and after its first use.
22
+ attr_accessor :expires_in_seconds
23
+
24
+ # Storefront path the browser lands on, after reserved preview parameters are removed.
25
+ attr_accessor :path
26
+
27
+ # The preview session applied, when one was requested.
28
+ attr_accessor :preview_session_id
29
+
30
+ # How long the browser stays in preview once access_url is opened. The remaining life of the preview session, or eight hours when none was given. Ending the preview session ends preview in that browser at its next page. The user and their storefront permission are checked again on every page, so removing either ends it sooner.
31
+ attr_accessor :session_lifetime_seconds
32
+
33
+ # Always true. A second open of access_url returns 410.
34
+ attr_accessor :single_use
35
+
36
+ # The theme shown, when one was requested.
37
+ attr_accessor :theme_oid
38
+
39
+ # Plain language instructions, safe to show a user.
40
+ attr_accessor :usage_note
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ def self.attribute_map
44
+ {
45
+ :'access_url' => :'access_url',
46
+ :'expires_in_seconds' => :'expires_in_seconds',
47
+ :'path' => :'path',
48
+ :'preview_session_id' => :'preview_session_id',
49
+ :'session_lifetime_seconds' => :'session_lifetime_seconds',
50
+ :'single_use' => :'single_use',
51
+ :'theme_oid' => :'theme_oid',
52
+ :'usage_note' => :'usage_note'
53
+ }
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ :'access_url' => :'String',
65
+ :'expires_in_seconds' => :'Integer',
66
+ :'path' => :'String',
67
+ :'preview_session_id' => :'String',
68
+ :'session_lifetime_seconds' => :'Integer',
69
+ :'single_use' => :'Boolean',
70
+ :'theme_oid' => :'Integer',
71
+ :'usage_note' => :'String'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbPreviewAccessResponse` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!self.class.attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbPreviewAccessResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'access_url')
97
+ self.access_url = attributes[:'access_url']
98
+ end
99
+
100
+ if attributes.key?(:'expires_in_seconds')
101
+ self.expires_in_seconds = attributes[:'expires_in_seconds']
102
+ end
103
+
104
+ if attributes.key?(:'path')
105
+ self.path = attributes[:'path']
106
+ end
107
+
108
+ if attributes.key?(:'preview_session_id')
109
+ self.preview_session_id = attributes[:'preview_session_id']
110
+ end
111
+
112
+ if attributes.key?(:'session_lifetime_seconds')
113
+ self.session_lifetime_seconds = attributes[:'session_lifetime_seconds']
114
+ end
115
+
116
+ if attributes.key?(:'single_use')
117
+ self.single_use = attributes[:'single_use']
118
+ end
119
+
120
+ if attributes.key?(:'theme_oid')
121
+ self.theme_oid = attributes[:'theme_oid']
122
+ end
123
+
124
+ if attributes.key?(:'usage_note')
125
+ self.usage_note = attributes[:'usage_note']
126
+ end
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ invalid_properties = Array.new
133
+ invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ true
140
+ end
141
+
142
+ # Checks equality by comparing each attribute.
143
+ # @param [Object] Object to be compared
144
+ def ==(o)
145
+ return true if self.equal?(o)
146
+ self.class == o.class &&
147
+ access_url == o.access_url &&
148
+ expires_in_seconds == o.expires_in_seconds &&
149
+ path == o.path &&
150
+ preview_session_id == o.preview_session_id &&
151
+ session_lifetime_seconds == o.session_lifetime_seconds &&
152
+ single_use == o.single_use &&
153
+ theme_oid == o.theme_oid &&
154
+ usage_note == o.usage_note
155
+ end
156
+
157
+ # @see the `==` method
158
+ # @param [Object] Object to be compared
159
+ def eql?(o)
160
+ self == o
161
+ end
162
+
163
+ # Calculates hash code according to all attributes.
164
+ # @return [Integer] Hash code
165
+ def hash
166
+ [access_url, expires_in_seconds, path, preview_session_id, session_lifetime_seconds, single_use, theme_oid, usage_note].hash
167
+ end
168
+
169
+ # Builds the object from hash
170
+ # @param [Hash] attributes Model attributes in the form of hash
171
+ # @return [Object] Returns the model itself
172
+ def self.build_from_hash(attributes)
173
+ new.build_from_hash(attributes)
174
+ end
175
+
176
+ # Builds the object from hash
177
+ # @param [Hash] attributes Model attributes in the form of hash
178
+ # @return [Object] Returns the model itself
179
+ def build_from_hash(attributes)
180
+ return nil unless attributes.is_a?(Hash)
181
+ attributes = attributes.transform_keys(&:to_sym)
182
+ self.class.openapi_types.each_pair do |key, type|
183
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
184
+ self.send("#{key}=", nil)
185
+ elsif type =~ /\AArray<(.*)>/i
186
+ # check to ensure the input is an array given that the attribute
187
+ # is documented as an array but the input is not
188
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
189
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
190
+ end
191
+ elsif !attributes[self.class.attribute_map[key]].nil?
192
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
193
+ end
194
+ end
195
+
196
+ self
197
+ end
198
+
199
+ # Deserializes the data based on type
200
+ # @param string type Data type
201
+ # @param string value Value to be deserialized
202
+ # @return [Object] Deserialized data
203
+ def _deserialize(type, value)
204
+ case type.to_sym
205
+ when :Time
206
+ Time.parse(value)
207
+ when :Date
208
+ Date.parse(value)
209
+ when :String
210
+ value.to_s
211
+ when :Integer
212
+ value.to_i
213
+ when :Float
214
+ value.to_f
215
+ when :Boolean
216
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
217
+ true
218
+ else
219
+ false
220
+ end
221
+ when :Object
222
+ # generic object (usually a Hash), return directly
223
+ value
224
+ when /\AArray<(?<inner_type>.+)>\z/
225
+ inner_type = Regexp.last_match[:inner_type]
226
+ value.map { |v| _deserialize(inner_type, v) }
227
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
228
+ k_type = Regexp.last_match[:k_type]
229
+ v_type = Regexp.last_match[:v_type]
230
+ {}.tap do |hash|
231
+ value.each do |k, v|
232
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
233
+ end
234
+ end
235
+ else # model
236
+ # models (e.g. Pet) or oneOf
237
+ klass = UltracartClient.const_get(type)
238
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
239
+ end
240
+ end
241
+
242
+ # Returns the string representation of the object
243
+ # @return [String] String presentation of the object
244
+ def to_s
245
+ to_hash.to_s
246
+ end
247
+
248
+ # to_body is an alias to to_hash (backward compatibility)
249
+ # @return [Hash] Returns the object in the form of hash
250
+ def to_body
251
+ to_hash
252
+ end
253
+
254
+ # Returns the object in the form of hash
255
+ # @return [Hash] Returns the object in the form of hash
256
+ def to_hash
257
+ hash = {}
258
+ self.class.attribute_map.each_pair do |attr, param|
259
+ value = self.send(attr)
260
+ if value.nil?
261
+ is_nullable = self.class.openapi_nullable.include?(attr)
262
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
263
+ end
264
+
265
+ hash[param] = _to_hash(value)
266
+ end
267
+ hash
268
+ end
269
+
270
+ # Outputs non-array value in the form of hash
271
+ # For object, use to_hash. Otherwise, just return the value
272
+ # @param [Object] value Any valid value
273
+ # @return [Hash] Returns the value in the form of hash
274
+ def _to_hash(value)
275
+ if value.is_a?(Array)
276
+ value.compact.map { |v| _to_hash(v) }
277
+ elsif value.is_a?(Hash)
278
+ {}.tap do |hash|
279
+ value.each { |k, v| hash[k] = _to_hash(v) }
280
+ end
281
+ elsif value.respond_to? :to_hash
282
+ value.to_hash
283
+ else
284
+ value
285
+ end
286
+ end
287
+
288
+ end
289
+
290
+ end
@@ -36,6 +36,12 @@ module UltracartClient
36
36
  # Most element library results one page returns. Asking for more is silently reduced to this, and unlike the directory listing there is no truncation flag on the response, so this number is the only way to know a larger request was cut.
37
37
  attr_accessor :max_library_results_per_page
38
38
 
39
+ # How deeply store menu entries can nest.
40
+ attr_accessor :max_menu_depth
41
+
42
+ # Most entries one store menu can hold, counting every level of the tree. A menu is navigation that renders on every page, so this is deliberately far below what the storage would physically accept.
43
+ attr_accessor :max_menu_items
44
+
39
45
  # Largest payload one preview session may hold, in bytes.
40
46
  attr_accessor :max_preview_session_bytes
41
47
 
@@ -95,6 +101,8 @@ module UltracartClient
95
101
  :'max_cjson_bytes' => :'max_cjson_bytes',
96
102
  :'max_directory_entries' => :'max_directory_entries',
97
103
  :'max_library_results_per_page' => :'max_library_results_per_page',
104
+ :'max_menu_depth' => :'max_menu_depth',
105
+ :'max_menu_items' => :'max_menu_items',
98
106
  :'max_preview_session_bytes' => :'max_preview_session_bytes',
99
107
  :'max_revertable_bytes' => :'max_revertable_bytes',
100
108
  :'max_search_results' => :'max_search_results',
@@ -122,6 +130,8 @@ module UltracartClient
122
130
  :'max_cjson_bytes' => :'Integer',
123
131
  :'max_directory_entries' => :'Integer',
124
132
  :'max_library_results_per_page' => :'Integer',
133
+ :'max_menu_depth' => :'Integer',
134
+ :'max_menu_items' => :'Integer',
125
135
  :'max_preview_session_bytes' => :'Integer',
126
136
  :'max_revertable_bytes' => :'Integer',
127
137
  :'max_search_results' => :'Integer',
@@ -183,6 +193,14 @@ module UltracartClient
183
193
  self.max_library_results_per_page = attributes[:'max_library_results_per_page']
184
194
  end
185
195
 
196
+ if attributes.key?(:'max_menu_depth')
197
+ self.max_menu_depth = attributes[:'max_menu_depth']
198
+ end
199
+
200
+ if attributes.key?(:'max_menu_items')
201
+ self.max_menu_items = attributes[:'max_menu_items']
202
+ end
203
+
186
204
  if attributes.key?(:'max_preview_session_bytes')
187
205
  self.max_preview_session_bytes = attributes[:'max_preview_session_bytes']
188
206
  end
@@ -257,6 +275,8 @@ module UltracartClient
257
275
  max_cjson_bytes == o.max_cjson_bytes &&
258
276
  max_directory_entries == o.max_directory_entries &&
259
277
  max_library_results_per_page == o.max_library_results_per_page &&
278
+ max_menu_depth == o.max_menu_depth &&
279
+ max_menu_items == o.max_menu_items &&
260
280
  max_preview_session_bytes == o.max_preview_session_bytes &&
261
281
  max_revertable_bytes == o.max_revertable_bytes &&
262
282
  max_search_results == o.max_search_results &&
@@ -277,7 +297,7 @@ module UltracartClient
277
297
  # Calculates hash code according to all attributes.
278
298
  # @return [Integer] Hash code
279
299
  def hash
280
- [container_manager_version, container_versions_retained, element_count, max_asset_bytes, max_cjson_bytes, max_directory_entries, max_library_results_per_page, max_preview_session_bytes, max_revertable_bytes, max_search_results, max_template_bytes, max_text_read_bytes, max_video_bytes, max_widget_ids_per_request, preview_session_ttl_seconds, release].hash
300
+ [container_manager_version, container_versions_retained, element_count, max_asset_bytes, max_cjson_bytes, max_directory_entries, max_library_results_per_page, max_menu_depth, max_menu_items, max_preview_session_bytes, max_revertable_bytes, max_search_results, max_template_bytes, max_text_read_bytes, max_video_bytes, max_widget_ids_per_request, preview_session_ttl_seconds, release].hash
281
301
  end
282
302
 
283
303
  # 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.154'
14
+ VERSION = '4.1.156'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -1004,12 +1004,18 @@ require 'ultracart_api/models/sfvb_files_response'
1004
1004
  require 'ultracart_api/models/sfvb_library_entry'
1005
1005
  require 'ultracart_api/models/sfvb_library_facet'
1006
1006
  require 'ultracart_api/models/sfvb_library_response'
1007
+ require 'ultracart_api/models/sfvb_menu'
1008
+ require 'ultracart_api/models/sfvb_menu_item'
1009
+ require 'ultracart_api/models/sfvb_menu_write_request'
1010
+ require 'ultracart_api/models/sfvb_menus_response'
1007
1011
  require 'ultracart_api/models/sfvb_page_attribute'
1008
1012
  require 'ultracart_api/models/sfvb_page_attribute_update'
1009
1013
  require 'ultracart_api/models/sfvb_page_attribute_update_request'
1010
1014
  require 'ultracart_api/models/sfvb_page_multimedia'
1011
1015
  require 'ultracart_api/models/sfvb_page_multimedia_request'
1012
1016
  require 'ultracart_api/models/sfvb_page_response'
1017
+ require 'ultracart_api/models/sfvb_preview_access_request'
1018
+ require 'ultracart_api/models/sfvb_preview_access_response'
1013
1019
  require 'ultracart_api/models/sfvb_preview_session_request'
1014
1020
  require 'ultracart_api/models/sfvb_preview_session_response'
1015
1021
  require 'ultracart_api/models/sfvb_preview_url_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.154
4
+ version: 4.1.156
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-14 00:00:00.000000000 Z
11
+ date: 2026-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -1066,12 +1066,18 @@ files:
1066
1066
  - docs/SfvbLibraryEntry.md
1067
1067
  - docs/SfvbLibraryFacet.md
1068
1068
  - docs/SfvbLibraryResponse.md
1069
+ - docs/SfvbMenu.md
1070
+ - docs/SfvbMenuItem.md
1071
+ - docs/SfvbMenuWriteRequest.md
1072
+ - docs/SfvbMenusResponse.md
1069
1073
  - docs/SfvbPageAttribute.md
1070
1074
  - docs/SfvbPageAttributeUpdate.md
1071
1075
  - docs/SfvbPageAttributeUpdateRequest.md
1072
1076
  - docs/SfvbPageMultimedia.md
1073
1077
  - docs/SfvbPageMultimediaRequest.md
1074
1078
  - docs/SfvbPageResponse.md
1079
+ - docs/SfvbPreviewAccessRequest.md
1080
+ - docs/SfvbPreviewAccessResponse.md
1075
1081
  - docs/SfvbPreviewSessionRequest.md
1076
1082
  - docs/SfvbPreviewSessionResponse.md
1077
1083
  - docs/SfvbPreviewUrlResponse.md
@@ -2207,12 +2213,18 @@ files:
2207
2213
  - lib/ultracart_api/models/sfvb_library_entry.rb
2208
2214
  - lib/ultracart_api/models/sfvb_library_facet.rb
2209
2215
  - lib/ultracart_api/models/sfvb_library_response.rb
2216
+ - lib/ultracart_api/models/sfvb_menu.rb
2217
+ - lib/ultracart_api/models/sfvb_menu_item.rb
2218
+ - lib/ultracart_api/models/sfvb_menu_write_request.rb
2219
+ - lib/ultracart_api/models/sfvb_menus_response.rb
2210
2220
  - lib/ultracart_api/models/sfvb_page_attribute.rb
2211
2221
  - lib/ultracart_api/models/sfvb_page_attribute_update.rb
2212
2222
  - lib/ultracart_api/models/sfvb_page_attribute_update_request.rb
2213
2223
  - lib/ultracart_api/models/sfvb_page_multimedia.rb
2214
2224
  - lib/ultracart_api/models/sfvb_page_multimedia_request.rb
2215
2225
  - lib/ultracart_api/models/sfvb_page_response.rb
2226
+ - lib/ultracart_api/models/sfvb_preview_access_request.rb
2227
+ - lib/ultracart_api/models/sfvb_preview_access_response.rb
2216
2228
  - lib/ultracart_api/models/sfvb_preview_session_request.rb
2217
2229
  - lib/ultracart_api/models/sfvb_preview_session_response.rb
2218
2230
  - lib/ultracart_api/models/sfvb_preview_url_response.rb