smplkit 3.0.8 → 3.0.10

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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/billing_api.rb +0 -469
  3. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/subscription_api.rb +289 -0
  4. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{subscription_list_response.rb → admin_subscription_request.rb} +9 -20
  5. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/admin_subscription_request_attributes.rb +190 -0
  6. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{create_subscription_data.rb → admin_subscription_request_resource.rb} +46 -12
  7. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{next_tier_meta.rb → next_tier_response.rb} +6 -6
  8. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_change_projection.rb +321 -0
  9. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{create_subscription_attributes.rb → subscription_item_request.rb} +10 -21
  10. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{subscription_attributes.rb → subscription_item_response.rb} +66 -77
  11. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_preview_attributes.rb +390 -0
  12. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_preview_resource.rb +241 -0
  13. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{plan_change_request.rb → subscription_preview_response.rb} +20 -21
  14. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{create_subscription_body.rb → subscription_request.rb} +5 -5
  15. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_request_attributes.rb +179 -0
  16. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_request_resource.rb +227 -0
  17. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_resource.rb +4 -2
  18. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/subscription_response.rb +1 -1
  19. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{subscription_list_meta.rb → subscription_response_attributes.rb} +135 -62
  20. data/lib/smplkit/_generated/app/lib/smplkit_app_client.rb +15 -8
  21. data/lib/smplkit/_generated/app/spec/api/billing_api_spec.rb +0 -86
  22. data/lib/smplkit/_generated/app/spec/api/subscription_api_spec.rb +83 -0
  23. data/lib/smplkit/_generated/app/spec/models/{create_subscription_attributes_spec.rb → admin_subscription_request_attributes_spec.rb} +9 -9
  24. data/lib/smplkit/_generated/app/spec/models/admin_subscription_request_resource_spec.rb +52 -0
  25. data/lib/smplkit/_generated/app/spec/models/{plan_change_request_spec.rb → admin_subscription_request_spec.rb} +7 -7
  26. data/lib/smplkit/_generated/app/spec/models/{next_tier_meta_spec.rb → next_tier_response_spec.rb} +6 -6
  27. data/lib/smplkit/_generated/app/spec/models/{subscription_list_meta_spec.rb → subscription_change_projection_spec.rb} +20 -14
  28. data/lib/smplkit/_generated/app/spec/models/{create_subscription_data_spec.rb → subscription_item_request_spec.rb} +8 -8
  29. data/lib/smplkit/_generated/app/spec/models/{subscription_attributes_spec.rb → subscription_item_response_spec.rb} +12 -18
  30. data/lib/smplkit/_generated/app/spec/models/subscription_preview_attributes_spec.rb +88 -0
  31. data/lib/smplkit/_generated/app/spec/models/subscription_preview_resource_spec.rb +56 -0
  32. data/lib/smplkit/_generated/app/spec/models/subscription_preview_response_spec.rb +36 -0
  33. data/lib/smplkit/_generated/app/spec/models/{subscription_list_response_spec.rb → subscription_request_attributes_spec.rb} +8 -8
  34. data/lib/smplkit/_generated/app/spec/models/subscription_request_resource_spec.rb +52 -0
  35. data/lib/smplkit/_generated/app/spec/models/{create_subscription_body_spec.rb → subscription_request_spec.rb} +6 -6
  36. data/lib/smplkit/_generated/app/spec/models/subscription_response_attributes_spec.rb +100 -0
  37. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/actions_api.rb +9 -10
  38. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/forwarders_api.rb +11 -12
  39. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/resource_types_api.rb +9 -10
  40. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/usage_api.rb +9 -0
  41. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_list_response.rb +4 -14
  42. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event_list_meta.rb +1 -0
  43. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/event_list_response.rb +1 -1
  44. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/{resource_type_list_links.rb → forwarder_delivery_list_links.rb} +3 -3
  45. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/{action_list_meta.rb → forwarder_delivery_list_meta.rb} +4 -3
  46. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery_list_response.rb +3 -3
  47. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_list_response.rb +4 -14
  48. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/{resource_type_list_meta.rb → list_meta.rb} +20 -19
  49. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/{forwarder_list_meta.rb → pagination_meta.rb} +70 -19
  50. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/resource_type_list_response.rb +4 -14
  51. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/usage_response.rb +30 -4
  52. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client.rb +4 -6
  53. data/lib/smplkit/_generated/audit/spec/api/actions_api_spec.rb +3 -2
  54. data/lib/smplkit/_generated/audit/spec/api/forwarders_api_spec.rb +4 -3
  55. data/lib/smplkit/_generated/audit/spec/api/resource_types_api_spec.rb +3 -2
  56. data/lib/smplkit/_generated/audit/spec/api/usage_api_spec.rb +3 -0
  57. data/lib/smplkit/_generated/audit/spec/models/action_list_response_spec.rb +0 -6
  58. data/lib/smplkit/_generated/audit/spec/models/{action_list_links_spec.rb → forwarder_delivery_list_links_spec.rb} +6 -6
  59. data/lib/smplkit/_generated/audit/spec/models/{resource_type_list_meta_spec.rb → forwarder_delivery_list_meta_spec.rb} +6 -6
  60. data/lib/smplkit/_generated/audit/spec/models/forwarder_list_response_spec.rb +0 -6
  61. data/lib/smplkit/_generated/audit/spec/models/{action_list_meta_spec.rb → list_meta_spec.rb} +7 -7
  62. data/lib/smplkit/_generated/audit/spec/models/pagination_meta_spec.rb +54 -0
  63. data/lib/smplkit/_generated/audit/spec/models/resource_type_list_response_spec.rb +0 -6
  64. data/lib/smplkit/_generated/audit/spec/models/usage_response_spec.rb +6 -0
  65. data/lib/smplkit/audit/actions.rb +7 -6
  66. data/lib/smplkit/audit/models.rb +14 -0
  67. data/lib/smplkit/audit/resource_types.rb +7 -6
  68. data/lib/smplkit/management/audit.rb +5 -4
  69. metadata +39 -29
  70. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/action_list_links.rb +0 -148
  71. data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_list_links.rb +0 -148
  72. data/lib/smplkit/_generated/audit/spec/models/forwarder_list_links_spec.rb +0 -36
  73. data/lib/smplkit/_generated/audit/spec/models/forwarder_list_meta_spec.rb +0 -36
  74. data/lib/smplkit/_generated/audit/spec/models/resource_type_list_links_spec.rb +0 -36
