ultracart_api 4.1.152 → 4.1.153

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.
@@ -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 SfvbPageResponse
18
+ # Every attribute this page has, including ones a template declares but nothing has set yet. These are what the pageattribute element renders. Sorted by name.
19
+ attr_accessor :attributes
20
+
21
+ # The page's images, including codes a template declares but nothing has attached yet. These are what the pageimage element renders - the default image when pageImageCode is empty, otherwise the image with that code. The default image comes first.
22
+ attr_accessor :multimedia
23
+
24
+ # The page path, normalized to begin and end with a slash.
25
+ attr_accessor :path
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'attributes' => :'attributes',
31
+ :'multimedia' => :'multimedia',
32
+ :'path' => :'path'
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
+ :'attributes' => :'Array<SfvbPageAttribute>',
45
+ :'multimedia' => :'Array<SfvbPageMultimedia>',
46
+ :'path' => :'String'
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::SfvbPageResponse` 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::SfvbPageResponse`. 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?(:'attributes')
72
+ if (value = attributes[:'attributes']).is_a?(Array)
73
+ self.attributes = value
74
+ end
75
+ end
76
+
77
+ if attributes.key?(:'multimedia')
78
+ if (value = attributes[:'multimedia']).is_a?(Array)
79
+ self.multimedia = value
80
+ end
81
+ end
82
+
83
+ if attributes.key?(:'path')
84
+ self.path = attributes[:'path']
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
+ attributes == o.attributes &&
107
+ multimedia == o.multimedia &&
108
+ path == o.path
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
+ [attributes, multimedia, path].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
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.152'
14
+ VERSION = '4.1.153'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -1004,6 +1004,12 @@ require 'ultracart_api/models/sfvb_files_response'
1004
1004
  require 'ultracart_api/models/sfvb_library_entry'
1005
1005
  require 'ultracart_api/models/sfvb_library_facet'
1006
1006
  require 'ultracart_api/models/sfvb_library_response'
1007
+ require 'ultracart_api/models/sfvb_page_attribute'
1008
+ require 'ultracart_api/models/sfvb_page_attribute_update'
1009
+ require 'ultracart_api/models/sfvb_page_attribute_update_request'
1010
+ require 'ultracart_api/models/sfvb_page_multimedia'
1011
+ require 'ultracart_api/models/sfvb_page_multimedia_request'
1012
+ require 'ultracart_api/models/sfvb_page_response'
1007
1013
  require 'ultracart_api/models/sfvb_preview_session_request'
1008
1014
  require 'ultracart_api/models/sfvb_preview_session_response'
1009
1015
  require 'ultracart_api/models/sfvb_preview_url_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.152
4
+ version: 4.1.153
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-09 00:00:00.000000000 Z
11
+ date: 2026-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -1066,6 +1066,12 @@ files:
1066
1066
  - docs/SfvbLibraryEntry.md
1067
1067
  - docs/SfvbLibraryFacet.md
1068
1068
  - docs/SfvbLibraryResponse.md
1069
+ - docs/SfvbPageAttribute.md
1070
+ - docs/SfvbPageAttributeUpdate.md
1071
+ - docs/SfvbPageAttributeUpdateRequest.md
1072
+ - docs/SfvbPageMultimedia.md
1073
+ - docs/SfvbPageMultimediaRequest.md
1074
+ - docs/SfvbPageResponse.md
1069
1075
  - docs/SfvbPreviewSessionRequest.md
1070
1076
  - docs/SfvbPreviewSessionResponse.md
1071
1077
  - docs/SfvbPreviewUrlResponse.md
@@ -2201,6 +2207,12 @@ files:
2201
2207
  - lib/ultracart_api/models/sfvb_library_entry.rb
2202
2208
  - lib/ultracart_api/models/sfvb_library_facet.rb
2203
2209
  - lib/ultracart_api/models/sfvb_library_response.rb
2210
+ - lib/ultracart_api/models/sfvb_page_attribute.rb
2211
+ - lib/ultracart_api/models/sfvb_page_attribute_update.rb
2212
+ - lib/ultracart_api/models/sfvb_page_attribute_update_request.rb
2213
+ - lib/ultracart_api/models/sfvb_page_multimedia.rb
2214
+ - lib/ultracart_api/models/sfvb_page_multimedia_request.rb
2215
+ - lib/ultracart_api/models/sfvb_page_response.rb
2204
2216
  - lib/ultracart_api/models/sfvb_preview_session_request.rb
2205
2217
  - lib/ultracart_api/models/sfvb_preview_session_response.rb
2206
2218
  - lib/ultracart_api/models/sfvb_preview_url_response.rb