ultracart_api 4.1.183 → 4.1.185

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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +40 -2
  3. data/docs/AutoOrderApi.md +28 -1
  4. data/docs/OrderApi.md +107 -3
  5. data/docs/SfvbApi.md +941 -50
  6. data/docs/SfvbLibraryAiReview.md +28 -0
  7. data/docs/SfvbLibraryContentManifest.md +26 -0
  8. data/docs/SfvbLibraryDeleteResult.md +20 -0
  9. data/docs/SfvbLibraryEntry.md +28 -0
  10. data/docs/SfvbLibraryEntryRequest.md +30 -0
  11. data/docs/SfvbLibraryFacet.md +2 -2
  12. data/docs/SfvbLibraryHistoryEntry.md +24 -0
  13. data/docs/SfvbLibraryHistoryResponse.md +18 -0
  14. data/docs/SfvbLibraryInstallConflict.md +22 -0
  15. data/docs/SfvbLibraryInstallReceipt.md +32 -0
  16. data/docs/SfvbLibraryInstallRecord.md +32 -0
  17. data/docs/SfvbLibraryInstallRequest.md +22 -0
  18. data/docs/SfvbLibraryInstallsResponse.md +18 -0
  19. data/docs/SfvbLibraryParameter.md +26 -0
  20. data/docs/SfvbLibraryPublishRequest.md +20 -0
  21. data/docs/SfvbLibraryScreenshotRequest.md +22 -0
  22. data/docs/SfvbLibraryShareRequest.md +18 -0
  23. data/docs/SfvbLibraryShareTarget.md +20 -0
  24. data/docs/SfvbLibraryShareTargetsResponse.md +18 -0
  25. data/docs/SfvbLibraryTaxonomy.md +24 -0
  26. data/docs/SfvbLibraryTaxonomyCatalog.md +18 -0
  27. data/docs/SfvbLibraryUnshareResult.md +22 -0
  28. data/docs/SfvbWhoamiResponse.md +2 -0
  29. data/lib/ultracart_api/api/sfvb_api.rb +1334 -118
  30. data/lib/ultracart_api/models/sfvb_library_ai_review.rb +304 -0
  31. data/lib/ultracart_api/models/sfvb_library_content_manifest.rb +259 -0
  32. data/lib/ultracart_api/models/sfvb_library_delete_result.rb +264 -0
  33. data/lib/ultracart_api/models/sfvb_library_entry.rb +177 -1
  34. data/lib/ultracart_api/models/sfvb_library_entry_request.rb +280 -0
  35. data/lib/ultracart_api/models/sfvb_library_facet.rb +2 -2
  36. data/lib/ultracart_api/models/sfvb_library_history_entry.rb +250 -0
  37. data/lib/ultracart_api/models/sfvb_library_history_response.rb +222 -0
  38. data/lib/ultracart_api/models/sfvb_library_install_conflict.rb +240 -0
  39. data/lib/ultracart_api/models/sfvb_library_install_receipt.rb +297 -0
  40. data/lib/ultracart_api/models/sfvb_library_install_record.rb +290 -0
  41. data/lib/ultracart_api/models/sfvb_library_install_request.rb +274 -0
  42. data/lib/ultracart_api/models/sfvb_library_installs_response.rb +222 -0
  43. data/lib/ultracart_api/models/sfvb_library_parameter.rb +260 -0
  44. data/lib/ultracart_api/models/sfvb_library_publish_request.rb +264 -0
  45. data/lib/ultracart_api/models/sfvb_library_screenshot_request.rb +274 -0
  46. data/lib/ultracart_api/models/sfvb_library_share_request.rb +220 -0
  47. data/lib/ultracart_api/models/sfvb_library_share_target.rb +230 -0
  48. data/lib/ultracart_api/models/sfvb_library_share_targets_response.rb +222 -0
  49. data/lib/ultracart_api/models/sfvb_library_taxonomy.rb +258 -0
  50. data/lib/ultracart_api/models/sfvb_library_taxonomy_catalog.rb +220 -0
  51. data/lib/ultracart_api/models/sfvb_library_unshare_result.rb +242 -0
  52. data/lib/ultracart_api/models/sfvb_whoami_response.rb +11 -1
  53. data/lib/ultracart_api/version.rb +1 -1
  54. data/lib/ultracart_api.rb +20 -0
  55. metadata +41 -1