@@ -0,0 +1,56 @@
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::SubscriptionPreviewResource
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe SmplkitGeneratedClient::App::SubscriptionPreviewResource do
21
+ #let(:instance) { SmplkitGeneratedClient::App::SubscriptionPreviewResource.new }
22
+
23
+ describe 'test an instance of SubscriptionPreviewResource' do
24
+ it 'should create an instance of SubscriptionPreviewResource' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::SubscriptionPreviewResource)
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
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["preview"])
34
+ # validator.allowable_values.each do |value|
35
+ # expect { instance.id = value }.not_to raise_error
36
+ # end
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "type"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["subscription_preview"])
44
+ # validator.allowable_values.each do |value|
45
+ # expect { instance.type = value }.not_to raise_error
46
+ # end
47
+ end
48
+ end
49
+
50
+ describe 'test attribute "attributes"' do
51
+ it 'should work' do
52
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
53
+ end
54
+ end
55
+
56
+ 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::SubscriptionPreviewResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe SmplkitGeneratedClient::App::SubscriptionPreviewResponse do
21
+ #let(:instance) { SmplkitGeneratedClient::App::SubscriptionPreviewResponse.new }
22
+
23
+ describe 'test an instance of SubscriptionPreviewResponse' do
24
+ it 'should create an instance of SubscriptionPreviewResponse' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::SubscriptionPreviewResponse)
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
@@ -14,26 +14,26 @@ require 'spec_helper'
14
14
  require 'json'
15
15
  require 'date'
16
16
 
