ultracart_api 4.1.170 → 4.1.172

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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -2
  3. data/docs/SfvbApi.md +890 -37
  4. data/docs/SfvbPageResponse.md +2 -0
  5. data/docs/SfvbUpsellItemLogic.md +24 -0
  6. data/docs/SfvbUpsellItemLogicItem.md +22 -0
  7. data/docs/SfvbUpsellOffer.md +118 -8
  8. data/docs/SfvbUpsellPath.md +48 -0
  9. data/docs/SfvbUpsellPathDuplicateRequest.md +18 -0
  10. data/docs/SfvbUpsellPathMoveRequest.md +18 -0
  11. data/docs/SfvbUpsellPathsResponse.md +28 -0
  12. data/docs/SfvbUpsellStats.md +54 -0
  13. data/docs/SfvbUpsellStep.md +22 -0
  14. data/docs/SfvbUpsellStepOffer.md +32 -0
  15. data/docs/SfvbUpsellTowerData.md +20 -0
  16. data/docs/SfvbUpsellVariation.md +22 -0
  17. data/lib/ultracart_api/api/sfvb_api.rb +1256 -78
  18. data/lib/ultracart_api/models/sfvb_page_response.rb +11 -1
  19. data/lib/ultracart_api/models/sfvb_upsell_item_logic.rb +252 -0
  20. data/lib/ultracart_api/models/sfvb_upsell_item_logic_item.rb +240 -0
  21. data/lib/ultracart_api/models/sfvb_upsell_offer.rb +598 -9
  22. data/lib/ultracart_api/models/sfvb_upsell_path.rb +373 -0
  23. data/lib/ultracart_api/models/sfvb_upsell_path_duplicate_request.rb +220 -0
  24. data/lib/ultracart_api/models/sfvb_upsell_path_move_request.rb +220 -0
  25. data/lib/ultracart_api/models/sfvb_upsell_paths_response.rb +272 -0
  26. data/lib/ultracart_api/models/sfvb_upsell_stats.rb +400 -0
  27. data/lib/ultracart_api/models/sfvb_upsell_step.rb +241 -0
  28. data/lib/ultracart_api/models/sfvb_upsell_step_offer.rb +288 -0
  29. data/lib/ultracart_api/models/sfvb_upsell_tower_data.rb +234 -0
  30. data/lib/ultracart_api/models/sfvb_upsell_variation.rb +241 -0
  31. data/lib/ultracart_api/version.rb +1 -1
  32. data/lib/ultracart_api.rb +11 -0
  33. metadata +24 -2
