smplkit 3.0.12 → 3.0.14

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 (80) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/api_keys_api.rb +9 -0
  3. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/billing_api.rb +20 -2
  4. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/context_types_api.rb +9 -0
  5. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/context_values_api.rb +97 -0
  6. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/contexts_api.rb +16 -4
  7. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/environments_api.rb +9 -0
  8. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/invitations_api.rb +9 -0
  9. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/metrics_api.rb +27 -0
  10. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/plans_api.rb +9 -0
  11. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/products_api.rb +9 -0
  12. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/services_api.rb +9 -0
  13. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/users_api.rb +8 -17
  14. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/api_key_list_response.rb +30 -4
  15. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context.rb +12 -1
  16. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_list_response.rb +30 -4
  17. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_resource.rb +1 -1
  18. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_type_list_response.rb +30 -4
  19. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_value.rb +166 -0
  20. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_value_list_response.rb +193 -0
  21. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_value_resource.rb +225 -0
  22. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/environment_list_response.rb +30 -4
  23. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invitation_list_response.rb +30 -4
  24. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invoice_list_response.rb +30 -4
  25. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{user_list_meta.rb → list_meta.rb} +20 -19
  26. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_list_response.rb +30 -4
  27. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_names_response.rb +30 -4
  28. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_rollup_list_response.rb +30 -4
  29. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{page_meta.rb → pagination_meta.rb} +43 -75
  30. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/payment_method_list_response.rb +30 -4
  31. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/plan_list_response.rb +30 -4
  32. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/product_list_response.rb +30 -4
  33. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/service_list_response.rb +30 -4
  34. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/user_list_response.rb +18 -1
  35. data/lib/smplkit/_generated/app/lib/smplkit_app_client.rb +6 -2
  36. data/lib/smplkit/_generated/app/spec/api/api_keys_api_spec.rb +3 -0
  37. data/lib/smplkit/_generated/app/spec/api/billing_api_spec.rb +7 -1
  38. data/lib/smplkit/_generated/app/spec/api/context_types_api_spec.rb +3 -0
  39. data/lib/smplkit/_generated/app/spec/api/context_values_api_spec.rb +52 -0
  40. data/lib/smplkit/_generated/app/spec/api/contexts_api_spec.rb +6 -2
  41. data/lib/smplkit/_generated/app/spec/api/environments_api_spec.rb +3 -0
  42. data/lib/smplkit/_generated/app/spec/api/invitations_api_spec.rb +3 -0
  43. data/lib/smplkit/_generated/app/spec/api/metrics_api_spec.rb +9 -0
  44. data/lib/smplkit/_generated/app/spec/api/plans_api_spec.rb +3 -0
  45. data/lib/smplkit/_generated/app/spec/api/products_api_spec.rb +3 -0
  46. data/lib/smplkit/_generated/app/spec/api/services_api_spec.rb +3 -0
  47. data/lib/smplkit/_generated/app/spec/api/users_api_spec.rb +3 -2
  48. data/lib/smplkit/_generated/app/spec/models/api_key_list_response_spec.rb +6 -0
  49. data/lib/smplkit/_generated/app/spec/models/context_list_response_spec.rb +6 -0
  50. data/lib/smplkit/_generated/app/spec/models/context_spec.rb +6 -0
  51. data/lib/smplkit/_generated/app/spec/models/context_type_list_response_spec.rb +6 -0
  52. data/lib/smplkit/_generated/app/spec/models/context_value_list_response_spec.rb +42 -0
  53. data/lib/smplkit/_generated/app/spec/models/context_value_resource_spec.rb +52 -0
  54. data/lib/smplkit/_generated/app/spec/models/{user_list_meta_spec.rb → context_value_spec.rb} +7 -7
  55. data/lib/smplkit/_generated/app/spec/models/environment_list_response_spec.rb +6 -0
  56. data/lib/smplkit/_generated/app/spec/models/invitation_list_response_spec.rb +6 -0
  57. data/lib/smplkit/_generated/app/spec/models/invoice_list_response_spec.rb +6 -0
  58. data/lib/smplkit/_generated/app/spec/models/list_meta_spec.rb +36 -0
  59. data/lib/smplkit/_generated/app/spec/models/metric_list_response_spec.rb +6 -0
  60. data/lib/smplkit/_generated/app/spec/models/metric_names_response_spec.rb +6 -0
  61. data/lib/smplkit/_generated/app/spec/models/metric_rollup_list_response_spec.rb +6 -0
  62. data/lib/smplkit/_generated/app/spec/models/{page_meta_spec.rb → pagination_meta_spec.rb} +9 -9
  63. data/lib/smplkit/_generated/app/spec/models/payment_method_list_response_spec.rb +6 -0
  64. data/lib/smplkit/_generated/app/spec/models/plan_list_response_spec.rb +6 -0
  65. data/lib/smplkit/_generated/app/spec/models/product_list_response_spec.rb +6 -0
  66. data/lib/smplkit/_generated/app/spec/models/service_list_response_spec.rb +6 -0
  67. data/lib/smplkit/_generated/config/lib/smplkit_config_client/api/configs_api.rb +9 -0
  68. data/lib/smplkit/_generated/config/lib/smplkit_config_client/api/usage_api.rb +9 -0
  69. data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/config_list_response.rb +30 -4
  70. data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/list_meta.rb +165 -0
  71. data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/pagination_meta.rb +215 -0
  72. data/lib/smplkit/_generated/config/lib/smplkit_config_client/models/usage_list_response.rb +30 -4
  73. data/lib/smplkit/_generated/config/lib/smplkit_config_client.rb +2 -0
  74. data/lib/smplkit/_generated/config/spec/api/configs_api_spec.rb +3 -0
  75. data/lib/smplkit/_generated/config/spec/api/usage_api_spec.rb +3 -0
  76. data/lib/smplkit/_generated/config/spec/models/config_list_response_spec.rb +6 -0
  77. data/lib/smplkit/_generated/config/spec/models/list_meta_spec.rb +36 -0
  78. data/lib/smplkit/_generated/config/spec/models/pagination_meta_spec.rb +54 -0
  79. data/lib/smplkit/_generated/config/spec/models/usage_list_response_spec.rb +6 -0
  80. metadata +17 -5
