svix 0.41.0 → 0.48.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +62 -8
  4. data/lib/svix/api/application_api.rb +23 -1
  5. data/lib/svix/api/authentication_api.rb +7 -1
  6. data/lib/svix/api/endpoint_api.rb +61 -18
  7. data/lib/svix/api/environment_api.rb +158 -0
  8. data/lib/svix/api/environment_settings_api.rb +82 -0
  9. data/lib/svix/api/event_type_api.rb +23 -1
  10. data/lib/svix/api/health_api.rb +6 -1
  11. data/lib/svix/api/integration_api.rb +627 -0
  12. data/lib/svix/api/message_api.rb +31 -3
  13. data/lib/svix/api/message_attempt_api.rb +359 -5
  14. data/lib/svix/api/organization_api.rb +152 -0
  15. data/lib/svix/api/organization_settings_api.rb +7 -7
  16. data/lib/svix/api/statistics_api.rb +7 -1
  17. data/lib/svix/api_client.rb +1 -1
  18. data/lib/svix/api_error.rb +1 -1
  19. data/lib/svix/configuration.rb +1 -1
  20. data/lib/svix/endpoint_api.rb +1 -1
  21. data/lib/svix/integration_api.rb +38 -0
  22. data/lib/svix/internal.rb +1 -0
  23. data/lib/svix/message_attempt_api.rb +11 -1
  24. data/lib/svix/models/application_in.rb +1 -1
  25. data/lib/svix/models/application_out.rb +1 -1
  26. data/lib/svix/models/attempt_statistics_data.rb +1 -1
  27. data/lib/svix/models/attempt_statistics_response.rb +1 -1
  28. data/lib/svix/models/border_radius_config.rb +1 -1
  29. data/lib/svix/models/border_radius_enum.rb +1 -1
  30. data/lib/svix/models/custom_theme_override.rb +1 -1
  31. data/lib/svix/models/dashboard_access_out.rb +1 -1
  32. data/lib/svix/models/endpoint_created_event.rb +1 -1
  33. data/lib/svix/models/endpoint_created_event_data.rb +1 -1
  34. data/lib/svix/models/endpoint_deleted_event.rb +1 -1
  35. data/lib/svix/models/endpoint_deleted_event_data.rb +1 -1
  36. data/lib/svix/models/endpoint_disabled_event.rb +1 -1
  37. data/lib/svix/models/endpoint_disabled_event_data.rb +1 -1
  38. data/lib/svix/models/endpoint_headers_in.rb +1 -1
  39. data/lib/svix/models/endpoint_headers_out.rb +1 -1
  40. data/lib/svix/models/endpoint_in.rb +38 -2
  41. data/lib/svix/models/endpoint_message_out.rb +38 -2
  42. data/lib/svix/models/endpoint_out.rb +38 -2
  43. data/lib/svix/models/endpoint_secret_out.rb +1 -1
  44. data/lib/svix/models/endpoint_secret_rotate_in.rb +1 -1
  45. data/lib/svix/models/endpoint_stats.rb +1 -1
  46. data/lib/svix/models/endpoint_update.rb +38 -2
  47. data/lib/svix/models/endpoint_updated_event.rb +1 -1
  48. data/lib/svix/models/endpoint_updated_event_data.rb +1 -1
  49. data/lib/svix/models/environment_in.rb +257 -0
  50. data/lib/svix/models/environment_out.rb +259 -0
  51. data/lib/svix/models/environment_settings_out.rb +308 -0
  52. data/lib/svix/models/event_example_in.rb +1 -1
  53. data/lib/svix/models/event_type_example_out.rb +1 -1
  54. data/lib/svix/models/event_type_in.rb +1 -1
  55. data/lib/svix/models/event_type_out.rb +1 -1
  56. data/lib/svix/models/event_type_schema_in.rb +1 -1
  57. data/lib/svix/models/event_type_update.rb +1 -1
  58. data/lib/svix/models/export_organization_out.rb +259 -0
  59. data/lib/svix/models/font_size_config.rb +1 -1
  60. data/lib/svix/models/http_error_out.rb +1 -1
  61. data/lib/svix/models/http_validation_error.rb +1 -1
  62. data/lib/svix/models/import_organization_in.rb +257 -0
  63. data/lib/svix/models/integration_in.rb +223 -0
  64. data/lib/svix/models/integration_key_out.rb +223 -0
  65. data/lib/svix/models/integration_out.rb +265 -0
  66. data/lib/svix/models/integration_update.rb +223 -0
  67. data/lib/svix/models/list_response_application_out.rb +1 -1
  68. data/lib/svix/models/list_response_endpoint_message_out.rb +1 -1
  69. data/lib/svix/models/list_response_endpoint_out.rb +1 -1
  70. data/lib/svix/models/list_response_event_type_out.rb +1 -1
  71. data/lib/svix/models/list_response_integration_out.rb +248 -0
  72. data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +1 -1
  73. data/lib/svix/models/list_response_message_attempt_out.rb +1 -1
  74. data/lib/svix/models/list_response_message_endpoint_out.rb +1 -1
  75. data/lib/svix/models/list_response_message_out.rb +1 -1
  76. data/lib/svix/models/message_attempt_endpoint_out.rb +16 -2
  77. data/lib/svix/models/message_attempt_exhausted_event.rb +1 -1
  78. data/lib/svix/models/message_attempt_exhausted_event_data.rb +1 -1
  79. data/lib/svix/models/message_attempt_failed_event.rb +1 -1
  80. data/lib/svix/models/message_attempt_out.rb +1 -1
  81. data/lib/svix/models/message_attempt_trigger_type.rb +1 -1
  82. data/lib/svix/models/message_endpoint_out.rb +38 -2
  83. data/lib/svix/models/message_in.rb +38 -2
  84. data/lib/svix/models/message_out.rb +38 -2
  85. data/lib/svix/models/message_status.rb +1 -1
  86. data/lib/svix/models/portal_settings_out.rb +16 -5
  87. data/lib/svix/models/recover_in.rb +1 -1
  88. data/lib/svix/models/settings_in.rb +339 -0
  89. data/lib/svix/models/settings_out.rb +339 -0
  90. data/lib/svix/models/statistics_period.rb +1 -1
  91. data/lib/svix/models/validation_error.rb +1 -1
  92. data/lib/svix/models/webhook_types.rb +1 -1
  93. data/lib/svix/svix.rb +2 -0
  94. data/lib/svix/version.rb +1 -1
  95. data/lib/svix.rb +8 -2
  96. metadata +23 -6
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Svix API
3
3
 