17
- # Unit tests for SmplkitGeneratedClient::App::SubscriptionListResponse
17
+ # Unit tests for SmplkitGeneratedClient::App::SubscriptionRequestAttributes
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
- describe SmplkitGeneratedClient::App::SubscriptionListResponse do
21
- #let(:instance) { SmplkitGeneratedClient::App::SubscriptionListResponse.new }
20
+ describe SmplkitGeneratedClient::App::SubscriptionRequestAttributes do
21
+ #let(:instance) { SmplkitGeneratedClient::App::SubscriptionRequestAttributes.new }
22
22
 
23
- describe 'test an instance of SubscriptionListResponse' do
24
- it 'should create an instance of SubscriptionListResponse' do
23
+ describe 'test an instance of SubscriptionRequestAttributes' do
24
+ it 'should create an instance of SubscriptionRequestAttributes' do
25
25
  # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::SubscriptionListResponse)
26
+ #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::SubscriptionRequestAttributes)
27
27
  end
28
28
  end
29
29
 
30
- describe 'test attribute "data"' do
30
+ describe 'test attribute "items"' 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 "meta"' do
36
+ describe 'test attribute "payment_method"' 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
@@ -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::SubscriptionRequestResource
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe SmplkitGeneratedClient::App::SubscriptionRequestResource do
21
+ #let(:instance) { SmplkitGeneratedClient::App::SubscriptionRequestResource.new }
22
+
23
+ describe 'test an instance of SubscriptionRequestResource' do
24
+ it 'should create an instance of SubscriptionRequestResource' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::SubscriptionRequestResource)
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', ["subscription"])
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,16 +14,16 @@ require 'spec_helper'
14
14
  require 'json'
15
15
  require 'date'
16
16
 
17
- # Unit tests for SmplkitGeneratedClient::App::CreateSubscriptionBody
17
+ # Unit tests for SmplkitGeneratedClient::App::SubscriptionRequest
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
- describe SmplkitGeneratedClient::App::CreateSubscriptionBody do
21
- #let(:instance) { SmplkitGeneratedClient::App::CreateSubscriptionBody.new }
20
+ describe SmplkitGeneratedClient::App::SubscriptionRequest do
21
+ #let(:instance) { SmplkitGeneratedClient::App::SubscriptionRequest.new }
22
22
 
23
- describe 'test an instance of CreateSubscriptionBody' do
24
- it 'should create an instance of CreateSubscriptionBody' do
23
+ describe 'test an instance of SubscriptionRequest' do
24
+ it 'should create an instance of SubscriptionRequest' do
25
25
  # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::CreateSubscriptionBody)
26
+ #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::SubscriptionRequest)
27
27
  end
28
28
  end
29
29
 
@@ -0,0 +1,100 @@
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::SubscriptionResponseAttributes
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe SmplkitGeneratedClient::App::SubscriptionResponseAttributes do
21
+ #let(:instance) { SmplkitGeneratedClient::App::SubscriptionResponseAttributes.new }
22
+
23
+ describe 'test an instance of SubscriptionResponseAttributes' do
24
+ it 'should create an instance of SubscriptionResponseAttributes' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(SmplkitGeneratedClient::App::SubscriptionResponseAttributes)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "status"' 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 "current_period_start"' 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 "current_period_end"' 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 "discount_pct"' 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
+ describe 'test attribute "discount_source"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["VOLUME", "OVERRIDE"])
58
+ # validator.allowable_values.each do |value|
59
+ # expect { instance.discount_source = value }.not_to raise_error
60
+ # end
61
+ end
62
+ end
63
+
64
+ describe 'test attribute "subtotal_cents"' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
67
+ end
68
+ end
69
+
70
+ describe 'test attribute "discount_amount_cents"' do
71
+ it 'should work' do
72
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
73
+ end
74
+ end
75
+
76
+ describe 'test attribute "total_cents"' do
77
+ it 'should work' do
78
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
79
+ end
80
+ end
81
+
82
+ describe 'test attribute "next_tier"' do
83
+ it 'should work' do
84
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
85
+ end
86
+ end
87
+
88
+ describe 'test attribute "payment_method"' do
89
+ it 'should work' do
90
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
91
+ end
92
+ end
93
+
94
+ describe 'test attribute "items"' do
95
+ it 'should work' do
96
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
97
+ end
98
+ end
99
+
100
+ end
@@ -23,9 +23,10 @@ module SmplkitGeneratedClient::Audit
23
23
  # List the distinct `action` slugs recorded for this account. Default sort is `key` ascending; pass `sort=-key` for descending. Without `filter[resource_type]`, returns one row per distinct action. With `filter[resource_type]`, returns the actions recorded for that specific resource type.
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @option opts [String] :filter_resource_type
26
- # @option opts [Integer] :page_size
27
- # @option opts [String] :page_after
28
26
  # @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`. (default to 'key')
