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
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module SmplkitGeneratedClient::Audit
17
- # JSON:API collection response for forwarder deliveries.
17
+ # JSON:API collection response for forwarder deliveries (cursor paged).
18
18
  class ForwarderDeliveryListResponse < ApiModelBase
19
19
  attr_accessor :data
20
20
 
@@ -45,8 +45,8 @@ module SmplkitGeneratedClient::Audit
45
45
  def self.openapi_types
46
46
  {
47
47
  :'data' => :'Array<ForwarderDeliveryResource>',
48
- :'meta' => :'ForwarderListMeta',
49
- :'links' => :'ForwarderListLinks'
48
+ :'meta' => :'ForwarderDeliveryListMeta',
49
+ :'links' => :'ForwarderDeliveryListLinks'
50
50
  }
51
51
  end
52
52
 
@@ -20,14 +20,11 @@ module SmplkitGeneratedClient::Audit
20
20
 
21
21
  attr_accessor :meta
22
22
 
23
- attr_accessor :links
24
-
25
23
  # Attribute mapping from ruby-style variable name to JSON key.
26
24
  def self.attribute_map
27
25
  {
28
26
  :'data' => :'data',
29
- :'meta' => :'meta',
30
- :'links' => :'links'
27
+ :'meta' => :'meta'
31
28
  }
32
29
  end
33
30
 
@@ -45,15 +42,13 @@ module SmplkitGeneratedClient::Audit
45
42
  def self.openapi_types
46
43
  {
47
44
  :'data' => :'Array<ForwarderResource>',
48
- :'meta' => :'ForwarderListMeta',
49
- :'links' => :'ForwarderListLinks'
45
+ :'meta' => :'ListMeta'
50
46
  }
51
47
  end
52
48
 
53
49
  # List of attributes with nullable: true
54
50
  def self.openapi_nullable
55
51
  Set.new([
56
- :'links'
57
52
  ])
58
53
  end
59
54
 
@@ -86,10 +81,6 @@ module SmplkitGeneratedClient::Audit
86
81
  else
87
82
  self.meta = nil
88
83
  end
89
-
90
- if attributes.key?(:'links')
91
- self.links = attributes[:'links']
92
- end
93
84
  end
94
85
 
95
86
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -143,8 +134,7 @@ module SmplkitGeneratedClient::Audit
143
134
  return true if self.equal?(o)
144
135
  self.class == o.class &&
145
136
  data == o.data &&
146
- meta == o.meta &&
147
- links == o.links
137
+ meta == o.meta
148
138
  end
149
139
 
150
140
  # @see the `==` method
@@ -156,7 +146,7 @@ module SmplkitGeneratedClient::Audit
156
146
  # Calculates hash code according to all attributes.
157
147
  # @return [Integer] Hash code
158
148
  def hash
159
- [data, meta, links].hash
149
+ [data, meta].hash
160
150
  end
161
151
 
162
152
  # Builds the object from hash
@@ -14,13 +14,14 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module SmplkitGeneratedClient::Audit
17
- class ResourceTypeListMeta < ApiModelBase
18
- attr_accessor :page_size
17
+ # Top-level ``meta`` block included on every JSON:API list response.
18
+ class ListMeta < ApiModelBase
19
+ attr_accessor :pagination
19
20
 
20
21
  # Attribute mapping from ruby-style variable name to JSON key.
21
22
  def self.attribute_map
22
23
  {
23
- :'page_size' => :'page_size'
24
+ :'pagination' => :'pagination'
24
25
  }
25
26
  end
26
27
 
@@ -37,7 +38,7 @@ module SmplkitGeneratedClient::Audit
37
38
  # Attribute type mapping.
38
39
  def self.openapi_types
39
40
  {
40
- :'page_size' => :'Integer'
41
+ :'pagination' => :'PaginationMeta'
41
42
  }
42
43
  end
43
44
 