4
- #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
4
+ #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
5
5
 
6
6
  The version of the OpenAPI document: 1.4
7
7
 
@@ -24,6 +24,7 @@ module Svix
24
24
  # @param app_id [String]
25
25
  # @param endpoint_in [EndpointIn]
26
26
  # @param [Hash] opts the optional parameters
27
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
27
28
  # @return [EndpointOut]
28
29
  def create_endpoint_api_v1_app_app_id_endpoint_post(app_id, endpoint_in, opts = {})
29
30
  data, _status_code, _headers = create_endpoint_api_v1_app_app_id_endpoint_post_with_http_info(app_id, endpoint_in, opts)
@@ -35,6 +36,7 @@ module Svix
35
36
  # @param app_id [String]
36
37
  # @param endpoint_in [EndpointIn]
37
38
  # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
38
40
  # @return [Array<(EndpointOut, Integer, Hash)>] EndpointOut data, response status code and response headers
39
41
  def create_endpoint_api_v1_app_app_id_endpoint_post_with_http_info(app_id, endpoint_in, opts = {})
40
42
  if @api_client.config.debugging
@@ -73,6 +75,7 @@ module Svix
73
75
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
74
76
  # HTTP header 'Content-Type'
75
77
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
78
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
76
79
 
77
80
  # form parameters
78
81
  form_params = opts[:form_params] || {}
@@ -108,6 +111,7 @@ module Svix
108
111
  # @param endpoint_id [String]
109
112
  # @param app_id [String]
110
113
  # @param [Hash] opts the optional parameters
114
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
111
115
  # @return [nil]
112
116
  def delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete(endpoint_id, app_id, opts = {})
113
117
  delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete_with_http_info(endpoint_id, app_id, opts)
@@ -119,6 +123,7 @@ module Svix
119
123
  # @param endpoint_id [String]
120
124
  # @param app_id [String]
121
125
  # @param [Hash] opts the optional parameters