27
+ # @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)
28
+ # @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)
29
+ # @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)
29
30
  # @return [ActionListResponse]
30
31
  def list_actions(opts = {})
31
32
  data, _status_code, _headers = list_actions_with_http_info(opts)
@@ -36,18 +37,15 @@ module SmplkitGeneratedClient::Audit
36
37
  # List the distinct `action` slugs recorded for this account. Default sort is `key` ascending; pass `sort=-key` for descending. Without `filter[resource_type]`, returns one row per distinct action. With `filter[resource_type]`, returns the actions recorded for that specific resource type.
37
38
  # @param [Hash] opts the optional parameters
38
39
  # @option opts [String] :filter_resource_type
39
- # @option opts [Integer] :page_size
40
- # @option opts [String] :page_after
41
40
  # @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `key`, `-key`. (default to 'key')
41
+ # @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)
42
+ # @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)
43
+ # @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)
42
44
  # @return [Array<(ActionListResponse, Integer, Hash)>] ActionListResponse data, response status code and response headers
43
45
  def list_actions_with_http_info(opts = {})
44
46
  if @api_client.config.debugging
45
47
  @api_client.config.logger.debug 'Calling API: ActionsApi.list_actions ...'
46
48
  end
47
- if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
48
- fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ActionsApi.list_actions, must be greater than or equal to 1.'
49
- end
50
-
51
49
  allowable_values = ["key", "-key"]
52
50
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
53
51
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
@@ -58,9 +56,10 @@ module SmplkitGeneratedClient::Audit
58
56
  # query parameters
59
57
  query_params = opts[:query_params] || {}
60
58
  query_params[:'filter[resource_type]'] = opts[:'filter_resource_type'] if !opts[:'filter_resource_type'].nil?
61
- query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
62
- query_params[:'page[after]'] = opts[:'page_after'] if !opts[:'page_after'].nil?
63
59
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
60
+ query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
61
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
62
+ query_params[:'meta[total]'] = opts[:'meta_total'] if !opts[:'meta_total'].nil?
64
63
 
65
64
  # header parameters
66
65
  header_params = opts[:header_params] || {}
@@ -369,13 +369,14 @@ module SmplkitGeneratedClient::Audit
369
369
  end
370
370
 
371
371
  # List Forwarders
372
- # List forwarders for this account. Default sort is `-created_at` (newest first). Pagination uses cursor tokens; keep the same `sort` value across paginated requests.
372
+ # List forwarders for this account. Default sort is `-created_at` (newest first).
373
373
  # @param [Hash] opts the optional parameters
374
374
  # @option opts [String] :filter_forwarder_type
375
375
  # @option opts [Boolean] :filter_enabled
376
- # @option opts [Integer] :page_size
377
- # @option opts [String] :page_after
378
376
  # @option opts [String] :sort Field to sort by. Prefix with &#x60;-&#x60; for descending order. Default: &#x60;-created_at&#x60;. Allowed values: &#x60;created_at&#x60;, &#x60;-created_at&#x60;, &#x60;updated_at&#x60;, &#x60;-updated_at&#x60;. (default to '-created_at')
377
+ # @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)
378
+ # @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)
379
+ # @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)
379
380
  # @return [ForwarderListResponse]
