svix 0.65.1 → 0.66.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b56665c0f45462010d249411167386943b4b36268e012b95f07d07e5f0d9f27
4
- data.tar.gz: 8c372fdae859eb4f0f7304a2c52a7667b36cd9dee2c9e86d4f2bbd4a7b6656e1
3
+ metadata.gz: 5d300df50ddfa25b537c607c2e12be972dc9011f6a8abc22f8c17936e1b5d1ec
4
+ data.tar.gz: 41882c52cbd282cd42584018464924d56c4d3ab169c3786c4539ce3e0ab049e7
5
5
  SHA512:
6
- metadata.gz: e5044be394c475eae2f119810806c8d08263ddf9a8572cc8e1ddce8b0fdcdc6f0f9e39215202a731ff29f81b8419a78f901b476b404d43711c9821359ce9faeb
7
- data.tar.gz: f54e58b9e0ee03aacb0143f145afdcbcd832e1c9b03154c7038c3695a51ffd1b5034f1ec4afad6e9957c6fe9dc457af2c3a7a35336c045a95c3df77763616e38
6
+ metadata.gz: 9c2b8101577188561126ae3dcc37e9da38f67aca8b0d28324e2ede3c265bf906616dce13019dcda54257c9d9c34937d1090ba6b885cb88274790cf5016ddc3b2
7
+ data.tar.gz: 1c1744492897b3f60147de55c55a17b321bec1a61e190eecc176a6974aecbfa7b96e3563b226eca6bd0533637cf1d642a099cfae2350c6308a03c47e817f9ae3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (0.65.1)
4
+ svix (0.66.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -596,6 +596,104 @@ module Svix
596
596
  return data, status_code, headers
597
597
  end
598
598
 
599
+ # Get Endpoint Transformation
600
+ # Get the transformation code associated with this endpoint
601
+ # @param endpoint_id [String]
602
+ # @param app_id [String]
603
+ # @param [Hash] opts the optional parameters
604
+ # @option opts [String] :idempotency_key The request's idempotency key
605
+ # @return [EndpointTransformationOut]
606
+ def get_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_get(endpoint_id, app_id, opts = {})
607
+ data, _status_code, _headers = get_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_get_with_http_info(endpoint_id, app_id, opts)
608
+ data
609
+ end
610
+
611
+ # Get Endpoint Transformation
612
+ # Get the transformation code associated with this endpoint
613
+ # @param endpoint_id [String]
614
+ # @param app_id [String]
615
+ # @param [Hash] opts the optional parameters
616
+ # @option opts [String] :idempotency_key The request's idempotency key
617
+ # @return [Array<(EndpointTransformationOut, Integer, Hash)>] EndpointTransformationOut data, response status code and response headers
618
+ def get_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_get_with_http_info(endpoint_id, app_id, opts = {})
619
+ if @api_client.config.debugging
620
+ @api_client.config.logger.debug 'Calling API: EndpointApi.get_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_get ...'
621
+ end
622
+ # verify the required parameter 'endpoint_id' is set
623
+ if @api_client.config.client_side_validation && endpoint_id.nil?
624
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.get_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_get"
625
+ end
626
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
627
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.get_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_get, the character length must be smaller than or equal to 256.'
628
+ end
629
+
630
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
631
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.get_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_get, the character length must be great than or equal to 1.'
632
+ end
633
+
634
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
635
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
636
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.get_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_get, must conform to the pattern #{pattern}."
637
+ end
638
+
639
+ # verify the required parameter 'app_id' is set
640
+ if @api_client.config.client_side_validation && app_id.nil?
641
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.get_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_get"
642
+ end
643
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
644
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.get_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_get, the character length must be smaller than or equal to 256.'
645
+ end
646
+
647
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
648
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.get_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_get, the character length must be great than or equal to 1.'
649
+ end
650
+
651
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
652
+ if @api_client.config.client_side_validation && app_id !~ pattern
653
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.get_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_get, must conform to the pattern #{pattern}."
654
+ end
655
+
656
+ # resource path
657
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
658
+
659
+ # query parameters
660
+ query_params = opts[:query_params] || {}
661
+
662
+ # header parameters
663
+ header_params = opts[:header_params] || {}
664
+ # HTTP header 'Accept' (if needed)
665
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
666
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
667
+
668
+ # form parameters
669
+ form_params = opts[:form_params] || {}
670
+
671
+ # http body (model)
672
+ post_body = opts[:debug_body]
673
+
674
+ # return_type
675
+ return_type = opts[:debug_return_type] || 'EndpointTransformationOut'
676
+
677
+ # auth_names
678
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
679
+
680
+ new_options = opts.merge(
681
+ :operation => :"EndpointApi.get_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_get",
682
+ :header_params => header_params,
683
+ :query_params => query_params,
684
+ :form_params => form_params,
685
+ :body => post_body,
686
+ :auth_names => auth_names,
687
+ :return_type => return_type
688
+ )
689
+
690
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
691
+ if @api_client.config.debugging
692
+ @api_client.config.logger.debug "API called: EndpointApi#get_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
693
+ end
694
+ return data, status_code, headers
695
+ end
696
+
599
697
  # List Endpoints
600
698
  # List the application's endpoints.
601
699
  # @param app_id [String]
@@ -1109,6 +1207,218 @@ module Svix
1109
1207
  return data, status_code, headers
1110
1208
  end
1111
1209
 
1210
+ # Set Endpoint Transformation
1211
+ # Set or unset the transformation code associated with this endpoint
1212
+ # @param app_id [String]
1213
+ # @param endpoint_id [String]
1214
+ # @param endpoint_transformation_in [EndpointTransformationIn]
1215
+ # @param [Hash] opts the optional parameters
1216
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
1217
+ # @return [nil]
1218
+ def set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch(app_id, endpoint_id, endpoint_transformation_in, opts = {})
1219
+ set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch_with_http_info(app_id, endpoint_id, endpoint_transformation_in, opts)
1220
+ nil
1221
+ end
1222
+
1223
+ # Set Endpoint Transformation
1224
+ # Set or unset the transformation code associated with this endpoint
1225
+ # @param app_id [String]
1226
+ # @param endpoint_id [String]
1227
+ # @param endpoint_transformation_in [EndpointTransformationIn]
1228
+ # @param [Hash] opts the optional parameters
1229
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
1230
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1231
+ def set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch_with_http_info(app_id, endpoint_id, endpoint_transformation_in, opts = {})
1232
+ if @api_client.config.debugging
1233
+ @api_client.config.logger.debug 'Calling API: EndpointApi.set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch ...'
1234
+ end
1235
+ # verify the required parameter 'app_id' is set
1236
+ if @api_client.config.client_side_validation && app_id.nil?
1237
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch"
1238
+ end
1239
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
1240
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch, the character length must be smaller than or equal to 256.'
1241
+ end
1242
+
1243
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
1244
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch, the character length must be great than or equal to 1.'
1245
+ end
1246
+
1247
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1248
+ if @api_client.config.client_side_validation && app_id !~ pattern
1249
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch, must conform to the pattern #{pattern}."
1250
+ end
1251
+
1252
+ # verify the required parameter 'endpoint_id' is set
1253
+ if @api_client.config.client_side_validation && endpoint_id.nil?
1254
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch"
1255
+ end
1256
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
1257
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch, the character length must be smaller than or equal to 256.'
1258
+ end
1259
+
1260
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
1261
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch, the character length must be great than or equal to 1.'
1262
+ end
1263
+
1264
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1265
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
1266
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch, must conform to the pattern #{pattern}."
1267
+ end
1268
+
1269
+ # verify the required parameter 'endpoint_transformation_in' is set
1270
+ if @api_client.config.client_side_validation && endpoint_transformation_in.nil?
1271
+ fail ArgumentError, "Missing the required parameter 'endpoint_transformation_in' when calling EndpointApi.set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch"
1272
+ end
1273
+ # resource path
1274
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
1275
+
1276
+ # query parameters
1277
+ query_params = opts[:query_params] || {}
1278
+
1279
+ # header parameters
1280
+ header_params = opts[:header_params] || {}
1281
+ # HTTP header 'Accept' (if needed)
1282
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1283
+ # HTTP header 'Content-Type'
1284
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1285
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
1286
+
1287
+ # form parameters
1288
+ form_params = opts[:form_params] || {}
1289
+
1290
+ # http body (model)
1291
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(endpoint_transformation_in)
1292
+
1293
+ # return_type
1294
+ return_type = opts[:debug_return_type]
1295
+
1296
+ # auth_names
1297
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
1298
+
1299
+ new_options = opts.merge(
1300
+ :operation => :"EndpointApi.set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch",
1301
+ :header_params => header_params,
1302
+ :query_params => query_params,
1303
+ :form_params => form_params,
1304
+ :body => post_body,
1305
+ :auth_names => auth_names,
1306
+ :return_type => return_type
1307
+ )
1308
+
1309
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1310
+ if @api_client.config.debugging
1311
+ @api_client.config.logger.debug "API called: EndpointApi#set_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1312
+ end
1313
+ return data, status_code, headers
1314
+ end
1315
+
1316
+ # Simulate Endpoint Transformation
1317
+ # Simulate running the transformation on the payload and code
1318
+ # @param endpoint_id [String]
1319
+ # @param app_id [String]
1320
+ # @param endpoint_transformation_simulate_in [EndpointTransformationSimulateIn]
1321
+ # @param [Hash] opts the optional parameters
1322
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
1323
+ # @return [EndpointTransformationSimulateOut]
1324
+ def simulate_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_simulate_post(endpoint_id, app_id, endpoint_transformation_simulate_in, opts = {})
1325
+ data, _status_code, _headers = simulate_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_simulate_post_with_http_info(endpoint_id, app_id, endpoint_transformation_simulate_in, opts)
1326
+ data
1327
+ end
1328
+
1329
+ # Simulate Endpoint Transformation
1330
+ # Simulate running the transformation on the payload and code
1331
+ # @param endpoint_id [String]
1332
+ # @param app_id [String]
1333
+ # @param endpoint_transformation_simulate_in [EndpointTransformationSimulateIn]
1334
+ # @param [Hash] opts the optional parameters
1335
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
1336
+ # @return [Array<(EndpointTransformationSimulateOut, Integer, Hash)>] EndpointTransformationSimulateOut data, response status code and response headers
1337
+ def simulate_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_simulate_post_with_http_info(endpoint_id, app_id, endpoint_transformation_simulate_in, opts = {})
1338
+ if @api_client.config.debugging
1339
+ @api_client.config.logger.debug 'Calling API: EndpointApi.simulate_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_simulate_post ...'
1340
+ end
1341
+ # verify the required parameter 'endpoint_id' is set
1342
+ if @api_client.config.client_side_validation && endpoint_id.nil?
1343
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.simulate_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_simulate_post"
1344
+ end
1345
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
1346
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.simulate_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_simulate_post, the character length must be smaller than or equal to 256.'
1347
+ end
1348
+
1349
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
1350
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.simulate_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_simulate_post, the character length must be great than or equal to 1.'
1351
+ end
1352
+
1353
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1354
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
1355
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.simulate_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_simulate_post, must conform to the pattern #{pattern}."
1356
+ end
1357
+
1358
+ # verify the required parameter 'app_id' is set
1359
+ if @api_client.config.client_side_validation && app_id.nil?
1360
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.simulate_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_simulate_post"
1361
+ end
1362
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
1363
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.simulate_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_simulate_post, the character length must be smaller than or equal to 256.'
1364
+ end
1365
+
1366
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
1367
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.simulate_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_simulate_post, the character length must be great than or equal to 1.'
1368
+ end
1369
+
1370
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1371
+ if @api_client.config.client_side_validation && app_id !~ pattern
1372
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.simulate_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_simulate_post, must conform to the pattern #{pattern}."
1373
+ end
1374
+
1375
+ # verify the required parameter 'endpoint_transformation_simulate_in' is set
1376
+ if @api_client.config.client_side_validation && endpoint_transformation_simulate_in.nil?
1377
+ fail ArgumentError, "Missing the required parameter 'endpoint_transformation_simulate_in' when calling EndpointApi.simulate_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_simulate_post"
1378
+ end
1379
+ # resource path
1380
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/simulate/'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
1381
+
1382
+ # query parameters
1383
+ query_params = opts[:query_params] || {}
1384
+
1385
+ # header parameters
1386
+ header_params = opts[:header_params] || {}
1387
+ # HTTP header 'Accept' (if needed)
1388
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1389
+ # HTTP header 'Content-Type'
1390
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1391
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
1392
+
1393
+ # form parameters
1394
+ form_params = opts[:form_params] || {}
1395
+
1396
+ # http body (model)
1397
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(endpoint_transformation_simulate_in)
1398
+
1399
+ # return_type
1400
+ return_type = opts[:debug_return_type] || 'EndpointTransformationSimulateOut'
1401
+
1402
+ # auth_names
1403
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
1404
+
1405
+ new_options = opts.merge(
1406
+ :operation => :"EndpointApi.simulate_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_simulate_post",
1407
+ :header_params => header_params,
1408
+ :query_params => query_params,
1409
+ :form_params => form_params,
1410
+ :body => post_body,
1411
+ :auth_names => auth_names,
1412
+ :return_type => return_type
1413
+ )
1414
+
1415
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1416
+ if @api_client.config.debugging
1417
+ @api_client.config.logger.debug "API called: EndpointApi#simulate_endpoint_transformation_api_v1_app_app_id_endpoint_endpoint_id_transformation_simulate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1418
+ end
1419
+ return data, status_code, headers
1420
+ end
1421
+
1112
1422
  # Update Endpoint
1113
1423
  # Update an endpoint.
1114
1424
  # @param endpoint_id [String]
@@ -1,55 +1,59 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Svix
4
- class EndpointAPI
5
- def initialize(api_client)
6
- @api = EndpointApi.new(api_client)
7
- end
4
+ class EndpointAPI
5
+ def initialize(api_client)
6
+ @api = EndpointApi.new(api_client)
7
+ end
8
8
 
9
- def list(app_id, options = {})
10
- return @api.list_endpoints_api_v1_app_app_id_endpoint_get(app_id, options)
11
- end
9
+ def list(app_id, options = {})
10
+ return @api.list_endpoints_api_v1_app_app_id_endpoint_get(app_id, options)
11
+ end
12
12
 
13
- def create(app_id, endpoint_in, options = {})
14
- return @api.create_endpoint_api_v1_app_app_id_endpoint_post(app_id, endpoint_in, options)
15
- end
13
+ def create(app_id, endpoint_in, options = {})
14
+ return @api.create_endpoint_api_v1_app_app_id_endpoint_post(app_id, endpoint_in, options)
15
+ end
16
16
 
17
- def get(app_id, endpoint_id)
18
- return @api.get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get(endpoint_id, app_id)
19
- end
17
+ def get(app_id, endpoint_id)
18
+ return @api.get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get(endpoint_id, app_id)
19
+ end
20
20
 
21
- def update(app_id, endpoint_id, endpoint_update)
22
- return @api.update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put(endpoint_id, app_id, endpoint_update)
23
- end
21
+ def update(app_id, endpoint_id, endpoint_update)
22
+ return @api.update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put(endpoint_id, app_id, endpoint_update)
23
+ end
24
24
 
25
- def delete(app_id, endpoint_id)
26
- return @api.delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete(endpoint_id, app_id)
27
- end
25
+ def delete(app_id, endpoint_id)
26
+ return @api.delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete(endpoint_id, app_id)
27
+ end
28
28
 
29
- def get_secret(app_id, endpoint_id)
30
- return @api.get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get(endpoint_id, app_id)
31
- end
29
+ def get_secret(app_id, endpoint_id)
30
+ return @api.get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get(endpoint_id, app_id)
31
+ end
32
32
 
33
- def rotate_secret(app_id, endpoint_id, endpoint_secret_rotate_in, options = {})
34
- return @api.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post(endpoint_id, app_id, endpoint_secret_rotate_in, options)
35
- end
33
+ def rotate_secret(app_id, endpoint_id, endpoint_secret_rotate_in, options = {})
34
+ return @api.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post(endpoint_id, app_id, endpoint_secret_rotate_in, options)
35
+ end
36
36
 
37
- def recover(app_id, endpoint_id, recover_in, options = {})
38
- @api.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post(app_id, endpoint_id, recover_in, options)
39
- nil
40
- end
37
+ def recover(app_id, endpoint_id, recover_in, options = {})
38
+ @api.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post(app_id, endpoint_id, recover_in, options)
39
+ nil
40
+ end
41
41
 
42
- def get_headers(app_id, endpoint_id)
43
- return @api.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get(endpoint_id app_id)
44
- end
42
+ def get_headers(app_id, endpoint_id)
43
+ return @api.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get(endpoint_id app_id)
44
+ end
45
45
 
46
- def update_headers(app_id, endpoint_id, endpoint_headers_in)
47
- return @api.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put(app_id, endpoint_id, endpoint_headers_in)
48
- end
46
+ def update_headers(app_id, endpoint_id, endpoint_headers_in)
47
+ return @api.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put(app_id, endpoint_id, endpoint_headers_in)
48
+ end
49
49
 
50
- def patch_headers(app_id, endpoint_id, endpoint_headers_in)
51
- return @api.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch(app_id, endpoint_id, endpoint_headers_in)
52
- end
50
+ def patch_headers(app_id, endpoint_id, endpoint_headers_in)
51
+ return @api.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch(app_id, endpoint_id, endpoint_headers_in)
52
+ end
53
53
 
54
+ def get_stats(app_id, endpoint_id)
55
+ return @api.get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get(endpoint_id app_id)
54
56
  end
57
+
58
+ end
55
59
  end
@@ -158,6 +158,14 @@ module Svix
158
158
  invalid_properties.push('invalid value for "filter_types", number of items must be greater than or equal to 1.')
159
159
  end
160
160
 
161
+ if !@rate_limit.nil? && @rate_limit > 65535
162
+ invalid_properties.push('invalid value for "rate_limit", must be smaller than or equal to 65535.')
163
+ end
164
+
165
+ if !@rate_limit.nil? && @rate_limit < 1
166
+ invalid_properties.push('invalid value for "rate_limit", must be greater than or equal to 1.')
167
+ end
168
+
161
169
  pattern = Regexp.new(/^(whsec_)?[a-zA-Z0-9+\/=]{32,100}$/)
162
170
  if !@secret.nil? && @secret !~ pattern
163
171
  invalid_properties.push("invalid value for \"secret\", must conform to the pattern #{pattern}.")
@@ -201,6 +209,8 @@ module Svix
201
209
  return false if !@channels.nil? && @channels.length > 10
202
210
  return false if !@channels.nil? && @channels.length < 1
203
211
  return false if !@filter_types.nil? && @filter_types.length < 1
212
+ return false if !@rate_limit.nil? && @rate_limit > 65535
213
+ return false if !@rate_limit.nil? && @rate_limit < 1
204
214
  return false if !@secret.nil? && @secret !~ Regexp.new(/^(whsec_)?[a-zA-Z0-9+\/=]{32,100}$/)
205
215
  return false if !@uid.nil? && @uid.to_s.length > 256
206
216
  return false if !@uid.nil? && @uid.to_s.length < 1
@@ -236,6 +246,20 @@ module Svix
236
246
  @filter_types = filter_types
237
247
  end
238
248
 
249
+ # Custom attribute writer method with validation
250
+ # @param [Object] rate_limit Value to be assigned
251
+ def rate_limit=(rate_limit)
252
+ if !rate_limit.nil? && rate_limit > 65535
253
+ fail ArgumentError, 'invalid value for "rate_limit", must be smaller than or equal to 65535.'
254
+ end
255
+
256
+ if !rate_limit.nil? && rate_limit < 1
257
+ fail ArgumentError, 'invalid value for "rate_limit", must be greater than or equal to 1.'
258
+ end
259
+
260
+ @rate_limit = rate_limit
261
+ end
262
+
239
263
  # Custom attribute writer method with validation
240
264
  # @param [Object] secret Value to be assigned
241
265
  def secret=(secret)
@@ -180,6 +180,14 @@ module Svix
180
180
  invalid_properties.push('invalid value for "id", id cannot be nil.')
181
181
  end
182
182
 
183
+ if !@rate_limit.nil? && @rate_limit > 65535
184
+ invalid_properties.push('invalid value for "rate_limit", must be smaller than or equal to 65535.')
185
+ end
186
+
187
+ if !@rate_limit.nil? && @rate_limit < 1
188
+ invalid_properties.push('invalid value for "rate_limit", must be greater than or equal to 1.')
189
+ end
190
+
183
191
  if !@uid.nil? && @uid.to_s.length > 256
184
192
  invalid_properties.push('invalid value for "uid", the character length must be smaller than or equal to 256.')
185
193
  end
@@ -224,6 +232,8 @@ module Svix
224
232
  return false if @created_at.nil?
225
233
  return false if !@filter_types.nil? && @filter_types.length < 1
226
234
  return false if @id.nil?
235
+ return false if !@rate_limit.nil? && @rate_limit > 65535
236
+ return false if !@rate_limit.nil? && @rate_limit < 1
227
237
  return false if !@uid.nil? && @uid.to_s.length > 256
228
238
  return false if !@uid.nil? && @uid.to_s.length < 1
229
239
  return false if !@uid.nil? && @uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
@@ -259,6 +269,20 @@ module Svix
259
269
  @filter_types = filter_types
260
270
  end
261
271
 
272
+ # Custom attribute writer method with validation
273
+ # @param [Object] rate_limit Value to be assigned
274
+ def rate_limit=(rate_limit)
275
+ if !rate_limit.nil? && rate_limit > 65535
276
+ fail ArgumentError, 'invalid value for "rate_limit", must be smaller than or equal to 65535.'
277
+ end
278
+
279
+ if !rate_limit.nil? && rate_limit < 1
280
+ fail ArgumentError, 'invalid value for "rate_limit", must be greater than or equal to 1.'
281
+ end
282
+
283
+ @rate_limit = rate_limit
284
+ end
285
+
262
286
  # Custom attribute writer method with validation
263
287
  # @param [Object] uid Value to be assigned
264
288
  def uid=(uid)