126
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
122
127
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
123
128
  def delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete_with_http_info(endpoint_id, app_id, opts = {})
124
129
  if @api_client.config.debugging
@@ -168,6 +173,7 @@ module Svix
168
173
  header_params = opts[:header_params] || {}
169
174
  # HTTP header 'Accept' (if needed)
170
175
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
176
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
171
177
 
172
178
  # form parameters
173
179
  form_params = opts[:form_params] || {}
@@ -203,6 +209,7 @@ module Svix
203
209
  # @param endpoint_id [String]
204
210
  # @param app_id [String]
205
211
  # @param [Hash] opts the optional parameters
212
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
206
213
  # @return [EndpointOut]
207
214
  def get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get(endpoint_id, app_id, opts = {})
208
215
  data, _status_code, _headers = get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get_with_http_info(endpoint_id, app_id, opts)
@@ -214,6 +221,7 @@ module Svix
214
221
  # @param endpoint_id [String]
215
222
  # @param app_id [String]
216
223
  # @param [Hash] opts the optional parameters
224
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
217
225
  # @return [Array<(EndpointOut, Integer, Hash)>] EndpointOut data, response status code and response headers
218
226
  def get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get_with_http_info(endpoint_id, app_id, opts = {})
219
227
  if @api_client.config.debugging
@@ -263,6 +271,7 @@ module Svix
263
271
  header_params = opts[:header_params] || {}
264
272
  # HTTP header 'Accept' (if needed)
265
273
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
274
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
266
275
 
267
276
  # form parameters
268
277
  form_params = opts[:form_params] || {}
@@ -298,6 +307,7 @@ module Svix
298
307
  # @param endpoint_id [String]
299
308
  # @param app_id [String]
300
309
  # @param [Hash] opts the optional parameters
310
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
301
311
  # @return [EndpointHeadersOut]
302
312
  def get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get(endpoint_id, app_id, opts = {})
303
313
  data, _status_code, _headers = get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get_with_http_info(endpoint_id, app_id, opts)
@@ -309,6 +319,7 @@ module Svix
309
319
  # @param endpoint_id [String]
310
320
  # @param app_id [String]
311
321
  # @param [Hash] opts the optional parameters
322
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
312
323
  # @return [Array<(EndpointHeadersOut, Integer, Hash)>] EndpointHeadersOut data, response status code and response headers
313
324
  def get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get_with_http_info(endpoint_id, app_id, opts = {})
314
325
  if @api_client.config.debugging
@@ -358,6 +369,7 @@ module Svix
358
369
  header_params = opts[:header_params] || {}
359
370
  # HTTP header 'Accept' (if needed)
360
371
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
372
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
361
373
 
362
374
  # form parameters
363
375
  form_params = opts[:form_params] || {}
@@ -393,6 +405,7 @@ module Svix
393
405
  # @param endpoint_id [String]
394
406
  # @param app_id [String]
395
407
  # @param [Hash] opts the optional parameters
408
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
396
409
  # @return [EndpointSecretOut]
397
410
  def get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get(endpoint_id, app_id, opts = {})
398
411
  data, _status_code, _headers = get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get_with_http_info(endpoint_id, app_id, opts)
@@ -404,6 +417,7 @@ module Svix
404
417
  # @param endpoint_id [String]
405
418
  # @param app_id [String]
406
419
  # @param [Hash] opts the optional parameters
420
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
407
421
  # @return [Array<(EndpointSecretOut, Integer, Hash)>] EndpointSecretOut data, response status code and response headers
408
422
  def get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get_with_http_info(endpoint_id, app_id, opts = {})
409
423
  if @api_client.config.debugging
@@ -453,6 +467,7 @@ module Svix
453
467
  header_params = opts[:header_params] || {}
454
468
  # HTTP header 'Accept' (if needed)
455
469
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
470
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
456
471
 
457
472
  # form parameters
458
473
  form_params = opts[:form_params] || {}
@@ -488,6 +503,7 @@ module Svix
488
503
  # @param endpoint_id [String]
489
504
  # @param app_id [String]
490
505
  # @param [Hash] opts the optional parameters
506
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
491
507
  # @return [EndpointStats]
492
508
  def get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get(endpoint_id, app_id, opts = {})
493
509
  data, _status_code, _headers = get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get_with_http_info(endpoint_id, app_id, opts)
