smplkit 1.0.21 → 1.0.23

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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/billing_api.rb +0 -125
  3. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/account.rb +49 -5
  4. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{catalog_bundle_resource.rb → next_tier_meta.rb} +60 -68
  5. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_attributes.rb +1 -11
  6. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_list_meta.rb +302 -0
  7. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_list_response.rb +13 -4
  8. data/lib/smplkit/_generated/app/lib/smplkit_app_client.rb +2 -9
  9. data/lib/smplkit/_generated/app/spec/api/billing_api_spec.rb +0 -23
  10. data/lib/smplkit/_generated/app/spec/models/account_spec.rb +24 -0
  11. data/lib/smplkit/_generated/app/spec/models/{bundle_attributes_spec.rb → next_tier_meta_spec.rb} +9 -15
  12. data/lib/smplkit/_generated/app/spec/models/subscription_attributes_spec.rb +0 -6
  13. data/lib/smplkit/_generated/app/spec/models/subscription_list_meta_spec.rb +70 -0
  14. data/lib/smplkit/_generated/app/spec/models/subscription_list_response_spec.rb +6 -0
  15. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_http.rb +23 -2
  16. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/test_forwarder_request.rb +22 -1
  17. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client.rb +0 -1
  18. metadata +5 -21
  19. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_attributes.rb +0 -246
  20. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_list_response.rb +0 -166
  21. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_resource.rb +0 -224
  22. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_response.rb +0 -164
  23. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/catalog_bundle_attributes.rb +0 -244
  24. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_bundle_attributes.rb +0 -174
  25. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_bundle_body.rb +0 -164
  26. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_bundle_data.rb +0 -214
  27. data/lib/smplkit/_generated/app/spec/models/bundle_list_response_spec.rb +0 -36
  28. data/lib/smplkit/_generated/app/spec/models/bundle_resource_spec.rb +0 -52
  29. data/lib/smplkit/_generated/app/spec/models/bundle_response_spec.rb +0 -36
  30. data/lib/smplkit/_generated/app/spec/models/catalog_bundle_attributes_spec.rb +0 -54
  31. data/lib/smplkit/_generated/app/spec/models/catalog_bundle_resource_spec.rb +0 -52
  32. data/lib/smplkit/_generated/app/spec/models/create_bundle_attributes_spec.rb +0 -42
  33. data/lib/smplkit/_generated/app/spec/models/create_bundle_body_spec.rb +0 -36
  34. data/lib/smplkit/_generated/app/spec/models/create_bundle_data_spec.rb +0 -46
  35. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/success_status.rb +0 -103
  36. data/lib/smplkit/_generated/audit/spec/models/success_status_spec.rb +0 -21
@@ -57,7 +57,7 @@ module SmplkitGeneratedClient::Audit
57
57
  :'url' => :'String',
58
58
  :'headers' => :'Array<HttpHeader>',
59
59
  :'body' => :'String',
60
- :'success_status' => :'SuccessStatus',
60
+ :'success_status' => :'String',
61
61
  :'timeout_ms' => :'Integer'
62
62
  }
63
63
  end
@@ -110,6 +110,8 @@ module SmplkitGeneratedClient::Audit
110
110
 
111
111
  if attributes.key?(:'success_status')
112
112
  self.success_status = attributes[:'success_status']
113
+ else
114
+ self.success_status = '2xx'
113
115
  end
114
116
 
115
117
  if attributes.key?(:'timeout_ms')
@@ -138,6 +140,10 @@ module SmplkitGeneratedClient::Audit
138
140
  invalid_properties.push('invalid value for "body", the character length must be smaller than or equal to 65536.')
139
141
  end
140
142
 
143
+ if !@success_status.nil? && @success_status.to_s.length > 3
144
+ invalid_properties.push('invalid value for "success_status", the character length must be smaller than or equal to 3.')
145
+ end
146
+
141
147
  if !@timeout_ms.nil? && @timeout_ms > 30000
142
148
  invalid_properties.push('invalid value for "timeout_ms", must be smaller than or equal to 30000.')
