smplkit 1.0.22 → 1.0.24

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/audit/client.rb +6 -3
  16. data/lib/smplkit/audit/events.rb +7 -4
  17. data/lib/smplkit/audit/forwarders.rb +246 -0
  18. data/lib/smplkit/audit/functions.rb +58 -0
  19. data/lib/smplkit.rb +2 -0
  20. metadata +7 -19
  21. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_attributes.rb +0 -246
  22. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_list_response.rb +0 -166
  23. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_resource.rb +0 -224
  24. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/bundle_response.rb +0 -164
  25. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/catalog_bundle_attributes.rb +0 -244
  26. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_bundle_attributes.rb +0 -174
  27. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_bundle_body.rb +0 -164
  28. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/create_bundle_data.rb +0 -214
  29. data/lib/smplkit/_generated/app/spec/models/bundle_list_response_spec.rb +0 -36
  30. data/lib/smplkit/_generated/app/spec/models/bundle_resource_spec.rb +0 -52
  31. data/lib/smplkit/_generated/app/spec/models/bundle_response_spec.rb +0 -36
  32. data/lib/smplkit/_generated/app/spec/models/catalog_bundle_attributes_spec.rb +0 -54
  33. data/lib/smplkit/_generated/app/spec/models/catalog_bundle_resource_spec.rb +0 -52
  34. data/lib/smplkit/_generated/app/spec/models/create_bundle_attributes_spec.rb +0 -42
  35. data/lib/smplkit/_generated/app/spec/models/create_bundle_body_spec.rb +0 -36
  36. data/lib/smplkit/_generated/app/spec/models/create_bundle_data_spec.rb +0 -46