@@ -0,0 +1,42 @@
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::ContextValueListResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe SmplkitGeneratedClient::App::ContextValueListResponse do
21
+ #let(:instance) { SmplkitGeneratedClient::App::ContextValueListResponse.new }
22
+
23
+ describe 'test an instance of ContextValueListResponse' do
24
+ it 'should create an instance of ContextValueListResponse' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::ContextValueListResponse)
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
+ describe 'test attribute "meta"' 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
@@ -0,0 +1,52 @@
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::ContextValueResource
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe SmplkitGeneratedClient::App::ContextValueResource do
21
+ #let(:instance) { SmplkitGeneratedClient::App::ContextValueResource.new }
22
+
23
+ describe 'test an instance of ContextValueResource' do
24
+ it 'should create an instance of ContextValueResource' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::ContextValueResource)
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', ["context_value"])
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
@@ -14,20 +14,20 @@ require 'spec_helper'
14
14
  require 'json'
15
15
  require 'date'
16
16
 
17
- # Unit tests for SmplkitGeneratedClient::App::UserListMeta
17
+ # Unit tests for SmplkitGeneratedClient::App::ContextValue
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
- describe SmplkitGeneratedClient::App::UserListMeta do
21
- #let(:instance) { SmplkitGeneratedClient::App::UserListMeta.new }
20
+ describe SmplkitGeneratedClient::App::ContextValue do
21
+ #let(:instance) { SmplkitGeneratedClient::App::ContextValue.new }
22
22
 
23
- describe 'test an instance of UserListMeta' do
24
- it 'should create an instance of UserListMeta' do
23
+ describe 'test an instance of ContextValue' do
24
+ it 'should create an instance of ContextValue' do
25
25
  # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::UserListMeta)
26
+ #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::ContextValue)
27
27
  end
28
28
  end
29
29
 
30
- describe 'test attribute "page"' do
30
+ describe 'test attribute "value"' do
31
31
  it 'should work' do
