ultracart_api 4.1.199 → 4.1.200
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 +21 -2
- data/docs/SfvbApi.md +465 -11
- data/docs/SfvbApprovalCreateRequest.md +6 -0
- data/docs/SfvbApprovalParams.md +23 -3
- data/docs/SfvbItemAttributeBatchRequest.md +20 -0
- data/docs/SfvbItemAttributeBatchResponse.md +40 -0
- data/docs/SfvbItemAttributeBatchRow.md +30 -0
- data/docs/SfvbItemAttributeBatchRowResult.md +36 -0
- data/docs/SfvbItemPricing.md +38 -0
- data/docs/SfvbItemPricingRequest.md +32 -0
- data/docs/SfvbItemRelated.md +28 -0
- data/docs/SfvbItemRelatedItem.md +22 -0
- data/docs/SfvbItemRelatedRequest.md +22 -0
- data/docs/SfvbItemVolumeDiscount.md +20 -0
- data/lib/ultracart_api/api/sfvb_api.rb +640 -16
- data/lib/ultracart_api/models/sfvb_approval_create_request.rb +33 -3
- data/lib/ultracart_api/models/sfvb_approval_params.rb +142 -6
- data/lib/ultracart_api/models/sfvb_item_attribute_batch_request.rb +232 -0
- data/lib/ultracart_api/models/sfvb_item_attribute_batch_response.rb +332 -0
- data/lib/ultracart_api/models/sfvb_item_attribute_batch_row.rb +280 -0
- data/lib/ultracart_api/models/sfvb_item_attribute_batch_row_result.rb +344 -0
- data/lib/ultracart_api/models/sfvb_item_pricing.rb +322 -0
- data/lib/ultracart_api/models/sfvb_item_pricing_request.rb +292 -0
- data/lib/ultracart_api/models/sfvb_item_related.rb +272 -0
- data/lib/ultracart_api/models/sfvb_item_related_item.rb +274 -0
- data/lib/ultracart_api/models/sfvb_item_related_request.rb +242 -0
- data/lib/ultracart_api/models/sfvb_item_volume_discount.rb +230 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +10 -0
- metadata +22 -2
|
@@ -0,0 +1,230 @@
|
|
|
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 SfvbItemVolumeDiscount
|
|
18
|
+
# The unit price at that quantity, in the item's currency.
|
|
19
|
+
attr_accessor :cost
|
|
20
|
+
|
|
21
|
+
# The quantity from which this unit price applies. 2 or more.
|
|
22
|
+
attr_accessor :quantity
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'cost' => :'cost',
|
|
28
|
+
:'quantity' => :'quantity'
|
|
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
|
+
:'cost' => :'Float',
|
|
41
|
+
:'quantity' => :'Integer'
|
|
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::SfvbItemVolumeDiscount` 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::SfvbItemVolumeDiscount`. 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?(:'cost')
|
|
67
|
+
self.cost = attributes[:'cost']
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'quantity')
|
|
71
|
+
self.quantity = attributes[:'quantity']
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
76
|
+
# @return Array for valid properties with the reasons
|
|
77
|
+
def list_invalid_properties
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
invalid_properties
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Check to see if the all the properties in the model are valid
|
|
83
|
+
# @return true if the model is valid
|
|
84
|
+
def valid?
|
|
85
|
+
true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def ==(o)
|
|
91
|
+
return true if self.equal?(o)
|
|
92
|
+
self.class == o.class &&
|
|
93
|
+
cost == o.cost &&
|
|
94
|
+
quantity == o.quantity
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @see the `==` method
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def eql?(o)
|
|
100
|
+
self == o
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Calculates hash code according to all attributes.
|
|
104
|
+
# @return [Integer] Hash code
|
|
105
|
+
def hash
|
|
106
|
+
[cost, quantity].hash
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Builds the object from hash
|
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
111
|
+
# @return [Object] Returns the model itself
|
|
112
|
+
def self.build_from_hash(attributes)
|
|
113
|
+
new.build_from_hash(attributes)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Builds the object from hash
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
# @return [Object] Returns the model itself
|
|
119
|
+
def build_from_hash(attributes)
|
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
122
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
123
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
124
|
+
self.send("#{key}=", nil)
|
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
129
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
self
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Deserializes the data based on type
|
|
140
|
+
# @param string type Data type
|
|
141
|
+
# @param string value Value to be deserialized
|
|
142
|
+
# @return [Object] Deserialized data
|
|
143
|
+
def _deserialize(type, value)
|
|
144
|
+
case type.to_sym
|
|
145
|
+
when :Time
|
|
146
|
+
Time.parse(value)
|
|
147
|
+
when :Date
|
|
148
|
+
Date.parse(value)
|
|
149
|
+
when :String
|
|
150
|
+
value.to_s
|
|
151
|
+
when :Integer
|
|
152
|
+
value.to_i
|
|
153
|
+
when :Float
|
|
154
|
+
value.to_f
|
|
155
|
+
when :Boolean
|
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
157
|
+
true
|
|
158
|
+
else
|
|
159
|
+
false
|
|
160
|
+
end
|
|
161
|
+
when :Object
|
|
162
|
+
# generic object (usually a Hash), return directly
|
|
163
|
+
value
|
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
|
170
|
+
{}.tap do |hash|
|
|
171
|
+
value.each do |k, v|
|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
else # model
|
|
176
|
+
# models (e.g. Pet) or oneOf
|
|
177
|
+
klass = UltracartClient.const_get(type)
|
|
178
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns the string representation of the object
|
|
183
|
+
# @return [String] String presentation of the object
|
|
184
|
+
def to_s
|
|
185
|
+
to_hash.to_s
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
|
190
|
+
def to_body
|
|
191
|
+
to_hash
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Returns the object in the form of hash
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_hash
|
|
197
|
+
hash = {}
|
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
199
|
+
value = self.send(attr)
|
|
200
|
+
if value.nil?
|
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
hash[param] = _to_hash(value)
|
|
206
|
+
end
|
|
207
|
+
hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Outputs non-array value in the form of hash
|
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
212
|
+
# @param [Object] value Any valid value
|
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
|
214
|
+
def _to_hash(value)
|
|
215
|
+
if value.is_a?(Array)
|
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
|
217
|
+
elsif value.is_a?(Hash)
|
|
218
|
+
{}.tap do |hash|
|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
220
|
+
end
|
|
221
|
+
elsif value.respond_to? :to_hash
|
|
222
|
+
value.to_hash
|
|
223
|
+
else
|
|
224
|
+
value
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -1040,6 +1040,10 @@ require 'ultracart_api/models/sfvb_i18n_messages_response'
|
|
|
1040
1040
|
require 'ultracart_api/models/sfvb_i18n_reset_response'
|
|
1041
1041
|
require 'ultracart_api/models/sfvb_i18n_translation'
|
|
1042
1042
|
require 'ultracart_api/models/sfvb_item_attribute'
|
|
1043
|
+
require 'ultracart_api/models/sfvb_item_attribute_batch_request'
|
|
1044
|
+
require 'ultracart_api/models/sfvb_item_attribute_batch_response'
|
|
1045
|
+
require 'ultracart_api/models/sfvb_item_attribute_batch_row'
|
|
1046
|
+
require 'ultracart_api/models/sfvb_item_attribute_batch_row_result'
|
|
1043
1047
|
require 'ultracart_api/models/sfvb_item_attribute_update'
|
|
1044
1048
|
require 'ultracart_api/models/sfvb_item_attribute_update_request'
|
|
1045
1049
|
require 'ultracart_api/models/sfvb_item_container'
|
|
@@ -1047,9 +1051,15 @@ require 'ultracart_api/models/sfvb_item_containers_response'
|
|
|
1047
1051
|
require 'ultracart_api/models/sfvb_item_content_request'
|
|
1048
1052
|
require 'ultracart_api/models/sfvb_item_multimedia'
|
|
1049
1053
|
require 'ultracart_api/models/sfvb_item_multimedia_request'
|
|
1054
|
+
require 'ultracart_api/models/sfvb_item_pricing'
|
|
1055
|
+
require 'ultracart_api/models/sfvb_item_pricing_request'
|
|
1056
|
+
require 'ultracart_api/models/sfvb_item_related'
|
|
1057
|
+
require 'ultracart_api/models/sfvb_item_related_item'
|
|
1058
|
+
require 'ultracart_api/models/sfvb_item_related_request'
|
|
1050
1059
|
require 'ultracart_api/models/sfvb_item_response'
|
|
1051
1060
|
require 'ultracart_api/models/sfvb_item_seo'
|
|
1052
1061
|
require 'ultracart_api/models/sfvb_item_seo_request'
|
|
1062
|
+
require 'ultracart_api/models/sfvb_item_volume_discount'
|
|
1053
1063
|
require 'ultracart_api/models/sfvb_library_ai_review'
|
|
1054
1064
|
require 'ultracart_api/models/sfvb_library_content_manifest'
|
|
1055
1065
|
require 'ultracart_api/models/sfvb_library_delete_result'
|
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.200
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -1102,6 +1102,10 @@ files:
|
|
|
1102
1102
|
- docs/SfvbI18nResetResponse.md
|
|
1103
1103
|
- docs/SfvbI18nTranslation.md
|
|
1104
1104
|
- docs/SfvbItemAttribute.md
|
|
1105
|
+
- docs/SfvbItemAttributeBatchRequest.md
|
|
1106
|
+
- docs/SfvbItemAttributeBatchResponse.md
|
|
1107
|
+
- docs/SfvbItemAttributeBatchRow.md
|
|
1108
|
+
- docs/SfvbItemAttributeBatchRowResult.md
|
|
1105
1109
|
- docs/SfvbItemAttributeUpdate.md
|
|
1106
1110
|
- docs/SfvbItemAttributeUpdateRequest.md
|
|
1107
1111
|
- docs/SfvbItemContainer.md
|
|
@@ -1109,9 +1113,15 @@ files:
|
|
|
1109
1113
|
- docs/SfvbItemContentRequest.md
|
|
1110
1114
|
- docs/SfvbItemMultimedia.md
|
|
1111
1115
|
- docs/SfvbItemMultimediaRequest.md
|
|
1116
|
+
- docs/SfvbItemPricing.md
|
|
1117
|
+
- docs/SfvbItemPricingRequest.md
|
|
1118
|
+
- docs/SfvbItemRelated.md
|
|
1119
|
+
- docs/SfvbItemRelatedItem.md
|
|
1120
|
+
- docs/SfvbItemRelatedRequest.md
|
|
1112
1121
|
- docs/SfvbItemResponse.md
|
|
1113
1122
|
- docs/SfvbItemSeo.md
|
|
1114
1123
|
- docs/SfvbItemSeoRequest.md
|
|
1124
|
+
- docs/SfvbItemVolumeDiscount.md
|
|
1115
1125
|
- docs/SfvbLibraryAiReview.md
|
|
1116
1126
|
- docs/SfvbLibraryContentManifest.md
|
|
1117
1127
|
- docs/SfvbLibraryDeleteResult.md
|
|
@@ -2396,6 +2406,10 @@ files:
|
|
|
2396
2406
|
- lib/ultracart_api/models/sfvb_i18n_reset_response.rb
|
|
2397
2407
|
- lib/ultracart_api/models/sfvb_i18n_translation.rb
|
|
2398
2408
|
- lib/ultracart_api/models/sfvb_item_attribute.rb
|
|
2409
|
+
- lib/ultracart_api/models/sfvb_item_attribute_batch_request.rb
|
|
2410
|
+
- lib/ultracart_api/models/sfvb_item_attribute_batch_response.rb
|
|
2411
|
+
- lib/ultracart_api/models/sfvb_item_attribute_batch_row.rb
|
|
2412
|
+
- lib/ultracart_api/models/sfvb_item_attribute_batch_row_result.rb
|
|
2399
2413
|
- lib/ultracart_api/models/sfvb_item_attribute_update.rb
|
|
2400
2414
|
- lib/ultracart_api/models/sfvb_item_attribute_update_request.rb
|
|
2401
2415
|
- lib/ultracart_api/models/sfvb_item_container.rb
|
|
@@ -2403,9 +2417,15 @@ files:
|
|
|
2403
2417
|
- lib/ultracart_api/models/sfvb_item_content_request.rb
|
|
2404
2418
|
- lib/ultracart_api/models/sfvb_item_multimedia.rb
|
|
2405
2419
|
- lib/ultracart_api/models/sfvb_item_multimedia_request.rb
|
|
2420
|
+
- lib/ultracart_api/models/sfvb_item_pricing.rb
|
|
2421
|
+
- lib/ultracart_api/models/sfvb_item_pricing_request.rb
|
|
2422
|
+
- lib/ultracart_api/models/sfvb_item_related.rb
|
|
2423
|
+
- lib/ultracart_api/models/sfvb_item_related_item.rb
|
|
2424
|
+
- lib/ultracart_api/models/sfvb_item_related_request.rb
|
|
2406
2425
|
- lib/ultracart_api/models/sfvb_item_response.rb
|
|
2407
2426
|
- lib/ultracart_api/models/sfvb_item_seo.rb
|
|
2408
2427
|
- lib/ultracart_api/models/sfvb_item_seo_request.rb
|
|
2428
|
+
- lib/ultracart_api/models/sfvb_item_volume_discount.rb
|
|
2409
2429
|
- lib/ultracart_api/models/sfvb_library_ai_review.rb
|
|
2410
2430
|
- lib/ultracart_api/models/sfvb_library_content_manifest.rb
|
|
2411
2431
|
- lib/ultracart_api/models/sfvb_library_delete_result.rb
|