143
149
  end
@@ -157,6 +163,7 @@ module SmplkitGeneratedClient::Audit
157
163
  return false if @url.to_s.length > 2048
158
164
  return false if @url.to_s.length < 1
159
165
  return false if !@body.nil? && @body.to_s.length > 65536
166
+ return false if !@success_status.nil? && @success_status.to_s.length > 3
160
167
  return false if !@timeout_ms.nil? && @timeout_ms > 30000
161
168
  return false if !@timeout_ms.nil? && @timeout_ms < 1
162
169
  true
@@ -190,6 +197,20 @@ module SmplkitGeneratedClient::Audit
190
197
  @body = body
191
198
  end
192
199
 
200
+ # Custom attribute writer method with validation
201
+ # @param [Object] success_status Value to be assigned
202
+ def success_status=(success_status)
203
+ if success_status.nil?
204
+ fail ArgumentError, 'success_status cannot be nil'
205
+ end
206
+
207
+ if success_status.to_s.length > 3
208
+ fail ArgumentError, 'invalid value for "success_status", the character length must be smaller than or equal to 3.'
209
+ end
210
+
211
+ @success_status = success_status
212
+ end
213
+
193
214
  # Custom attribute writer method with validation
194
215
  # @param [Object] timeout_ms Value to be assigned
195
216
  def timeout_ms=(timeout_ms)
@@ -37,7 +37,6 @@ require 'smplkit_audit_client/models/forwarder_resource'
37
37
  require 'smplkit_audit_client/models/forwarder_response'
38
38
  require 'smplkit_audit_client/models/http_header'
39
39
  require 'smplkit_audit_client/models/retry_failed_deliveries_summary'
40
- require 'smplkit_audit_client/models/success_status'
41
40
  require 'smplkit_audit_client/models/test_forwarder_request'
42
41
  require 'smplkit_audit_client/models/test_forwarder_response'
43
42
  require 'smplkit_audit_client/models/usage_resource'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smplkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.21
4
+ version: 1.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Smpl Solutions LLC
@@ -183,12 +183,6 @@ files:
183
183
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/api_key_resource.rb
184
184
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/api_key_response.rb
185
185
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/auth_token_response.rb
186
- - lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_attributes.rb
187
- - lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_list_response.rb
188
- - lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_resource.rb
189
- - lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_response.rb
190
- - lib/smplkit/_generated/app/lib/smplkit_app_client/models/catalog_bundle_attributes.rb
191
- - lib/smplkit/_generated/app/lib/smplkit_app_client/models/catalog_bundle_resource.rb
192
186
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/contact_topic.rb
193
187
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/context.rb
194
188
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_batch_response.rb
@@ -201,9 +195,6 @@ files:
201
195
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_type_list_response.rb
202
196
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_type_resource.rb
203
197
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_type_response.rb
204
- - lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_bundle_attributes.rb
205
- - lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_bundle_body.rb
206
- - lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_bundle_data.rb
207
198
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_subscription_attributes.rb
208
199
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_subscription_body.rb
209
200
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_subscription_data.rb
@@ -238,6 +229,7 @@ files:
238
229
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_rollup_attributes.rb
239
230
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_rollup_list_response.rb
240
231
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_rollup_resource.rb
232
+ - lib/smplkit/_generated/app/lib/smplkit_app_client/models/next_tier_meta.rb
241
233
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/oidc_provider.rb
242
234
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/page_meta.rb
243
235
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/payment_method.rb
@@ -261,6 +253,7 @@ files:
261
253
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/setup_intent_resource.rb
262
254
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/setup_intent_response.rb
263
255
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_attributes.rb
256
+ - lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_list_meta.rb
264
257
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_list_response.rb
265
258
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_resource.rb
266
259
  - lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_response.rb
@@ -299,12 +292,6 @@ files:
299
292
  - lib/smplkit/_generated/app/spec/models/api_key_response_spec.rb
300
293
  - lib/smplkit/_generated/app/spec/models/api_key_spec.rb