32
32
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
33
  end
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::EnvironmentListResponse do
33
33
  end
34
34
  end
35
35
 
36
+ describe 'test attribute "meta"' 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
+
36
42
  end
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::InvitationListResponse do
33
33
  end
34
34
  end
35
35
 
36
+ describe 'test attribute "meta"' 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
+
36
42
  end
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::InvoiceListResponse do
33
33
  end
34
34
  end
35
35
 
36
+ describe 'test attribute "meta"' 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
+
36
42
  end
@@ -0,0 +1,36 @@
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::ListMeta
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe SmplkitGeneratedClient::App::ListMeta do
21
+ #let(:instance) { SmplkitGeneratedClient::App::ListMeta.new }
22
+
23
+ describe 'test an instance of ListMeta' do
24
+ it 'should create an instance of ListMeta' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::ListMeta)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "pagination"' 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
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::MetricListResponse do
33
33
  end
34
34
  end
35
35
 
36
+ describe 'test attribute "meta"' 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
+
36
42
  end
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::MetricNamesResponse do
33
33
  end
34
34
  end
35
35
 
36
+ describe 'test attribute "meta"' 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
+
36
42
  end
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::MetricRollupListResponse do
33
33
  end
34
34
  end
35
35
 
36
+ describe 'test attribute "meta"' 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
+
36
42
  end
@@ -14,32 +14,32 @@ require 'spec_helper'
14
14
  require 'json'
15
15
  require 'date'
16
16
 
17
- # Unit tests for SmplkitGeneratedClient::App::PageMeta
17
+ # Unit tests for SmplkitGeneratedClient::App::PaginationMeta
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
- describe SmplkitGeneratedClient::App::PageMeta do
21
- #let(:instance) { SmplkitGeneratedClient::App::PageMeta.new }
20
+ describe SmplkitGeneratedClient::App::PaginationMeta do
21
+ #let(:instance) { SmplkitGeneratedClient::App::PaginationMeta.new }
22
22
 
23
- describe 'test an instance of PageMeta' do
24
- it 'should create an instance of PageMeta' do
23
+ describe 'test an instance of PaginationMeta' do
24
+ it 'should create an instance of PaginationMeta' do
25
25
  # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::PageMeta)
26
+ #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::PaginationMeta)
27
27
  end
28
28
  end
29
29
 
30
- describe 'test attribute "size"' do
30
+ describe 'test attribute "page"' do
31
31
  it 'should work' do
32
32
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
33
  end
34
34
  end
35
35
 
36
- describe 'test attribute "number"' do
36
+ describe 'test attribute "size"' do
37
37
  it 'should work' do
38
38
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
39
  end
40
40
  end
41
41
 
42
- describe 'test attribute "total_items"' do
42
+ describe 'test attribute "total"' do
43
43
  it 'should work' do
44
44
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
45
  end
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::PaymentMethodListResponse do
33
33
  end
34
34
  end
35
35
 
36
+ describe 'test attribute "meta"' 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
+
36
42
  end
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::PlanListResponse do
33
33
  end
34
34
  end
35
35
 
36
+ describe 'test attribute "meta"' 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
+
36
42
  end
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::ProductListResponse do
33
33
  end
34
34
  end
35
35
 
36
+ describe 'test attribute "meta"' 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
+
36
42
  end
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::App::ServiceListResponse do
33
33
  end
34
34
  end
35
35
 
36
+ describe 'test attribute "meta"' 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
+
36
42
  end
@@ -216,6 +216,9 @@ module SmplkitGeneratedClient::Config
216
216
  # @param [Hash] opts the optional parameters
217
217
  # @option opts [String] :filter_parent
218
218
  # @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `created_at`, `-created_at`, `key`, `-key`, `name`, `-name`, `updated_at`, `-updated_at`. (default to 'key')
219
+ # @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
220
+ # @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
221
+ # @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false)
219
222
  # @return [ConfigListResponse]
220
223
  def list_configs(opts = {})
221
224
  data, _status_code, _headers = list_configs_with_http_info(opts)
@@ -227,6 +230,9 @@ module SmplkitGeneratedClient::Config
227
230
  # @param [Hash] opts the optional parameters
