ultracart_api 4.1.239 → 4.1.240
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 +27 -2
- data/docs/SfvbApi.md +337 -0
- data/docs/SfvbApprovalCreateRequest.md +4 -0
- data/docs/SfvbItemChildCreateRequest.md +26 -0
- data/docs/SfvbItemChildCreateResponse.md +36 -0
- data/docs/SfvbItemDefaultPageRequest.md +20 -0
- data/docs/SfvbItemDefaultPageResponse.md +36 -0
- data/docs/SfvbItemDefaultPageResult.md +40 -0
- data/docs/SfvbItemDefaultPageRow.md +28 -0
- data/docs/SfvbItemPageAssignment.md +28 -0
- data/docs/SfvbItemPages.md +28 -0
- data/docs/SfvbItemVariationAxis.md +22 -0
- data/docs/SfvbItemVariationChange.md +40 -0
- data/docs/SfvbItemVariationChangeResult.md +24 -0
- data/docs/SfvbItemVariationChild.md +22 -0
- data/docs/SfvbItemVariationCombination.md +24 -0
- data/docs/SfvbItemVariationOption.md +22 -0
- data/docs/SfvbItemVariationValue.md +20 -0
- data/docs/SfvbItemVariations.md +30 -0
- data/docs/SfvbItemVariationsRequest.md +20 -0
- data/docs/SfvbItemVariationsResponse.md +38 -0
- data/lib/ultracart_api/api/sfvb_api.rb +459 -0
- data/lib/ultracart_api/models/sfvb_approval_create_request.rb +24 -3
- data/lib/ultracart_api/models/sfvb_item_child_create_request.rb +260 -0
- data/lib/ultracart_api/models/sfvb_item_child_create_response.rb +309 -0
- data/lib/ultracart_api/models/sfvb_item_default_page_request.rb +232 -0
- data/lib/ultracart_api/models/sfvb_item_default_page_response.rb +312 -0
- data/lib/ultracart_api/models/sfvb_item_default_page_result.rb +330 -0
- data/lib/ultracart_api/models/sfvb_item_default_page_row.rb +270 -0
- data/lib/ultracart_api/models/sfvb_item_page_assignment.rb +270 -0
- data/lib/ultracart_api/models/sfvb_item_pages.rb +274 -0
- data/lib/ultracart_api/models/sfvb_item_variation_axis.rb +242 -0
- data/lib/ultracart_api/models/sfvb_item_variation_change.rb +334 -0
- data/lib/ultracart_api/models/sfvb_item_variation_change_result.rb +250 -0
- data/lib/ultracart_api/models/sfvb_item_variation_child.rb +240 -0
- data/lib/ultracart_api/models/sfvb_item_variation_combination.rb +251 -0
- data/lib/ultracart_api/models/sfvb_item_variation_option.rb +240 -0
- data/lib/ultracart_api/models/sfvb_item_variation_value.rb +230 -0
- data/lib/ultracart_api/models/sfvb_item_variations.rb +284 -0
- data/lib/ultracart_api/models/sfvb_item_variations_request.rb +232 -0
- data/lib/ultracart_api/models/sfvb_item_variations_response.rb +328 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +18 -0
- metadata +37 -1
|
@@ -0,0 +1,232 @@
|
|
|
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 SfvbItemVariationsRequest
|
|
18
|
+
# The changes, applied in order. All are checked before anything is saved.
|
|
19
|
+
attr_accessor :changes
|
|
20
|
+
|
|
21
|
+
# True to check and plan without saving.
|
|
22
|
+
attr_accessor :dry_run
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'changes' => :'changes',
|
|
28
|
+
:'dry_run' => :'dry_run'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'changes' => :'Array<SfvbItemVariationChange>',
|
|
41
|
+
:'dry_run' => :'Boolean'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbItemVariationsRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbItemVariationsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'changes')
|
|
67
|
+
if (value = attributes[:'changes']).is_a?(Array)
|
|
68
|
+
self.changes = value
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'dry_run')
|
|
73
|
+
self.dry_run = attributes[:'dry_run']
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
78
|
+
# @return Array for valid properties with the reasons
|
|
79
|
+
def list_invalid_properties
|
|
80
|
+
invalid_properties = Array.new
|
|
81
|
+
invalid_properties
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Check to see if the all the properties in the model are valid
|
|
85
|
+
# @return true if the model is valid
|
|
86
|
+
def valid?
|
|
87
|
+
true
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Checks equality by comparing each attribute.
|
|
91
|
+
# @param [Object] Object to be compared
|
|
92
|
+
def ==(o)
|
|
93
|
+
return true if self.equal?(o)
|
|
94
|
+
self.class == o.class &&
|
|
95
|
+
changes == o.changes &&
|
|
96
|
+
dry_run == o.dry_run
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# @see the `==` method
|
|
100
|
+
# @param [Object] Object to be compared
|
|
101
|
+
def eql?(o)
|
|
102
|
+
self == o
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Calculates hash code according to all attributes.
|
|
106
|
+
# @return [Integer] Hash code
|
|
107
|
+
def hash
|
|
108
|
+
[changes, dry_run].hash
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Builds the object from hash
|
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
113
|
+
# @return [Object] Returns the model itself
|
|
114
|
+
def self.build_from_hash(attributes)
|
|
115
|
+
new.build_from_hash(attributes)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Builds the object from hash
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
# @return [Object] Returns the model itself
|
|
121
|
+
def build_from_hash(attributes)
|
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
|
123
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
124
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
125
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
126
|
+
self.send("#{key}=", nil)
|
|
127
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
128
|
+
# check to ensure the input is an array given that the attribute
|
|
129
|
+
# is documented as an array but the input is not
|
|
130
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
131
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
132
|
+
end
|
|
133
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
134
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
self
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Deserializes the data based on type
|
|
142
|
+
# @param string type Data type
|
|
143
|
+
# @param string value Value to be deserialized
|
|
144
|
+
# @return [Object] Deserialized data
|
|
145
|
+
def _deserialize(type, value)
|
|
146
|
+
case type.to_sym
|
|
147
|
+
when :Time
|
|
148
|
+
Time.parse(value)
|
|
149
|
+
when :Date
|
|
150
|
+
Date.parse(value)
|
|
151
|
+
when :String
|
|
152
|
+
value.to_s
|
|
153
|
+
when :Integer
|
|
154
|
+
value.to_i
|
|
155
|
+
when :Float
|
|
156
|
+
value.to_f
|
|
157
|
+
when :Boolean
|
|
158
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
159
|
+
true
|
|
160
|
+
else
|
|
161
|
+
false
|
|
162
|
+
end
|
|
163
|
+
when :Object
|
|
164
|
+
# generic object (usually a Hash), return directly
|
|
165
|
+
value
|
|
166
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
167
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
168
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
169
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
170
|
+
k_type = Regexp.last_match[:k_type]
|
|
171
|
+
v_type = Regexp.last_match[:v_type]
|
|
172
|
+
{}.tap do |hash|
|
|
173
|
+
value.each do |k, v|
|
|
174
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
else # model
|
|
178
|
+
# models (e.g. Pet) or oneOf
|
|
179
|
+
klass = UltracartClient.const_get(type)
|
|
180
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Returns the string representation of the object
|
|
185
|
+
# @return [String] String presentation of the object
|
|
186
|
+
def to_s
|
|
187
|
+
to_hash.to_s
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
|
192
|
+
def to_body
|
|
193
|
+
to_hash
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Returns the object in the form of hash
|
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
|
198
|
+
def to_hash
|
|
199
|
+
hash = {}
|
|
200
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
201
|
+
value = self.send(attr)
|
|
202
|
+
if value.nil?
|
|
203
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
204
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
hash[param] = _to_hash(value)
|
|
208
|
+
end
|
|
209
|
+
hash
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Outputs non-array value in the form of hash
|
|
213
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
214
|
+
# @param [Object] value Any valid value
|
|
215
|
+
# @return [Hash] Returns the value in the form of hash
|
|
216
|
+
def _to_hash(value)
|
|
217
|
+
if value.is_a?(Array)
|
|
218
|
+
value.compact.map { |v| _to_hash(v) }
|
|
219
|
+
elsif value.is_a?(Hash)
|
|
220
|
+
{}.tap do |hash|
|
|
221
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
222
|
+
end
|
|
223
|
+
elsif value.respond_to? :to_hash
|
|
224
|
+
value.to_hash
|
|
225
|
+
else
|
|
226
|
+
value
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
end
|
|
@@ -0,0 +1,328 @@
|
|
|
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 SfvbItemVariationsResponse
|
|
18
|
+
# True when the change needs an approved item.variations request.
|
|
19
|
+
attr_accessor :approval_needed
|
|
20
|
+
|
|
21
|
+
# The axes in order.
|
|
22
|
+
attr_accessor :axes
|
|
23
|
+
|
|
24
|
+
# What each change did, or would do on a dry run.
|
|
25
|
+
attr_accessor :changes
|
|
26
|
+
|
|
27
|
+
# Every filled combination.
|
|
28
|
+
attr_accessor :combinations
|
|
29
|
+
|
|
30
|
+
# The parent item's description.
|
|
31
|
+
attr_accessor :description
|
|
32
|
+
|
|
33
|
+
# True when nothing was saved.
|
|
34
|
+
attr_accessor :dry_run
|
|
35
|
+
|
|
36
|
+
# Hash of the variations as returned.
|
|
37
|
+
attr_accessor :hash_sha256
|
|
38
|
+
|
|
39
|
+
# The parent item's id.
|
|
40
|
+
attr_accessor :merchant_item_id
|
|
41
|
+
|
|
42
|
+
# The parent item's oid.
|
|
43
|
+
attr_accessor :merchant_item_oid
|
|
44
|
+
|
|
45
|
+
# How many combinations of the options have no child.
|
|
46
|
+
attr_accessor :unfilled_combinations
|
|
47
|
+
|
|
48
|
+
# Things worth knowing, such as combinations left unfilled.
|
|
49
|
+
attr_accessor :warnings
|
|
50
|
+
|
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
52
|
+
def self.attribute_map
|
|
53
|
+
{
|
|
54
|
+
:'approval_needed' => :'approval_needed',
|
|
55
|
+
:'axes' => :'axes',
|
|
56
|
+
:'changes' => :'changes',
|
|
57
|
+
:'combinations' => :'combinations',
|
|
58
|
+
:'description' => :'description',
|
|
59
|
+
:'dry_run' => :'dry_run',
|
|
60
|
+
:'hash_sha256' => :'hash_sha256',
|
|
61
|
+
:'merchant_item_id' => :'merchant_item_id',
|
|
62
|
+
:'merchant_item_oid' => :'merchant_item_oid',
|
|
63
|
+
:'unfilled_combinations' => :'unfilled_combinations',
|
|
64
|
+
:'warnings' => :'warnings'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Returns all the JSON keys this model knows about
|
|
69
|
+
def self.acceptable_attributes
|
|
70
|
+
attribute_map.values
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Attribute type mapping.
|
|
74
|
+
def self.openapi_types
|
|
75
|
+
{
|
|
76
|
+
:'approval_needed' => :'Boolean',
|
|
77
|
+
:'axes' => :'Array<SfvbItemVariationAxis>',
|
|
78
|
+
:'changes' => :'Array<SfvbItemVariationChangeResult>',
|
|
79
|
+
:'combinations' => :'Array<SfvbItemVariationCombination>',
|
|
80
|
+
:'description' => :'String',
|
|
81
|
+
:'dry_run' => :'Boolean',
|
|
82
|
+
:'hash_sha256' => :'String',
|
|
83
|
+
:'merchant_item_id' => :'String',
|
|
84
|
+
:'merchant_item_oid' => :'Integer',
|
|
85
|
+
:'unfilled_combinations' => :'Integer',
|
|
86
|
+
:'warnings' => :'Array<String>'
|
|
87
|
+
}
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# List of attributes with nullable: true
|
|
91
|
+
def self.openapi_nullable
|
|
92
|
+
Set.new([
|
|
93
|
+
])
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Initializes the object
|
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
98
|
+
def initialize(attributes = {})
|
|
99
|
+
if (!attributes.is_a?(Hash))
|
|
100
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbItemVariationsResponse` initialize method"
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
104
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
105
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
106
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbItemVariationsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
107
|
+
end
|
|
108
|
+
h[k.to_sym] = v
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'approval_needed')
|
|
112
|
+
self.approval_needed = attributes[:'approval_needed']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'axes')
|
|
116
|
+
if (value = attributes[:'axes']).is_a?(Array)
|
|
117
|
+
self.axes = value
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'changes')
|
|
122
|
+
if (value = attributes[:'changes']).is_a?(Array)
|
|
123
|
+
self.changes = value
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'combinations')
|
|
128
|
+
if (value = attributes[:'combinations']).is_a?(Array)
|
|
129
|
+
self.combinations = value
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'description')
|
|
134
|
+
self.description = attributes[:'description']
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'dry_run')
|
|
138
|
+
self.dry_run = attributes[:'dry_run']
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'hash_sha256')
|
|
142
|
+
self.hash_sha256 = attributes[:'hash_sha256']
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'merchant_item_id')
|
|
146
|
+
self.merchant_item_id = attributes[:'merchant_item_id']
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'merchant_item_oid')
|
|
150
|
+
self.merchant_item_oid = attributes[:'merchant_item_oid']
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'unfilled_combinations')
|
|
154
|
+
self.unfilled_combinations = attributes[:'unfilled_combinations']
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'warnings')
|
|
158
|
+
if (value = attributes[:'warnings']).is_a?(Array)
|
|
159
|
+
self.warnings = value
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
165
|
+
# @return Array for valid properties with the reasons
|
|
166
|
+
def list_invalid_properties
|
|
167
|
+
invalid_properties = Array.new
|
|
168
|
+
invalid_properties
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Check to see if the all the properties in the model are valid
|
|
172
|
+
# @return true if the model is valid
|
|
173
|
+
def valid?
|
|
174
|
+
true
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Checks equality by comparing each attribute.
|
|
178
|
+
# @param [Object] Object to be compared
|
|
179
|
+
def ==(o)
|
|
180
|
+
return true if self.equal?(o)
|
|
181
|
+
self.class == o.class &&
|
|
182
|
+
approval_needed == o.approval_needed &&
|
|
183
|
+
axes == o.axes &&
|
|
184
|
+
changes == o.changes &&
|
|
185
|
+
combinations == o.combinations &&
|
|
186
|
+
description == o.description &&
|
|
187
|
+
dry_run == o.dry_run &&
|
|
188
|
+
hash_sha256 == o.hash_sha256 &&
|
|
189
|
+
merchant_item_id == o.merchant_item_id &&
|
|
190
|
+
merchant_item_oid == o.merchant_item_oid &&
|
|
191
|
+
unfilled_combinations == o.unfilled_combinations &&
|
|
192
|
+
warnings == o.warnings
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# @see the `==` method
|
|
196
|
+
# @param [Object] Object to be compared
|
|
197
|
+
def eql?(o)
|
|
198
|
+
self == o
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Calculates hash code according to all attributes.
|
|
202
|
+
# @return [Integer] Hash code
|
|
203
|
+
def hash
|
|
204
|
+
[approval_needed, axes, changes, combinations, description, dry_run, hash_sha256, merchant_item_id, merchant_item_oid, unfilled_combinations, warnings].hash
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Builds the object from hash
|
|
208
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
209
|
+
# @return [Object] Returns the model itself
|
|
210
|
+
def self.build_from_hash(attributes)
|
|
211
|
+
new.build_from_hash(attributes)
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Builds the object from hash
|
|
215
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
216
|
+
# @return [Object] Returns the model itself
|
|
217
|
+
def build_from_hash(attributes)
|
|
218
|
+
return nil unless attributes.is_a?(Hash)
|
|
219
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
220
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
221
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
222
|
+
self.send("#{key}=", nil)
|
|
223
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
224
|
+
# check to ensure the input is an array given that the attribute
|
|
225
|
+
# is documented as an array but the input is not
|
|
226
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
227
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
228
|
+
end
|
|
229
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
230
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
self
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Deserializes the data based on type
|
|
238
|
+
# @param string type Data type
|
|
239
|
+
# @param string value Value to be deserialized
|
|
240
|
+
# @return [Object] Deserialized data
|
|
241
|
+
def _deserialize(type, value)
|
|
242
|
+
case type.to_sym
|
|
243
|
+
when :Time
|
|
244
|
+
Time.parse(value)
|
|
245
|
+
when :Date
|
|
246
|
+
Date.parse(value)
|
|
247
|
+
when :String
|
|
248
|
+
value.to_s
|
|
249
|
+
when :Integer
|
|
250
|
+
value.to_i
|
|
251
|
+
when :Float
|
|
252
|
+
value.to_f
|
|
253
|
+
when :Boolean
|
|
254
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
255
|
+
true
|
|
256
|
+
else
|
|
257
|
+
false
|
|
258
|
+
end
|
|
259
|
+
when :Object
|
|
260
|
+
# generic object (usually a Hash), return directly
|
|
261
|
+
value
|
|
262
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
263
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
264
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
265
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
266
|
+
k_type = Regexp.last_match[:k_type]
|
|
267
|
+
v_type = Regexp.last_match[:v_type]
|
|
268
|
+
{}.tap do |hash|
|
|
269
|
+
value.each do |k, v|
|
|
270
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
else # model
|
|
274
|
+
# models (e.g. Pet) or oneOf
|
|
275
|
+
klass = UltracartClient.const_get(type)
|
|
276
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Returns the string representation of the object
|
|
281
|
+
# @return [String] String presentation of the object
|
|
282
|
+
def to_s
|
|
283
|
+
to_hash.to_s
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
287
|
+
# @return [Hash] Returns the object in the form of hash
|
|
288
|
+
def to_body
|
|
289
|
+
to_hash
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# Returns the object in the form of hash
|
|
293
|
+
# @return [Hash] Returns the object in the form of hash
|
|
294
|
+
def to_hash
|
|
295
|
+
hash = {}
|
|
296
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
297
|
+
value = self.send(attr)
|
|
298
|
+
if value.nil?
|
|
299
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
300
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
hash[param] = _to_hash(value)
|
|
304
|
+
end
|
|
305
|
+
hash
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Outputs non-array value in the form of hash
|
|
309
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
310
|
+
# @param [Object] value Any valid value
|
|
311
|
+
# @return [Hash] Returns the value in the form of hash
|
|
312
|
+
def _to_hash(value)
|
|
313
|
+
if value.is_a?(Array)
|
|
314
|
+
value.compact.map { |v| _to_hash(v) }
|
|
315
|
+
elsif value.is_a?(Hash)
|
|
316
|
+
{}.tap do |hash|
|
|
317
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
318
|
+
end
|
|
319
|
+
elsif value.respond_to? :to_hash
|
|
320
|
+
value.to_hash
|
|
321
|
+
else
|
|
322
|
+
value
|
|
323
|
+
end
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -1138,12 +1138,20 @@ require 'ultracart_api/models/sfvb_item_attribute_batch_row'
|
|
|
1138
1138
|
require 'ultracart_api/models/sfvb_item_attribute_batch_row_result'
|
|
1139
1139
|
require 'ultracart_api/models/sfvb_item_attribute_update'
|
|
1140
1140
|
require 'ultracart_api/models/sfvb_item_attribute_update_request'
|
|
1141
|
+
require 'ultracart_api/models/sfvb_item_child_create_request'
|
|
1142
|
+
require 'ultracart_api/models/sfvb_item_child_create_response'
|
|
1141
1143
|
require 'ultracart_api/models/sfvb_item_container'
|
|
1142
1144
|
require 'ultracart_api/models/sfvb_item_containers_response'
|
|
1143
1145
|
require 'ultracart_api/models/sfvb_item_content_request'
|
|
1146
|
+
require 'ultracart_api/models/sfvb_item_default_page_request'
|
|
1147
|
+
require 'ultracart_api/models/sfvb_item_default_page_response'
|
|
1148
|
+
require 'ultracart_api/models/sfvb_item_default_page_result'
|
|
1149
|
+
require 'ultracart_api/models/sfvb_item_default_page_row'
|
|
1144
1150
|
require 'ultracart_api/models/sfvb_item_multimedia'
|
|
1145
1151
|
require 'ultracart_api/models/sfvb_item_multimedia_description_request'
|
|
1146
1152
|
require 'ultracart_api/models/sfvb_item_multimedia_request'
|
|
1153
|
+
require 'ultracart_api/models/sfvb_item_page_assignment'
|
|
1154
|
+
require 'ultracart_api/models/sfvb_item_pages'
|
|
1147
1155
|
require 'ultracart_api/models/sfvb_item_preorder'
|
|
1148
1156
|
require 'ultracart_api/models/sfvb_item_preorder_change'
|
|
1149
1157
|
require 'ultracart_api/models/sfvb_item_preorder_child_row'
|
|
@@ -1160,6 +1168,16 @@ require 'ultracart_api/models/sfvb_item_response'
|
|
|
1160
1168
|
require 'ultracart_api/models/sfvb_item_seo'
|
|
1161
1169
|
require 'ultracart_api/models/sfvb_item_seo_request'
|
|
1162
1170
|
require 'ultracart_api/models/sfvb_item_tags'
|
|
1171
|
+
require 'ultracart_api/models/sfvb_item_variation_axis'
|
|
1172
|
+
require 'ultracart_api/models/sfvb_item_variation_change'
|
|
1173
|
+
require 'ultracart_api/models/sfvb_item_variation_change_result'
|
|
1174
|
+
require 'ultracart_api/models/sfvb_item_variation_child'
|
|
1175
|
+
require 'ultracart_api/models/sfvb_item_variation_combination'
|
|
1176
|
+
require 'ultracart_api/models/sfvb_item_variation_option'
|
|
1177
|
+
require 'ultracart_api/models/sfvb_item_variation_value'
|
|
1178
|
+
require 'ultracart_api/models/sfvb_item_variations'
|
|
1179
|
+
require 'ultracart_api/models/sfvb_item_variations_request'
|
|
1180
|
+
require 'ultracart_api/models/sfvb_item_variations_response'
|
|
1163
1181
|
require 'ultracart_api/models/sfvb_item_volume_discount'
|
|
1164
1182
|
require 'ultracart_api/models/sfvb_library_ai_review'
|
|
1165
1183
|
require 'ultracart_api/models/sfvb_library_content_manifest'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.240
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
@@ -1200,12 +1200,20 @@ files:
|
|
|
1200
1200
|
- docs/SfvbItemAttributeBatchRowResult.md
|
|
1201
1201
|
- docs/SfvbItemAttributeUpdate.md
|
|
1202
1202
|
- docs/SfvbItemAttributeUpdateRequest.md
|
|
1203
|
+
- docs/SfvbItemChildCreateRequest.md
|
|
1204
|
+
- docs/SfvbItemChildCreateResponse.md
|
|
1203
1205
|
- docs/SfvbItemContainer.md
|
|
1204
1206
|
- docs/SfvbItemContainersResponse.md
|
|
1205
1207
|
- docs/SfvbItemContentRequest.md
|
|
1208
|
+
- docs/SfvbItemDefaultPageRequest.md
|
|
1209
|
+
- docs/SfvbItemDefaultPageResponse.md
|
|
1210
|
+
- docs/SfvbItemDefaultPageResult.md
|
|
1211
|
+
- docs/SfvbItemDefaultPageRow.md
|
|
1206
1212
|
- docs/SfvbItemMultimedia.md
|
|
1207
1213
|
- docs/SfvbItemMultimediaDescriptionRequest.md
|
|
1208
1214
|
- docs/SfvbItemMultimediaRequest.md
|
|
1215
|
+
- docs/SfvbItemPageAssignment.md
|
|
1216
|
+
- docs/SfvbItemPages.md
|
|
1209
1217
|
- docs/SfvbItemPreorder.md
|
|
1210
1218
|
- docs/SfvbItemPreorderChange.md
|
|
1211
1219
|
- docs/SfvbItemPreorderChildRow.md
|
|
@@ -1222,6 +1230,16 @@ files:
|
|
|
1222
1230
|
- docs/SfvbItemSeo.md
|
|
1223
1231
|
- docs/SfvbItemSeoRequest.md
|
|
1224
1232
|
- docs/SfvbItemTags.md
|
|
1233
|
+
- docs/SfvbItemVariationAxis.md
|
|
1234
|
+
- docs/SfvbItemVariationChange.md
|
|
1235
|
+
- docs/SfvbItemVariationChangeResult.md
|
|
1236
|
+
- docs/SfvbItemVariationChild.md
|
|
1237
|
+
- docs/SfvbItemVariationCombination.md
|
|
1238
|
+
- docs/SfvbItemVariationOption.md
|
|
1239
|
+
- docs/SfvbItemVariationValue.md
|
|
1240
|
+
- docs/SfvbItemVariations.md
|
|
1241
|
+
- docs/SfvbItemVariationsRequest.md
|
|
1242
|
+
- docs/SfvbItemVariationsResponse.md
|
|
1225
1243
|
- docs/SfvbItemVolumeDiscount.md
|
|
1226
1244
|
- docs/SfvbLibraryAiReview.md
|
|
1227
1245
|
- docs/SfvbLibraryContentManifest.md
|
|
@@ -2682,12 +2700,20 @@ files:
|
|
|
2682
2700
|
- lib/ultracart_api/models/sfvb_item_attribute_batch_row_result.rb
|
|
2683
2701
|
- lib/ultracart_api/models/sfvb_item_attribute_update.rb
|
|
2684
2702
|
- lib/ultracart_api/models/sfvb_item_attribute_update_request.rb
|
|
2703
|
+
- lib/ultracart_api/models/sfvb_item_child_create_request.rb
|
|
2704
|
+
- lib/ultracart_api/models/sfvb_item_child_create_response.rb
|
|
2685
2705
|
- lib/ultracart_api/models/sfvb_item_container.rb
|
|
2686
2706
|
- lib/ultracart_api/models/sfvb_item_containers_response.rb
|
|
2687
2707
|
- lib/ultracart_api/models/sfvb_item_content_request.rb
|
|
2708
|
+
- lib/ultracart_api/models/sfvb_item_default_page_request.rb
|
|
2709
|
+
- lib/ultracart_api/models/sfvb_item_default_page_response.rb
|
|
2710
|
+
- lib/ultracart_api/models/sfvb_item_default_page_result.rb
|
|
2711
|
+
- lib/ultracart_api/models/sfvb_item_default_page_row.rb
|
|
2688
2712
|
- lib/ultracart_api/models/sfvb_item_multimedia.rb
|
|
2689
2713
|
- lib/ultracart_api/models/sfvb_item_multimedia_description_request.rb
|
|
2690
2714
|
- lib/ultracart_api/models/sfvb_item_multimedia_request.rb
|
|
2715
|
+
- lib/ultracart_api/models/sfvb_item_page_assignment.rb
|
|
2716
|
+
- lib/ultracart_api/models/sfvb_item_pages.rb
|
|
2691
2717
|
- lib/ultracart_api/models/sfvb_item_preorder.rb
|
|
2692
2718
|
- lib/ultracart_api/models/sfvb_item_preorder_change.rb
|
|
2693
2719
|
- lib/ultracart_api/models/sfvb_item_preorder_child_row.rb
|
|
@@ -2704,6 +2730,16 @@ files:
|
|
|
2704
2730
|
- lib/ultracart_api/models/sfvb_item_seo.rb
|
|
2705
2731
|
- lib/ultracart_api/models/sfvb_item_seo_request.rb
|
|
2706
2732
|
- lib/ultracart_api/models/sfvb_item_tags.rb
|
|
2733
|
+
- lib/ultracart_api/models/sfvb_item_variation_axis.rb
|
|
2734
|
+
- lib/ultracart_api/models/sfvb_item_variation_change.rb
|
|
2735
|
+
- lib/ultracart_api/models/sfvb_item_variation_change_result.rb
|
|
2736
|
+
- lib/ultracart_api/models/sfvb_item_variation_child.rb
|
|
2737
|
+
- lib/ultracart_api/models/sfvb_item_variation_combination.rb
|
|
2738
|
+
- lib/ultracart_api/models/sfvb_item_variation_option.rb
|
|
2739
|
+
- lib/ultracart_api/models/sfvb_item_variation_value.rb
|
|
2740
|
+
- lib/ultracart_api/models/sfvb_item_variations.rb
|
|
2741
|
+
- lib/ultracart_api/models/sfvb_item_variations_request.rb
|
|
2742
|
+
- lib/ultracart_api/models/sfvb_item_variations_response.rb
|
|
2707
2743
|
- lib/ultracart_api/models/sfvb_item_volume_discount.rb
|
|
2708
2744
|
- lib/ultracart_api/models/sfvb_library_ai_review.rb
|
|
2709
2745
|
- lib/ultracart_api/models/sfvb_library_content_manifest.rb
|