@@ -499,6 +515,7 @@ module Svix
499
515
  # @param endpoint_id [String]
500
516
  # @param app_id [String]
501
517
  # @param [Hash] opts the optional parameters
518
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
502
519
  # @return [Array<(EndpointStats, Integer, Hash)>] EndpointStats data, response status code and response headers
503
520
  def get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get_with_http_info(endpoint_id, app_id, opts = {})
504
521
  if @api_client.config.debugging
@@ -548,6 +565,7 @@ module Svix
548
565
  header_params = opts[:header_params] || {}
549
566
  # HTTP header 'Accept' (if needed)
550
567
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
568
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
551
569
 
552
570
  # form parameters
553
571
  form_params = opts[:form_params] || {}
@@ -584,6 +602,7 @@ module Svix
584
602
  # @param [Hash] opts the optional parameters
585
603
  # @option opts [String] :iterator
586
604
  # @option opts [Integer] :limit (default to 50)
605
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
587
606
  # @return [ListResponseEndpointOut]
588
607
  def list_endpoints_api_v1_app_app_id_endpoint_get(app_id, opts = {})
589
608
  data, _status_code, _headers = list_endpoints_api_v1_app_app_id_endpoint_get_with_http_info(app_id, opts)
@@ -596,6 +615,7 @@ module Svix
596
615
  # @param [Hash] opts the optional parameters
597
616
  # @option opts [String] :iterator
598
617
  # @option opts [Integer] :limit
618
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
599
619
  # @return [Array<(ListResponseEndpointOut, Integer, Hash)>] ListResponseEndpointOut data, response status code and response headers
600
620
  def list_endpoints_api_v1_app_app_id_endpoint_get_with_http_info(app_id, opts = {})
601
621
  if @api_client.config.debugging
@@ -618,6 +638,10 @@ module Svix
618
638
  fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.list_endpoints_api_v1_app_app_id_endpoint_get, must conform to the pattern #{pattern}."
619
639
  end
620
640
 
641
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
642
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EndpointApi.list_endpoints_api_v1_app_app_id_endpoint_get, must be smaller than or equal to 250.'
643
+ end
644
+
621
645
  # resource path
622
646
  local_var_path = '/api/v1/app/{app_id}/endpoint/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
623
647
 
@@ -630,6 +654,7 @@ module Svix
630
654
  header_params = opts[:header_params] || {}
631
655
  # HTTP header 'Accept' (if needed)
632
656
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
657
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
633
658
 
634
659
  # form parameters
635
660
  form_params = opts[:form_params] || {}
@@ -666,6 +691,7 @@ module Svix
666
691
  # @param endpoint_id [String]
667
692
  # @param endpoint_headers_in [EndpointHeadersIn]
668
693
  # @param [Hash] opts the optional parameters
694
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
669
695
  # @return [nil]
670
696
  def patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch(app_id, endpoint_id, endpoint_headers_in, opts = {})
671
697
  patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch_with_http_info(app_id, endpoint_id, endpoint_headers_in, opts)
@@ -678,6 +704,7 @@ module Svix
678
704
  # @param endpoint_id [String]
679
705
  # @param endpoint_headers_in [EndpointHeadersIn]
680
706
  # @param [Hash] opts the optional parameters
707
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
681
708
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
682
709
  def patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch_with_http_info(app_id, endpoint_id, endpoint_headers_in, opts = {})
683
710
  if @api_client.config.debugging
@@ -733,6 +760,7 @@ module Svix
733
760
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
734
761
  # HTTP header 'Content-Type'
735
762
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
763
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
736
764
 
737
765
  # form parameters
738
766
  form_params = opts[:form_params] || {}
@@ -763,66 +791,68 @@ module Svix
763
791
  return data, status_code, headers
764
792
  end
765
793
 
766
- # Resend Failed Webhooks
794
+ # Recover Failed Webhooks
767
795
  # Resend all failed messages since a given time.
768
796
  # @param app_id [String]
769
797
  # @param endpoint_id [String]
770
798
  # @param recover_in [RecoverIn]
771
799
  # @param [Hash] opts the optional parameters
800
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
772
801
  # @return [Object]