228
231
  # @option opts [String] :filter_parent
229
232
  # @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `created_at`, `-created_at`, `key`, `-key`, `name`, `-name`, `updated_at`, `-updated_at`. (default to 'key')
233
+ # @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
234
+ # @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
235
+ # @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false)
230
236
  # @return [Array<(ConfigListResponse, Integer, Hash)>] ConfigListResponse data, response status code and response headers
231
237
  def list_configs_with_http_info(opts = {})
232
238
  if @api_client.config.debugging
@@ -243,6 +249,9 @@ module SmplkitGeneratedClient::Config
243
249
  query_params = opts[:query_params] || {}
244
250
  query_params[:'filter[parent]'] = opts[:'filter_parent'] if !opts[:'filter_parent'].nil?
245
251
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
252
+ query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
253
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
254
+ query_params[:'meta[total]'] = opts[:'meta_total'] if !opts[:'meta_total'].nil?
246
255
 
247
256
  # header parameters
248
257
  header_params = opts[:header_params] || {}
@@ -23,6 +23,9 @@ module SmplkitGeneratedClient::Config
23
23
  # Report the current-period usage counters for this account.
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @option opts [String] :filter_period Period to report. &#x60;current&#x60; is the only supported value.
26
+ # @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to &#x60;1&#x60; when omitted. Must be &#x60;&gt;&#x3D; 1&#x60; — requests with a smaller value are rejected with a 400 error. (default to 1)
27
+ # @option opts [Integer] :page_size Number of items per page. Optional; defaults to &#x60;1000&#x60; when omitted. Must be between &#x60;1&#x60; and &#x60;1000&#x60; inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
28
+ # @option opts [Boolean] :meta_total When &#x60;true&#x60;, the response&#39;s &#x60;meta.pagination&#x60; block includes &#x60;total&#x60; (the total number of matching items across all pages) and &#x60;total_pages&#x60;. Computing these requires an extra &#x60;COUNT&#x60; query, so omit (or pass &#x60;false&#x60;) when the totals are not needed. Defaults to &#x60;false&#x60;. (default to false)
26
29
  # @return [UsageListResponse]
27
30
  def list_config_usage(opts = {})
28
31
  data, _status_code, _headers = list_config_usage_with_http_info(opts)
@@ -33,6 +36,9 @@ module SmplkitGeneratedClient::Config
33
36
  # Report the current-period usage counters for this account.
34
37
  # @param [Hash] opts the optional parameters
35
38
  # @option opts [String] :filter_period Period to report. &#x60;current&#x60; is the only supported value.
39
+ # @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to &#x60;1&#x60; when omitted. Must be &#x60;&gt;&#x3D; 1&#x60; — requests with a smaller value are rejected with a 400 error. (default to 1)
40
+ # @option opts [Integer] :page_size Number of items per page. Optional; defaults to &#x60;1000&#x60; when omitted. Must be between &#x60;1&#x60; and &#x60;1000&#x60; inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
41
+ # @option opts [Boolean] :meta_total When &#x60;true&#x60;, the response&#39;s &#x60;meta.pagination&#x60; block includes &#x60;total&#x60; (the total number of matching items across all pages) and &#x60;total_pages&#x60;. Computing these requires an extra &#x60;COUNT&#x60; query, so omit (or pass &#x60;false&#x60;) when the totals are not needed. Defaults to &#x60;false&#x60;. (default to false)
36
42
  # @return [Array<(UsageListResponse, Integer, Hash)>] UsageListResponse data, response status code and response headers
37
43
  def list_config_usage_with_http_info(opts = {})
38
44
  if @api_client.config.debugging
@@ -44,6 +50,9 @@ module SmplkitGeneratedClient::Config
44
50
  # query parameters
45
51
  query_params = opts[:query_params] || {}
46
52
  query_params[:'filter[period]'] = opts[:'filter_period'] if !opts[:'filter_period'].nil?
53
+ query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
54
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
55
+ query_params[:'meta[total]'] = opts[:'meta_total'] if !opts[:'meta_total'].nil?
47
56
 
