ultracart_api 4.1.252 → 4.1.253
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 +12 -2
- data/docs/SfvbApi.md +168 -2
- data/docs/SfvbApprovalParams.md +6 -0
- data/docs/SfvbPageMoveRequest.md +26 -0
- data/docs/SfvbPageMoveResponse.md +32 -0
- data/docs/SfvbPageResponse.md +4 -0
- data/docs/SfvbPageSettingsRequest.md +6 -0
- data/docs/SfvbSearchFacet.md +26 -0
- data/docs/SfvbSearchFacetUpdate.md +24 -0
- data/docs/SfvbSearchFacetsRequest.md +22 -0
- data/docs/SfvbSearchFacetsResponse.md +30 -0
- data/lib/ultracart_api/api/sfvb_api.rb +224 -4
- data/lib/ultracart_api/models/sfvb_approval_create_request.rb +2 -2
- data/lib/ultracart_api/models/sfvb_approval_params.rb +31 -1
- data/lib/ultracart_api/models/sfvb_page_move_request.rb +294 -0
- data/lib/ultracart_api/models/sfvb_page_move_response.rb +290 -0
- data/lib/ultracart_api/models/sfvb_page_response.rb +22 -1
- data/lib/ultracart_api/models/sfvb_page_settings_request.rb +65 -1
- data/lib/ultracart_api/models/sfvb_search_facet.rb +260 -0
- data/lib/ultracart_api/models/sfvb_search_facet_update.rb +250 -0
- data/lib/ultracart_api/models/sfvb_search_facets_request.rb +244 -0
- data/lib/ultracart_api/models/sfvb_search_facets_response.rb +286 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +6 -0
- metadata +14 -2
|
@@ -0,0 +1,244 @@
|
|
|
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 SfvbSearchFacetsRequest
|
|
18
|
+
# The Cost facet price breaks, 1 to 20 whole amounts in the base currency, each 1 to 10,000,000, smallest first. Replaces the list.
|
|
19
|
+
attr_accessor :cost_price_points
|
|
20
|
+
|
|
21
|
+
# True to check the change and report it without saving.
|
|
22
|
+
attr_accessor :dry_run
|
|
23
|
+
|
|
24
|
+
# The facets to change.
|
|
25
|
+
attr_accessor :facets
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'cost_price_points' => :'cost_price_points',
|
|
31
|
+
:'dry_run' => :'dry_run',
|
|
32
|
+
:'facets' => :'facets'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'cost_price_points' => :'Array<Integer>',
|
|
45
|
+
:'dry_run' => :'Boolean',
|
|
46
|
+
:'facets' => :'Array<SfvbSearchFacetUpdate>'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbSearchFacetsRequest` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbSearchFacetsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'cost_price_points')
|
|
72
|
+
if (value = attributes[:'cost_price_points']).is_a?(Array)
|
|
73
|
+
self.cost_price_points = value
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'dry_run')
|
|
78
|
+
self.dry_run = attributes[:'dry_run']
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'facets')
|
|
82
|
+
if (value = attributes[:'facets']).is_a?(Array)
|
|
83
|
+
self.facets = value
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
89
|
+
# @return Array for valid properties with the reasons
|
|
90
|
+
def list_invalid_properties
|
|
91
|
+
invalid_properties = Array.new
|
|
92
|
+
invalid_properties
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Check to see if the all the properties in the model are valid
|
|
96
|
+
# @return true if the model is valid
|
|
97
|
+
def valid?
|
|
98
|
+
true
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Checks equality by comparing each attribute.
|
|
102
|
+
# @param [Object] Object to be compared
|
|
103
|
+
def ==(o)
|
|
104
|
+
return true if self.equal?(o)
|
|
105
|
+
self.class == o.class &&
|
|
106
|
+
cost_price_points == o.cost_price_points &&
|
|
107
|
+
dry_run == o.dry_run &&
|
|
108
|
+
facets == o.facets
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# @see the `==` method
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def eql?(o)
|
|
114
|
+
self == o
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Calculates hash code according to all attributes.
|
|
118
|
+
# @return [Integer] Hash code
|
|
119
|
+
def hash
|
|
120
|
+
[cost_price_points, dry_run, facets].hash
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Builds the object from hash
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
# @return [Object] Returns the model itself
|
|
126
|
+
def self.build_from_hash(attributes)
|
|
127
|
+
new.build_from_hash(attributes)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Builds the object from hash
|
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
132
|
+
# @return [Object] Returns the model itself
|
|
133
|
+
def build_from_hash(attributes)
|
|
134
|
+
return nil unless attributes.is_a?(Hash)
|
|
135
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
136
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
137
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
138
|
+
self.send("#{key}=", nil)
|
|
139
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
140
|
+
# check to ensure the input is an array given that the attribute
|
|
141
|
+
# is documented as an array but the input is not
|
|
142
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
143
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
144
|
+
end
|
|
145
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
146
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
self
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Deserializes the data based on type
|
|
154
|
+
# @param string type Data type
|
|
155
|
+
# @param string value Value to be deserialized
|
|
156
|
+
# @return [Object] Deserialized data
|
|
157
|
+
def _deserialize(type, value)
|
|
158
|
+
case type.to_sym
|
|
159
|
+
when :Time
|
|
160
|
+
Time.parse(value)
|
|
161
|
+
when :Date
|
|
162
|
+
Date.parse(value)
|
|
163
|
+
when :String
|
|
164
|
+
value.to_s
|
|
165
|
+
when :Integer
|
|
166
|
+
value.to_i
|
|
167
|
+
when :Float
|
|
168
|
+
value.to_f
|
|
169
|
+
when :Boolean
|
|
170
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
171
|
+
true
|
|
172
|
+
else
|
|
173
|
+
false
|
|
174
|
+
end
|
|
175
|
+
when :Object
|
|
176
|
+
# generic object (usually a Hash), return directly
|
|
177
|
+
value
|
|
178
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
179
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
180
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
181
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
182
|
+
k_type = Regexp.last_match[:k_type]
|
|
183
|
+
v_type = Regexp.last_match[:v_type]
|
|
184
|
+
{}.tap do |hash|
|
|
185
|
+
value.each do |k, v|
|
|
186
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
else # model
|
|
190
|
+
# models (e.g. Pet) or oneOf
|
|
191
|
+
klass = UltracartClient.const_get(type)
|
|
192
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Returns the string representation of the object
|
|
197
|
+
# @return [String] String presentation of the object
|
|
198
|
+
def to_s
|
|
199
|
+
to_hash.to_s
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
|
204
|
+
def to_body
|
|
205
|
+
to_hash
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Returns the object in the form of hash
|
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
|
210
|
+
def to_hash
|
|
211
|
+
hash = {}
|
|
212
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
213
|
+
value = self.send(attr)
|
|
214
|
+
if value.nil?
|
|
215
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
216
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
hash[param] = _to_hash(value)
|
|
220
|
+
end
|
|
221
|
+
hash
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Outputs non-array value in the form of hash
|
|
225
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
226
|
+
# @param [Object] value Any valid value
|
|
227
|
+
# @return [Hash] Returns the value in the form of hash
|
|
228
|
+
def _to_hash(value)
|
|
229
|
+
if value.is_a?(Array)
|
|
230
|
+
value.compact.map { |v| _to_hash(v) }
|
|
231
|
+
elsif value.is_a?(Hash)
|
|
232
|
+
{}.tap do |hash|
|
|
233
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
234
|
+
end
|
|
235
|
+
elsif value.respond_to? :to_hash
|
|
236
|
+
value.to_hash
|
|
237
|
+
else
|
|
238
|
+
value
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
end
|
|
@@ -0,0 +1,286 @@
|
|
|
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 SfvbSearchFacetsResponse
|
|
18
|
+
# After a change, the facets it changed.
|
|
19
|
+
attr_accessor :changed_facets
|
|
20
|
+
|
|
21
|
+
# The Cost facet price breaks, smallest first.
|
|
22
|
+
attr_accessor :cost_price_points
|
|
23
|
+
|
|
24
|
+
# True when nothing was saved.
|
|
25
|
+
attr_accessor :dry_run
|
|
26
|
+
|
|
27
|
+
# Every facet the storefront can offer, in the fixed order shoppers see them.
|
|
28
|
+
attr_accessor :facets
|
|
29
|
+
|
|
30
|
+
# Hash of the facets and price points. Send it as If-Match on a change.
|
|
31
|
+
attr_accessor :hash_sha256
|
|
32
|
+
|
|
33
|
+
# After a change, true when the price points changed.
|
|
34
|
+
attr_accessor :price_points_changed
|
|
35
|
+
|
|
36
|
+
# After a change, the search index rebuild it started. none, quick (minutes, small catalogs), slow (the regular rebuild cycle) or failed (the change is saved but the rebuild could not be started; save again or contact support).
|
|
37
|
+
attr_accessor :rebuild
|
|
38
|
+
|
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
|
+
def self.attribute_map
|
|
41
|
+
{
|
|
42
|
+
:'changed_facets' => :'changed_facets',
|
|
43
|
+
:'cost_price_points' => :'cost_price_points',
|
|
44
|
+
:'dry_run' => :'dry_run',
|
|
45
|
+
:'facets' => :'facets',
|
|
46
|
+
:'hash_sha256' => :'hash_sha256',
|
|
47
|
+
:'price_points_changed' => :'price_points_changed',
|
|
48
|
+
:'rebuild' => :'rebuild'
|
|
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
|
+
:'changed_facets' => :'Array<String>',
|
|
61
|
+
:'cost_price_points' => :'Array<Integer>',
|
|
62
|
+
:'dry_run' => :'Boolean',
|
|
63
|
+
:'facets' => :'Array<SfvbSearchFacet>',
|
|
64
|
+
:'hash_sha256' => :'String',
|
|
65
|
+
:'price_points_changed' => :'Boolean',
|
|
66
|
+
:'rebuild' => :'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::SfvbSearchFacetsResponse` 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::SfvbSearchFacetsResponse`. 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?(:'changed_facets')
|
|
92
|
+
if (value = attributes[:'changed_facets']).is_a?(Array)
|
|
93
|
+
self.changed_facets = value
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'cost_price_points')
|
|
98
|
+
if (value = attributes[:'cost_price_points']).is_a?(Array)
|
|
99
|
+
self.cost_price_points = value
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'dry_run')
|
|
104
|
+
self.dry_run = attributes[:'dry_run']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'facets')
|
|
108
|
+
if (value = attributes[:'facets']).is_a?(Array)
|
|
109
|
+
self.facets = value
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'hash_sha256')
|
|
114
|
+
self.hash_sha256 = attributes[:'hash_sha256']
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'price_points_changed')
|
|
118
|
+
self.price_points_changed = attributes[:'price_points_changed']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'rebuild')
|
|
122
|
+
self.rebuild = attributes[:'rebuild']
|
|
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
|
+
changed_facets == o.changed_facets &&
|
|
145
|
+
cost_price_points == o.cost_price_points &&
|
|
146
|
+
dry_run == o.dry_run &&
|
|
147
|
+
facets == o.facets &&
|
|
148
|
+
hash_sha256 == o.hash_sha256 &&
|
|
149
|
+
price_points_changed == o.price_points_changed &&
|
|
150
|
+
rebuild == o.rebuild
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# @see the `==` method
|
|
154
|
+
# @param [Object] Object to be compared
|
|
155
|
+
def eql?(o)
|
|
156
|
+
self == o
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Calculates hash code according to all attributes.
|
|
160
|
+
# @return [Integer] Hash code
|
|
161
|
+
def hash
|
|
162
|
+
[changed_facets, cost_price_points, dry_run, facets, hash_sha256, price_points_changed, rebuild].hash
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Builds the object from hash
|
|
166
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
167
|
+
# @return [Object] Returns the model itself
|
|
168
|
+
def self.build_from_hash(attributes)
|
|
169
|
+
new.build_from_hash(attributes)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Builds the object from hash
|
|
173
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
174
|
+
# @return [Object] Returns the model itself
|
|
175
|
+
def build_from_hash(attributes)
|
|
176
|
+
return nil unless attributes.is_a?(Hash)
|
|
177
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
178
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
179
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
180
|
+
self.send("#{key}=", nil)
|
|
181
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
182
|
+
# check to ensure the input is an array given that the attribute
|
|
183
|
+
# is documented as an array but the input is not
|
|
184
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
185
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
186
|
+
end
|
|
187
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
188
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
self
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Deserializes the data based on type
|
|
196
|
+
# @param string type Data type
|
|
197
|
+
# @param string value Value to be deserialized
|
|
198
|
+
# @return [Object] Deserialized data
|
|
199
|
+
def _deserialize(type, value)
|
|
200
|
+
case type.to_sym
|
|
201
|
+
when :Time
|
|
202
|
+
Time.parse(value)
|
|
203
|
+
when :Date
|
|
204
|
+
Date.parse(value)
|
|
205
|
+
when :String
|
|
206
|
+
value.to_s
|
|
207
|
+
when :Integer
|
|
208
|
+
value.to_i
|
|
209
|
+
when :Float
|
|
210
|
+
value.to_f
|
|
211
|
+
when :Boolean
|
|
212
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
213
|
+
true
|
|
214
|
+
else
|
|
215
|
+
false
|
|
216
|
+
end
|
|
217
|
+
when :Object
|
|
218
|
+
# generic object (usually a Hash), return directly
|
|
219
|
+
value
|
|
220
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
221
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
222
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
223
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
224
|
+
k_type = Regexp.last_match[:k_type]
|
|
225
|
+
v_type = Regexp.last_match[:v_type]
|
|
226
|
+
{}.tap do |hash|
|
|
227
|
+
value.each do |k, v|
|
|
228
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
else # model
|
|
232
|
+
# models (e.g. Pet) or oneOf
|
|
233
|
+
klass = UltracartClient.const_get(type)
|
|
234
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Returns the string representation of the object
|
|
239
|
+
# @return [String] String presentation of the object
|
|
240
|
+
def to_s
|
|
241
|
+
to_hash.to_s
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
245
|
+
# @return [Hash] Returns the object in the form of hash
|
|
246
|
+
def to_body
|
|
247
|
+
to_hash
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Returns the object in the form of hash
|
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
|
252
|
+
def to_hash
|
|
253
|
+
hash = {}
|
|
254
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
255
|
+
value = self.send(attr)
|
|
256
|
+
if value.nil?
|
|
257
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
258
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
hash[param] = _to_hash(value)
|
|
262
|
+
end
|
|
263
|
+
hash
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Outputs non-array value in the form of hash
|
|
267
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
268
|
+
# @param [Object] value Any valid value
|
|
269
|
+
# @return [Hash] Returns the value in the form of hash
|
|
270
|
+
def _to_hash(value)
|
|
271
|
+
if value.is_a?(Array)
|
|
272
|
+
value.compact.map { |v| _to_hash(v) }
|
|
273
|
+
elsif value.is_a?(Hash)
|
|
274
|
+
{}.tap do |hash|
|
|
275
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
276
|
+
end
|
|
277
|
+
elsif value.respond_to? :to_hash
|
|
278
|
+
value.to_hash
|
|
279
|
+
else
|
|
280
|
+
value
|
|
281
|
+
end
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -1231,6 +1231,8 @@ require 'ultracart_api/models/sfvb_page_items_add_request'
|
|
|
1231
1231
|
require 'ultracart_api/models/sfvb_page_items_remove_request'
|
|
1232
1232
|
require 'ultracart_api/models/sfvb_page_items_response'
|
|
1233
1233
|
require 'ultracart_api/models/sfvb_page_list_response'
|
|
1234
|
+
require 'ultracart_api/models/sfvb_page_move_request'
|
|
1235
|
+
require 'ultracart_api/models/sfvb_page_move_response'
|
|
1234
1236
|
require 'ultracart_api/models/sfvb_page_multimedia'
|
|
1235
1237
|
require 'ultracart_api/models/sfvb_page_multimedia_request'
|
|
1236
1238
|
require 'ultracart_api/models/sfvb_page_refresh_request'
|
|
@@ -1279,6 +1281,10 @@ require 'ultracart_api/models/sfvb_redirects_response'
|
|
|
1279
1281
|
require 'ultracart_api/models/sfvb_render_request'
|
|
1280
1282
|
require 'ultracart_api/models/sfvb_render_response'
|
|
1281
1283
|
require 'ultracart_api/models/sfvb_robots_txt'
|
|
1284
|
+
require 'ultracart_api/models/sfvb_search_facet'
|
|
1285
|
+
require 'ultracart_api/models/sfvb_search_facet_update'
|
|
1286
|
+
require 'ultracart_api/models/sfvb_search_facets_request'
|
|
1287
|
+
require 'ultracart_api/models/sfvb_search_facets_response'
|
|
1282
1288
|
require 'ultracart_api/models/sfvb_secret_handle'
|
|
1283
1289
|
require 'ultracart_api/models/sfvb_secret_kind'
|
|
1284
1290
|
require 'ultracart_api/models/sfvb_secret_kinds_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.
|
|
4
|
+
version: 4.1.253
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -1293,6 +1293,8 @@ files:
|
|
|
1293
1293
|
- docs/SfvbPageItemsRemoveRequest.md
|
|
1294
1294
|
- docs/SfvbPageItemsResponse.md
|
|
1295
1295
|
- docs/SfvbPageListResponse.md
|
|
1296
|
+
- docs/SfvbPageMoveRequest.md
|
|
1297
|
+
- docs/SfvbPageMoveResponse.md
|
|
1296
1298
|
- docs/SfvbPageMultimedia.md
|
|
1297
1299
|
- docs/SfvbPageMultimediaRequest.md
|
|
1298
1300
|
- docs/SfvbPageRefreshRequest.md
|
|
@@ -1341,6 +1343,10 @@ files:
|
|
|
1341
1343
|
- docs/SfvbRenderRequest.md
|
|
1342
1344
|
- docs/SfvbRenderResponse.md
|
|
1343
1345
|
- docs/SfvbRobotsTxt.md
|
|
1346
|
+
- docs/SfvbSearchFacet.md
|
|
1347
|
+
- docs/SfvbSearchFacetUpdate.md
|
|
1348
|
+
- docs/SfvbSearchFacetsRequest.md
|
|
1349
|
+
- docs/SfvbSearchFacetsResponse.md
|
|
1344
1350
|
- docs/SfvbSecretHandle.md
|
|
1345
1351
|
- docs/SfvbSecretKind.md
|
|
1346
1352
|
- docs/SfvbSecretKindsResponse.md
|
|
@@ -2797,6 +2803,8 @@ files:
|
|
|
2797
2803
|
- lib/ultracart_api/models/sfvb_page_items_remove_request.rb
|
|
2798
2804
|
- lib/ultracart_api/models/sfvb_page_items_response.rb
|
|
2799
2805
|
- lib/ultracart_api/models/sfvb_page_list_response.rb
|
|
2806
|
+
- lib/ultracart_api/models/sfvb_page_move_request.rb
|
|
2807
|
+
- lib/ultracart_api/models/sfvb_page_move_response.rb
|
|
2800
2808
|
- lib/ultracart_api/models/sfvb_page_multimedia.rb
|
|
2801
2809
|
- lib/ultracart_api/models/sfvb_page_multimedia_request.rb
|
|
2802
2810
|
- lib/ultracart_api/models/sfvb_page_refresh_request.rb
|
|
@@ -2845,6 +2853,10 @@ files:
|
|
|
2845
2853
|
- lib/ultracart_api/models/sfvb_render_request.rb
|
|
2846
2854
|
- lib/ultracart_api/models/sfvb_render_response.rb
|
|
2847
2855
|
- lib/ultracart_api/models/sfvb_robots_txt.rb
|
|
2856
|
+
- lib/ultracart_api/models/sfvb_search_facet.rb
|
|
2857
|
+
- lib/ultracart_api/models/sfvb_search_facet_update.rb
|
|
2858
|
+
- lib/ultracart_api/models/sfvb_search_facets_request.rb
|
|
2859
|
+
- lib/ultracart_api/models/sfvb_search_facets_response.rb
|
|
2848
2860
|
- lib/ultracart_api/models/sfvb_secret_handle.rb
|
|
2849
2861
|
- lib/ultracart_api/models/sfvb_secret_kind.rb
|
|
2850
2862
|
- lib/ultracart_api/models/sfvb_secret_kinds_response.rb
|