773
- def resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post(app_id, endpoint_id, recover_in, opts = {})
774
- data, _status_code, _headers = resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post_with_http_info(app_id, endpoint_id, recover_in, opts)
802
+ def recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post(app_id, endpoint_id, recover_in, opts = {})
803
+ data, _status_code, _headers = recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post_with_http_info(app_id, endpoint_id, recover_in, opts)
775
804
  data
776
805
  end
777
806
 
778
- # Resend Failed Webhooks
807
+ # Recover Failed Webhooks
779
808
  # Resend all failed messages since a given time.
780
809
  # @param app_id [String]
781
810
  # @param endpoint_id [String]
782
811
  # @param recover_in [RecoverIn]
783
812
  # @param [Hash] opts the optional parameters
813
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
784
814
  # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
785
- def resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post_with_http_info(app_id, endpoint_id, recover_in, opts = {})
815
+ def recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post_with_http_info(app_id, endpoint_id, recover_in, opts = {})
786
816
  if @api_client.config.debugging
787
- @api_client.config.logger.debug 'Calling API: EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post ...'
817
+ @api_client.config.logger.debug 'Calling API: EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post ...'
788
818
  end
789
819
  # verify the required parameter 'app_id' is set
790
820
  if @api_client.config.client_side_validation && app_id.nil?
791
- fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
821
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
792
822
  end
793
823
  if @api_client.config.client_side_validation && app_id.to_s.length > 256
794
- fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be smaller than or equal to 256.'
824
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be smaller than or equal to 256.'
795
825
  end
796
826
 
797
827
  if @api_client.config.client_side_validation && app_id.to_s.length < 1
798
- fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be great than or equal to 1.'
828
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be great than or equal to 1.'
799
829
  end
800
830
 
801
831
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
802
832
  if @api_client.config.client_side_validation && app_id !~ pattern
803
- fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, must conform to the pattern #{pattern}."
833
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, must conform to the pattern #{pattern}."
804
834
  end
805
835
 
806
836
  # verify the required parameter 'endpoint_id' is set
807
837
  if @api_client.config.client_side_validation && endpoint_id.nil?
808
- fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
838
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
809
839
  end
810
840
  if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
811
- fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be smaller than or equal to 256.'
841
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be smaller than or equal to 256.'
812
842
  end
813
843
 
814
844
  if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
815
- fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be great than or equal to 1.'
845
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be great than or equal to 1.'
816
846
  end
817
847
 
818
848
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
819
849
  if @api_client.config.client_side_validation && endpoint_id !~ pattern
820
- fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, must conform to the pattern #{pattern}."
850
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, must conform to the pattern #{pattern}."
821
851
  end
822
852
 
823
853
  # verify the required parameter 'recover_in' is set
824
854
  if @api_client.config.client_side_validation && recover_in.nil?
825
- fail ArgumentError, "Missing the required parameter 'recover_in' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
855
+ fail ArgumentError, "Missing the required parameter 'recover_in' when calling EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
826
856
  end
827
857
  # resource path
828
858
  local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
@@ -836,6 +866,7 @@ module Svix
836
866
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
837
867
  # HTTP header 'Content-Type'
838
868
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
869
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
839
870
 
840
871
  # form parameters
841
872
  form_params = opts[:form_params] || {}
@@ -850,7 +881,7 @@ module Svix
850
881
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
851
882
 