@@ -51,22 +52,22 @@ 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::ResourceTypeListMeta` initialize method"
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::ListMeta` 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::ResourceTypeListMeta`. 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::ListMeta`. 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
  }
65
66
 
66
- if attributes.key?(:'page_size')
67
- self.page_size = attributes[:'page_size']
67
+ if attributes.key?(:'pagination')
68
+ self.pagination = attributes[:'pagination']
68
69
  else
69
- self.page_size = nil
70
+ self.pagination = nil
70
71
  end
71
72
  end
72
73
 
@@ -75,8 +76,8 @@ module SmplkitGeneratedClient::Audit
75
76
  def list_invalid_properties
76
77
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
78
  invalid_properties = Array.new
78
- if @page_size.nil?
79
- invalid_properties.push('invalid value for "page_size", page_size cannot be nil.')
79
+ if @pagination.nil?
80
+ invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
80
81
  end
81
82
 
82
83
  invalid_properties
@@ -86,18 +87,18 @@ module SmplkitGeneratedClient::Audit
86
87
  # @return true if the model is valid
87
88
  def valid?
88
89
  warn '[DEPRECATED] the `valid?` method is obsolete'
89
- return false if @page_size.nil?
90
+ return false if @pagination.nil?
90
91
  true
91
92
  end
92
93
 
93
94
  # Custom attribute writer method with validation
94
- # @param [Object] page_size Value to be assigned
95
- def page_size=(page_size)
96
- if page_size.nil?
97
- fail ArgumentError, 'page_size cannot be nil'
95
+ # @param [Object] pagination Value to be assigned
96
+ def pagination=(pagination)
97
+ if pagination.nil?
98
+ fail ArgumentError, 'pagination cannot be nil'
98
99
  end
99
100
 
100
- @page_size = page_size
101
+ @pagination = pagination
101
102
  end
102
103
 
103
104
  # Checks equality by comparing each attribute.
@@ -105,7 +106,7 @@ module SmplkitGeneratedClient::Audit
105
106
  def ==(o)
106
107
  return true if self.equal?(o)
107
108
  self.class == o.class &&
108
- page_size == o.page_size
109
+ pagination == o.pagination
109
110
  end
110
111
 
111
112
  # @see the `==` method
@@ -117,7 +118,7 @@ module SmplkitGeneratedClient::Audit
117
118
  # Calculates hash code according to all attributes.
118
119
  # @return [Integer] Hash code
119
120
  def hash
120
- [page_size].hash
121
+ [pagination].hash
121
122
  end
122
123
 
123
124
  # Builds the object from hash
@@ -14,13 +14,27 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module SmplkitGeneratedClient::Audit
17
- class ForwarderListMeta < ApiModelBase
18
- attr_accessor :page_size
17
+ # Pagination block returned inside ``meta`` on every list response. ``page`` and ``size`` are always present and echo the parameters that served the response (their defaults when the client omitted them). ``total`` and ``total_pages`` are present only when the request included ``meta[total]=true``.
18
+ class PaginationMeta < ApiModelBase
19
+ # 1-based page number returned.
20
+ attr_accessor :page
21
+
22
+ # Number of items per page.
23
+ attr_accessor :size
24
+
25
+ # Total number of matching items across all pages. Present only when the request included `meta[total]=true`.
26
+ attr_accessor :total
27
+
28
+ # Total number of pages at the requested page size. Present only when the request included `meta[total]=true`.
29
+ attr_accessor :total_pages
19
30
 
20
31
  # Attribute mapping from ruby-style variable name to JSON key.
21
32
  def self.attribute_map
22
33
  {
23
- :'page_size' => :'page_size'
34
+ :'page' => :'page',
35
+ :'size' => :'size',
36
+ :'total' => :'total',
37
+ :'total_pages' => :'total_pages'
24
38
  }
25
39
  end
26
40
 
@@ -37,13 +51,18 @@ module SmplkitGeneratedClient::Audit
37
51
  # Attribute type mapping.
