svix 1.69.0 → 1.70.1

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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/svix/api/endpoint.rb +8 -0
  4. data/lib/svix/models/{api_token_expire_in.rb → airwallex_config.rb} +7 -8
  5. data/lib/svix/models/{api_token_in.rb → airwallex_config_out.rb} +4 -10
  6. data/lib/svix/models/app_portal_access_in.rb +7 -1
  7. data/lib/svix/models/application_token_expire_in.rb +7 -1
  8. data/lib/svix/models/checkbook_config.rb +46 -0
  9. data/lib/svix/models/checkbook_config_out.rb +43 -0
  10. data/lib/svix/models/connector_in.rb +5 -0
  11. data/lib/svix/models/connector_out.rb +4 -0
  12. data/lib/svix/models/easypost_config.rb +46 -0
  13. data/lib/svix/models/easypost_config_out.rb +43 -0
  14. data/lib/svix/models/{list_response_api_token_censored_out.rb → endpoint_transformation_patch.rb} +10 -16
  15. data/lib/svix/models/event_type_from_open_api.rb +4 -1
  16. data/lib/svix/models/event_type_in.rb +14 -1
  17. data/lib/svix/models/event_type_out.rb +4 -0
  18. data/lib/svix/models/event_type_patch.rb +4 -1
  19. data/lib/svix/models/event_type_update.rb +4 -1
  20. data/lib/svix/models/ingest_source_in.rb +58 -2
  21. data/lib/svix/models/ingest_source_out.rb +58 -2
  22. data/lib/svix/models/message_attempt_trigger_type.rb +1 -0
  23. data/lib/svix/models/message_status.rb +1 -0
  24. data/lib/svix/models/orum_io_config.rb +46 -0
  25. data/lib/svix/models/orum_io_config_out.rb +46 -0
  26. data/lib/svix/models/port_io_config.rb +46 -0
  27. data/lib/svix/models/port_io_config_out.rb +43 -0
  28. data/lib/svix/models/rutter_config.rb +46 -0
  29. data/lib/svix/models/rutter_config_out.rb +43 -0
  30. data/lib/svix/models/status_code_class.rb +1 -0
  31. data/lib/svix/models/telnyx_config.rb +46 -0
  32. data/lib/svix/models/telnyx_config_out.rb +46 -0
  33. data/lib/svix/models/vapi_config.rb +46 -0
  34. data/lib/svix/models/vapi_config_out.rb +43 -0
  35. data/lib/svix/models/veriff_config.rb +46 -0
  36. data/lib/svix/models/veriff_config_out.rb +43 -0
  37. data/lib/svix/svix.rb +0 -2
  38. data/lib/svix/version.rb +1 -1
  39. data/lib/svix.rb +19 -7
  40. metadata +21 -9
  41. data/lib/svix/api/management.rb +0 -14
  42. data/lib/svix/api/management_authentication.rb +0 -52
  43. data/lib/svix/models/api_token_censored_out.rb +0 -62
  44. data/lib/svix/models/api_token_out.rb +0 -62
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class TelnyxConfigOut
7
+ attr_accessor :public_key
8
+
9
+ ALL_FIELD ||= ["public_key"].freeze
10
+ private_constant :ALL_FIELD
11
+
12
+ def initialize(attributes = {})
13
+ unless attributes.is_a?(Hash)
14
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::TelnyxConfigOut` new method")
15
+ end
16
+
17
+ attributes.each do |k, v|
18
+ unless ALL_FIELD.include?(k.to_s)
19
+ fail(ArgumentError, "The field #{k} is not part of Svix::TelnyxConfigOut")
20
+ end
21
+
22
+ instance_variable_set("@#{k}", v)
23
+ instance_variable_set("@__#{k}_is_defined", true)
24
+ end
25
+ end
26
+
27
+ def self.deserialize(attributes = {})
28
+ attributes = attributes.transform_keys(&:to_s)
29
+ attrs = Hash.new
30
+ attrs["public_key"] = attributes["publicKey"]
31
+ new(attrs)
32
+ end
33
+
34
+ def serialize
35
+ out = Hash.new
36
+ out["publicKey"] = Svix::serialize_primitive(@public_key) if @public_key
37
+ out
38
+ end
39
+
40
+ # Serializes the object to a json string
41
+ # @return String
42
+ def to_json
43
+ JSON.dump(serialize)
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class VapiConfig
7
+ attr_accessor :secret
8
+
9
+ ALL_FIELD ||= ["secret"].freeze
10
+ private_constant :ALL_FIELD
11
+
12
+ def initialize(attributes = {})
13
+ unless attributes.is_a?(Hash)
14
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::VapiConfig` new method")
15
+ end
16
+
17
+ attributes.each do |k, v|
18
+ unless ALL_FIELD.include?(k.to_s)
19
+ fail(ArgumentError, "The field #{k} is not part of Svix::VapiConfig")
20
+ end
21
+
22
+ instance_variable_set("@#{k}", v)
23
+ instance_variable_set("@__#{k}_is_defined", true)
24
+ end
25
+ end
26
+
27
+ def self.deserialize(attributes = {})
28
+ attributes = attributes.transform_keys(&:to_s)
29
+ attrs = Hash.new
30
+ attrs["secret"] = attributes["secret"]
31
+ new(attrs)
32
+ end
33
+
34
+ def serialize
35
+ out = Hash.new
36
+ out["secret"] = Svix::serialize_primitive(@secret) if @secret
37
+ out
38
+ end
39
+
40
+ # Serializes the object to a json string
41
+ # @return String
42
+ def to_json
43
+ JSON.dump(serialize)
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class VapiConfigOut
7
+
8
+ ALL_FIELD ||= [].freeze
9
+ private_constant :ALL_FIELD
10
+
11
+ def initialize(attributes = {})
12
+ unless attributes.is_a?(Hash)
13
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::VapiConfigOut` new method")
14
+ end
15
+
16
+ attributes.each do |k, v|
17
+ unless ALL_FIELD.include?(k.to_s)
18
+ fail(ArgumentError, "The field #{k} is not part of Svix::VapiConfigOut")
19
+ end
20
+
21
+ instance_variable_set("@#{k}", v)
22
+ instance_variable_set("@__#{k}_is_defined", true)
23
+ end
24
+ end
25
+
26
+ def self.deserialize(attributes = {})
27
+ attributes = attributes.transform_keys(&:to_s)
28
+ attrs = Hash.new
29
+ new(attrs)
30
+ end
31
+
32
+ def serialize
33
+ out = Hash.new
34
+ out
35
+ end
36
+
37
+ # Serializes the object to a json string
38
+ # @return String
39
+ def to_json
40
+ JSON.dump(serialize)
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class VeriffConfig
7
+ attr_accessor :secret
8
+
9
+ ALL_FIELD ||= ["secret"].freeze
10
+ private_constant :ALL_FIELD
11
+
12
+ def initialize(attributes = {})
13
+ unless attributes.is_a?(Hash)
14
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::VeriffConfig` new method")
15
+ end
16
+
17
+ attributes.each do |k, v|
18
+ unless ALL_FIELD.include?(k.to_s)
19
+ fail(ArgumentError, "The field #{k} is not part of Svix::VeriffConfig")
20
+ end
21
+
22
+ instance_variable_set("@#{k}", v)
23
+ instance_variable_set("@__#{k}_is_defined", true)
24
+ end
25
+ end
26
+
27
+ def self.deserialize(attributes = {})
28
+ attributes = attributes.transform_keys(&:to_s)
29
+ attrs = Hash.new
30
+ attrs["secret"] = attributes["secret"]
31
+ new(attrs)
32
+ end
33
+
34
+ def serialize
35
+ out = Hash.new
36
+ out["secret"] = Svix::serialize_primitive(@secret) if @secret
37
+ out
38
+ end
39
+
40
+ # Serializes the object to a json string
41
+ # @return String
42
+ def to_json
43
+ JSON.dump(serialize)
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class VeriffConfigOut
7
+
8
+ ALL_FIELD ||= [].freeze
9
+ private_constant :ALL_FIELD
10
+
11
+ def initialize(attributes = {})
12
+ unless attributes.is_a?(Hash)
13
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::VeriffConfigOut` new method")
14
+ end
15
+
16
+ attributes.each do |k, v|
17
+ unless ALL_FIELD.include?(k.to_s)
18
+ fail(ArgumentError, "The field #{k} is not part of Svix::VeriffConfigOut")
19
+ end
20
+
21
+ instance_variable_set("@#{k}", v)
22
+ instance_variable_set("@__#{k}_is_defined", true)
23
+ end
24
+ end
25
+
26
+ def self.deserialize(attributes = {})
27
+ attributes = attributes.transform_keys(&:to_s)
28
+ attrs = Hash.new
29
+ new(attrs)
30
+ end
31
+
32
+ def serialize
33
+ out = Hash.new
34
+ out
35
+ end
36
+
37
+ # Serializes the object to a json string
38
+ # @return String
39
+ def to_json
40
+ JSON.dump(serialize)
41
+ end
42
+ end
43
+ end
data/lib/svix/svix.rb CHANGED
@@ -21,7 +21,6 @@ module Svix
21
21
  attr_accessor :health
22
22
  attr_accessor :ingest
23
23
  attr_accessor :integration
24
- attr_accessor :management
25
24
  attr_accessor :message
26
25
  attr_accessor :message_attempt
27
26
  attr_accessor :operational_webhook
@@ -56,7 +55,6 @@ module Svix
56
55
  @health = Health.new(api_client)
57
56
  @ingest = Ingest.new(api_client)
58
57
  @integration = Integration.new(api_client)
59
- @management = Management.new(api_client)
60
58
  @message = Message.new(api_client)
61
59
  @message_attempt = MessageAttempt.new(api_client)
62
60
  @operational_webhook = OperationalWebhook.new(api_client)
data/lib/svix/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Svix
4
- VERSION = "1.69.0"
4
+ VERSION = "1.70.1"
5
5
  end
data/lib/svix.rb CHANGED
@@ -19,8 +19,6 @@ require "svix/api/ingest"
19
19
  require "svix/api/ingest_endpoint"
20
20
  require "svix/api/ingest_source"
21
21
  require "svix/api/integration"
22
- require "svix/api/management"
23
- require "svix/api/management_authentication"
24
22
  require "svix/api/message"
25
23
  require "svix/api/message_poller"
26
24
  require "svix/api/message_attempt"
@@ -32,10 +30,8 @@ require "svix/api/statistics"
32
30
  require "svix/models/adobe_sign_config"
33
31
  require "svix/models/adobe_sign_config_out"
34
32
  require "svix/models/aggregate_event_types_out"
35
- require "svix/models/api_token_censored_out"
36
- require "svix/models/api_token_expire_in"
37
- require "svix/models/api_token_in"
38
- require "svix/models/api_token_out"
33
+ require "svix/models/airwallex_config"
34
+ require "svix/models/airwallex_config_out"
39
35
  require "svix/models/app_portal_access_in"
40
36
  require "svix/models/app_portal_access_out"
41
37
  require "svix/models/app_usage_stats_in"
@@ -49,6 +45,8 @@ require "svix/models/background_task_finished_event2"
49
45
  require "svix/models/background_task_out"
50
46
  require "svix/models/background_task_status"
51
47
  require "svix/models/background_task_type"
48
+ require "svix/models/checkbook_config"
49
+ require "svix/models/checkbook_config_out"
52
50
  require "svix/models/connector_in"
53
51
  require "svix/models/connector_kind"
54
52
  require "svix/models/connector_out"
@@ -56,6 +54,8 @@ require "svix/models/cron_config"
56
54
  require "svix/models/dashboard_access_out"
57
55
  require "svix/models/docusign_config"
58
56
  require "svix/models/docusign_config_out"
57
+ require "svix/models/easypost_config"
58
+ require "svix/models/easypost_config_out"
59
59
  require "svix/models/endpoint_created_event"
60
60
  require "svix/models/endpoint_created_event_data"
61
61
  require "svix/models/endpoint_deleted_event"
@@ -77,6 +77,7 @@ require "svix/models/endpoint_secret_rotate_in"
77
77
  require "svix/models/endpoint_stats"
78
78
  require "svix/models/endpoint_transformation_in"
79
79
  require "svix/models/endpoint_transformation_out"
80
+ require "svix/models/endpoint_transformation_patch"
80
81
  require "svix/models/endpoint_update"
81
82
  require "svix/models/endpoint_updated_event"
82
83
  require "svix/models/endpoint_updated_event_data"
@@ -110,7 +111,6 @@ require "svix/models/integration_in"
110
111
  require "svix/models/integration_key_out"
111
112
  require "svix/models/integration_out"
112
113
  require "svix/models/integration_update"
113
- require "svix/models/list_response_api_token_censored_out"
114
114
  require "svix/models/list_response_application_out"
115
115
  require "svix/models/list_response_background_task_out"
116
116
  require "svix/models/list_response_endpoint_message_out"
@@ -144,17 +144,23 @@ require "svix/models/operational_webhook_endpoint_secret_in"
144
144
  require "svix/models/operational_webhook_endpoint_secret_out"
145
145
  require "svix/models/operational_webhook_endpoint_update"
146
146
  require "svix/models/ordering"
147
+ require "svix/models/orum_io_config"
148
+ require "svix/models/orum_io_config_out"
147
149
  require "svix/models/panda_doc_config"
148
150
  require "svix/models/panda_doc_config_out"
149
151
  require "svix/models/polling_endpoint_consumer_seek_in"
150
152
  require "svix/models/polling_endpoint_consumer_seek_out"
151
153
  require "svix/models/polling_endpoint_message_out"
152
154
  require "svix/models/polling_endpoint_out"
155
+ require "svix/models/port_io_config"
156
+ require "svix/models/port_io_config_out"
153
157
  require "svix/models/recover_in"
154
158
  require "svix/models/recover_out"
155
159
  require "svix/models/replay_in"
156
160
  require "svix/models/replay_out"
157
161
  require "svix/models/rotate_token_out"
162
+ require "svix/models/rutter_config"
163
+ require "svix/models/rutter_config_out"
158
164
  require "svix/models/segment_config"
159
165
  require "svix/models/segment_config_out"
160
166
  require "svix/models/shopify_config"
@@ -166,6 +172,12 @@ require "svix/models/stripe_config"
166
172
  require "svix/models/stripe_config_out"
167
173
  require "svix/models/svix_config"
168
174
  require "svix/models/svix_config_out"
175
+ require "svix/models/telnyx_config"
176
+ require "svix/models/telnyx_config_out"
177
+ require "svix/models/vapi_config"
178
+ require "svix/models/vapi_config_out"
179
+ require "svix/models/veriff_config"
180
+ require "svix/models/veriff_config_out"
169
181
  require "svix/models/zoom_config"
170
182
  require "svix/models/zoom_config_out"
171
183
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svix
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.69.0
4
+ version: 1.70.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svix
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-07-07 00:00:00.000000000 Z
10
+ date: 2025-08-06 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rake
@@ -74,8 +74,6 @@ files:
74
74
  - lib/svix/api/ingest_endpoint.rb
75
75
  - lib/svix/api/ingest_source.rb
76
76
  - lib/svix/api/integration.rb
77
- - lib/svix/api/management.rb
78
- - lib/svix/api/management_authentication.rb
79
77
  - lib/svix/api/message.rb
80
78
  - lib/svix/api/message_attempt.rb
81
79
  - lib/svix/api/message_poller.rb
@@ -90,10 +88,8 @@ files:
90
88
  - lib/svix/models/adobe_sign_config.rb
91
89
  - lib/svix/models/adobe_sign_config_out.rb
92
90
  - lib/svix/models/aggregate_event_types_out.rb
93
- - lib/svix/models/api_token_censored_out.rb
94
- - lib/svix/models/api_token_expire_in.rb
95
- - lib/svix/models/api_token_in.rb
96
- - lib/svix/models/api_token_out.rb
91
+ - lib/svix/models/airwallex_config.rb
92
+ - lib/svix/models/airwallex_config_out.rb
97
93
  - lib/svix/models/app_portal_access_in.rb
98
94
  - lib/svix/models/app_portal_access_out.rb
99
95
  - lib/svix/models/app_usage_stats_in.rb
@@ -107,6 +103,8 @@ files:
107
103
  - lib/svix/models/background_task_out.rb
108
104
  - lib/svix/models/background_task_status.rb
109
105
  - lib/svix/models/background_task_type.rb
106
+ - lib/svix/models/checkbook_config.rb
107
+ - lib/svix/models/checkbook_config_out.rb
110
108
  - lib/svix/models/connector_in.rb
111
109
  - lib/svix/models/connector_kind.rb
112
110
  - lib/svix/models/connector_out.rb
@@ -114,6 +112,8 @@ files:
114
112
  - lib/svix/models/dashboard_access_out.rb
115
113
  - lib/svix/models/docusign_config.rb
116
114
  - lib/svix/models/docusign_config_out.rb
115
+ - lib/svix/models/easypost_config.rb
116
+ - lib/svix/models/easypost_config_out.rb
117
117
  - lib/svix/models/endpoint_created_event.rb
118
118
  - lib/svix/models/endpoint_created_event_data.rb
119
119
  - lib/svix/models/endpoint_deleted_event.rb
@@ -135,6 +135,7 @@ files:
135
135
  - lib/svix/models/endpoint_stats.rb
136
136
  - lib/svix/models/endpoint_transformation_in.rb
137
137
  - lib/svix/models/endpoint_transformation_out.rb
138
+ - lib/svix/models/endpoint_transformation_patch.rb
138
139
  - lib/svix/models/endpoint_update.rb
139
140
  - lib/svix/models/endpoint_updated_event.rb
140
141
  - lib/svix/models/endpoint_updated_event_data.rb
@@ -169,7 +170,6 @@ files:
169
170
  - lib/svix/models/integration_key_out.rb
170
171
  - lib/svix/models/integration_out.rb
171
172
  - lib/svix/models/integration_update.rb
172
- - lib/svix/models/list_response_api_token_censored_out.rb
173
173
  - lib/svix/models/list_response_application_out.rb
174
174
  - lib/svix/models/list_response_background_task_out.rb
175
175
  - lib/svix/models/list_response_endpoint_message_out.rb
@@ -203,17 +203,23 @@ files:
203
203
  - lib/svix/models/operational_webhook_endpoint_secret_out.rb
204
204
  - lib/svix/models/operational_webhook_endpoint_update.rb
205
205
  - lib/svix/models/ordering.rb
206
+ - lib/svix/models/orum_io_config.rb
207
+ - lib/svix/models/orum_io_config_out.rb
206
208
  - lib/svix/models/panda_doc_config.rb
207
209
  - lib/svix/models/panda_doc_config_out.rb
208
210
  - lib/svix/models/polling_endpoint_consumer_seek_in.rb
209
211
  - lib/svix/models/polling_endpoint_consumer_seek_out.rb
210
212
  - lib/svix/models/polling_endpoint_message_out.rb
211
213
  - lib/svix/models/polling_endpoint_out.rb
214
+ - lib/svix/models/port_io_config.rb
215
+ - lib/svix/models/port_io_config_out.rb
212
216
  - lib/svix/models/recover_in.rb
213
217
  - lib/svix/models/recover_out.rb
214
218
  - lib/svix/models/replay_in.rb
215
219
  - lib/svix/models/replay_out.rb
216
220
  - lib/svix/models/rotate_token_out.rb
221
+ - lib/svix/models/rutter_config.rb
222
+ - lib/svix/models/rutter_config_out.rb
217
223
  - lib/svix/models/segment_config.rb
218
224
  - lib/svix/models/segment_config_out.rb
219
225
  - lib/svix/models/shopify_config.rb
@@ -225,6 +231,12 @@ files:
225
231
  - lib/svix/models/stripe_config_out.rb
226
232
  - lib/svix/models/svix_config.rb
227
233
  - lib/svix/models/svix_config_out.rb
234
+ - lib/svix/models/telnyx_config.rb
235
+ - lib/svix/models/telnyx_config_out.rb
236
+ - lib/svix/models/vapi_config.rb
237
+ - lib/svix/models/vapi_config_out.rb
238
+ - lib/svix/models/veriff_config.rb
239
+ - lib/svix/models/veriff_config_out.rb
228
240
  - lib/svix/models/zoom_config.rb
229
241
  - lib/svix/models/zoom_config_out.rb
230
242
  - lib/svix/svix.rb
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
- # This file is @generated
3
-
4
- require "net/http"
5
-
6
- module Svix
7
- class Management
8
- attr_accessor :authentication
9
- def initialize(client)
10
- @client = client
11
- @authentication = ManagementAuthentication.new(client)
12
- end
13
- end
14
- end
@@ -1,52 +0,0 @@
1
- # frozen_string_literal: true
2
- # This file is @generated
3
-
4
- require "net/http"
5
-
6
- module Svix
7
- class ManagementAuthentication
8
- def initialize(client)
9
- @client = client
10
- end
11
-
12
- def list_api_tokens(options = {})
13
- options = options.transform_keys(&:to_s)
14
- res = @client.execute_request(
15
- "GET",
16
- "/api/v1/management/authentication/api-token",
17
- query_params: {
18
- "limit" => options["limit"],
19
- "iterator" => options["iterator"],
20
- "order" => options["order"]
21
- }
22
- )
23
- ListResponseApiTokenCensoredOut.deserialize(res)
24
- end
25
-
26
- def create_api_token(api_token_in, options = {})
27
- options = options.transform_keys(&:to_s)
28
- res = @client.execute_request(
29
- "POST",
30
- "/api/v1/management/authentication/api-token",
31
- headers: {
32
- "idempotency-key" => options["idempotency-key"]
33
- },
34
- body: api_token_in
35
- )
36
- ApiTokenOut.deserialize(res)
37
- end
38
-
39
- def expire_api_token(key_id, api_token_expire_in, options = {})
40
- options = options.transform_keys(&:to_s)
41
- @client.execute_request(
42
- "POST",
43
- "/api/v1/management/authentication/api-token/#{key_id}/expire",
44
- headers: {
45
- "idempotency-key" => options["idempotency-key"]
46
- },
47
- body: api_token_expire_in
48
- )
49
- end
50
-
51
- end
52
- end
@@ -1,62 +0,0 @@
1
- # frozen_string_literal: true
2
- # This file is @generated
3
- require "json"
4
-
5
- module Svix
6
- class ApiTokenCensoredOut
7
- attr_accessor :censored_token
8
- attr_accessor :created_at
9
- attr_accessor :expires_at
10
- # The ApplicationToken's ID.
11
- attr_accessor :id
12
- attr_accessor :name
13
- attr_accessor :scopes
14
-
15
- ALL_FIELD ||= ["censored_token", "created_at", "expires_at", "id", "name", "scopes"].freeze
16
- private_constant :ALL_FIELD
17
-
18
- def initialize(attributes = {})
19
- unless attributes.is_a?(Hash)
20
- fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::ApiTokenCensoredOut` new method")
21
- end
22
-
23
- attributes.each do |k, v|
24
- unless ALL_FIELD.include?(k.to_s)
25
- fail(ArgumentError, "The field #{k} is not part of Svix::ApiTokenCensoredOut")
26
- end
27
-
28
- instance_variable_set("@#{k}", v)
29
- instance_variable_set("@__#{k}_is_defined", true)
30
- end
31
- end
32
-
33
- def self.deserialize(attributes = {})
34
- attributes = attributes.transform_keys(&:to_s)
35
- attrs = Hash.new
36
- attrs["censored_token"] = attributes["censoredToken"]
37
- attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time
38
- attrs["expires_at"] = DateTime.rfc3339(attributes["expiresAt"]).to_time if attributes["expiresAt"]
39
- attrs["id"] = attributes["id"]
40
- attrs["name"] = attributes["name"]
41
- attrs["scopes"] = attributes["scopes"]
42
- new(attrs)
43
- end
44
-
45
- def serialize
46
- out = Hash.new
47
- out["censoredToken"] = Svix::serialize_primitive(@censored_token) if @censored_token
48
- out["createdAt"] = Svix::serialize_primitive(@created_at) if @created_at
49
- out["expiresAt"] = Svix::serialize_primitive(@expires_at) if @expires_at
50
- out["id"] = Svix::serialize_primitive(@id) if @id
51
- out["name"] = Svix::serialize_primitive(@name) if @name
52
- out["scopes"] = Svix::serialize_primitive(@scopes) if @scopes
53
- out
54
- end
55
-
56
- # Serializes the object to a json string
57
- # @return String
58
- def to_json
59
- JSON.dump(serialize)
60
- end
61
- end
62
- end
@@ -1,62 +0,0 @@
1
- # frozen_string_literal: true
2
- # This file is @generated
3
- require "json"
4
-
5
- module Svix
6
- class ApiTokenOut
7
- attr_accessor :created_at
8
- attr_accessor :expires_at
9
- # The GlobalApplicationToken's ID.
10
- attr_accessor :id
11
- attr_accessor :name
12
- attr_accessor :scopes
13
- attr_accessor :token
14
-
15
- ALL_FIELD ||= ["created_at", "expires_at", "id", "name", "scopes", "token"].freeze
16
- private_constant :ALL_FIELD
17
-
18
- def initialize(attributes = {})
19
- unless attributes.is_a?(Hash)
20
- fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::ApiTokenOut` new method")
21
- end
22
-
23
- attributes.each do |k, v|
24
- unless ALL_FIELD.include?(k.to_s)
25
- fail(ArgumentError, "The field #{k} is not part of Svix::ApiTokenOut")
26
- end
27
-
28
- instance_variable_set("@#{k}", v)
29
- instance_variable_set("@__#{k}_is_defined", true)
30
- end
31
- end
32
-
33
- def self.deserialize(attributes = {})
34
- attributes = attributes.transform_keys(&:to_s)
35
- attrs = Hash.new
36
- attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time
37
- attrs["expires_at"] = DateTime.rfc3339(attributes["expiresAt"]).to_time if attributes["expiresAt"]
38
- attrs["id"] = attributes["id"]
39
- attrs["name"] = attributes["name"]
40
- attrs["scopes"] = attributes["scopes"]
41
- attrs["token"] = attributes["token"]
42
- new(attrs)
43
- end
44
-
45
- def serialize
46
- out = Hash.new
47
- out["createdAt"] = Svix::serialize_primitive(@created_at) if @created_at
48
- out["expiresAt"] = Svix::serialize_primitive(@expires_at) if @expires_at
49
- out["id"] = Svix::serialize_primitive(@id) if @id
50
- out["name"] = Svix::serialize_primitive(@name) if @name
51
- out["scopes"] = Svix::serialize_primitive(@scopes) if @scopes
52
- out["token"] = Svix::serialize_primitive(@token) if @token
53
- out
54
- end
55
-
56
- # Serializes the object to a json string
57
- # @return String
58
- def to_json
59
- JSON.dump(serialize)
60
- end
61
- end
62
- end