@@ -0,0 +1,241 @@
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 SfvbUpsellVariation
18
+ # Variation name.
19
+ attr_accessor :name
20
+
21
+ attr_accessor :stats
22
+
23
+ # The steps, in the order shoppers see them.
24
+ attr_accessor :steps
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'name' => :'name',
30
+ :'stats' => :'stats',
31
+ :'steps' => :'steps'
32
+ }
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'name' => :'String',
44
+ :'stats' => :'SfvbUpsellStats',
45
+ :'steps' => :'Array<SfvbUpsellStep>'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbUpsellVariation` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!self.class.attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbUpsellVariation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'name')
71
+ self.name = attributes[:'name']
72
+ end
73
+
74
+ if attributes.key?(:'stats')
75
+ self.stats = attributes[:'stats']
76
+ end
77
+
78
+ if attributes.key?(:'steps')
79
+ if (value = attributes[:'steps']).is_a?(Array)
80
+ self.steps = value
81
+ end
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ invalid_properties = Array.new
89
+ invalid_properties
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ def valid?
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ name == o.name &&
104
+ stats == o.stats &&
105
+ steps == o.steps
106
+ end
107
+
108
+ # @see the `==` method
109
+ # @param [Object] Object to be compared
110
+ def eql?(o)
111
+ self == o
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Integer] Hash code
116
+ def hash
117
+ [name, stats, steps].hash
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def self.build_from_hash(attributes)
124
+ new.build_from_hash(attributes)
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ attributes = attributes.transform_keys(&:to_sym)
133
+ self.class.openapi_types.each_pair do |key, type|
134
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
135
+ self.send("#{key}=", nil)
136
+ elsif type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
140
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
141
+ end
142
+ elsif !attributes[self.class.attribute_map[key]].nil?
143
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
144
+ end
145
+ end
146
+
147
+ self
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def _deserialize(type, value)
155
+ case type.to_sym
156
+ when :Time
157
+ Time.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :Boolean
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ # models (e.g. Pet) or oneOf
188
+ klass = UltracartClient.const_get(type)
189
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
190
+ end
191
+ end
192
+
193
+ # Returns the string representation of the object
194
+ # @return [String] String presentation of the object
195
+ def to_s
196
+ to_hash.to_s
197
+ end
198
+
199
+ # to_body is an alias to to_hash (backward compatibility)
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_body
202
+ to_hash
203
+ end
204
+
205
+ # Returns the object in the form of hash
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_hash
208
+ hash = {}
209
+ self.class.attribute_map.each_pair do |attr, param|
210
+ value = self.send(attr)
211
+ if value.nil?
212
+ is_nullable = self.class.openapi_nullable.include?(attr)
213
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
+ end
215
+
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ # Outputs non-array value in the form of hash
222
+ # For object, use to_hash. Otherwise, just return the value
223
+ # @param [Object] value Any valid value
224
+ # @return [Hash] Returns the value in the form of hash
225
+ def _to_hash(value)
226
+ if value.is_a?(Array)
227
+ value.compact.map { |v| _to_hash(v) }
228
+ elsif value.is_a?(Hash)
229
+ {}.tap do |hash|
230
+ value.each { |k, v| hash[k] = _to_hash(v) }
231
+ end
232
+ elsif value.respond_to? :to_hash
233
+ value.to_hash
234
+ else
235
+ value
236
+ end
237
+ end
238
+
239
+ end
240
+
241
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.170'
14
+ VERSION = '4.1.172'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -1078,8 +1078,19 @@ require 'ultracart_api/models/sfvb_theme_font'
1078
1078
  require 'ultracart_api/models/sfvb_theme_font_family'
1079
1079
  require 'ultracart_api/models/sfvb_theme_job_response'
1080
1080
  require 'ultracart_api/models/sfvb_themes_response'
1081
+ require 'ultracart_api/models/sfvb_upsell_item_logic'
1082
+ require 'ultracart_api/models/sfvb_upsell_item_logic_item'
1081
1083
  require 'ultracart_api/models/sfvb_upsell_offer'
1082
1084
  require 'ultracart_api/models/sfvb_upsell_offers_response'
1085
+ require 'ultracart_api/models/sfvb_upsell_path'
1086
+ require 'ultracart_api/models/sfvb_upsell_path_duplicate_request'
1087
+ require 'ultracart_api/models/sfvb_upsell_path_move_request'
1088
+ require 'ultracart_api/models/sfvb_upsell_paths_response'
1089
+ require 'ultracart_api/models/sfvb_upsell_stats'
1090
+ require 'ultracart_api/models/sfvb_upsell_step'
1091
+ require 'ultracart_api/models/sfvb_upsell_step_offer'
1092
+ require 'ultracart_api/models/sfvb_upsell_tower_data'
1093
+ require 'ultracart_api/models/sfvb_upsell_variation'
1083
1094
  require 'ultracart_api/models/sfvb_validate_request'
1084
1095
  require 'ultracart_api/models/sfvb_validation_response'
1085
1096
  require 'ultracart_api/models/sfvb_velocity_validate_request'
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.170
4
+ version: 4.1.172
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-22 00:00:00.000000000 Z
11
+ date: 2026-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -1140,8 +1140,19 @@ files:
1140
1140
  - docs/SfvbThemeFontFamily.md
1141
1141
  - docs/SfvbThemeJobResponse.md
1142
1142
  - docs/SfvbThemesResponse.md
1143
+ - docs/SfvbUpsellItemLogic.md
1144
+ - docs/SfvbUpsellItemLogicItem.md
1143
1145
  - docs/SfvbUpsellOffer.md
1144
1146
  - docs/SfvbUpsellOffersResponse.md
1147
+ - docs/SfvbUpsellPath.md
1148
+ - docs/SfvbUpsellPathDuplicateRequest.md
1149
+ - docs/SfvbUpsellPathMoveRequest.md
1150
+ - docs/SfvbUpsellPathsResponse.md
1151
+ - docs/SfvbUpsellStats.md
1152
+ - docs/SfvbUpsellStep.md
1153
+ - docs/SfvbUpsellStepOffer.md
1154
+ - docs/SfvbUpsellTowerData.md
1155
+ - docs/SfvbUpsellVariation.md
1145
1156
  - docs/SfvbValidateRequest.md
1146
1157
  - docs/SfvbValidationResponse.md
1147
1158
  - docs/SfvbVelocityValidateRequest.md
@@ -2332,8 +2343,19 @@ files:
2332
2343
  - lib/ultracart_api/models/sfvb_theme_font_family.rb
2333
2344
  - lib/ultracart_api/models/sfvb_theme_job_response.rb
2334
2345
  - lib/ultracart_api/models/sfvb_themes_response.rb
2346
+ - lib/ultracart_api/models/sfvb_upsell_item_logic.rb
2347
+ - lib/ultracart_api/models/sfvb_upsell_item_logic_item.rb
2335
2348
  - lib/ultracart_api/models/sfvb_upsell_offer.rb
2336
2349
  - lib/ultracart_api/models/sfvb_upsell_offers_response.rb
2350
+ - lib/ultracart_api/models/sfvb_upsell_path.rb
2351
+ - lib/ultracart_api/models/sfvb_upsell_path_duplicate_request.rb
2352
+ - lib/ultracart_api/models/sfvb_upsell_path_move_request.rb
2353
+ - lib/ultracart_api/models/sfvb_upsell_paths_response.rb
2354
+ - lib/ultracart_api/models/sfvb_upsell_stats.rb
2355
+ - lib/ultracart_api/models/sfvb_upsell_step.rb
2356
+ - lib/ultracart_api/models/sfvb_upsell_step_offer.rb
2357
+ - lib/ultracart_api/models/sfvb_upsell_tower_data.rb
2358
+ - lib/ultracart_api/models/sfvb_upsell_variation.rb
2337
2359
  - lib/ultracart_api/models/sfvb_validate_request.rb
2338
2360
  - lib/ultracart_api/models/sfvb_validation_response.rb
2339
2361
  - lib/ultracart_api/models/sfvb_velocity_validate_request.rb