cbox_billing 0.1.0 → 0.2.0

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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cbox_billing/api/checkout_portal_api.rb +214 -0
  3. data/lib/cbox_billing/api/coupons_api.rb +55 -55
  4. data/lib/cbox_billing/api/experiments_api.rb +526 -0
  5. data/lib/cbox_billing/api/organizations_api.rb +554 -0
  6. data/lib/cbox_billing/api/pricing_tables_api.rb +519 -0
  7. data/lib/cbox_billing/api/retention_api.rb +884 -0
  8. data/lib/cbox_billing/api/sellers_api.rb +590 -0
  9. data/lib/cbox_billing/models/checkout_link.rb +283 -0
  10. data/lib/cbox_billing/models/conclude_experiment_request.rb +161 -0
  11. data/lib/cbox_billing/models/create_checkout_link_request.rb +178 -0
  12. data/lib/cbox_billing/models/customer_lifecycle_refusal.rb +238 -0
  13. data/lib/cbox_billing/models/customer_lifecycle_state.rb +268 -0
  14. data/lib/cbox_billing/models/delete_experiment200_response.rb +227 -0
  15. data/lib/cbox_billing/models/delete_organization200_response.rb +227 -0
  16. data/lib/cbox_billing/models/experiment.rb +387 -0
  17. data/lib/cbox_billing/models/experiment_input.rb +410 -0
  18. data/lib/cbox_billing/models/experiment_input_variants_inner.rb +233 -0
  19. data/lib/cbox_billing/models/experiment_variant.rb +266 -0
  20. data/lib/cbox_billing/models/list_checkout_links200_response.rb +179 -0
  21. data/lib/cbox_billing/models/list_checkout_links200_response_data_inner.rb +223 -0
  22. data/lib/cbox_billing/models/list_experiments200_response.rb +179 -0
  23. data/lib/cbox_billing/models/list_pricing_tables200_response.rb +179 -0
  24. data/lib/cbox_billing/models/list_retention_offers200_response.rb +179 -0
  25. data/lib/cbox_billing/models/list_retention_reasons200_response.rb +179 -0
  26. data/lib/cbox_billing/models/list_sellers200_response.rb +179 -0
  27. data/lib/cbox_billing/models/merge_organization_request.rb +221 -0
  28. data/lib/cbox_billing/models/merge_organization_request_fields.rb +279 -0
  29. data/lib/cbox_billing/models/preview_organization_merge200_response.rb +343 -0
  30. data/lib/cbox_billing/models/preview_organization_merge_request.rb +177 -0
  31. data/lib/cbox_billing/models/pricing_table.rb +426 -0
  32. data/lib/cbox_billing/models/pricing_table_column.rb +248 -0
  33. data/lib/cbox_billing/models/pricing_table_input.rb +388 -0
  34. data/lib/cbox_billing/models/retention_offer.rb +389 -0
  35. data/lib/cbox_billing/models/retention_offer_input.rb +447 -0
  36. data/lib/cbox_billing/models/retention_reason.rb +282 -0
  37. data/lib/cbox_billing/models/retention_reason_input.rb +195 -0
  38. data/lib/cbox_billing/models/revoke_checkout_link200_response.rb +227 -0
  39. data/lib/cbox_billing/models/seller.rb +551 -0
  40. data/lib/cbox_billing/models/seller_address.rb +201 -0
  41. data/lib/cbox_billing/models/seller_bank.rb +191 -0
  42. data/lib/cbox_billing/models/seller_input.rb +633 -0
  43. data/lib/cbox_billing/models/seller_input_registrations_inner.rb +188 -0
  44. data/lib/cbox_billing/models/seller_registrations_inner.rb +189 -0
  45. data/lib/cbox_billing/models/suspend_organization_request.rb +179 -0
  46. data/lib/cbox_billing/version.rb +1 -1
  47. data/lib/cbox_billing.rb +41 -0
  48. metadata +42 -1