380
381
  def list_forwarders(opts = {})
381
382
  data, _status_code, _headers = list_forwarders_with_http_info(opts)
@@ -383,22 +384,19 @@ module SmplkitGeneratedClient::Audit
383
384
  end
384
385
 
385
386
  # List Forwarders
386
- # List forwarders for this account. Default sort is &#x60;-created_at&#x60; (newest first). Pagination uses cursor tokens; keep the same &#x60;sort&#x60; value across paginated requests.
387
+ # List forwarders for this account. Default sort is &#x60;-created_at&#x60; (newest first).
387
388
  # @param [Hash] opts the optional parameters
388
389
  # @option opts [String] :filter_forwarder_type
389
390
  # @option opts [Boolean] :filter_enabled
390
- # @option opts [Integer] :page_size
391
- # @option opts [String] :page_after
392
391
  # @option opts [String] :sort Field to sort by. Prefix with &#x60;-&#x60; for descending order. Default: &#x60;-created_at&#x60;. Allowed values: &#x60;created_at&#x60;, &#x60;-created_at&#x60;, &#x60;updated_at&#x60;, &#x60;-updated_at&#x60;. (default to '-created_at')
392
+ # @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)
393
+ # @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)
394
+ # @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)
393
395
  # @return [Array<(ForwarderListResponse, Integer, Hash)>] ForwarderListResponse data, response status code and response headers
394
396
  def list_forwarders_with_http_info(opts = {})
395
397
  if @api_client.config.debugging
396
398
  @api_client.config.logger.debug 'Calling API: ForwardersApi.list_forwarders ...'
397
399
  end
398
- if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
399
- fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ForwardersApi.list_forwarders, must be greater than or equal to 1.'
400
- end
401
-
402
400
  allowable_values = ["created_at", "-created_at", "updated_at", "-updated_at"]
403
401
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
404
402
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
@@ -410,9 +408,10 @@ module SmplkitGeneratedClient::Audit
410
408
  query_params = opts[:query_params] || {}
411
409
  query_params[:'filter[forwarder_type]'] = opts[:'filter_forwarder_type'] if !opts[:'filter_forwarder_type'].nil?
412
410
  query_params[:'filter[enabled]'] = opts[:'filter_enabled'] if !opts[:'filter_enabled'].nil?
413
- query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
414
- query_params[:'page[after]'] = opts[:'page_after'] if !opts[:'page_after'].nil?
415
411
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
412
+ query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
413
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
414
+ query_params[:'meta[total]'] = opts[:'meta_total'] if !opts[:'meta_total'].nil?
416
415
 
417
416
  # header parameters
418
417
  header_params = opts[:header_params] || {}
@@ -22,9 +22,10 @@ module SmplkitGeneratedClient::Audit
22
22
  # List Resource Types
23
23
  # List the distinct `resource_type` slugs recorded for this account. The resource `id` is the slug itself. Default sort is `key` ascending; pass `sort=-key` for descending. Useful for populating filter dropdowns in a UI.
24
24
  # @param [Hash] opts the optional parameters
25
- # @option opts [Integer] :page_size
26
- # @option opts [String] :page_after
27
25
  # @option opts [String] :sort Field to sort by. Prefix with &#x60;-&#x60; for descending order. Default: &#x60;key&#x60;. Allowed values: &#x60;key&#x60;, &#x60;-key&#x60;. (default to 'key')
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)
28
29
  # @return [ResourceTypeListResponse]
29
30
  def list_resource_types(opts = {})
30
31
  data, _status_code, _headers = list_resource_types_with_http_info(opts)
@@ -34,18 +35,15 @@ module SmplkitGeneratedClient::Audit
34
35
  # List Resource Types
35
36
  # List the distinct &#x60;resource_type&#x60; slugs recorded for this account. The resource &#x60;id&#x60; is the slug itself. Default sort is &#x60;key&#x60; ascending; pass &#x60;sort&#x3D;-key&#x60; for descending. Useful for populating filter dropdowns in a UI.