48
57
  # header parameters
49
58
  header_params = opts[:header_params] || {}
@@ -18,10 +18,13 @@ module SmplkitGeneratedClient::Config
18
18
  class ConfigListResponse < ApiModelBase
19
19
  attr_accessor :data
20
20
 
21
+ attr_accessor :meta
22
+
21
23
  # Attribute mapping from ruby-style variable name to JSON key.
22
24
  def self.attribute_map
23
25
  {
24
- :'data' => :'data'
26
+ :'data' => :'data',
27
+ :'meta' => :'meta'
25
28
  }
26
29
  end
27
30
 
@@ -38,7 +41,8 @@ module SmplkitGeneratedClient::Config
38
41
  # Attribute type mapping.
39
42
  def self.openapi_types
40
43
  {
41
- :'data' => :'Array<ConfigResource>'
44
+ :'data' => :'Array<ConfigResource>',
45
+ :'meta' => :'ListMeta'
42
46
  }
43
47
  end
44
48
 
@@ -71,6 +75,12 @@ module SmplkitGeneratedClient::Config
71
75
  else
72
76
  self.data = nil
73
77
  end
78
+
79
+ if attributes.key?(:'meta')
80
+ self.meta = attributes[:'meta']
81
+ else
82
+ self.meta = nil
83
+ end
74
84
  end
75
85
 
76
86
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -82,6 +92,10 @@ module SmplkitGeneratedClient::Config
82
92
  invalid_properties.push('invalid value for "data", data cannot be nil.')
83
93
  end
84
94
 
95
+ if @meta.nil?
96
+ invalid_properties.push('invalid value for "meta", meta cannot be nil.')
97
+ end
98
+
85
99
  invalid_properties
86
100
  end
87
101
 
@@ -90,6 +104,7 @@ module SmplkitGeneratedClient::Config
90
104
  def valid?
91
105
  warn '[DEPRECATED] the `valid?` method is obsolete'
92
106
  return false if @data.nil?
107
+ return false if @meta.nil?
93
108
  true
94
109
  end
95
110
 
@@ -103,12 +118,23 @@ module SmplkitGeneratedClient::Config
103
118
  @data = data
104
119
  end
105
120
 
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] meta Value to be assigned
123
+ def meta=(meta)
124
+ if meta.nil?
125
+ fail ArgumentError, 'meta cannot be nil'
126
+ end
127
+
128
+ @meta = meta
129
+ end
130
+
106
131
  # Checks equality by comparing each attribute.
107
132
  # @param [Object] Object to be compared
108
133
  def ==(o)
109
134
  return true if self.equal?(o)
110
135
  self.class == o.class &&
111
- data == o.data
136
+ data == o.data &&
137
+ meta == o.meta
112
138
  end
113
139
 
114
140
  # @see the `==` method
@@ -120,7 +146,7 @@ module SmplkitGeneratedClient::Config
120
146
  # Calculates hash code according to all attributes.
121
147
  # @return [Integer] Hash code
122
148
  def hash
123
- [data].hash
149
+ [data, meta].hash
124
150
  end
125
151
 
126
152
  # Builds the object from hash
@@ -0,0 +1,165 @@
1
+ =begin
2
+ #smplkit Config API
3
+
4
+ #Configuration management API for smplkit.
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::Config
17
+ # Top-level ``meta`` block included on every JSON:API list response.
18
+ class ListMeta < ApiModelBase
19
+ attr_accessor :pagination
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'pagination' => :'pagination'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'pagination' => :'PaginationMeta'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Config::ListMeta` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Config::ListMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'pagination')
68
+ self.pagination = attributes[:'pagination']
69
+ else
70
+ self.pagination = nil
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ if @pagination.nil?
80
+ invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
81
+ end
82
+
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ warn '[DEPRECATED] the `valid?` method is obsolete'
90
+ return false if @pagination.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] pagination Value to be assigned
96
+ def pagination=(pagination)
97
+ if pagination.nil?
98
+ fail ArgumentError, 'pagination cannot be nil'
99
+ end
100
+
101
+ @pagination = pagination
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ pagination == o.pagination
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [pagination].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end