301
294
  - lib/smplkit/_generated/app/spec/models/auth_token_response_spec.rb
302
- - lib/smplkit/_generated/app/spec/models/bundle_attributes_spec.rb
303
- - lib/smplkit/_generated/app/spec/models/bundle_list_response_spec.rb
304
- - lib/smplkit/_generated/app/spec/models/bundle_resource_spec.rb
305
- - lib/smplkit/_generated/app/spec/models/bundle_response_spec.rb
306
- - lib/smplkit/_generated/app/spec/models/catalog_bundle_attributes_spec.rb
307
- - lib/smplkit/_generated/app/spec/models/catalog_bundle_resource_spec.rb
308
295
  - lib/smplkit/_generated/app/spec/models/contact_topic_spec.rb
309
296
  - lib/smplkit/_generated/app/spec/models/context_batch_response_spec.rb
310
297
  - lib/smplkit/_generated/app/spec/models/context_bulk_item_spec.rb
@@ -317,9 +304,6 @@ files:
317
304
  - lib/smplkit/_generated/app/spec/models/context_type_resource_spec.rb
318
305
  - lib/smplkit/_generated/app/spec/models/context_type_response_spec.rb
319
306
  - lib/smplkit/_generated/app/spec/models/context_type_spec.rb
320
- - lib/smplkit/_generated/app/spec/models/create_bundle_attributes_spec.rb
321
- - lib/smplkit/_generated/app/spec/models/create_bundle_body_spec.rb
322
- - lib/smplkit/_generated/app/spec/models/create_bundle_data_spec.rb
323
307
  - lib/smplkit/_generated/app/spec/models/create_subscription_attributes_spec.rb
324
308
  - lib/smplkit/_generated/app/spec/models/create_subscription_body_spec.rb
325
309
  - lib/smplkit/_generated/app/spec/models/create_subscription_data_spec.rb
@@ -354,6 +338,7 @@ files:
354
338
  - lib/smplkit/_generated/app/spec/models/metric_rollup_attributes_spec.rb
355
339
  - lib/smplkit/_generated/app/spec/models/metric_rollup_list_response_spec.rb
356
340
  - lib/smplkit/_generated/app/spec/models/metric_rollup_resource_spec.rb
341
+ - lib/smplkit/_generated/app/spec/models/next_tier_meta_spec.rb
357
342
  - lib/smplkit/_generated/app/spec/models/oidc_provider_spec.rb
358
343
  - lib/smplkit/_generated/app/spec/models/page_meta_spec.rb
359
344
  - lib/smplkit/_generated/app/spec/models/payment_method_list_response_spec.rb
@@ -377,6 +362,7 @@ files:
377
362
  - lib/smplkit/_generated/app/spec/models/setup_intent_resource_spec.rb
378
363
  - lib/smplkit/_generated/app/spec/models/setup_intent_response_spec.rb
379
364
  - lib/smplkit/_generated/app/spec/models/subscription_attributes_spec.rb
365
+ - lib/smplkit/_generated/app/spec/models/subscription_list_meta_spec.rb
380
366
  - lib/smplkit/_generated/app/spec/models/subscription_list_response_spec.rb
381
367
  - lib/smplkit/_generated/app/spec/models/subscription_resource_spec.rb
382
368
  - lib/smplkit/_generated/app/spec/models/subscription_response_spec.rb
@@ -415,7 +401,6 @@ files:
415
401
  - lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_response.rb
416
402
  - lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/http_header.rb
417
403
  - lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/retry_failed_deliveries_summary.rb
418
- - lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/success_status.rb
419
404
  - lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/test_forwarder_request.rb
420
405
  - lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/test_forwarder_response.rb
421
406
  - lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/usage_resource.rb
@@ -443,7 +428,6 @@ files:
443
428
  - lib/smplkit/_generated/audit/spec/models/forwarder_spec.rb
444
429
  - lib/smplkit/_generated/audit/spec/models/http_header_spec.rb
445
430
  - lib/smplkit/_generated/audit/spec/models/retry_failed_deliveries_summary_spec.rb