36
37
  # @param [Hash] opts the optional parameters
37
- # @option opts [Integer] :page_size
38
- # @option opts [String] :page_after
39
38
  # @option opts [String] :sort Field to sort by. Prefix with &#x60;-&#x60; for descending order. Default: &#x60;key&#x60;. Allowed values: &#x60;key&#x60;, &#x60;-key&#x60;. (default to 'key')
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)
40
42
  # @return [Array<(ResourceTypeListResponse, Integer, Hash)>] ResourceTypeListResponse data, response status code and response headers
41
43
  def list_resource_types_with_http_info(opts = {})
42
44
  if @api_client.config.debugging
43
45
  @api_client.config.logger.debug 'Calling API: ResourceTypesApi.list_resource_types ...'
44
46
  end
45
- if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
46
- fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ResourceTypesApi.list_resource_types, must be greater than or equal to 1.'
47
- end
48
-
49
47
  allowable_values = ["key", "-key"]
50
48
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
51
49
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
@@ -55,9 +53,10 @@ module SmplkitGeneratedClient::Audit
55
53
 
56
54
  # query parameters
57
55
  query_params = opts[:query_params] || {}
58
- query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
59
- query_params[:'page[after]'] = opts[:'page_after'] if !opts[:'page_after'].nil?
60
56
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
57
+ query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
58
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
59
+ query_params[:'meta[total]'] = opts[:'meta_total'] if !opts[:'meta_total'].nil?
61
60
 
62
61
  # header parameters
63
62
  header_params = opts[:header_params] || {}
@@ -23,6 +23,9 @@ module SmplkitGeneratedClient::Audit
23
23
  # Report the current-period usage counters for this account.
24
24
  # @param filter_period [String] Period to report. &#x60;current&#x60; is the only supported value.
25
25
  # @param [Hash] opts the optional parameters
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 [UsageResponse]
27
30
  def list_usage(filter_period, opts = {})
28
31
  data, _status_code, _headers = list_usage_with_http_info(filter_period, opts)
@@ -33,6 +36,9 @@ module SmplkitGeneratedClient::Audit
33
36
  # Report the current-period usage counters for this account.
34
37
  # @param filter_period [String] Period to report. &#x60;current&#x60; is the only supported value.
35
38
  # @param [Hash] opts the optional parameters
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<(UsageResponse, Integer, Hash)>] UsageResponse data, response status code and response headers
37
43
  def list_usage_with_http_info(filter_period, opts = {})
38
44
  if @api_client.config.debugging
@@ -48,6 +54,9 @@ module SmplkitGeneratedClient::Audit
48
54
  # query parameters
49
55
  query_params = opts[:query_params] || {}
50
56
  query_params[:'filter[period]'] = filter_period
57
+ query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
58
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
59
+ query_params[:'meta[total]'] = opts[:'meta_total'] if !opts[:'meta_total'].nil?
51
60
 
52
61
  # header parameters
53
62
  header_params = opts[:header_params] || {}
@@ -19,14 +19,11 @@ module SmplkitGeneratedClient::Audit
19
19
 
20
20
  attr_accessor :meta
21
21
 
22
- attr_accessor :links
23
-
24
22
  # Attribute mapping from ruby-style variable name to JSON key.
25
23
  def self.attribute_map
26
24
  {
27
25
  :'data' => :'data',
28
- :'meta' => :'meta',
29
- :'links' => :'links'
26
+ :'meta' => :'meta'
30
27
  }
31
28
  end
32
29
 
@@ -44,15 +41,13 @@ module SmplkitGeneratedClient::Audit
44
41
  def self.openapi_types
45
42
  {
46
43
  :'data' => :'Array<ActionResource>',
47
- :'meta' => :'ActionListMeta',
48
- :'links' => :'ActionListLinks'
44
+ :'meta' => :'ListMeta'
49
45
  }
50
46
  end
51
47
 
52
48
  # List of attributes with nullable: true
53
49
  def self.openapi_nullable
54
50
  Set.new([
55
- :'links'
56
51
  ])