@@ -0,0 +1,426 @@
1
+ =begin
2
+ #Cbox Billing API
3
+
4
+ #The HTTP API of Cbox Billing. Reference: https://github.com/cboxdk/cbox-billing/tree/main/docs/api
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module CboxBilling
17
+ class PricingTable < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ # The public address of the page and embed.
21
+ attr_accessor :key
22
+
23
+ attr_accessor :name
24
+
25
+ attr_accessor :active
26
+
27
+ attr_accessor :seller_entity_id
28
+
29
+ # Empty means every currency the plans are priced in.
30
+ attr_accessor :currencies
31
+
32
+ attr_accessor :default_currency
33
+
34
+ attr_accessor :interval_toggle
35
+
36
+ attr_accessor :cta_label
37
+
38
+ attr_accessor :cta_url_template
39
+
40
+ attr_accessor :columns
41
+
42
+ # Feature ids, in the order the comparison lists them.
43
+ attr_accessor :features
44
+
45
+ attr_accessor :created_at
46
+
47
+ attr_accessor :updated_at
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'id' => :'id',
53
+ :'key' => :'key',
54
+ :'name' => :'name',
55
+ :'active' => :'active',
56
+ :'seller_entity_id' => :'seller_entity_id',
57
+ :'currencies' => :'currencies',
58
+ :'default_currency' => :'default_currency',
59
+ :'interval_toggle' => :'interval_toggle',
60
+ :'cta_label' => :'cta_label',
61
+ :'cta_url_template' => :'cta_url_template',
62
+ :'columns' => :'columns',
63
+ :'features' => :'features',
64
+ :'created_at' => :'created_at',
65
+ :'updated_at' => :'updated_at'
66
+ }
67
+ end
68
+
69
+ # Returns attribute mapping this model knows about
70
+ def self.acceptable_attribute_map
71
+ attribute_map
72
+ end
73
+
74
+ # Returns all the JSON keys this model knows about
75
+ def self.acceptable_attributes
76
+ acceptable_attribute_map.values
77
+ end
78
+
79
+ # Attribute type mapping.
80
+ def self.openapi_types
81
+ {
82
+ :'id' => :'String',
83
+ :'key' => :'String',
84
+ :'name' => :'String',
85
+ :'active' => :'Boolean',
86
+ :'seller_entity_id' => :'String',
87
+ :'currencies' => :'Array<String>',
88
+ :'default_currency' => :'String',
89
+ :'interval_toggle' => :'Boolean',
90
+ :'cta_label' => :'String',
91
+ :'cta_url_template' => :'String',
92
+ :'columns' => :'Array<PricingTableColumn>',
93
+ :'features' => :'Array<String>',
94
+ :'created_at' => :'Time',
95
+ :'updated_at' => :'Time'
96
+ }
97
+ end
98
+
99
+ # List of attributes with nullable: true
100
+ def self.openapi_nullable
101
+ Set.new([
102
+ :'seller_entity_id',
103
+ :'default_currency',
104
+ :'cta_label',
105
+ :'cta_url_template',
106
+ ])
107
+ end
108
+
109
+ # Returns attribute type mapping
110
+ def self.acceptable_openapi_types
111
+ openapi_types
112
+ end
113
+
114
+ # Returns the nullable attributes
115
+ def self.acceptable_openapi_nullable
116
+ openapi_nullable
117
+ end
118
+
119
+ # Initializes the object
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ def initialize(attributes = {})
122
+ if (!attributes.is_a?(Hash))
123
+ fail ArgumentError, "The input argument (attributes) must be a hash in `CboxBilling::PricingTable` initialize method"
124
+ end
125
+
126
+ # check to see if the attribute exists and convert string to symbol for hash key
127
+ acceptable_attribute_map = self.class.acceptable_attribute_map
128
+ attributes = attributes.each_with_object({}) { |(k, v), h|
129
+ if (!acceptable_attribute_map.key?(k.to_sym))
130
+ fail ArgumentError, "`#{k}` is not a valid attribute in `CboxBilling::PricingTable`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
131
+ end
132
+ h[k.to_sym] = v
133
+ }
134
+
135
+ if attributes.key?(:'id')
136
+ self.id = attributes[:'id']
137
+ else
138
+ self.id = nil
139
+ end
140
+
141
+ if attributes.key?(:'key')
142
+ self.key = attributes[:'key']
143
+ else
144
+ self.key = nil
145
+ end
146
+
147
+ if attributes.key?(:'name')
148
+ self.name = attributes[:'name']
149
+ else
150
+ self.name = nil
151
+ end
152
+
153
+ if attributes.key?(:'active')
154
+ self.active = attributes[:'active']
155
+ else
156
+ self.active = nil
157
+ end
158
+
159
+ if attributes.key?(:'seller_entity_id')
160
+ self.seller_entity_id = attributes[:'seller_entity_id']
161
+ end
162
+
163
+ if attributes.key?(:'currencies')
164
+ if (value = attributes[:'currencies']).is_a?(Array)
165
+ self.currencies = value
166
+ end
167
+ else
168
+ self.currencies = nil
169
+ end
170
+
171
+ if attributes.key?(:'default_currency')
172
+ self.default_currency = attributes[:'default_currency']
173
+ end
174
+
175
+ if attributes.key?(:'interval_toggle')
176
+ self.interval_toggle = attributes[:'interval_toggle']
177
+ else
178
+ self.interval_toggle = nil
179
+ end
180
+
181
+ if attributes.key?(:'cta_label')
182
+ self.cta_label = attributes[:'cta_label']
183
+ end
184
+
185
+ if attributes.key?(:'cta_url_template')
186
+ self.cta_url_template = attributes[:'cta_url_template']
187
+ end
188
+
189
+ if attributes.key?(:'columns')
190
+ if (value = attributes[:'columns']).is_a?(Array)
191
+ self.columns = value
192
+ end
193
+ else
194
+ self.columns = nil
195
+ end
196
+
197
+ if attributes.key?(:'features')
198
+ if (value = attributes[:'features']).is_a?(Array)
199
+ self.features = value
200
+ end
201
+ else
202
+ self.features = nil
203
+ end
204
+
205
+ if attributes.key?(:'created_at')
206
+ self.created_at = attributes[:'created_at']
207
+ end
208
+
209
+ if attributes.key?(:'updated_at')
210
+ self.updated_at = attributes[:'updated_at']
211
+ end
212
+ end
213
+
214
+ # Show invalid properties with the reasons. Usually used together with valid?
215
+ # @return Array for valid properties with the reasons
216
+ def list_invalid_properties
217
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
218
+ invalid_properties = Array.new
219
+ if @id.nil?
220
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
221
+ end
222
+
223
+ if @key.nil?
224
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
225
+ end
226
+
227
+ if @name.nil?
228
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
229
+ end
230
+
231
+ if @active.nil?
232
+ invalid_properties.push('invalid value for "active", active cannot be nil.')
233
+ end
234
+
235
+ if @currencies.nil?
236
+ invalid_properties.push('invalid value for "currencies", currencies cannot be nil.')
237
+ end
238
+
239
+ if @interval_toggle.nil?
240
+ invalid_properties.push('invalid value for "interval_toggle", interval_toggle cannot be nil.')
241
+ end
242
+
243
+ if @columns.nil?
244
+ invalid_properties.push('invalid value for "columns", columns cannot be nil.')
245
+ end
246
+
247
+ if @features.nil?
248
+ invalid_properties.push('invalid value for "features", features cannot be nil.')
249
+ end
250
+
251
+ invalid_properties
252
+ end
253
+
254
+ # Check to see if the all the properties in the model are valid
255
+ # @return true if the model is valid
256
+ def valid?
257
+ warn '[DEPRECATED] the `valid?` method is obsolete'
258
+ return false if @id.nil?
259
+ return false if @key.nil?
260
+ return false if @name.nil?
261
+ return false if @active.nil?
262
+ return false if @currencies.nil?
263
+ return false if @interval_toggle.nil?
264
+ return false if @columns.nil?
265
+ return false if @features.nil?
266
+ true
267
+ end
268
+
269
+ # Custom attribute writer method with validation
270
+ # @param [Object] id Value to be assigned
271
+ def id=(id)
272
+ if id.nil?
273
+ fail ArgumentError, 'id cannot be nil'
274
+ end
275
+
276
+ @id = id
277
+ end
278
+
279
+ # Custom attribute writer method with validation
280
+ # @param [Object] key Value to be assigned
281
+ def key=(key)
282
+ if key.nil?
283
+ fail ArgumentError, 'key cannot be nil'
284
+ end
285
+
286
+ @key = key
287
+ end
288
+
289
+ # Custom attribute writer method with validation
290
+ # @param [Object] name Value to be assigned
291
+ def name=(name)
292
+ if name.nil?
293
+ fail ArgumentError, 'name cannot be nil'
294
+ end
295
+
296
+ @name = name
297
+ end
298
+
299
+ # Custom attribute writer method with validation
300
+ # @param [Object] active Value to be assigned
301
+ def active=(active)
302
+ if active.nil?
303
+ fail ArgumentError, 'active cannot be nil'
304
+ end
305
+
306
+ @active = active
307
+ end
308
+
309
+ # Custom attribute writer method with validation
310
+ # @param [Object] currencies Value to be assigned
311
+ def currencies=(currencies)
312
+ if currencies.nil?
313
+ fail ArgumentError, 'currencies cannot be nil'
314
+ end
315
+
316
+ @currencies = currencies
317
+ end
318
+
319
+ # Custom attribute writer method with validation
320
+ # @param [Object] interval_toggle Value to be assigned
321
+ def interval_toggle=(interval_toggle)
322
+ if interval_toggle.nil?
323
+ fail ArgumentError, 'interval_toggle cannot be nil'
324
+ end
325
+
326
+ @interval_toggle = interval_toggle
327
+ end
328
+
329
+ # Custom attribute writer method with validation
330
+ # @param [Object] columns Value to be assigned
331
+ def columns=(columns)
332
+ if columns.nil?
333
+ fail ArgumentError, 'columns cannot be nil'
334
+ end
335
+
336
+ @columns = columns
337
+ end
338
+
339
+ # Custom attribute writer method with validation
340
+ # @param [Object] features Value to be assigned
341
+ def features=(features)
342
+ if features.nil?
343
+ fail ArgumentError, 'features cannot be nil'
344
+ end
345
+
346
+ @features = features
347
+ end
348
+
349
+ # Checks equality by comparing each attribute.
350
+ # @param [Object] Object to be compared
351
+ def ==(o)
352
+ return true if self.equal?(o)
353
+ self.class == o.class &&
354
+ id == o.id &&
355
+ key == o.key &&
356
+ name == o.name &&
357
+ active == o.active &&
358
+ seller_entity_id == o.seller_entity_id &&
359
+ currencies == o.currencies &&
360
+ default_currency == o.default_currency &&
361
+ interval_toggle == o.interval_toggle &&
362
+ cta_label == o.cta_label &&
363
+ cta_url_template == o.cta_url_template &&
364
+ columns == o.columns &&
365
+ features == o.features &&
366
+ created_at == o.created_at &&
367
+ updated_at == o.updated_at
368
+ end
369
+
370
+ # @see the `==` method
371
+ # @param [Object] Object to be compared
372
+ def eql?(o)
373
+ self == o
374
+ end
375
+
376
+ # Calculates hash code according to all attributes.
377
+ # @return [Integer] Hash code
378
+ def hash
379
+ [id, key, name, active, seller_entity_id, currencies, default_currency, interval_toggle, cta_label, cta_url_template, columns, features, created_at, updated_at].hash
380
+ end
381
+
382
+ # Builds the object from hash
383
+ # @param [Hash] attributes Model attributes in the form of hash
384
+ # @return [Object] Returns the model itself
385
+ def self.build_from_hash(attributes)
386
+ return nil unless attributes.is_a?(Hash)
387
+ attributes = attributes.transform_keys(&:to_sym)
388
+ # include attributes inherited from allOf parents (the nearest declaration wins)
389
+ map = acceptable_attribute_map
390
+ transformed_hash = {}
391
+ acceptable_openapi_types.each_pair do |key, type|
392
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
393
+ transformed_hash["#{key}"] = nil
394
+ elsif type =~ /\AArray<(.*)>/i
395
+ # check to ensure the input is an array given that the attribute
396
+ # is documented as an array but the input is not
397
+ if attributes[map[key]].is_a?(Array)
398
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
399
+ end
400
+ elsif !attributes[map[key]].nil?
401
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
402
+ end
403
+ end
404
+ new(transformed_hash)
405
+ end
406
+
407
+ # Returns the object in the form of hash
408
+ # @return [Hash] Returns the object in the form of hash
409
+ def to_hash
410
+ hash = {}
411
+ # include attributes inherited from allOf parents (the nearest declaration wins)
412
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
413
+ value = self.send(attr)
414
+ if value.nil?
415
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
416
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
417
+ end
418
+
419
+ hash[param] = _to_hash(value)
420
+ end
421
+ hash
422
+ end
423
+
424
+ end
425
+
426
+ end
@@ -0,0 +1,248 @@
1
+ =begin
2
+ #Cbox Billing API
3
+
4
+ #The HTTP API of Cbox Billing. Reference: https://github.com/cboxdk/cbox-billing/tree/main/docs/api
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module CboxBilling
17
+ class PricingTableColumn < ApiModelBase
18
+ # The plan's id.
19
+ attr_accessor :plan_id
20
+
21
+ # The yearly plan the interval toggle switches to.
22
+ attr_accessor :annual_plan_id
23
+
24
+ attr_accessor :featured
25
+
26
+ attr_accessor :badge
27
+
28
+ attr_accessor :highlight
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'plan_id' => :'plan_id',
34
+ :'annual_plan_id' => :'annual_plan_id',
35
+ :'featured' => :'featured',
36
+ :'badge' => :'badge',
37
+ :'highlight' => :'highlight'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'plan_id' => :'String',
55
+ :'annual_plan_id' => :'String',
56
+ :'featured' => :'Boolean',
57
+ :'badge' => :'String',
58
+ :'highlight' => :'String'
59
+ }
60
+ end
61
+
62
+ # List of attributes with nullable: true
63
+ def self.openapi_nullable
64
+ Set.new([
65
+ :'annual_plan_id',
66
+ :'badge',
67
+ :'highlight'
68
+ ])
69
+ end
70
+
71
+ # Returns attribute type mapping
72
+ def self.acceptable_openapi_types
73
+ openapi_types
74
+ end
75
+
76
+ # Returns the nullable attributes
77
+ def self.acceptable_openapi_nullable
78
+ openapi_nullable
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 `CboxBilling::PricingTableColumn` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ acceptable_attribute_map = self.class.acceptable_attribute_map
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!acceptable_attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `CboxBilling::PricingTableColumn`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'plan_id')
98
+ self.plan_id = attributes[:'plan_id']
99
+ else
100
+ self.plan_id = nil
101
+ end
102
+
103
+ if attributes.key?(:'annual_plan_id')
104
+ self.annual_plan_id = attributes[:'annual_plan_id']
105
+ end
106
+
107
+ if attributes.key?(:'featured')
108
+ self.featured = attributes[:'featured']
109
+ end
110
+
111
+ if attributes.key?(:'badge')
112
+ self.badge = attributes[:'badge']
113
+ end
114
+
115
+ if attributes.key?(:'highlight')
116
+ self.highlight = attributes[:'highlight']
117
+ end
118
+ end
119
+
120
+ # Show invalid properties with the reasons. Usually used together with valid?
121
+ # @return Array for valid properties with the reasons
122
+ def list_invalid_properties
123
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
124
+ invalid_properties = Array.new
125
+ if @plan_id.nil?
126
+ invalid_properties.push('invalid value for "plan_id", plan_id cannot be nil.')
127
+ end
128
+
129
+ if !@badge.nil? && @badge.to_s.length > 40
130
+ invalid_properties.push('invalid value for "badge", the character length must be smaller than or equal to 40.')
131
+ end
132
+
133
+ if !@highlight.nil? && @highlight.to_s.length > 120
134
+ invalid_properties.push('invalid value for "highlight", the character length must be smaller than or equal to 120.')
135
+ end
136
+
137
+ invalid_properties
138
+ end
139
+
140
+ # Check to see if the all the properties in the model are valid
141
+ # @return true if the model is valid
142
+ def valid?
143
+ warn '[DEPRECATED] the `valid?` method is obsolete'
144
+ return false if @plan_id.nil?
145
+ return false if !@badge.nil? && @badge.to_s.length > 40
146
+ return false if !@highlight.nil? && @highlight.to_s.length > 120
147
+ true
148
+ end
149
+
150
+ # Custom attribute writer method with validation
151
+ # @param [Object] plan_id Value to be assigned
152
+ def plan_id=(plan_id)
153
+ if plan_id.nil?
154
+ fail ArgumentError, 'plan_id cannot be nil'
155
+ end
156
+
157
+ @plan_id = plan_id
158
+ end
159
+
160
+ # Custom attribute writer method with validation
161
+ # @param [Object] badge Value to be assigned
162
+ def badge=(badge)
163
+ if !badge.nil? && badge.to_s.length > 40
164
+ fail ArgumentError, 'invalid value for "badge", the character length must be smaller than or equal to 40.'
165
+ end
166
+
167
+ @badge = badge
168
+ end
169
+
170
+ # Custom attribute writer method with validation
171
+ # @param [Object] highlight Value to be assigned
172
+ def highlight=(highlight)
173
+ if !highlight.nil? && highlight.to_s.length > 120
174
+ fail ArgumentError, 'invalid value for "highlight", the character length must be smaller than or equal to 120.'
175
+ end
176
+
177
+ @highlight = highlight
178
+ end
179
+
180
+ # Checks equality by comparing each attribute.
181
+ # @param [Object] Object to be compared
182
+ def ==(o)
183
+ return true if self.equal?(o)
184
+ self.class == o.class &&
185
+ plan_id == o.plan_id &&
186
+ annual_plan_id == o.annual_plan_id &&
187
+ featured == o.featured &&
188
+ badge == o.badge &&
189
+ highlight == o.highlight
190
+ end
191
+
192
+ # @see the `==` method
193
+ # @param [Object] Object to be compared
194
+ def eql?(o)
195
+ self == o
196
+ end
197
+
198
+ # Calculates hash code according to all attributes.
199
+ # @return [Integer] Hash code
200
+ def hash
201
+ [plan_id, annual_plan_id, featured, badge, highlight].hash
202
+ end
203
+
204
+ # Builds the object from hash
205
+ # @param [Hash] attributes Model attributes in the form of hash
206
+ # @return [Object] Returns the model itself
207
+ def self.build_from_hash(attributes)
208
+ return nil unless attributes.is_a?(Hash)
209
+ attributes = attributes.transform_keys(&:to_sym)
210
+ # include attributes inherited from allOf parents (the nearest declaration wins)
211
+ map = acceptable_attribute_map
212
+ transformed_hash = {}
213
+ acceptable_openapi_types.each_pair do |key, type|
214
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
215
+ transformed_hash["#{key}"] = nil
216
+ elsif type =~ /\AArray<(.*)>/i
217
+ # check to ensure the input is an array given that the attribute
218
+ # is documented as an array but the input is not
219
+ if attributes[map[key]].is_a?(Array)
220
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
221
+ end
222
+ elsif !attributes[map[key]].nil?
223
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
224
+ end
225
+ end
226
+ new(transformed_hash)
227
+ end
228
+
229
+ # Returns the object in the form of hash
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_hash
232
+ hash = {}
233
+ # include attributes inherited from allOf parents (the nearest declaration wins)
234
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
235
+ value = self.send(attr)
236
+ if value.nil?
237
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
238
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
239
+ end
240
+
241
+ hash[param] = _to_hash(value)
242
+ end
243
+ hash
244
+ end
245
+
246
+ end
247
+
248
+ end