@@ -0,0 +1,297 @@
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 SfvbLibraryInstallReceipt
18
+ # The fragment, with its file paths rewritten to where they were installed. Ready to place.
19
+ attr_accessor :cjson
20
+
21
+ # Paths that already held a different file. With on_conflict fail these refuse the install.
22
+ attr_accessor :conflicts
23
+
24
+ attr_accessor :content_manifest
25
+
26
+ # Paths not written, because an identical or chosen existing file was kept, or the file could not be fetched.
27
+ attr_accessor :files_skipped
28
+
29
+ # Storefront paths this install wrote.
30
+ attr_accessor :files_written
31
+
32
+ # The entry.
33
+ attr_accessor :library_oid
34
+
35
+ # The revision installed.
36
+ attr_accessor :revision_number
37
+
38
+ # Required parameters with no default. Replace them in the cjson before placing it.
39
+ attr_accessor :unresolved_parameters
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+ :'cjson' => :'cjson',
45
+ :'conflicts' => :'conflicts',
46
+ :'content_manifest' => :'content_manifest',
47
+ :'files_skipped' => :'files_skipped',
48
+ :'files_written' => :'files_written',
49
+ :'library_oid' => :'library_oid',
50
+ :'revision_number' => :'revision_number',
51
+ :'unresolved_parameters' => :'unresolved_parameters'
52
+ }
53
+ end
54
+
55
+ # Returns all the JSON keys this model knows about
56
+ def self.acceptable_attributes
57
+ attribute_map.values
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ def self.openapi_types
62
+ {
63
+ :'cjson' => :'String',
64
+ :'conflicts' => :'Array<SfvbLibraryInstallConflict>',
65
+ :'content_manifest' => :'SfvbLibraryContentManifest',
66
+ :'files_skipped' => :'Array<String>',
67
+ :'files_written' => :'Array<String>',
68
+ :'library_oid' => :'Integer',
69
+ :'revision_number' => :'Integer',
70
+ :'unresolved_parameters' => :'Array<String>'
71
+ }
72
+ end
73
+
74
+ # List of attributes with nullable: true
75
+ def self.openapi_nullable
76
+ Set.new([
77
+ ])
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ def initialize(attributes = {})
83
+ if (!attributes.is_a?(Hash))
84
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbLibraryInstallReceipt` initialize method"
85
+ end
86
+
87
+ # check to see if the attribute exists and convert string to symbol for hash key
88
+ attributes = attributes.each_with_object({}) { |(k, v), h|
89
+ if (!self.class.attribute_map.key?(k.to_sym))
90
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbLibraryInstallReceipt`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
91
+ end
92
+ h[k.to_sym] = v
93
+ }
94
+
95
+ if attributes.key?(:'cjson')
96
+ self.cjson = attributes[:'cjson']
97
+ end
98
+
99
+ if attributes.key?(:'conflicts')
100
+ if (value = attributes[:'conflicts']).is_a?(Array)
101
+ self.conflicts = value
102
+ end
103
+ end
104
+
105
+ if attributes.key?(:'content_manifest')
106
+ self.content_manifest = attributes[:'content_manifest']
107
+ end
108
+
109
+ if attributes.key?(:'files_skipped')
110
+ if (value = attributes[:'files_skipped']).is_a?(Array)
111
+ self.files_skipped = value
112
+ end
113
+ end
114
+
115
+ if attributes.key?(:'files_written')
116
+ if (value = attributes[:'files_written']).is_a?(Array)
117
+ self.files_written = value
118
+ end
119
+ end
120
+
121
+ if attributes.key?(:'library_oid')
122
+ self.library_oid = attributes[:'library_oid']
123
+ end
124
+
125
+ if attributes.key?(:'revision_number')
126
+ self.revision_number = attributes[:'revision_number']
127
+ end
128
+
129
+ if attributes.key?(:'unresolved_parameters')
130
+ if (value = attributes[:'unresolved_parameters']).is_a?(Array)
131
+ self.unresolved_parameters = value
132
+ end
133
+ end
134
+ end
135
+
136
+ # Show invalid properties with the reasons. Usually used together with valid?
137
+ # @return Array for valid properties with the reasons
138
+ def list_invalid_properties
139
+ invalid_properties = Array.new
140
+ invalid_properties
141
+ end
142
+
143
+ # Check to see if the all the properties in the model are valid
144
+ # @return true if the model is valid
145
+ def valid?
146
+ true
147
+ end
148
+
149
+ # Checks equality by comparing each attribute.
150
+ # @param [Object] Object to be compared
151
+ def ==(o)
152
+ return true if self.equal?(o)
153
+ self.class == o.class &&
154
+ cjson == o.cjson &&
155
+ conflicts == o.conflicts &&
156
+ content_manifest == o.content_manifest &&
157
+ files_skipped == o.files_skipped &&
158
+ files_written == o.files_written &&
159
+ library_oid == o.library_oid &&
160
+ revision_number == o.revision_number &&
161
+ unresolved_parameters == o.unresolved_parameters
162
+ end
163
+
164
+ # @see the `==` method
165
+ # @param [Object] Object to be compared
166
+ def eql?(o)
167
+ self == o
168
+ end
169
+
170
+ # Calculates hash code according to all attributes.
171
+ # @return [Integer] Hash code
172
+ def hash
173
+ [cjson, conflicts, content_manifest, files_skipped, files_written, library_oid, revision_number, unresolved_parameters].hash
174
+ end
175
+
176
+ # Builds the object from hash
177
+ # @param [Hash] attributes Model attributes in the form of hash
178
+ # @return [Object] Returns the model itself
179
+ def self.build_from_hash(attributes)
180
+ new.build_from_hash(attributes)
181
+ end
182
+
183
+ # Builds the object from hash
184
+ # @param [Hash] attributes Model attributes in the form of hash
185
+ # @return [Object] Returns the model itself
186
+ def build_from_hash(attributes)
187
+ return nil unless attributes.is_a?(Hash)
188
+ attributes = attributes.transform_keys(&:to_sym)
189
+ self.class.openapi_types.each_pair do |key, type|
190
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
191
+ self.send("#{key}=", nil)
192
+ elsif type =~ /\AArray<(.*)>/i
193
+ # check to ensure the input is an array given that the attribute
194
+ # is documented as an array but the input is not
195
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
196
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
197
+ end
198
+ elsif !attributes[self.class.attribute_map[key]].nil?
199
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
200
+ end
201
+ end
202
+
203
+ self
204
+ end
205
+
206
+ # Deserializes the data based on type
207
+ # @param string type Data type
208
+ # @param string value Value to be deserialized
209
+ # @return [Object] Deserialized data
210
+ def _deserialize(type, value)
211
+ case type.to_sym
212
+ when :Time
213
+ Time.parse(value)
214
+ when :Date
215
+ Date.parse(value)
216
+ when :String
217
+ value.to_s
218
+ when :Integer
219
+ value.to_i
220
+ when :Float
221
+ value.to_f
222
+ when :Boolean
223
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
224
+ true
225
+ else
226
+ false
227
+ end
228
+ when :Object
229
+ # generic object (usually a Hash), return directly
230
+ value
231
+ when /\AArray<(?<inner_type>.+)>\z/
232
+ inner_type = Regexp.last_match[:inner_type]
233
+ value.map { |v| _deserialize(inner_type, v) }
234
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
235
+ k_type = Regexp.last_match[:k_type]
236
+ v_type = Regexp.last_match[:v_type]
237
+ {}.tap do |hash|
238
+ value.each do |k, v|
239
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
240
+ end
241
+ end
242
+ else # model
243
+ # models (e.g. Pet) or oneOf
244
+ klass = UltracartClient.const_get(type)
245
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
246
+ end
247
+ end
248
+
249
+ # Returns the string representation of the object
250
+ # @return [String] String presentation of the object
251
+ def to_s
252
+ to_hash.to_s
253
+ end
254
+
255
+ # to_body is an alias to to_hash (backward compatibility)
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_body
258
+ to_hash
259
+ end
260
+
261
+ # Returns the object in the form of hash
262
+ # @return [Hash] Returns the object in the form of hash
263
+ def to_hash
264
+ hash = {}
265
+ self.class.attribute_map.each_pair do |attr, param|
266
+ value = self.send(attr)
267
+ if value.nil?
268
+ is_nullable = self.class.openapi_nullable.include?(attr)
269
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
270
+ end
271
+
272
+ hash[param] = _to_hash(value)
273
+ end
274
+ hash
275
+ end
276
+
277
+ # Outputs non-array value in the form of hash
278
+ # For object, use to_hash. Otherwise, just return the value
279
+ # @param [Object] value Any valid value
280
+ # @return [Hash] Returns the value in the form of hash
281
+ def _to_hash(value)
282
+ if value.is_a?(Array)
283
+ value.compact.map { |v| _to_hash(v) }
284
+ elsif value.is_a?(Hash)
285
+ {}.tap do |hash|
286
+ value.each { |k, v| hash[k] = _to_hash(v) }
287
+ end
288
+ elsif value.respond_to? :to_hash
289
+ value.to_hash
290
+ else
291
+ value
292
+ end
293
+ end
294
+
295
+ end
296
+
297
+ end
@@ -0,0 +1,290 @@
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 SfvbLibraryInstallRecord
18
+ # When it was installed, ISO 8601.
19
+ attr_accessor :installed_dts
20
+
21
+ # The revision installed most recently on this storefront.
22
+ attr_accessor :installed_revision_number
23
+
24
+ # The latest published revision, or null when it can no longer be read.
25
+ attr_accessor :latest_revision_number
26
+
27
+ # The entry.
28
+ attr_accessor :library_oid
29
+
30
+ # The entry name, when the entry is still visible to this account.
31
+ attr_accessor :name
32
+
33
+ # True when the owner retired the entry. The installed copy keeps working.
34
+ attr_accessor :retired
35
+
36
+ # The storefront it was installed on.
37
+ attr_accessor :storefront_oid
38
+
39
+ # True when a newer revision has been published. Nothing updates automatically.
40
+ attr_accessor :update_available
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ def self.attribute_map
44
+ {
45
+ :'installed_dts' => :'installed_dts',
46
+ :'installed_revision_number' => :'installed_revision_number',
47
+ :'latest_revision_number' => :'latest_revision_number',
48
+ :'library_oid' => :'library_oid',
49
+ :'name' => :'name',
50
+ :'retired' => :'retired',
51
+ :'storefront_oid' => :'storefront_oid',
52
+ :'update_available' => :'update_available'
53
+ }
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ :'installed_dts' => :'String',
65
+ :'installed_revision_number' => :'Integer',
66
+ :'latest_revision_number' => :'Integer',
67
+ :'library_oid' => :'Integer',
68
+ :'name' => :'String',
69
+ :'retired' => :'Boolean',
70
+ :'storefront_oid' => :'Integer',
71
+ :'update_available' => :'Boolean'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbLibraryInstallRecord` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!self.class.attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbLibraryInstallRecord`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'installed_dts')
97
+ self.installed_dts = attributes[:'installed_dts']
98
+ end
99
+
100
+ if attributes.key?(:'installed_revision_number')
101
+ self.installed_revision_number = attributes[:'installed_revision_number']
102
+ end
103
+
104
+ if attributes.key?(:'latest_revision_number')
105
+ self.latest_revision_number = attributes[:'latest_revision_number']
106
+ end
107
+
108
+ if attributes.key?(:'library_oid')
109
+ self.library_oid = attributes[:'library_oid']
110
+ end
111
+
112
+ if attributes.key?(:'name')
113
+ self.name = attributes[:'name']
114
+ end
115
+
116
+ if attributes.key?(:'retired')
117
+ self.retired = attributes[:'retired']
118
+ end
119
+
120
+ if attributes.key?(:'storefront_oid')
121
+ self.storefront_oid = attributes[:'storefront_oid']
122
+ end
123
+
124
+ if attributes.key?(:'update_available')
125
+ self.update_available = attributes[:'update_available']
126
+ end
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ invalid_properties = Array.new
133
+ invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ true
140
+ end
141
+
142
+ # Checks equality by comparing each attribute.
143
+ # @param [Object] Object to be compared
144
+ def ==(o)
145
+ return true if self.equal?(o)
146
+ self.class == o.class &&
147
+ installed_dts == o.installed_dts &&
148
+ installed_revision_number == o.installed_revision_number &&
149
+ latest_revision_number == o.latest_revision_number &&
150
+ library_oid == o.library_oid &&
151
+ name == o.name &&
152
+ retired == o.retired &&
153
+ storefront_oid == o.storefront_oid &&
154
+ update_available == o.update_available
155
+ end
156
+
157
+ # @see the `==` method
158
+ # @param [Object] Object to be compared
159
+ def eql?(o)
160
+ self == o
161
+ end
162
+
163
+ # Calculates hash code according to all attributes.
164
+ # @return [Integer] Hash code
165
+ def hash
166
+ [installed_dts, installed_revision_number, latest_revision_number, library_oid, name, retired, storefront_oid, update_available].hash
167
+ end
168
+
169
+ # Builds the object from hash
170
+ # @param [Hash] attributes Model attributes in the form of hash
171
+ # @return [Object] Returns the model itself
172
+ def self.build_from_hash(attributes)
173
+ new.build_from_hash(attributes)
174
+ end
175
+
176
+ # Builds the object from hash
177
+ # @param [Hash] attributes Model attributes in the form of hash
178
+ # @return [Object] Returns the model itself
179
+ def build_from_hash(attributes)
180
+ return nil unless attributes.is_a?(Hash)
181
+ attributes = attributes.transform_keys(&:to_sym)
182
+ self.class.openapi_types.each_pair do |key, type|
183
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
184
+ self.send("#{key}=", nil)
185
+ elsif type =~ /\AArray<(.*)>/i
186
+ # check to ensure the input is an array given that the attribute
187
+ # is documented as an array but the input is not
188
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
189
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
190
+ end
191
+ elsif !attributes[self.class.attribute_map[key]].nil?
192
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
193
+ end
194
+ end
195
+
196
+ self
197
+ end
198
+
199
+ # Deserializes the data based on type
200
+ # @param string type Data type
201
+ # @param string value Value to be deserialized
202
+ # @return [Object] Deserialized data
203
+ def _deserialize(type, value)
204
+ case type.to_sym
205
+ when :Time
206
+ Time.parse(value)
207
+ when :Date
208
+ Date.parse(value)
209
+ when :String
210
+ value.to_s
211
+ when :Integer
212
+ value.to_i
213
+ when :Float
214
+ value.to_f
215
+ when :Boolean
216
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
217
+ true
218
+ else
219
+ false
220
+ end
221
+ when :Object
222
+ # generic object (usually a Hash), return directly
223
+ value
224
+ when /\AArray<(?<inner_type>.+)>\z/
225
+ inner_type = Regexp.last_match[:inner_type]
226
+ value.map { |v| _deserialize(inner_type, v) }
227
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
228
+ k_type = Regexp.last_match[:k_type]
229
+ v_type = Regexp.last_match[:v_type]
230
+ {}.tap do |hash|
231
+ value.each do |k, v|
232
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
233
+ end
234
+ end
235
+ else # model
236
+ # models (e.g. Pet) or oneOf
237
+ klass = UltracartClient.const_get(type)
238
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
239
+ end
240
+ end
241
+
242
+ # Returns the string representation of the object
243
+ # @return [String] String presentation of the object
244
+ def to_s
245
+ to_hash.to_s
246
+ end
247
+
248
+ # to_body is an alias to to_hash (backward compatibility)
249
+ # @return [Hash] Returns the object in the form of hash
250
+ def to_body
251
+ to_hash
252
+ end
253
+
254
+ # Returns the object in the form of hash
255
+ # @return [Hash] Returns the object in the form of hash
256
+ def to_hash
257
+ hash = {}
258
+ self.class.attribute_map.each_pair do |attr, param|
259
+ value = self.send(attr)
260
+ if value.nil?
261
+ is_nullable = self.class.openapi_nullable.include?(attr)
262
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
263
+ end
264
+
265
+ hash[param] = _to_hash(value)
266
+ end
267
+ hash
268
+ end
269
+
270
+ # Outputs non-array value in the form of hash
271
+ # For object, use to_hash. Otherwise, just return the value
272
+ # @param [Object] value Any valid value
273
+ # @return [Hash] Returns the value in the form of hash
274
+ def _to_hash(value)
275
+ if value.is_a?(Array)
276
+ value.compact.map { |v| _to_hash(v) }
277
+ elsif value.is_a?(Hash)
278
+ {}.tap do |hash|
279
+ value.each { |k, v| hash[k] = _to_hash(v) }
280
+ end
281
+ elsif value.respond_to? :to_hash
282
+ value.to_hash
283
+ else
284
+ value
285
+ end
286
+ end
287
+
288
+ end
289
+
290
+ end