852
883
  new_options = opts.merge(
853
- :operation => :"EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post",
884
+ :operation => :"EndpointApi.recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post",
854
885
  :header_params => header_params,
855
886
  :query_params => query_params,
856
887
  :form_params => form_params,
@@ -861,7 +892,7 @@ module Svix
861
892
 
862
893
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
863
894
  if @api_client.config.debugging
864
- @api_client.config.logger.debug "API called: EndpointApi#resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
895
+ @api_client.config.logger.debug "API called: EndpointApi#recover_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
865
896
  end
866
897
  return data, status_code, headers
867
898
  end
@@ -872,6 +903,7 @@ module Svix
872
903
  # @param app_id [String]
873
904
  # @param endpoint_secret_rotate_in [EndpointSecretRotateIn]
874
905
  # @param [Hash] opts the optional parameters
906
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
875
907
  # @return [nil]
876
908
  def rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post(endpoint_id, app_id, endpoint_secret_rotate_in, opts = {})
877
909
  rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post_with_http_info(endpoint_id, app_id, endpoint_secret_rotate_in, opts)
@@ -884,6 +916,7 @@ module Svix
884
916
  # @param app_id [String]
885
917
  # @param endpoint_secret_rotate_in [EndpointSecretRotateIn]
886
918
  # @param [Hash] opts the optional parameters
919
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
887
920
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
888
921
  def rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post_with_http_info(endpoint_id, app_id, endpoint_secret_rotate_in, opts = {})
889
922
  if @api_client.config.debugging
@@ -939,6 +972,7 @@ module Svix
939
972
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
940
973
  # HTTP header 'Content-Type'
941
974
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
975
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
942
976
 
943
977
  # form parameters
944
978
  form_params = opts[:form_params] || {}
@@ -975,6 +1009,7 @@ module Svix
975
1009
  # @param endpoint_id [String]
976
1010
  # @param event_example_in [EventExampleIn]
977
1011
  # @param [Hash] opts the optional parameters
1012
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
978
1013
  # @return [MessageOut]
979
1014
  def send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post(app_id, endpoint_id, event_example_in, opts = {})
980
1015
  data, _status_code, _headers = send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post_with_http_info(app_id, endpoint_id, event_example_in, opts)
@@ -987,6 +1022,7 @@ module Svix
987
1022
  # @param endpoint_id [String]
988
1023
  # @param event_example_in [EventExampleIn]
989
1024
  # @param [Hash] opts the optional parameters
1025
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
990
1026
  # @return [Array<(MessageOut, Integer, Hash)>] MessageOut data, response status code and response headers
991
1027
  def send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post_with_http_info(app_id, endpoint_id, event_example_in, opts = {})
992
1028
  if @api_client.config.debugging
@@ -1042,6 +1078,7 @@ module Svix
1042
1078
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1043
1079
  # HTTP header 'Content-Type'
1044
1080
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1081
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
1045
1082
 
1046
1083
  # form parameters
1047
1084
  form_params = opts[:form_params] || {}
@@ -1078,6 +1115,7 @@ module Svix
1078
1115
  # @param app_id [String]
1079
1116
  # @param endpoint_update [EndpointUpdate]
1080
1117
  # @param [Hash] opts the optional parameters
1118
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
1081
1119
  # @return [EndpointOut]
1082
1120
  def update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put(endpoint_id, app_id, endpoint_update, opts = {})
1083
1121
  data, _status_code, _headers = update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put_with_http_info(endpoint_id, app_id, endpoint_update, opts)
@@ -1090,6 +1128,7 @@ module Svix
1090
1128
  # @param app_id [String]
1091
1129
  # @param endpoint_update [EndpointUpdate]
1092
1130
  # @param [Hash] opts the optional parameters
1131
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
1093
1132
  # @return [Array<(EndpointOut, Integer, Hash)>] EndpointOut data, response status code and response headers
1094
1133
  def update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put_with_http_info(endpoint_id, app_id, endpoint_update, opts = {})
1095
1134
  if @api_client.config.debugging
@@ -1145,6 +1184,7 @@ module Svix
1145
1184
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1146
1185
  # HTTP header 'Content-Type'
1147
1186
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1187
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
1148
1188
 
1149
1189
  # form parameters
1150
1190
  form_params = opts[:form_params] || {}
@@ -1181,6 +1221,7 @@ module Svix
1181
1221
  # @param endpoint_id [String]
1182
1222
  # @param endpoint_headers_in [EndpointHeadersIn]
1183
1223
  # @param [Hash] opts the optional parameters
1224
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
1184
1225
  # @return [nil]
1185
1226
  def update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put(app_id, endpoint_id, endpoint_headers_in, opts = {})
1186
1227
  update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put_with_http_info(app_id, endpoint_id, endpoint_headers_in, opts)
@@ -1193,6 +1234,7 @@ module Svix
1193
1234
  # @param endpoint_id [String]
1194
1235
  # @param endpoint_headers_in [EndpointHeadersIn]
1195
1236
  # @param [Hash] opts the optional parameters
1237
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
1196
1238
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1197
1239
  def update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put_with_http_info(app_id, endpoint_id, endpoint_headers_in, opts = {})
1198
1240
  if @api_client.config.debugging
@@ -1248,6 +1290,7 @@ module Svix
1248
1290
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1249
1291
  # HTTP header 'Content-Type'
1250
1292
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1293
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
1251
1294
 
1252
1295
  # form parameters
1253
1296
  form_params = opts[:form_params] || {}
@@ -0,0 +1,158 @@
1
+ =begin
2
+ #Svix API
3
+
4
+ #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
5
+
6
+ The version of the OpenAPI document: 1.4
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Svix
16
+ class EnvironmentApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Export Environment Configuration
23
+ # Download a JSON file containing all org-settings and event types
24
+ # @param body [Object]
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
27
+ # @return [EnvironmentOut]
28
+ def export_environment_configuration_api_v1_environment_export_post(body, opts = {})
29
+ data, _status_code, _headers = export_environment_configuration_api_v1_environment_export_post_with_http_info(body, opts)
30
+ data
31
+ end
32
+
33
+ # Export Environment Configuration
34
+ # Download a JSON file containing all org-settings and event types
35
+ # @param body [Object]
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
38
+ # @return [Array<(EnvironmentOut, Integer, Hash)>] EnvironmentOut data, response status code and response headers
39
+ def export_environment_configuration_api_v1_environment_export_post_with_http_info(body, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: EnvironmentApi.export_environment_configuration_api_v1_environment_export_post ...'
42
+ end
43
+ # verify the required parameter 'body' is set
44
+ if @api_client.config.client_side_validation && body.nil?
45
+ fail ArgumentError, "Missing the required parameter 'body' when calling EnvironmentApi.export_environment_configuration_api_v1_environment_export_post"
46
+ end
47
+ # resource path
48
+ local_var_path = '/api/v1/environment/export/'
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+
53
+ # header parameters
54
+ header_params = opts[:header_params] || {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
57
+ # HTTP header 'Content-Type'
58
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
59
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'EnvironmentOut'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"EnvironmentApi.export_environment_configuration_api_v1_environment_export_post",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: EnvironmentApi#export_environment_configuration_api_v1_environment_export_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Import Environment Configuration
91
+ # Import a configuration into the active organization. It doesn't delete anything, only adds/updates what was passed to it.
92
+ # @param environment_in [EnvironmentIn]
93
+ # @param [Hash] opts the optional parameters
94
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
95
+ # @return [nil]
96
+ def import_environment_configuration_api_v1_environment_import_post(environment_in, opts = {})
97
+ import_environment_configuration_api_v1_environment_import_post_with_http_info(environment_in, opts)
98
+ nil
99
+ end
100
+
101
+ # Import Environment Configuration
102
+ # Import a configuration into the active organization. It doesn&#39;t delete anything, only adds/updates what was passed to it.
103
+ # @param environment_in [EnvironmentIn]
104
+ # @param [Hash] opts the optional parameters
105
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
106
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
107
+ def import_environment_configuration_api_v1_environment_import_post_with_http_info(environment_in, opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: EnvironmentApi.import_environment_configuration_api_v1_environment_import_post ...'
110
+ end
111
+ # verify the required parameter 'environment_in' is set
112
+ if @api_client.config.client_side_validation && environment_in.nil?
113
+ fail ArgumentError, "Missing the required parameter 'environment_in' when calling EnvironmentApi.import_environment_configuration_api_v1_environment_import_post"
114
+ end
115
+ # resource path
116
+ local_var_path = '/api/v1/environment/import/'
117
+
118
+ # query parameters
119
+ query_params = opts[:query_params] || {}
120
+
121
+ # header parameters
122
+ header_params = opts[:header_params] || {}
123
+ # HTTP header 'Accept' (if needed)
124
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
125
+ # HTTP header 'Content-Type'
126
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
127
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
128
+
129
+ # form parameters
130
+ form_params = opts[:form_params] || {}
131
+
132
+ # http body (model)
133
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(environment_in)
134
+
135
+ # return_type
136
+ return_type = opts[:debug_return_type]
137
+
138
+ # auth_names
139
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
140
+
141
+ new_options = opts.merge(
142
+ :operation => :"EnvironmentApi.import_environment_configuration_api_v1_environment_import_post",
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => return_type
149
+ )
150
+
151
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: EnvironmentApi#import_environment_configuration_api_v1_environment_import_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+ end
158
+ end