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,214 +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 CreateBundleData < ApiModelBase
18
- attr_accessor :type
19
-
20
- attr_accessor :attributes
21
-
22
- class EnumAttributeValidator
23
- attr_reader :datatype
24
- attr_reader :allowable_values
25
-
26
- def initialize(datatype, allowable_values)
27
- @allowable_values = allowable_values.map do |value|
28
- case datatype.to_s
29
- when /Integer/i
30
- value.to_i
31
- when /Float/i
32
- value.to_f
33
- else
34
- value
35
- end
36
- end
37
- end
38
-
39
- def valid?(value)
40
- !value || allowable_values.include?(value)
41
- end
42
- end
43
-
44
- # Attribute mapping from ruby-style variable name to JSON key.
45
- def self.attribute_map
46
- {
47
- :'type' => :'type',
48
- :'attributes' => :'attributes'
49
- }
50
- end
51
-
52
- # Returns attribute mapping this model knows about
53
- def self.acceptable_attribute_map
54
- attribute_map
55
- end
56
-
57
- # Returns all the JSON keys this model knows about
58
- def self.acceptable_attributes
59
- acceptable_attribute_map.values
60
- end
61
-
62
- # Attribute type mapping.
63
- def self.openapi_types
64
- {
65
- :'type' => :'String',
66
- :'attributes' => :'CreateBundleAttributes'
67
- }
68
- end
69
-
70
- # List of attributes with nullable: true
71
- def self.openapi_nullable
72
- Set.new([
73
- ])
74
- end
75
-
76
- # Initializes the object
77
- # @param [Hash] attributes Model attributes in the form of hash
78
- def initialize(attributes = {})
79
- if (!attributes.is_a?(Hash))
80
- fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::App::CreateBundleData` initialize method"
81
- end
82
-
83
- # check to see if the attribute exists and convert string to symbol for hash key
84
- acceptable_attribute_map = self.class.acceptable_attribute_map
85
- attributes = attributes.each_with_object({}) { |(k, v), h|
86
- if (!acceptable_attribute_map.key?(k.to_sym))
87
- fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::App::CreateBundleData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
- end
89
- h[k.to_sym] = v
90
- }
91
-
92
- if attributes.key?(:'type')
93
- self.type = attributes[:'type']
94
- else
95
- self.type = nil
96
- end
97
-
98
- if attributes.key?(:'attributes')
99
- self.attributes = attributes[:'attributes']
100
- else
101
- self.attributes = 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 @type.nil?
111
- invalid_properties.push('invalid value for "type", type cannot be nil.')
112
- end
113
-
114
- if @attributes.nil?
115
- invalid_properties.push('invalid value for "attributes", attributes cannot be nil.')
116
- end
117
-
118
- invalid_properties
119
- end
120
-
121
- # Check to see if the all the properties in the model are valid
122
- # @return true if the model is valid
123
- def valid?
124
- warn '[DEPRECATED] the `valid?` method is obsolete'
125
- return false if @type.nil?
126
- type_validator = EnumAttributeValidator.new('String', ["bundle"])
127
- return false unless type_validator.valid?(@type)
128
- return false if @attributes.nil?
129
- true
130
- end
131
-
132
- # Custom attribute writer method checking allowed values (enum).
133
- # @param [Object] type Object to be assigned
134
- def type=(type)
135
- validator = EnumAttributeValidator.new('String', ["bundle"])
136
- unless validator.valid?(type)
137
- fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
138
- end
139
- @type = type
140
- end
141
-
142
- # Custom attribute writer method with validation
143
- # @param [Object] attributes Value to be assigned
144
- def attributes=(attributes)
145
- if attributes.nil?
146
- fail ArgumentError, 'attributes cannot be nil'
147
- end
148
-
149
- @attributes = attributes
150
- end
151
-
152
- # Checks equality by comparing each attribute.
153
- # @param [Object] Object to be compared
154
- def ==(o)
155
- return true if self.equal?(o)
156
- self.class == o.class &&
157
- type == o.type &&
158
- attributes == o.attributes
159
- end
160
-
161
- # @see the `==` method
162
- # @param [Object] Object to be compared
163
- def eql?(o)
164
- self == o
165
- end
166
-
167
- # Calculates hash code according to all attributes.
168
- # @return [Integer] Hash code
169
- def hash
170
- [type, attributes].hash
171
- end
172
-
173
- # Builds the object from hash
174
- # @param [Hash] attributes Model attributes in the form of hash
175
- # @return [Object] Returns the model itself
176
- def self.build_from_hash(attributes)
177
- return nil unless attributes.is_a?(Hash)
178
- attributes = attributes.transform_keys(&:to_sym)
179
- transformed_hash = {}
180
- openapi_types.each_pair do |key, type|
181
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
182
- transformed_hash["#{key}"] = nil
183
- elsif type =~ /\AArray<(.*)>/i
184
- # check to ensure the input is an array given that the attribute
185
- # is documented as an array but the input is not
186
- if attributes[attribute_map[key]].is_a?(Array)
187
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
188
- end
189
- elsif !attributes[attribute_map[key]].nil?
190
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
191
- end
192
- end
193
- new(transformed_hash)
194
- end
195
-
196
- # Returns the object in the form of hash
197
- # @return [Hash] Returns the object in the form of hash
198
- def to_hash
199
- hash = {}
200
- self.class.attribute_map.each_pair do |attr, param|
201
- value = self.send(attr)
202
- if value.nil?
203
- is_nullable = self.class.openapi_nullable.include?(attr)
204
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
- end
206
-
207
- hash[param] = _to_hash(value)
208
- end
209
- hash
210
- end
211
-
212
- end
213
-
214
- end
@@ -1,36 +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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for SmplkitGeneratedClient::App::BundleListResponse
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe SmplkitGeneratedClient::App::BundleListResponse do
21
- #let(:instance) { SmplkitGeneratedClient::App::BundleListResponse.new }
22
-
23
- describe 'test an instance of BundleListResponse' do
24
- it 'should create an instance of BundleListResponse' do
25
- # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::BundleListResponse)
27
- end
28
- end
29
-
30
- describe 'test attribute "data"' do
31
- it 'should work' do
32
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- end
34
- end
35
-
36
- end
@@ -1,52 +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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for SmplkitGeneratedClient::App::BundleResource
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe SmplkitGeneratedClient::App::BundleResource do
21
- #let(:instance) { SmplkitGeneratedClient::App::BundleResource.new }
22
-
23
- describe 'test an instance of BundleResource' do
24
- it 'should create an instance of BundleResource' do
25
- # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::BundleResource)
27
- end
28
- end
29
-
30
- describe 'test attribute "id"' do
31
- it 'should work' do
32
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- end
34
- end
35
-
36
- describe 'test attribute "type"' do
37
- it 'should work' do
38
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["bundle"])
40
- # validator.allowable_values.each do |value|
41
- # expect { instance.type = value }.not_to raise_error
42
- # end
43
- end
44
- end
45
-
46
- describe 'test attribute "attributes"' do
47
- it 'should work' do
48
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
49
- end
50
- end
51
-
52
- end
@@ -1,36 +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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for SmplkitGeneratedClient::App::BundleResponse
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe SmplkitGeneratedClient::App::BundleResponse do
21
- #let(:instance) { SmplkitGeneratedClient::App::BundleResponse.new }
22
-
23
- describe 'test an instance of BundleResponse' do
24
- it 'should create an instance of BundleResponse' do
25
- # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::BundleResponse)
27
- end
28
- end
29
-
30
- describe 'test attribute "data"' do
31
- it 'should work' do
32
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- end
34
- end
35
-
36
- end
@@ -1,54 +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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for SmplkitGeneratedClient::App::CatalogBundleAttributes
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe SmplkitGeneratedClient::App::CatalogBundleAttributes do
21
- #let(:instance) { SmplkitGeneratedClient::App::CatalogBundleAttributes.new }
22
-
23
- describe 'test an instance of CatalogBundleAttributes' do
24
- it 'should create an instance of CatalogBundleAttributes' do
25
- # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::CatalogBundleAttributes)
27
- end
28
- end
29
-
30
- describe 'test attribute "display_name"' do
31
- it 'should work' do
32
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- end
34
- end
35
-
36
- describe 'test attribute "plan"' do
37
- it 'should work' do
38
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
- end
40
- end
41
-
42
- describe 'test attribute "products"' do
43
- it 'should work' do
44
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
- end
46
- end
47
-
48
- describe 'test attribute "price_monthly_cents"' do
49
- it 'should work' do
50
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
- end
52
- end
53
-
54
- end
@@ -1,52 +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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for SmplkitGeneratedClient::App::CatalogBundleResource
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe SmplkitGeneratedClient::App::CatalogBundleResource do
21
- #let(:instance) { SmplkitGeneratedClient::App::CatalogBundleResource.new }
22
-
23
- describe 'test an instance of CatalogBundleResource' do
24
- it 'should create an instance of CatalogBundleResource' do
25
- # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::CatalogBundleResource)
27
- end
28
- end
29
-
30
- describe 'test attribute "id"' do
31
- it 'should work' do
32
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- end
34
- end
35
-
36
- describe 'test attribute "type"' do
37
- it 'should work' do
38
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["bundle"])
40
- # validator.allowable_values.each do |value|
41
- # expect { instance.type = value }.not_to raise_error
42
- # end
43
- end
44
- end
45
-
46
- describe 'test attribute "attributes"' do
47
- it 'should work' do
48
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
49
- end
50
- end
51
-
52
- end
@@ -1,42 +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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for SmplkitGeneratedClient::App::CreateBundleAttributes
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe SmplkitGeneratedClient::App::CreateBundleAttributes do
21
- #let(:instance) { SmplkitGeneratedClient::App::CreateBundleAttributes.new }
22
-
23
- describe 'test an instance of CreateBundleAttributes' do
24
- it 'should create an instance of CreateBundleAttributes' do
25
- # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::CreateBundleAttributes)
27
- end
28
- end
29
-
30
- describe 'test attribute "bundle"' do
31
- it 'should work' do
32
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- end
34
- end
35
-
36
- describe 'test attribute "payment_method"' do
37
- it 'should work' do
38
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
- end
40
- end
41
-
42
- end
@@ -1,36 +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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for SmplkitGeneratedClient::App::CreateBundleBody
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe SmplkitGeneratedClient::App::CreateBundleBody do
21
- #let(:instance) { SmplkitGeneratedClient::App::CreateBundleBody.new }
22
-
23
- describe 'test an instance of CreateBundleBody' do
24
- it 'should create an instance of CreateBundleBody' do
25
- # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::CreateBundleBody)
27
- end
28
- end
29
-
30
- describe 'test attribute "data"' do
31
- it 'should work' do
32
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- end
34
- end
35
-
36
- end
@@ -1,46 +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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for SmplkitGeneratedClient::App::CreateBundleData
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe SmplkitGeneratedClient::App::CreateBundleData do
21
- #let(:instance) { SmplkitGeneratedClient::App::CreateBundleData.new }
22
-
23
- describe 'test an instance of CreateBundleData' do
24
- it 'should create an instance of CreateBundleData' do
25
- # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::CreateBundleData)
27
- end
28
- end
29
-
30
- describe 'test attribute "type"' do
31
- it 'should work' do
32
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["bundle"])
34
- # validator.allowable_values.each do |value|
35
- # expect { instance.type = value }.not_to raise_error
36
- # end
37
- end
38
- end
39
-
40
- describe 'test attribute "attributes"' do
41
- it 'should work' do
42
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
- end
44
- end
45
-
46
- end