38
52
  def self.openapi_types
39
53
  {
40
- :'page_size' => :'Integer'
54
+ :'page' => :'Integer',
55
+ :'size' => :'Integer',
56
+ :'total' => :'Integer',
57
+ :'total_pages' => :'Integer'
41
58
  }
42
59
  end
43
60
 
44
61
  # List of attributes with nullable: true
45
62
  def self.openapi_nullable
46
63
  Set.new([
64
+ :'total',
65
+ :'total_pages'
47
66
  ])
48
67
  end
49
68
 
@@ -51,22 +70,36 @@ module SmplkitGeneratedClient::Audit
51
70
  # @param [Hash] attributes Model attributes in the form of hash
52
71
  def initialize(attributes = {})
53
72
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::ForwarderListMeta` initialize method"
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Audit::PaginationMeta` initialize method"
55
74
  end
56
75
 
57
76
  # check to see if the attribute exists and convert string to symbol for hash key
58
77
  acceptable_attribute_map = self.class.acceptable_attribute_map
59
78
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
79
  if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Audit::ForwarderListMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Audit::PaginationMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
81
  end
63
82
  h[k.to_sym] = v
64
83
  }
65
84
 
66
- if attributes.key?(:'page_size')
67
- self.page_size = attributes[:'page_size']
85
+ if attributes.key?(:'page')
86
+ self.page = attributes[:'page']
68
87
  else
69
- self.page_size = nil
88
+ self.page = nil
89
+ end
90
+
91
+ if attributes.key?(:'size')
92
+ self.size = attributes[:'size']
93
+ else
94
+ self.size = nil
95
+ end
96
+
97
+ if attributes.key?(:'total')
98
+ self.total = attributes[:'total']
99
+ end
100
+
101
+ if attributes.key?(:'total_pages')
102
+ self.total_pages = attributes[:'total_pages']
70
103
  end
71
104
  end
72
105
 
@@ -75,8 +108,12 @@ module SmplkitGeneratedClient::Audit
75
108
  def list_invalid_properties
76
109
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
110
  invalid_properties = Array.new
78
- if @page_size.nil?
79
- invalid_properties.push('invalid value for "page_size", page_size cannot be nil.')
111
+ if @page.nil?
112
+ invalid_properties.push('invalid value for "page", page cannot be nil.')
113
+ end
114
+
115
+ if @size.nil?
116
+ invalid_properties.push('invalid value for "size", size cannot be nil.')
80
117
  end
81
118
 
82
119
  invalid_properties
@@ -86,18 +123,29 @@ module SmplkitGeneratedClient::Audit
86
123
  # @return true if the model is valid
87
124
  def valid?
88
125
  warn '[DEPRECATED] the `valid?` method is obsolete'
89
- return false if @page_size.nil?
126
+ return false if @page.nil?
127
+ return false if @size.nil?
90
128
  true
91
129
  end
92
130
 
93
131
  # Custom attribute writer method with validation
94
- # @param [Object] page_size Value to be assigned
95
- def page_size=(page_size)
96
- if page_size.nil?
97
- fail ArgumentError, 'page_size cannot be nil'
132
+ # @param [Object] page Value to be assigned
133
+ def page=(page)
134
+ if page.nil?
135
+ fail ArgumentError, 'page cannot be nil'
136
+ end
137
+
138
+ @page = page
139
+ end
140
+
141
+ # Custom attribute writer method with validation
142
+ # @param [Object] size Value to be assigned
143
+ def size=(size)
144
+ if size.nil?
145
+ fail ArgumentError, 'size cannot be nil'
98
146
  end
99
147
 
100
- @page_size = page_size
148
+ @size = size
101
149
  end
102
150
 
103
151
  # Checks equality by comparing each attribute.
@@ -105,7 +153,10 @@ module SmplkitGeneratedClient::Audit
105
153
  def ==(o)
106
154
  return true if self.equal?(o)