@@ -1,244 +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 CatalogBundleAttributes < ApiModelBase
18
- attr_accessor :display_name
19
-
20
- attr_accessor :plan
21
-
22
- attr_accessor :products
23
-
24
- attr_accessor :price_monthly_cents
25
-
26
- # Attribute mapping from ruby-style variable name to JSON key.
27
- def self.attribute_map
28
- {
29
- :'display_name' => :'display_name',
30
- :'plan' => :'plan',
31
- :'products' => :'products',
32
- :'price_monthly_cents' => :'price_monthly_cents'
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
- :'display_name' => :'String',
50
- :'plan' => :'String',
51
- :'products' => :'Array<String>',
52
- :'price_monthly_cents' => :'Integer'
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::CatalogBundleAttributes` 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::CatalogBundleAttributes`. 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?(:'display_name')
79
- self.display_name = attributes[:'display_name']
80
- else
81
- self.display_name = 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?(:'price_monthly_cents')
99
- self.price_monthly_cents = attributes[:'price_monthly_cents']
100
- else
101
- self.price_monthly_cents = nil
102
- end
103
- end
104
-
105
- # Show invalid properties with the reasons. Usually used together with valid?
106
- # @return Array for valid properties with the reasons
107
- def list_invalid_properties
108
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
- invalid_properties = Array.new
110
- if @display_name.nil?
111
- invalid_properties.push('invalid value for "display_name", display_name cannot be nil.')
112
- end
113
-
114
- if @plan.nil?
115
- invalid_properties.push('invalid value for "plan", plan cannot be nil.')
116
- end
117
-
118
- if @products.nil?
119
- invalid_properties.push('invalid value for "products", products cannot be nil.')
120
- end
121
-
122
- if @price_monthly_cents.nil?
123
- invalid_properties.push('invalid value for "price_monthly_cents", price_monthly_cents cannot be nil.')
124
- end
125
-
126
- invalid_properties
127
- end
128
-
129
- # Check to see if the all the properties in the model are valid
130
- # @return true if the model is valid
131
- def valid?
132
- warn '[DEPRECATED] the `valid?` method is obsolete'
133
- return false if @display_name.nil?
134
- return false if @plan.nil?
135
- return false if @products.nil?
136
- return false if @price_monthly_cents.nil?
137
- true
138
- end
139
-
140
- # Custom attribute writer method with validation
141
- # @param [Object] display_name Value to be assigned
142
- def display_name=(display_name)
143
- if display_name.nil?
144
- fail ArgumentError, 'display_name cannot be nil'
145
- end
146
-
147
- @display_name = display_name
148
- end
149
-
150
- # Custom attribute writer method with validation
151
- # @param [Object] plan Value to be assigned
152
- def plan=(plan)
153
- if plan.nil?
154
- fail ArgumentError, 'plan cannot be nil'
155
- end
156
-
157
- @plan = plan
158
- end
159
-
160
- # Custom attribute writer method with validation
161
- # @param [Object] products Value to be assigned
162
- def products=(products)
163
- if products.nil?
164
- fail ArgumentError, 'products cannot be nil'
165
- end
166
-
167
- @products = products
168
- end
169
-
170
- # Custom attribute writer method with validation
171
- # @param [Object] price_monthly_cents Value to be assigned
172
- def price_monthly_cents=(price_monthly_cents)
173
- if price_monthly_cents.nil?
174
- fail ArgumentError, 'price_monthly_cents cannot be nil'
175
- end
176
-
177
- @price_monthly_cents = price_monthly_cents
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
- display_name == o.display_name &&
186
- plan == o.plan &&
187
- products == o.products &&
188
- price_monthly_cents == o.price_monthly_cents
189
- end
190
-
191
- # @see the `==` method
192
- # @param [Object] Object to be compared
193
- def eql?(o)
194
- self == o
195
- end
196
-
197
- # Calculates hash code according to all attributes.
198
- # @return [Integer] Hash code
199
- def hash
200
- [display_name, plan, products, price_monthly_cents].hash
201
- end
202
-
203
- # Builds the object from hash
204
- # @param [Hash] attributes Model attributes in the form of hash
205
- # @return [Object] Returns the model itself
206
- def self.build_from_hash(attributes)
207
- return nil unless attributes.is_a?(Hash)
208
- attributes = attributes.transform_keys(&:to_sym)
209
- transformed_hash = {}
210
- openapi_types.each_pair do |key, type|
211
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
212
- transformed_hash["#{key}"] = nil
213
- elsif type =~ /\AArray<(.*)>/i
214
- # check to ensure the input is an array given that the attribute
215
- # is documented as an array but the input is not
216
- if attributes[attribute_map[key]].is_a?(Array)
217
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
218
- end
219
- elsif !attributes[attribute_map[key]].nil?
220
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
221
- end
222
- end
223
- new(transformed_hash)
224
- end
225
-
226
- # Returns the object in the form of hash
227
- # @return [Hash] Returns the object in the form of hash
228
- def to_hash
229
- hash = {}
230
- self.class.attribute_map.each_pair do |attr, param|
231
- value = self.send(attr)
232
- if value.nil?
233
- is_nullable = self.class.openapi_nullable.include?(attr)
234
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
235
- end
236
-
237
- hash[param] = _to_hash(value)
238
- end
239
- hash
240
- end
241
-
242
- end
243
-
244
- end
@@ -1,174 +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 CreateBundleAttributes < ApiModelBase
18
- attr_accessor :bundle
19
-
20
- attr_accessor :payment_method
21
-
22
- # Attribute mapping from ruby-style variable name to JSON key.
23
- def self.attribute_map
24
- {
25
- :'bundle' => :'bundle',
26
- :'payment_method' => :'payment_method'
27
- }
28
- end
29
-
30
- # Returns attribute mapping this model knows about
31
- def self.acceptable_attribute_map
32
- attribute_map
33
- end
34
-
35
- # Returns all the JSON keys this model knows about
36
- def self.acceptable_attributes
37
- acceptable_attribute_map.values
38
- end
39
-
40
- # Attribute type mapping.
41
- def self.openapi_types
42
- {
43
- :'bundle' => :'String',
44
- :'payment_method' => :'String'
45
- }
46
- end
47
-
48
- # List of attributes with nullable: true
49
- def self.openapi_nullable
50
- Set.new([
51
- :'payment_method'
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 `SmplkitGeneratedClient::App::CreateBundleAttributes` initialize method"
60
- end
61
-
62
- # check to see if the attribute exists and convert string to symbol for hash key
63
- acceptable_attribute_map = self.class.acceptable_attribute_map
64
- attributes = attributes.each_with_object({}) { |(k, v), h|
65
- if (!acceptable_attribute_map.key?(k.to_sym))
66
- fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::App::CreateBundleAttributes`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
- end
68
- h[k.to_sym] = v
69
- }
70
-
71
- if attributes.key?(:'bundle')
72
- self.bundle = attributes[:'bundle']
73
- else
74
- self.bundle = nil
75
- end
76
-
77
- if attributes.key?(:'payment_method')
78
- self.payment_method = attributes[:'payment_method']
79
- end
80
- end
81
-
82
- # Show invalid properties with the reasons. Usually used together with valid?
83
- # @return Array for valid properties with the reasons
84
- def list_invalid_properties
85
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
- invalid_properties = Array.new
87
- if @bundle.nil?
88
- invalid_properties.push('invalid value for "bundle", bundle cannot be nil.')
89
- end
90
-
91
- invalid_properties
92
- end
93
-
94
- # Check to see if the all the properties in the model are valid
95
- # @return true if the model is valid
96
- def valid?
97
- warn '[DEPRECATED] the `valid?` method is obsolete'
98
- return false if @bundle.nil?
99
- true
100
- end
101
-
102
- # Custom attribute writer method with validation
103
- # @param [Object] bundle Value to be assigned
104
- def bundle=(bundle)
105
- if bundle.nil?
106
- fail ArgumentError, 'bundle cannot be nil'
107
- end
108
-
109
- @bundle = bundle
110
- end
111
-
112
- # Checks equality by comparing each attribute.
113
- # @param [Object] Object to be compared
114
- def ==(o)
115
- return true if self.equal?(o)
116
- self.class == o.class &&
117
- bundle == o.bundle &&
118
- payment_method == o.payment_method
119
- end
120
-
121
- # @see the `==` method
122
- # @param [Object] Object to be compared
123
- def eql?(o)
124
- self == o
125
- end
126
-
127
- # Calculates hash code according to all attributes.
128
- # @return [Integer] Hash code
129
- def hash
130
- [bundle, payment_method].hash
131
- end
132
-
133
- # Builds the object from hash
134
- # @param [Hash] attributes Model attributes in the form of hash
135
- # @return [Object] Returns the model itself
136
- def self.build_from_hash(attributes)
137
- return nil unless attributes.is_a?(Hash)
138
- attributes = attributes.transform_keys(&:to_sym)
139
- transformed_hash = {}
140
- openapi_types.each_pair do |key, type|
141
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
- transformed_hash["#{key}"] = nil
143
- elsif type =~ /\AArray<(.*)>/i
144
- # check to ensure the input is an array given that the attribute
145
- # is documented as an array but the input is not
146
- if attributes[attribute_map[key]].is_a?(Array)
147
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
- end
149
- elsif !attributes[attribute_map[key]].nil?
150
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
151
- end
152
- end
153
- new(transformed_hash)
154
- end
155
-
156
- # Returns the object in the form of hash
157
- # @return [Hash] Returns the object in the form of hash
158
- def to_hash
159
- hash = {}
160
- self.class.attribute_map.each_pair do |attr, param|
161
- value = self.send(attr)
162
- if value.nil?
163
- is_nullable = self.class.openapi_nullable.include?(attr)
164
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
165
- end
166
-
167
- hash[param] = _to_hash(value)
168
- end
169
- hash
170
- end
171
-
172
- end
173
-
174
- end
@@ -1,164 +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 CreateBundleBody < 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' => :'CreateBundleData'
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::CreateBundleBody` 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::CreateBundleBody`. 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
- self.data = attributes[:'data']
68
- else
69
- self.data = nil
70
- end
71
- end
72
-
73
- # Show invalid properties with the reasons. Usually used together with valid?
74
- # @return Array for valid properties with the reasons
75
- def list_invalid_properties
76
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
- invalid_properties = Array.new
78
- if @data.nil?
79
- invalid_properties.push('invalid value for "data", data cannot be nil.')
80
- end
81
-
82
- invalid_properties
83
- end
84
-
85
- # Check to see if the all the properties in the model are valid
86
- # @return true if the model is valid
87
- def valid?
88
- warn '[DEPRECATED] the `valid?` method is obsolete'
89
- return false if @data.nil?
90
- true
91
- end
92
-
93
- # Custom attribute writer method with validation
94
- # @param [Object] data Value to be assigned
95
- def data=(data)
96
- if data.nil?
97
- fail ArgumentError, 'data cannot be nil'
98
- end
99
-
100
- @data = data
101
- end
102
-
103
- # Checks equality by comparing each attribute.
104
- # @param [Object] Object to be compared
105
- def ==(o)
106
- return true if self.equal?(o)
107
- self.class == o.class &&
108
- data == o.data
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
- [data].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
- return nil unless attributes.is_a?(Hash)
128
- attributes = attributes.transform_keys(&:to_sym)
129
- transformed_hash = {}
130
- openapi_types.each_pair do |key, type|
131
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
- transformed_hash["#{key}"] = nil
133
- elsif type =~ /\AArray<(.*)>/i
134
- # check to ensure the input is an array given that the attribute
135
- # is documented as an array but the input is not
136
- if attributes[attribute_map[key]].is_a?(Array)
137
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
- end
139
- elsif !attributes[attribute_map[key]].nil?
140
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
- end
142
- end
143
- new(transformed_hash)
144
- end
145
-
146
- # Returns the object in the form of hash
147
- # @return [Hash] Returns the object in the form of hash
148
- def to_hash
149
- hash = {}
150
- self.class.attribute_map.each_pair do |attr, param|
151
- value = self.send(attr)
152
- if value.nil?
153
- is_nullable = self.class.openapi_nullable.include?(attr)
154
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
- end
156
-
157
- hash[param] = _to_hash(value)
158
- end
159
- hash
160
- end
161
-
162
- end
163
-
164
- end