ultracart_api 4.1.173 → 4.1.175
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.
- checksums.yaml +4 -4
- data/README.md +11 -2
- data/docs/SfvbApi.md +112 -1
- data/docs/SfvbPageRefreshRequest.md +18 -0
- data/docs/SfvbPageRefreshResponse.md +26 -0
- data/docs/SfvbTemplateResolveCandidate.md +20 -0
- data/docs/SfvbTemplateResolvePath.md +24 -0
- data/docs/SfvbTemplateResolveResponse.md +30 -0
- data/lib/ultracart_api/api/sfvb_api.rb +151 -2
- data/lib/ultracart_api/models/sfvb_page_refresh_request.rb +220 -0
- data/lib/ultracart_api/models/sfvb_page_refresh_response.rb +260 -0
- data/lib/ultracart_api/models/sfvb_template_resolve_candidate.rb +230 -0
- data/lib/ultracart_api/models/sfvb_template_resolve_path.rb +252 -0
- data/lib/ultracart_api/models/sfvb_template_resolve_response.rb +282 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +5 -0
- metadata +12 -2
|
@@ -0,0 +1,252 @@
|
|
|
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 SfvbTemplateResolvePath
|
|
18
|
+
# Every file of that name below this path, in the order the storefront searches.
|
|
19
|
+
attr_accessor :candidates
|
|
20
|
+
|
|
21
|
+
# False when the theme has no such directory, so the storefront skips this path.
|
|
22
|
+
attr_accessor :directory_found
|
|
23
|
+
|
|
24
|
+
# The candidate this path supplies, relative to the theme root, or null. It is the first candidate that is not skipped.
|
|
25
|
+
attr_accessor :match
|
|
26
|
+
|
|
27
|
+
# The resource path, relative to the theme root. / is the theme root itself.
|
|
28
|
+
attr_accessor :resource_path
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'candidates' => :'candidates',
|
|
34
|
+
:'directory_found' => :'directory_found',
|
|
35
|
+
:'match' => :'match',
|
|
36
|
+
:'resource_path' => :'resource_path'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns all the JSON keys this model knows about
|
|
41
|
+
def self.acceptable_attributes
|
|
42
|
+
attribute_map.values
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
def self.openapi_types
|
|
47
|
+
{
|
|
48
|
+
:'candidates' => :'Array<SfvbTemplateResolveCandidate>',
|
|
49
|
+
:'directory_found' => :'Boolean',
|
|
50
|
+
:'match' => :'String',
|
|
51
|
+
:'resource_path' => :'String'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbTemplateResolvePath` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbTemplateResolvePath`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
72
|
+
end
|
|
73
|
+
h[k.to_sym] = v
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'candidates')
|
|
77
|
+
if (value = attributes[:'candidates']).is_a?(Array)
|
|
78
|
+
self.candidates = value
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'directory_found')
|
|
83
|
+
self.directory_found = attributes[:'directory_found']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'match')
|
|
87
|
+
self.match = attributes[:'match']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'resource_path')
|
|
91
|
+
self.resource_path = attributes[:'resource_path']
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
96
|
+
# @return Array for valid properties with the reasons
|
|
97
|
+
def list_invalid_properties
|
|
98
|
+
invalid_properties = Array.new
|
|
99
|
+
invalid_properties
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Check to see if the all the properties in the model are valid
|
|
103
|
+
# @return true if the model is valid
|
|
104
|
+
def valid?
|
|
105
|
+
true
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Checks equality by comparing each attribute.
|
|
109
|
+
# @param [Object] Object to be compared
|
|
110
|
+
def ==(o)
|
|
111
|
+
return true if self.equal?(o)
|
|
112
|
+
self.class == o.class &&
|
|
113
|
+
candidates == o.candidates &&
|
|
114
|
+
directory_found == o.directory_found &&
|
|
115
|
+
match == o.match &&
|
|
116
|
+
resource_path == o.resource_path
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# @see the `==` method
|
|
120
|
+
# @param [Object] Object to be compared
|
|
121
|
+
def eql?(o)
|
|
122
|
+
self == o
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Calculates hash code according to all attributes.
|
|
126
|
+
# @return [Integer] Hash code
|
|
127
|
+
def hash
|
|
128
|
+
[candidates, directory_found, match, resource_path].hash
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Builds the object from hash
|
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
133
|
+
# @return [Object] Returns the model itself
|
|
134
|
+
def self.build_from_hash(attributes)
|
|
135
|
+
new.build_from_hash(attributes)
|
|
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 build_from_hash(attributes)
|
|
142
|
+
return nil unless attributes.is_a?(Hash)
|
|
143
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
144
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
145
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
146
|
+
self.send("#{key}=", nil)
|
|
147
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
148
|
+
# check to ensure the input is an array given that the attribute
|
|
149
|
+
# is documented as an array but the input is not
|
|
150
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
151
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
152
|
+
end
|
|
153
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
154
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
self
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Deserializes the data based on type
|
|
162
|
+
# @param string type Data type
|
|
163
|
+
# @param string value Value to be deserialized
|
|
164
|
+
# @return [Object] Deserialized data
|
|
165
|
+
def _deserialize(type, value)
|
|
166
|
+
case type.to_sym
|
|
167
|
+
when :Time
|
|
168
|
+
Time.parse(value)
|
|
169
|
+
when :Date
|
|
170
|
+
Date.parse(value)
|
|
171
|
+
when :String
|
|
172
|
+
value.to_s
|
|
173
|
+
when :Integer
|
|
174
|
+
value.to_i
|
|
175
|
+
when :Float
|
|
176
|
+
value.to_f
|
|
177
|
+
when :Boolean
|
|
178
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
179
|
+
true
|
|
180
|
+
else
|
|
181
|
+
false
|
|
182
|
+
end
|
|
183
|
+
when :Object
|
|
184
|
+
# generic object (usually a Hash), return directly
|
|
185
|
+
value
|
|
186
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
187
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
188
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
189
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
190
|
+
k_type = Regexp.last_match[:k_type]
|
|
191
|
+
v_type = Regexp.last_match[:v_type]
|
|
192
|
+
{}.tap do |hash|
|
|
193
|
+
value.each do |k, v|
|
|
194
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
else # model
|
|
198
|
+
# models (e.g. Pet) or oneOf
|
|
199
|
+
klass = UltracartClient.const_get(type)
|
|
200
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Returns the string representation of the object
|
|
205
|
+
# @return [String] String presentation of the object
|
|
206
|
+
def to_s
|
|
207
|
+
to_hash.to_s
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
|
212
|
+
def to_body
|
|
213
|
+
to_hash
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Returns the object in the form of hash
|
|
217
|
+
# @return [Hash] Returns the object in the form of hash
|
|
218
|
+
def to_hash
|
|
219
|
+
hash = {}
|
|
220
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
221
|
+
value = self.send(attr)
|
|
222
|
+
if value.nil?
|
|
223
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
224
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
hash[param] = _to_hash(value)
|
|
228
|
+
end
|
|
229
|
+
hash
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Outputs non-array value in the form of hash
|
|
233
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
234
|
+
# @param [Object] value Any valid value
|
|
235
|
+
# @return [Hash] Returns the value in the form of hash
|
|
236
|
+
def _to_hash(value)
|
|
237
|
+
if value.is_a?(Array)
|
|
238
|
+
value.compact.map { |v| _to_hash(v) }
|
|
239
|
+
elsif value.is_a?(Hash)
|
|
240
|
+
{}.tap do |hash|
|
|
241
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
242
|
+
end
|
|
243
|
+
elsif value.respond_to? :to_hash
|
|
244
|
+
value.to_hash
|
|
245
|
+
else
|
|
246
|
+
value
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
end
|
|
@@ -0,0 +1,282 @@
|
|
|
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 SfvbTemplateResolveResponse
|
|
18
|
+
# Whether resolved_path is a file. False means a page naming this template cannot render.
|
|
19
|
+
attr_accessor :exists
|
|
20
|
+
|
|
21
|
+
# True when no resource path held the name, so the storefront fell back to the name at the theme root.
|
|
22
|
+
attr_accessor :fallback
|
|
23
|
+
|
|
24
|
+
# The template file name that was resolved, as a page's group_template or item_template holds it.
|
|
25
|
+
attr_accessor :name
|
|
26
|
+
|
|
27
|
+
# The file a page naming this template renders, relative to theme_path. This is the storefront's own answer.
|
|
28
|
+
attr_accessor :resolved_path
|
|
29
|
+
|
|
30
|
+
# The theme's resource paths in search order, each with the files of that name found below it. The first path with a match wins, which is how a theme copy overrides a shared core copy.
|
|
31
|
+
attr_accessor :resource_paths
|
|
32
|
+
|
|
33
|
+
# The theme the name was resolved in.
|
|
34
|
+
attr_accessor :theme_oid
|
|
35
|
+
|
|
36
|
+
# The theme's path in the file manager, such as /themes/Elements/.
|
|
37
|
+
attr_accessor :theme_path
|
|
38
|
+
|
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
|
+
def self.attribute_map
|
|
41
|
+
{
|
|
42
|
+
:'exists' => :'exists',
|
|
43
|
+
:'fallback' => :'fallback',
|
|
44
|
+
:'name' => :'name',
|
|
45
|
+
:'resolved_path' => :'resolved_path',
|
|
46
|
+
:'resource_paths' => :'resource_paths',
|
|
47
|
+
:'theme_oid' => :'theme_oid',
|
|
48
|
+
:'theme_path' => :'theme_path'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns all the JSON keys this model knows about
|
|
53
|
+
def self.acceptable_attributes
|
|
54
|
+
attribute_map.values
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Attribute type mapping.
|
|
58
|
+
def self.openapi_types
|
|
59
|
+
{
|
|
60
|
+
:'exists' => :'Boolean',
|
|
61
|
+
:'fallback' => :'Boolean',
|
|
62
|
+
:'name' => :'String',
|
|
63
|
+
:'resolved_path' => :'String',
|
|
64
|
+
:'resource_paths' => :'Array<SfvbTemplateResolvePath>',
|
|
65
|
+
:'theme_oid' => :'Integer',
|
|
66
|
+
:'theme_path' => :'String'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# List of attributes with nullable: true
|
|
71
|
+
def self.openapi_nullable
|
|
72
|
+
Set.new([
|
|
73
|
+
])
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Initializes the object
|
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
78
|
+
def initialize(attributes = {})
|
|
79
|
+
if (!attributes.is_a?(Hash))
|
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbTemplateResolveResponse` initialize method"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
85
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbTemplateResolveResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
87
|
+
end
|
|
88
|
+
h[k.to_sym] = v
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'exists')
|
|
92
|
+
self.exists = attributes[:'exists']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'fallback')
|
|
96
|
+
self.fallback = attributes[:'fallback']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'name')
|
|
100
|
+
self.name = attributes[:'name']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'resolved_path')
|
|
104
|
+
self.resolved_path = attributes[:'resolved_path']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'resource_paths')
|
|
108
|
+
if (value = attributes[:'resource_paths']).is_a?(Array)
|
|
109
|
+
self.resource_paths = value
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'theme_oid')
|
|
114
|
+
self.theme_oid = attributes[:'theme_oid']
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'theme_path')
|
|
118
|
+
self.theme_path = attributes[:'theme_path']
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
123
|
+
# @return Array for valid properties with the reasons
|
|
124
|
+
def list_invalid_properties
|
|
125
|
+
invalid_properties = Array.new
|
|
126
|
+
invalid_properties
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Check to see if the all the properties in the model are valid
|
|
130
|
+
# @return true if the model is valid
|
|
131
|
+
def valid?
|
|
132
|
+
true
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Checks equality by comparing each attribute.
|
|
136
|
+
# @param [Object] Object to be compared
|
|
137
|
+
def ==(o)
|
|
138
|
+
return true if self.equal?(o)
|
|
139
|
+
self.class == o.class &&
|
|
140
|
+
exists == o.exists &&
|
|
141
|
+
fallback == o.fallback &&
|
|
142
|
+
name == o.name &&
|
|
143
|
+
resolved_path == o.resolved_path &&
|
|
144
|
+
resource_paths == o.resource_paths &&
|
|
145
|
+
theme_oid == o.theme_oid &&
|
|
146
|
+
theme_path == o.theme_path
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# @see the `==` method
|
|
150
|
+
# @param [Object] Object to be compared
|
|
151
|
+
def eql?(o)
|
|
152
|
+
self == o
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Calculates hash code according to all attributes.
|
|
156
|
+
# @return [Integer] Hash code
|
|
157
|
+
def hash
|
|
158
|
+
[exists, fallback, name, resolved_path, resource_paths, theme_oid, theme_path].hash
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Builds the object from hash
|
|
162
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
163
|
+
# @return [Object] Returns the model itself
|
|
164
|
+
def self.build_from_hash(attributes)
|
|
165
|
+
new.build_from_hash(attributes)
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Builds the object from hash
|
|
169
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
170
|
+
# @return [Object] Returns the model itself
|
|
171
|
+
def build_from_hash(attributes)
|
|
172
|
+
return nil unless attributes.is_a?(Hash)
|
|
173
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
174
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
175
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
176
|
+
self.send("#{key}=", nil)
|
|
177
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
178
|
+
# check to ensure the input is an array given that the attribute
|
|
179
|
+
# is documented as an array but the input is not
|
|
180
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
181
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
182
|
+
end
|
|
183
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
184
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
self
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Deserializes the data based on type
|
|
192
|
+
# @param string type Data type
|
|
193
|
+
# @param string value Value to be deserialized
|
|
194
|
+
# @return [Object] Deserialized data
|
|
195
|
+
def _deserialize(type, value)
|
|
196
|
+
case type.to_sym
|
|
197
|
+
when :Time
|
|
198
|
+
Time.parse(value)
|
|
199
|
+
when :Date
|
|
200
|
+
Date.parse(value)
|
|
201
|
+
when :String
|
|
202
|
+
value.to_s
|
|
203
|
+
when :Integer
|
|
204
|
+
value.to_i
|
|
205
|
+
when :Float
|
|
206
|
+
value.to_f
|
|
207
|
+
when :Boolean
|
|
208
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
209
|
+
true
|
|
210
|
+
else
|
|
211
|
+
false
|
|
212
|
+
end
|
|
213
|
+
when :Object
|
|
214
|
+
# generic object (usually a Hash), return directly
|
|
215
|
+
value
|
|
216
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
217
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
218
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
219
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
220
|
+
k_type = Regexp.last_match[:k_type]
|
|
221
|
+
v_type = Regexp.last_match[:v_type]
|
|
222
|
+
{}.tap do |hash|
|
|
223
|
+
value.each do |k, v|
|
|
224
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
else # model
|
|
228
|
+
# models (e.g. Pet) or oneOf
|
|
229
|
+
klass = UltracartClient.const_get(type)
|
|
230
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Returns the string representation of the object
|
|
235
|
+
# @return [String] String presentation of the object
|
|
236
|
+
def to_s
|
|
237
|
+
to_hash.to_s
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
241
|
+
# @return [Hash] Returns the object in the form of hash
|
|
242
|
+
def to_body
|
|
243
|
+
to_hash
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Returns the object in the form of hash
|
|
247
|
+
# @return [Hash] Returns the object in the form of hash
|
|
248
|
+
def to_hash
|
|
249
|
+
hash = {}
|
|
250
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
251
|
+
value = self.send(attr)
|
|
252
|
+
if value.nil?
|
|
253
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
254
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
hash[param] = _to_hash(value)
|
|
258
|
+
end
|
|
259
|
+
hash
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Outputs non-array value in the form of hash
|
|
263
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
264
|
+
# @param [Object] value Any valid value
|
|
265
|
+
# @return [Hash] Returns the value in the form of hash
|
|
266
|
+
def _to_hash(value)
|
|
267
|
+
if value.is_a?(Array)
|
|
268
|
+
value.compact.map { |v| _to_hash(v) }
|
|
269
|
+
elsif value.is_a?(Hash)
|
|
270
|
+
{}.tap do |hash|
|
|
271
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
272
|
+
end
|
|
273
|
+
elsif value.respond_to? :to_hash
|
|
274
|
+
value.to_hash
|
|
275
|
+
else
|
|
276
|
+
value
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -1049,6 +1049,8 @@ require 'ultracart_api/models/sfvb_page_items_response'
|
|
|
1049
1049
|
require 'ultracart_api/models/sfvb_page_list_response'
|
|
1050
1050
|
require 'ultracart_api/models/sfvb_page_multimedia'
|
|
1051
1051
|
require 'ultracart_api/models/sfvb_page_multimedia_request'
|
|
1052
|
+
require 'ultracart_api/models/sfvb_page_refresh_request'
|
|
1053
|
+
require 'ultracart_api/models/sfvb_page_refresh_response'
|
|
1052
1054
|
require 'ultracart_api/models/sfvb_page_response'
|
|
1053
1055
|
require 'ultracart_api/models/sfvb_page_selectors'
|
|
1054
1056
|
require 'ultracart_api/models/sfvb_page_settings_request'
|
|
@@ -1067,6 +1069,9 @@ require 'ultracart_api/models/sfvb_site_attributes_response'
|
|
|
1067
1069
|
require 'ultracart_api/models/sfvb_storefront'
|
|
1068
1070
|
require 'ultracart_api/models/sfvb_storefronts_response'
|
|
1069
1071
|
require 'ultracart_api/models/sfvb_template'
|
|
1072
|
+
require 'ultracart_api/models/sfvb_template_resolve_candidate'
|
|
1073
|
+
require 'ultracart_api/models/sfvb_template_resolve_path'
|
|
1074
|
+
require 'ultracart_api/models/sfvb_template_resolve_response'
|
|
1070
1075
|
require 'ultracart_api/models/sfvb_templates_response'
|
|
1071
1076
|
require 'ultracart_api/models/sfvb_theme'
|
|
1072
1077
|
require 'ultracart_api/models/sfvb_theme_attribute'
|
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.
|
|
4
|
+
version: 4.1.175
|
|
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-
|
|
11
|
+
date: 2026-09-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -1111,6 +1111,8 @@ files:
|
|
|
1111
1111
|
- docs/SfvbPageListResponse.md
|
|
1112
1112
|
- docs/SfvbPageMultimedia.md
|
|
1113
1113
|
- docs/SfvbPageMultimediaRequest.md
|
|
1114
|
+
- docs/SfvbPageRefreshRequest.md
|
|
1115
|
+
- docs/SfvbPageRefreshResponse.md
|
|
1114
1116
|
- docs/SfvbPageResponse.md
|
|
1115
1117
|
- docs/SfvbPageSelectors.md
|
|
1116
1118
|
- docs/SfvbPageSettingsRequest.md
|
|
@@ -1129,6 +1131,9 @@ files:
|
|
|
1129
1131
|
- docs/SfvbStorefront.md
|
|
1130
1132
|
- docs/SfvbStorefrontsResponse.md
|
|
1131
1133
|
- docs/SfvbTemplate.md
|
|
1134
|
+
- docs/SfvbTemplateResolveCandidate.md
|
|
1135
|
+
- docs/SfvbTemplateResolvePath.md
|
|
1136
|
+
- docs/SfvbTemplateResolveResponse.md
|
|
1132
1137
|
- docs/SfvbTemplatesResponse.md
|
|
1133
1138
|
- docs/SfvbTheme.md
|
|
1134
1139
|
- docs/SfvbThemeAttribute.md
|
|
@@ -2314,6 +2319,8 @@ files:
|
|
|
2314
2319
|
- lib/ultracart_api/models/sfvb_page_list_response.rb
|
|
2315
2320
|
- lib/ultracart_api/models/sfvb_page_multimedia.rb
|
|
2316
2321
|
- lib/ultracart_api/models/sfvb_page_multimedia_request.rb
|
|
2322
|
+
- lib/ultracart_api/models/sfvb_page_refresh_request.rb
|
|
2323
|
+
- lib/ultracart_api/models/sfvb_page_refresh_response.rb
|
|
2317
2324
|
- lib/ultracart_api/models/sfvb_page_response.rb
|
|
2318
2325
|
- lib/ultracart_api/models/sfvb_page_selectors.rb
|
|
2319
2326
|
- lib/ultracart_api/models/sfvb_page_settings_request.rb
|
|
@@ -2332,6 +2339,9 @@ files:
|
|
|
2332
2339
|
- lib/ultracart_api/models/sfvb_storefront.rb
|
|
2333
2340
|
- lib/ultracart_api/models/sfvb_storefronts_response.rb
|
|
2334
2341
|
- lib/ultracart_api/models/sfvb_template.rb
|
|
2342
|
+
- lib/ultracart_api/models/sfvb_template_resolve_candidate.rb
|
|
2343
|
+
- lib/ultracart_api/models/sfvb_template_resolve_path.rb
|
|
2344
|
+
- lib/ultracart_api/models/sfvb_template_resolve_response.rb
|
|
2335
2345
|
- lib/ultracart_api/models/sfvb_templates_response.rb
|
|
2336
2346
|
- lib/ultracart_api/models/sfvb_theme.rb
|
|
2337
2347
|
- lib/ultracart_api/models/sfvb_theme_attribute.rb
|