107
155
  self.class == o.class &&
108
- page_size == o.page_size
156
+ page == o.page &&
157
+ size == o.size &&
158
+ total == o.total &&
159
+ total_pages == o.total_pages
109
160
  end
110
161
 
111
162
  # @see the `==` method
@@ -117,7 +168,7 @@ module SmplkitGeneratedClient::Audit
117
168
  # Calculates hash code according to all attributes.
118
169
  # @return [Integer] Hash code
119
170
  def hash
120
- [page_size].hash
171
+ [page, size, total, total_pages].hash
121
172
  end
122
173
 
123
174
  # Builds the object from hash
@@ -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<ResourceTypeResource>',
47
- :'meta' => :'ResourceTypeListMeta',
48
- :'links' => :'ResourceTypeListLinks'
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
@@ -17,10 +17,13 @@ module SmplkitGeneratedClient::Audit
17
17
  class UsageResponse < ApiModelBase
18
18
  attr_accessor :data
19
19
 
20
+ attr_accessor :meta
21
+
20
22
  # Attribute mapping from ruby-style variable name to JSON key.
21
23
  def self.attribute_map
22
24
  {
23
- :'data' => :'data'
25
+ :'data' => :'data',
26
+ :'meta' => :'meta'
24
27
  }
25
28
  end
26
29
 
@@ -37,7 +40,8 @@ module SmplkitGeneratedClient::Audit
37
40
  # Attribute type mapping.
38
41
  def self.openapi_types
39
42
  {
40
- :'data' => :'Array<UsageResource>'
43
+ :'data' => :'Array<UsageResource>',
44
+ :'meta' => :'ListMeta'
41
45
  }
42
46
  end
43
47
 
@@ -70,6 +74,12 @@ module SmplkitGeneratedClient::Audit
70
74
  else
71
75
  self.data = nil
72
76
  end
77
+
78
+ if attributes.key?(:'meta')
79
+ self.meta = attributes[:'meta']
80
+ else
81
+ self.meta = nil
82
+ end
73
83
  end
74
84
 
75
85
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -81,6 +91,10 @@ module SmplkitGeneratedClient::Audit
81
91
  invalid_properties.push('invalid value for "data", data cannot be nil.')
82
92
  end
83
93
 
94
+ if @meta.nil?
95
+ invalid_properties.push('invalid value for "meta", meta cannot be nil.')
96
+ end
97
+
84
98
  invalid_properties
85
99
  end
86
100
 
@@ -89,6 +103,7 @@ module SmplkitGeneratedClient::Audit
89
103
  def valid?
90
104
  warn '[DEPRECATED] the `valid?` method is obsolete'
91
105
  return false if @data.nil?
106
+ return false if @meta.nil?
92
107
  true
93
108
  end
94
109
 
@@ -102,12 +117,23 @@ module SmplkitGeneratedClient::Audit
102
117
  @data = data
103
118
  end
104
119
 
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] meta Value to be assigned
122
+ def meta=(meta)
123
+ if meta.nil?
124
+ fail ArgumentError, 'meta cannot be nil'
125
+ end
126
+
127
+ @meta = meta
128
+ end
129
+
105
130
  # Checks equality by comparing each attribute.
106
131
  # @param [Object] Object to be compared
107
132
  def ==(o)
108
133
  return true if self.equal?(o)
109
134
  self.class == o.class &&
110
- data == o.data
135
+ data == o.data &&
136
+ meta == o.meta
111
137
  end
112
138
 
113
139
  # @see the `==` method
@@ -119,7 +145,7 @@ module SmplkitGeneratedClient::Audit
119
145
  # Calculates hash code according to all attributes.
120
146
  # @return [Integer] Hash code
121
147
  def hash
122
- [data].hash
148
+ [data, meta].hash
123
149
  end
124
150
 
125
151
  # Builds the object from hash
@@ -19,8 +19,6 @@ require 'smplkit_audit_client/configuration'
19
19
 