57
52
  end
58
53
 
@@ -85,10 +80,6 @@ module SmplkitGeneratedClient::Audit
85
80
  else
86
81
  self.meta = nil
87
82
  end
88
-
89
- if attributes.key?(:'links')
90
- self.links = attributes[:'links']
91
- end
92
83
  end
93
84
 
94
85
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -142,8 +133,7 @@ module SmplkitGeneratedClient::Audit
142
133
  return true if self.equal?(o)
143
134
  self.class == o.class &&
144
135
  data == o.data &&
145
- meta == o.meta &&
146
- links == o.links
136
+ meta == o.meta
147
137
  end
148
138
 
149
139
  # @see the `==` method
@@ -155,7 +145,7 @@ module SmplkitGeneratedClient::Audit
155
145
  # Calculates hash code according to all attributes.
156
146
  # @return [Integer] Hash code
157
147
  def hash
158
- [data, meta, links].hash
148
+ [data, meta].hash
159
149
  end
160
150
 
161
151
  # Builds the object from hash
@@ -14,6 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module SmplkitGeneratedClient::Audit
17
+ # Cursor-pagination meta for the audit-event list endpoint. Audit events are append-only at high cardinality (millions of rows per account at production tenants), so this endpoint stays on cursor pagination — the documented exception in ADR-014. Every other read-many endpoint in the platform follows the standard offset convention (`page[number]` / `page[size]`).
17
18
  class EventListMeta < ApiModelBase
18
19
  attr_accessor :page_size
19
20
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module SmplkitGeneratedClient::Audit
17
- # JSON:API collection response for audit events.
17
+ # JSON:API collection response for audit events (cursor paged).
18
18
  class EventListResponse < ApiModelBase
19
19
  attr_accessor :data
20
20
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module SmplkitGeneratedClient::Audit
17
- class ResourceTypeListLinks < ApiModelBase
17
+ class ForwarderDeliveryListLinks < ApiModelBase
18
18
  attr_accessor :_next
19
19
 
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -52,14 +52,14 @@ module SmplkitGeneratedClient::Audit
52
52
  # @param [Hash] attributes Model attributes in the form of hash
53
53
  def initialize(attributes = {})
54
54
  if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::ResourceTypeListLinks` initialize method"
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::ForwarderDeliveryListLinks` initialize method"
56
56
  end
57
57
 
58
58
  # check to see if the attribute exists and convert string to symbol for hash key
59
59
  acceptable_attribute_map = self.class.acceptable_attribute_map
60
60
  attributes = attributes.each_with_object({}) { |(k, v), h|
61
61
  if (!acceptable_attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Audit::ResourceTypeListLinks`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Audit::ForwarderDeliveryListLinks`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
63
  end
64
64
  h[k.to_sym] = v
65
65
  }
@@ -14,7 +14,8 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module SmplkitGeneratedClient::Audit
17
- class ActionListMeta < ApiModelBase
17
+ # Cursor-pagination meta for the forwarder-delivery log endpoint. Forwarder deliveries are append-only at high cardinality (one row per delivery attempt per event) and scroll with the same workload as audit events, so this endpoint stays on cursor pagination — the documented exception in ADR-014. The parent `/forwarders` collection follows the standard offset convention.
18
+ class ForwarderDeliveryListMeta < ApiModelBase
18
19
  attr_accessor :page_size
19
20
 
20
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -51,14 +52,14 @@ module SmplkitGeneratedClient::Audit
51
52
  # @param [Hash] attributes Model attributes in the form of hash
52
53
  def initialize(attributes = {})
53
54
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::ActionListMeta` initialize method"
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::ForwarderDeliveryListMeta` initialize method"
55
56
  end
56
57
 
57
58
  # check to see if the attribute exists and convert string to symbol for hash key
58
59
  acceptable_attribute_map = self.class.acceptable_attribute_map
59
60
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
61
  if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Audit::ActionListMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Audit::ForwarderDeliveryListMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
63
  end
63
64
  h[k.to_sym] = v
64
65
  }