446
- - lib/smplkit/_generated/audit/spec/models/success_status_spec.rb
447
431
  - lib/smplkit/_generated/audit/spec/models/test_forwarder_request_spec.rb
448
432
  - lib/smplkit/_generated/audit/spec/models/test_forwarder_response_spec.rb
449
433
  - lib/smplkit/_generated/audit/spec/models/usage_resource_spec.rb
@@ -1,246 +0,0 @@
1
- =begin
2
- #smplkit API
3
-
4
- #API for the smplkit platform.
5
-
6
- The version of the OpenAPI document: 0.1.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.22.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module SmplkitGeneratedClient::App
17
- class BundleAttributes < ApiModelBase
18
- attr_accessor :bundle
19
-
20
- attr_accessor :plan
21
-
22
- attr_accessor :products
23
-
24
- attr_accessor :subscriptions
25
-
26
- # Attribute mapping from ruby-style variable name to JSON key.
27
- def self.attribute_map
28
- {
29
- :'bundle' => :'bundle',
30
- :'plan' => :'plan',
31
- :'products' => :'products',
32
- :'subscriptions' => :'subscriptions'
33
- }
34
- end
35
-
36
- # Returns attribute mapping this model knows about
37
- def self.acceptable_attribute_map
38
- attribute_map
39
- end
40
-
41
- # Returns all the JSON keys this model knows about
42
- def self.acceptable_attributes
43
- acceptable_attribute_map.values
44
- end
45
-
46
- # Attribute type mapping.
47
- def self.openapi_types
48
- {
49
- :'bundle' => :'String',
50
- :'plan' => :'String',
51
- :'products' => :'Array<String>',
52
- :'subscriptions' => :'Array<String>'
53
- }
54
- end
55
-
56
- # List of attributes with nullable: true
57
- def self.openapi_nullable
58
- Set.new([
59
- ])
60
- end
61
-
62
- # Initializes the object
63
- # @param [Hash] attributes Model attributes in the form of hash
64
- def initialize(attributes = {})
65
- if (!attributes.is_a?(Hash))
66
- fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::App::BundleAttributes` initialize method"
67
- end
68
-
69
- # check to see if the attribute exists and convert string to symbol for hash key
70
- acceptable_attribute_map = self.class.acceptable_attribute_map
71
- attributes = attributes.each_with_object({}) { |(k, v), h|
72
- if (!acceptable_attribute_map.key?(k.to_sym))
73
- fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::App::BundleAttributes`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
- end
75
- h[k.to_sym] = v
76
- }
77
-
78
- if attributes.key?(:'bundle')
79
- self.bundle = attributes[:'bundle']
80
- else
81
- self.bundle = nil
82
- end
83
-
84
- if attributes.key?(:'plan')
85
- self.plan = attributes[:'plan']
86
- else
87
- self.plan = nil
88
- end
89
-
90
- if attributes.key?(:'products')
91
- if (value = attributes[:'products']).is_a?(Array)
92
- self.products = value
93
- end
94
- else
95
- self.products = nil
96
- end
97
-
98
- if attributes.key?(:'subscriptions')
99
- if (value = attributes[:'subscriptions']).is_a?(Array)
100
- self.subscriptions = value
101
- end
102
- else
103
- self.subscriptions = nil
104
- end
105
- end
106
-
107
- # Show invalid properties with the reasons. Usually used together with valid?
108
- # @return Array for valid properties with the reasons
109
- def list_invalid_properties
110
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
111
- invalid_properties = Array.new
112
- if @bundle.nil?
113
- invalid_properties.push('invalid value for "bundle", bundle cannot be nil.')
114
- end
115
-
116
- if @plan.nil?
117
- invalid_properties.push('invalid value for "plan", plan cannot be nil.')
118
- end
119
-
120
- if @products.nil?
121
- invalid_properties.push('invalid value for "products", products cannot be nil.')
122
- end
123
-
124
- if @subscriptions.nil?
125
- invalid_properties.push('invalid value for "subscriptions", subscriptions cannot be nil.')
126
- end
127
-
128
- invalid_properties
129
- end
130
-
131
- # Check to see if the all the properties in the model are valid
132
- # @return true if the model is valid
133
- def valid?
134
- warn '[DEPRECATED] the `valid?` method is obsolete'
135
- return false if @bundle.nil?
136
- return false if @plan.nil?
137
- return false if @products.nil?
138
- return false if @subscriptions.nil?
139
- true
140
- end
141
-
142
- # Custom attribute writer method with validation
143
- # @param [Object] bundle Value to be assigned
144
- def bundle=(bundle)
145
- if bundle.nil?
146
- fail ArgumentError, 'bundle cannot be nil'
147
- end
148
-
149
- @bundle = bundle
150
- end
151
-
152
- # Custom attribute writer method with validation
153
- # @param [Object] plan Value to be assigned
154
- def plan=(plan)
155
- if plan.nil?
156
- fail ArgumentError, 'plan cannot be nil'
157
- end
158
-
159
- @plan = plan
160
- end
161
-
162
- # Custom attribute writer method with validation
163
- # @param [Object] products Value to be assigned
164
- def products=(products)
165
- if products.nil?
166
- fail ArgumentError, 'products cannot be nil'
167
- end
168
-
169
- @products = products
170
- end
171
-
172
- # Custom attribute writer method with validation
173
- # @param [Object] subscriptions Value to be assigned
174
- def subscriptions=(subscriptions)
175
- if subscriptions.nil?
176
- fail ArgumentError, 'subscriptions cannot be nil'
177
- end
178
-
179
- @subscriptions = subscriptions
180
- end
181
-
182
- # Checks equality by comparing each attribute.
183
- # @param [Object] Object to be compared
184
- def ==(o)
185
- return true if self.equal?(o)
186
- self.class == o.class &&
187
- bundle == o.bundle &&
188
- plan == o.plan &&
189
- products == o.products &&
190
- subscriptions == o.subscriptions
191
- end
192
-
193
- # @see the `==` method
194
- # @param [Object] Object to be compared
195
- def eql?(o)
196
- self == o
197
- end
198
-
199
- # Calculates hash code according to all attributes.
200
- # @return [Integer] Hash code
201
- def hash
202
- [bundle, plan, products, subscriptions].hash
203
- end
204
-
205
- # Builds the object from hash
206
- # @param [Hash] attributes Model attributes in the form of hash
207
- # @return [Object] Returns the model itself
208
- def self.build_from_hash(attributes)
209
- return nil unless attributes.is_a?(Hash)
210
- attributes = attributes.transform_keys(&:to_sym)
211
- transformed_hash = {}
212
- openapi_types.each_pair do |key, type|
213
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
214
- transformed_hash["#{key}"] = nil
215
- elsif type =~ /\AArray<(.*)>/i
216
- # check to ensure the input is an array given that the attribute
217
- # is documented as an array but the input is not
218
- if attributes[attribute_map[key]].is_a?(Array)
219
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
220
- end
221
- elsif !attributes[attribute_map[key]].nil?
222
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
223
- end
224
- end
225
- new(transformed_hash)
226
- end
227
-
228
- # Returns the object in the form of hash
229
- # @return [Hash] Returns the object in the form of hash
230
- def to_hash
231
- hash = {}
232
- self.class.attribute_map.each_pair do |attr, param|
233
- value = self.send(attr)
234
- if value.nil?
235
- is_nullable = self.class.openapi_nullable.include?(attr)
236
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
237
- end
238
-
239
- hash[param] = _to_hash(value)
240
- end
241
- hash
242
- end
243
-
244
- end
245
-
246
- end
@@ -1,166 +0,0 @@
1
- =begin
2
- #smplkit API
3
-
4
- #API for the smplkit platform.
5
-
6
- The version of the OpenAPI document: 0.1.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.22.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module SmplkitGeneratedClient::App
17
- class BundleListResponse < ApiModelBase
18
- attr_accessor :data
19
-
20
- # Attribute mapping from ruby-style variable name to JSON key.
21
- def self.attribute_map
22
- {
23
- :'data' => :'data'
24
- }
25
- end
26
-
27
- # Returns attribute mapping this model knows about
28
- def self.acceptable_attribute_map
29
- attribute_map
30
- end
31
-
32
- # Returns all the JSON keys this model knows about
33
- def self.acceptable_attributes
34
- acceptable_attribute_map.values
35
- end
36
-
37
- # Attribute type mapping.
38
- def self.openapi_types
39
- {
40
- :'data' => :'Array<CatalogBundleResource>'
41
- }
42
- end
43
-
44
- # List of attributes with nullable: true
45
- def self.openapi_nullable
46
- Set.new([
47
- ])
48
- end
49
-
50
- # Initializes the object
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- def initialize(attributes = {})
53
- if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::App::BundleListResponse` initialize method"
55
- end
56
-
57
- # check to see if the attribute exists and convert string to symbol for hash key
58
- acceptable_attribute_map = self.class.acceptable_attribute_map
59
- attributes = attributes.each_with_object({}) { |(k, v), h|
60
- if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::App::BundleListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
- end
63
- h[k.to_sym] = v
64
- }
65
-
66
- if attributes.key?(:'data')
67
- if (value = attributes[:'data']).is_a?(Array)
68
- self.data = value
69
- end
70
- else
71
- self.data = nil
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
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
- invalid_properties = Array.new
80
- if @data.nil?
81
- invalid_properties.push('invalid value for "data", data cannot be nil.')
82
- end
83
-
84
- invalid_properties
85
- end
86
-
87
- # Check to see if the all the properties in the model are valid
88
- # @return true if the model is valid
89
- def valid?
90
- warn '[DEPRECATED] the `valid?` method is obsolete'
91
- return false if @data.nil?
92
- true
93
- end
94
-
95
- # Custom attribute writer method with validation
96
- # @param [Object] data Value to be assigned
97
- def data=(data)
98
- if data.nil?
99
- fail ArgumentError, 'data cannot be nil'
100
- end
101
-
102
- @data = data
103
- end
104
-
105
- # Checks equality by comparing each attribute.
106
- # @param [Object] Object to be compared
107
- def ==(o)
108
- return true if self.equal?(o)
109
- self.class == o.class &&
110
- data == o.data
111
- end
112
-
113
- # @see the `==` method
114
- # @param [Object] Object to be compared
115
- def eql?(o)
116
- self == o
117
- end
118
-
119
- # Calculates hash code according to all attributes.
120
- # @return [Integer] Hash code
121
- def hash
122
- [data].hash
123
- end
124
-
125
- # Builds the object from hash
126
- # @param [Hash] attributes Model attributes in the form of hash
127
- # @return [Object] Returns the model itself
128
- def self.build_from_hash(attributes)
129
- return nil unless attributes.is_a?(Hash)
130
- attributes = attributes.transform_keys(&:to_sym)
131
- transformed_hash = {}
132
- openapi_types.each_pair do |key, type|
133
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
- transformed_hash["#{key}"] = nil
135
- elsif type =~ /\AArray<(.*)>/i
136
- # check to ensure the input is an array given that the attribute
137
- # is documented as an array but the input is not
138
- if attributes[attribute_map[key]].is_a?(Array)
139
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
- end
141
- elsif !attributes[attribute_map[key]].nil?
142
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
- end
144
- end
145
- new(transformed_hash)
146
- end
147
-
148
- # Returns the object in the form of hash
149
- # @return [Hash] Returns the object in the form of hash
150
- def to_hash
151
- hash = {}
152
- self.class.attribute_map.each_pair do |attr, param|
153
- value = self.send(attr)
154
- if value.nil?
155
- is_nullable = self.class.openapi_nullable.include?(attr)
156
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
157
- end
158
-
159
- hash[param] = _to_hash(value)
160
- end
161
- hash
162
- end
163
-
164
- end
165
-
166
- end