20
20
  # Models
21
21
  require 'smplkit_audit_client/models/action_attributes'
22
- require 'smplkit_audit_client/models/action_list_links'
23
- require 'smplkit_audit_client/models/action_list_meta'
24
22
  require 'smplkit_audit_client/models/action_list_response'
25
23
  require 'smplkit_audit_client/models/action_resource'
26
24
  require 'smplkit_audit_client/models/event'
@@ -32,21 +30,21 @@ require 'smplkit_audit_client/models/event_resource'
32
30
  require 'smplkit_audit_client/models/event_response'
33
31
  require 'smplkit_audit_client/models/forwarder'
34
32
  require 'smplkit_audit_client/models/forwarder_delivery'
33
+ require 'smplkit_audit_client/models/forwarder_delivery_list_links'
34
+ require 'smplkit_audit_client/models/forwarder_delivery_list_meta'
35
35
  require 'smplkit_audit_client/models/forwarder_delivery_list_response'
36
36
  require 'smplkit_audit_client/models/forwarder_delivery_resource'
37
37
  require 'smplkit_audit_client/models/forwarder_delivery_response'
38
38
  require 'smplkit_audit_client/models/forwarder_http'
39
- require 'smplkit_audit_client/models/forwarder_list_links'
40
- require 'smplkit_audit_client/models/forwarder_list_meta'
41
39
  require 'smplkit_audit_client/models/forwarder_list_response'
42
40
  require 'smplkit_audit_client/models/forwarder_request'
43
41
  require 'smplkit_audit_client/models/forwarder_resource'
44
42
  require 'smplkit_audit_client/models/forwarder_response'
45
43
  require 'smplkit_audit_client/models/forwarder_type'
46
44
  require 'smplkit_audit_client/models/http_header'
45
+ require 'smplkit_audit_client/models/list_meta'
46
+ require 'smplkit_audit_client/models/pagination_meta'
47
47
  require 'smplkit_audit_client/models/resource_type_attributes'
48
- require 'smplkit_audit_client/models/resource_type_list_links'
49
- require 'smplkit_audit_client/models/resource_type_list_meta'
50
48
  require 'smplkit_audit_client/models/resource_type_list_response'
51
49
  require 'smplkit_audit_client/models/resource_type_resource'
52
50
  require 'smplkit_audit_client/models/retry_failed_deliveries_summary'
@@ -37,9 +37,10 @@ describe 'ActionsApi' do
37
37
  # List the distinct &#x60;action&#x60; slugs recorded for this account. Default sort is &#x60;key&#x60; ascending; pass &#x60;sort&#x3D;-key&#x60; for descending. Without &#x60;filter[resource_type]&#x60;, returns one row per distinct action. With &#x60;filter[resource_type]&#x60;, returns the actions recorded for that specific resource type.
38
38
  # @param [Hash] opts the optional parameters
39
39
  # @option opts [String] :filter_resource_type
40
- # @option opts [Integer] :page_size
41
- # @option opts [String] :page_after
42
40
  # @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;.
41
+ # @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.
42
+ # @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.
43
+ # @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;.
43
44
  # @return [ActionListResponse]
44
45
  describe 'list_actions test' do
45
46
  it 'should work' do
@@ -100,13 +100,14 @@ describe 'ForwardersApi' do
100
100
 
101
101
  # unit tests for list_forwarders
102
102
  # List Forwarders
103
- # 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.
103
+ # List forwarders for this account. Default sort is &#x60;-created_at&#x60; (newest first).
104
104
  # @param [Hash] opts the optional parameters
105
105
  # @option opts [String] :filter_forwarder_type
106
106
  # @option opts [Boolean] :filter_enabled
107
- # @option opts [Integer] :page_size
108
- # @option opts [String] :page_after
109
107
  # @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;.
108
+ # @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.
109
+ # @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.
110
+ # @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;.
110
111
  # @return [ForwarderListResponse]
111
112
  describe 'list_forwarders test' do
112
113
  it 'should work' do
@@ -36,9 +36,10 @@ describe 'ResourceTypesApi' do
36
36
  # List Resource Types
37
37
  # 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.
38
38
  # @param [Hash] opts the optional parameters
39
- # @option opts [Integer] :page_size
40
- # @option opts [String] :page_after
41
39
  # @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;.
40
+ # @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.
41
+ # @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.
42
+ # @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;.
42
43
  # @return [ResourceTypeListResponse]
43
44
  describe 'list_resource_types test' do
44
45
  it 'should work' do
@@ -37,6 +37,9 @@ describe 'UsageApi' do
37
37
  # Report the current-period usage counters for this account.
38
38
  # @param filter_period Period to report. &#x60;current&#x60; is the only supported value.
39
39
  # @param [Hash] opts the optional parameters
40
+ # @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.
41
+ # @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.
42
+ # @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;.
40
43
  # @return [UsageResponse]
41
44
  describe 'list_usage test' do
42
45
  it 'should work' do
@@ -39,10 +39,4 @@ describe SmplkitGeneratedClient::Audit::ActionListResponse do
39
39
  end
40
40
  end
41
41
 
42
- describe 'test attribute "links"' 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
42
  end
@@ -14,16 +14,16 @@ require 'spec_helper'
14
14
  require 'json'
15
15
  require 'date'
16
16
 
17
- # Unit tests for SmplkitGeneratedClient::Audit::ActionListLinks
17
+ # Unit tests for SmplkitGeneratedClient::Audit::ForwarderDeliveryListLinks
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
- describe SmplkitGeneratedClient::Audit::ActionListLinks do
21
- #let(:instance) { SmplkitGeneratedClient::Audit::ActionListLinks.new }
20
+ describe SmplkitGeneratedClient::Audit::ForwarderDeliveryListLinks do
21
+ #let(:instance) { SmplkitGeneratedClient::Audit::ForwarderDeliveryListLinks.new }
22
22
 
23
- describe 'test an instance of ActionListLinks' do
24
- it 'should create an instance of ActionListLinks' do
23
+ describe 'test an instance of ForwarderDeliveryListLinks' do
24
+ it 'should create an instance of ForwarderDeliveryListLinks' do
25
25
  # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(SmplkitGeneratedClient::Audit::ActionListLinks)
26
+ #expect(instance).to be_instance_of(SmplkitGeneratedClient::Audit::ForwarderDeliveryListLinks)
27
27
  end
28
28
  end
29
29
 
@@ -14,16 +14,16 @@ require 'spec_helper'
14
14
  require 'json'
15
15
  require 'date'
16
16
 
17
- # Unit tests for SmplkitGeneratedClient::Audit::ResourceTypeListMeta
17
+ # Unit tests for SmplkitGeneratedClient::Audit::ForwarderDeliveryListMeta
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
- describe SmplkitGeneratedClient::Audit::ResourceTypeListMeta do
21
- #let(:instance) { SmplkitGeneratedClient::Audit::ResourceTypeListMeta.new }
20
+ describe SmplkitGeneratedClient::Audit::ForwarderDeliveryListMeta do
21
+ #let(:instance) { SmplkitGeneratedClient::Audit::ForwarderDeliveryListMeta.new }
22
22
 
23
- describe 'test an instance of ResourceTypeListMeta' do
24
- it 'should create an instance of ResourceTypeListMeta' do
23
+ describe 'test an instance of ForwarderDeliveryListMeta' do
24
+ it 'should create an instance of ForwarderDeliveryListMeta' do
25
25
  # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(SmplkitGeneratedClient::Audit::ResourceTypeListMeta)
26
+ #expect(instance).to be_instance_of(SmplkitGeneratedClient::Audit::ForwarderDeliveryListMeta)
27
27
  end
28
28
  end
29
29