svix 0.83.1 → 0.84.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/svix/api/application_api.rb +251 -181
  4. data/lib/svix/api/authentication_api.rb +84 -152
  5. data/lib/svix/api/background_tasks_api.rb +165 -0
  6. data/lib/svix/api/endpoint_api.rb +591 -511
  7. data/lib/svix/api/environment_api.rb +15 -15
  8. data/lib/svix/api/environment_settings_api.rb +7 -10
  9. data/lib/svix/api/event_type_api.rb +160 -85
  10. data/lib/svix/api/health_api.rb +7 -10
  11. data/lib/svix/api/integration_api.rb +136 -143
  12. data/lib/svix/api/message_api.rb +103 -105
  13. data/lib/svix/api/message_attempt_api.rb +419 -419
  14. data/lib/svix/api/statistics_api.rb +110 -48
  15. data/lib/svix/api_client.rb +1 -1
  16. data/lib/svix/api_error.rb +1 -1
  17. data/lib/svix/application_api.rb +22 -22
  18. data/lib/svix/authentication_api.rb +3 -3
  19. data/lib/svix/configuration.rb +2 -1
  20. data/lib/svix/endpoint_api.rb +16 -16
  21. data/lib/svix/event_type_api.rb +19 -19
  22. data/lib/svix/integration_api.rb +26 -26
  23. data/lib/svix/message_api.rb +4 -4
  24. data/lib/svix/message_attempt_api.rb +8 -8
  25. data/lib/svix/models/app_portal_access_in.rb +2 -1
  26. data/lib/svix/models/app_portal_access_out.rb +1 -1
  27. data/lib/svix/models/app_usage_stats_in.rb +255 -0
  28. data/lib/svix/models/app_usage_stats_out.rb +251 -0
  29. data/lib/svix/models/application_in.rb +35 -2
  30. data/lib/svix/models/application_out.rb +23 -3
  31. data/lib/svix/models/application_patch.rb +300 -0
  32. data/lib/svix/models/application_stats.rb +3 -2
  33. data/lib/svix/models/application_token_expire_in.rb +1 -1
  34. data/lib/svix/models/attempt_statistics_data.rb +1 -1
  35. data/lib/svix/models/attempt_statistics_response.rb +1 -1
  36. data/lib/svix/models/{webhook_types.rb → background_task_out.rb} +41 -70
  37. data/lib/svix/models/background_task_status.rb +38 -0
  38. data/lib/svix/models/background_task_type.rb +38 -0
  39. data/lib/svix/models/border_radius_config.rb +1 -1
  40. data/lib/svix/models/border_radius_enum.rb +1 -1
  41. data/lib/svix/models/custom_color_palette.rb +1 -1
  42. data/lib/svix/models/custom_theme_override.rb +1 -1
  43. data/lib/svix/models/dashboard_access_out.rb +1 -1
  44. data/lib/svix/models/endpoint_created_event.rb +6 -1
  45. data/lib/svix/models/endpoint_created_event_data.rb +5 -3
  46. data/lib/svix/models/endpoint_deleted_event.rb +6 -1
  47. data/lib/svix/models/endpoint_deleted_event_data.rb +5 -3
  48. data/lib/svix/models/endpoint_disabled_event.rb +6 -1
  49. data/lib/svix/models/endpoint_disabled_event_data.rb +6 -3
  50. data/lib/svix/models/endpoint_headers_in.rb +1 -1
  51. data/lib/svix/models/endpoint_headers_out.rb +1 -1
  52. data/lib/svix/models/endpoint_headers_patch_in.rb +1 -1
  53. data/lib/svix/models/endpoint_in.rb +20 -11
  54. data/lib/svix/models/endpoint_message_out.rb +4 -1
  55. data/lib/svix/models/endpoint_out.rb +35 -16
  56. data/lib/svix/models/endpoint_patch.rb +406 -0
  57. data/lib/svix/models/endpoint_secret_out.rb +1 -1
  58. data/lib/svix/models/endpoint_secret_rotate_in.rb +3 -1
  59. data/lib/svix/models/endpoint_stats.rb +1 -1
  60. data/lib/svix/models/endpoint_transformation_in.rb +1 -3
  61. data/lib/svix/models/endpoint_transformation_out.rb +1 -1
  62. data/lib/svix/models/endpoint_transformation_simulate_in.rb +8 -1
  63. data/lib/svix/models/endpoint_transformation_simulate_out.rb +1 -1
  64. data/lib/svix/models/endpoint_update.rb +20 -11
  65. data/lib/svix/models/endpoint_updated_event.rb +6 -1
  66. data/lib/svix/models/endpoint_updated_event_data.rb +5 -3
  67. data/lib/svix/models/environment_in.rb +1 -1
  68. data/lib/svix/models/environment_out.rb +1 -1
  69. data/lib/svix/models/environment_settings_out.rb +1 -1
  70. data/lib/svix/models/event_example_in.rb +2 -1
  71. data/lib/svix/models/event_type_example_out.rb +5 -3
  72. data/lib/svix/models/event_type_in.rb +2 -1
  73. data/lib/svix/models/event_type_out.rb +2 -1
  74. data/lib/svix/models/event_type_patch.rb +275 -0
  75. data/lib/svix/models/event_type_schema_in.rb +1 -2
  76. data/lib/svix/models/event_type_update.rb +1 -1
  77. data/lib/svix/models/font_size_config.rb +1 -1
  78. data/lib/svix/models/http_error_out.rb +1 -1
  79. data/lib/svix/models/http_validation_error.rb +6 -1
  80. data/lib/svix/models/integration_in.rb +1 -1
  81. data/lib/svix/models/integration_key_out.rb +1 -1
  82. data/lib/svix/models/integration_out.rb +2 -1
  83. data/lib/svix/models/integration_update.rb +1 -1
  84. data/lib/svix/models/list_response_application_out.rb +1 -1
  85. data/lib/svix/models/list_response_application_stats.rb +16 -6
  86. data/lib/svix/models/list_response_background_task_out.rb +259 -0
  87. data/lib/svix/models/list_response_endpoint_message_out.rb +1 -1
  88. data/lib/svix/models/list_response_endpoint_out.rb +1 -1
  89. data/lib/svix/models/list_response_event_type_out.rb +1 -1
  90. data/lib/svix/models/list_response_integration_out.rb +16 -6
  91. data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +1 -1
  92. data/lib/svix/models/list_response_message_attempt_out.rb +1 -1
  93. data/lib/svix/models/list_response_message_endpoint_out.rb +16 -6
  94. data/lib/svix/models/list_response_message_out.rb +1 -1
  95. data/lib/svix/models/message_attempt_endpoint_out.rb +4 -1
  96. data/lib/svix/models/message_attempt_exhausted_event.rb +6 -1
  97. data/lib/svix/models/message_attempt_exhausted_event_data.rb +7 -3
  98. data/lib/svix/models/message_attempt_failed_data.rb +2 -1
  99. data/lib/svix/models/message_attempt_failing_event.rb +6 -1
  100. data/lib/svix/models/message_attempt_failing_event_data.rb +7 -3
  101. data/lib/svix/models/message_attempt_headers_out.rb +28 -2
  102. data/lib/svix/models/message_attempt_out.rb +4 -1
  103. data/lib/svix/models/message_attempt_trigger_type.rb +1 -1
  104. data/lib/svix/models/message_endpoint_out.rb +47 -30
  105. data/lib/svix/models/message_in.rb +2 -2
  106. data/lib/svix/models/message_out.rb +3 -1
  107. data/lib/svix/models/message_status.rb +1 -1
  108. data/lib/svix/models/ordering.rb +1 -1
  109. data/lib/svix/models/recover_in.rb +1 -1
  110. data/lib/svix/models/{one_time_token_out.rb → recover_out.rb} +42 -14
  111. data/lib/svix/models/replay_in.rb +1 -1
  112. data/lib/svix/models/{one_time_token_in.rb → replay_out.rb} +42 -14
  113. data/lib/svix/models/settings_in.rb +1 -1
  114. data/lib/svix/models/settings_out.rb +1 -1
  115. data/lib/svix/models/statistics_period.rb +1 -1
  116. data/lib/svix/models/status_code_class.rb +1 -1
  117. data/lib/svix/models/transformation_http_method.rb +2 -2
  118. data/lib/svix/models/validation_error.rb +5 -1
  119. data/lib/svix/version.rb +1 -1
  120. metadata +14 -5
@@ -3,7 +3,7 @@
3
3
 
4
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
- The version of the OpenAPI document: 1.4
6
+ The version of the OpenAPI document: 1.4.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.2.0
@@ -21,47 +21,47 @@ module Svix
21
21
  end
22
22
  # Create Integration
23
23
  # Create an integration.
24
- # @param app_id [String]
24
+ # @param app_id [String] The app&#39;s ID or UID
25
25
  # @param integration_in [IntegrationIn]
26
26
  # @param [Hash] opts the optional parameters
27
27
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
28
28
  # @return [IntegrationOut]
29
- def create_integration_api_v1_app_app_id_integration_post(app_id, integration_in, opts = {})
30
- data, _status_code, _headers = create_integration_api_v1_app_app_id_integration_post_with_http_info(app_id, integration_in, opts)
29
+ def v1_integration_create(app_id, integration_in, opts = {})
30
+ data, _status_code, _headers = v1_integration_create_with_http_info(app_id, integration_in, opts)
31
31
  data
32
32
  end
33
33
 
34
34
  # Create Integration
35
35
  # Create an integration.
36
- # @param app_id [String]
36
+ # @param app_id [String] The app&#39;s ID or UID
37
37
  # @param integration_in [IntegrationIn]
38
38
  # @param [Hash] opts the optional parameters
39
39
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
40
40
  # @return [Array<(IntegrationOut, Integer, Hash)>] IntegrationOut data, response status code and response headers
41
- def create_integration_api_v1_app_app_id_integration_post_with_http_info(app_id, integration_in, opts = {})
41
+ def v1_integration_create_with_http_info(app_id, integration_in, opts = {})
42
42
  if @api_client.config.debugging
43
- @api_client.config.logger.debug 'Calling API: IntegrationApi.create_integration_api_v1_app_app_id_integration_post ...'
43
+ @api_client.config.logger.debug 'Calling API: IntegrationApi.v1_integration_create ...'
44
44
  end
45
45
  # verify the required parameter 'app_id' is set
46
46
  if @api_client.config.client_side_validation && app_id.nil?
47
- fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.create_integration_api_v1_app_app_id_integration_post"
47
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.v1_integration_create"
48
48
  end
49
49
  if @api_client.config.client_side_validation && app_id.to_s.length > 256
50
- fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.create_integration_api_v1_app_app_id_integration_post, the character length must be smaller than or equal to 256.'
50
+ fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_create, the character length must be smaller than or equal to 256.'
51
51
  end
52
52
 
53
53
  if @api_client.config.client_side_validation && app_id.to_s.length < 1
54
- fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.create_integration_api_v1_app_app_id_integration_post, the character length must be great than or equal to 1.'
54
+ fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_create, the character length must be great than or equal to 1.'
55
55
  end
56
56
 
57
57
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
58
58
  if @api_client.config.client_side_validation && app_id !~ pattern
59
- fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.create_integration_api_v1_app_app_id_integration_post, must conform to the pattern #{pattern}."
59
+ fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.v1_integration_create, must conform to the pattern #{pattern}."
60
60
  end
61
61
 
62
62
  # verify the required parameter 'integration_in' is set
63
63
  if @api_client.config.client_side_validation && integration_in.nil?
64
- fail ArgumentError, "Missing the required parameter 'integration_in' when calling IntegrationApi.create_integration_api_v1_app_app_id_integration_post"
64
+ fail ArgumentError, "Missing the required parameter 'integration_in' when calling IntegrationApi.v1_integration_create"
65
65
  end
66
66
  # resource path
67
67
  local_var_path = '/api/v1/app/{app_id}/integration/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
@@ -90,7 +90,7 @@ module Svix
90
90
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
91
91
 
92
92
  new_options = opts.merge(
93
- :operation => :"IntegrationApi.create_integration_api_v1_app_app_id_integration_post",
93
+ :operation => :"IntegrationApi.v1_integration_create",
94
94
  :header_params => header_params,
95
95
  :query_params => query_params,
96
96
  :form_params => form_params,
@@ -101,57 +101,55 @@ module Svix
101
101
 
102
102
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
103
103
  if @api_client.config.debugging
104
- @api_client.config.logger.debug "API called: IntegrationApi#create_integration_api_v1_app_app_id_integration_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
104
+ @api_client.config.logger.debug "API called: IntegrationApi#v1_integration_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
105
105
  end
106
106
  return data, status_code, headers
107
107
  end
108
108
 
109
109
  # Delete Integration
110
- # Delete an integration and revoke it's key.
111
- # @param integ_id [String]
112
- # @param app_id [String]
110
+ # Delete an integration.
111
+ # @param app_id [String] The app&#39;s ID or UID
112
+ # @param integ_id [String] The integ&#39;s ID
113
113
  # @param [Hash] opts the optional parameters
114
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
115
114
  # @return [nil]
116
- def delete_integration_api_v1_app_app_id_integration_integ_id_delete(integ_id, app_id, opts = {})
117
- delete_integration_api_v1_app_app_id_integration_integ_id_delete_with_http_info(integ_id, app_id, opts)
115
+ def v1_integration_delete(app_id, integ_id, opts = {})
116
+ v1_integration_delete_with_http_info(app_id, integ_id, opts)
118
117
  nil
119
118
  end
120
119
 
121
120
  # Delete Integration
122
- # Delete an integration and revoke it&#39;s key.
123
- # @param integ_id [String]
124
- # @param app_id [String]
121
+ # Delete an integration.
122
+ # @param app_id [String] The app&#39;s ID or UID
123
+ # @param integ_id [String] The integ&#39;s ID
125
124
  # @param [Hash] opts the optional parameters
126
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
127
125
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
128
- def delete_integration_api_v1_app_app_id_integration_integ_id_delete_with_http_info(integ_id, app_id, opts = {})
126
+ def v1_integration_delete_with_http_info(app_id, integ_id, opts = {})
129
127
  if @api_client.config.debugging
130
- @api_client.config.logger.debug 'Calling API: IntegrationApi.delete_integration_api_v1_app_app_id_integration_integ_id_delete ...'
131
- end
132
- # verify the required parameter 'integ_id' is set
133
- if @api_client.config.client_side_validation && integ_id.nil?
134
- fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.delete_integration_api_v1_app_app_id_integration_integ_id_delete"
128
+ @api_client.config.logger.debug 'Calling API: IntegrationApi.v1_integration_delete ...'
135
129
  end
136
130
  # verify the required parameter 'app_id' is set
137
131
  if @api_client.config.client_side_validation && app_id.nil?
138
- fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.delete_integration_api_v1_app_app_id_integration_integ_id_delete"
132
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.v1_integration_delete"
139
133
  end
140
134
  if @api_client.config.client_side_validation && app_id.to_s.length > 256
141
- fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.delete_integration_api_v1_app_app_id_integration_integ_id_delete, the character length must be smaller than or equal to 256.'
135
+ fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_delete, the character length must be smaller than or equal to 256.'
142
136
  end
143
137
 
144
138
  if @api_client.config.client_side_validation && app_id.to_s.length < 1
145
- fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.delete_integration_api_v1_app_app_id_integration_integ_id_delete, the character length must be great than or equal to 1.'
139
+ fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_delete, the character length must be great than or equal to 1.'
146
140
  end
147
141
 
148
142
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
149
143
  if @api_client.config.client_side_validation && app_id !~ pattern
150
- fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.delete_integration_api_v1_app_app_id_integration_integ_id_delete, must conform to the pattern #{pattern}."
144
+ fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.v1_integration_delete, must conform to the pattern #{pattern}."
151
145
  end
152
146
 
147
+ # verify the required parameter 'integ_id' is set
148
+ if @api_client.config.client_side_validation && integ_id.nil?
149
+ fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.v1_integration_delete"
150
+ end
153
151
  # resource path
154
- local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/'.sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
152
+ local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s))
155
153
 
156
154
  # query parameters
157
155
  query_params = opts[:query_params] || {}
@@ -160,7 +158,6 @@ module Svix
160
158
  header_params = opts[:header_params] || {}
161
159
  # HTTP header 'Accept' (if needed)
162
160
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
163
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
164
161
 
165
162
  # form parameters
166
163
  form_params = opts[:form_params] || {}
@@ -175,7 +172,7 @@ module Svix
175
172
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
176
173
 
177
174
  new_options = opts.merge(
178
- :operation => :"IntegrationApi.delete_integration_api_v1_app_app_id_integration_integ_id_delete",
175
+ :operation => :"IntegrationApi.v1_integration_delete",
179
176
  :header_params => header_params,
180
177
  :query_params => query_params,
181
178
  :form_params => form_params,
@@ -186,57 +183,55 @@ module Svix
186
183
 
187
184
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
188
185
  if @api_client.config.debugging
189
- @api_client.config.logger.debug "API called: IntegrationApi#delete_integration_api_v1_app_app_id_integration_integ_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
186
+ @api_client.config.logger.debug "API called: IntegrationApi#v1_integration_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
190
187
  end
191
188
  return data, status_code, headers
192
189
  end
193
190
 
194
191
  # Get Integration
195
192
  # Get an integration.
196
- # @param integ_id [String]
197
- # @param app_id [String]
193
+ # @param app_id [String] The app&#39;s ID or UID
194
+ # @param integ_id [String] The integ&#39;s ID
198
195
  # @param [Hash] opts the optional parameters
199
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
200
196
  # @return [IntegrationOut]
201
- def get_integration_api_v1_app_app_id_integration_integ_id_get(integ_id, app_id, opts = {})
202
- data, _status_code, _headers = get_integration_api_v1_app_app_id_integration_integ_id_get_with_http_info(integ_id, app_id, opts)
197
+ def v1_integration_get(app_id, integ_id, opts = {})
198
+ data, _status_code, _headers = v1_integration_get_with_http_info(app_id, integ_id, opts)
203
199
  data
204
200
  end
205
201
 
206
202
  # Get Integration
207
203
  # Get an integration.
208
- # @param integ_id [String]
209
- # @param app_id [String]
204
+ # @param app_id [String] The app&#39;s ID or UID
205
+ # @param integ_id [String] The integ&#39;s ID
210
206
  # @param [Hash] opts the optional parameters
211
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
212
207
  # @return [Array<(IntegrationOut, Integer, Hash)>] IntegrationOut data, response status code and response headers
213
- def get_integration_api_v1_app_app_id_integration_integ_id_get_with_http_info(integ_id, app_id, opts = {})
208
+ def v1_integration_get_with_http_info(app_id, integ_id, opts = {})
214
209
  if @api_client.config.debugging
215
- @api_client.config.logger.debug 'Calling API: IntegrationApi.get_integration_api_v1_app_app_id_integration_integ_id_get ...'
216
- end
217
- # verify the required parameter 'integ_id' is set
218
- if @api_client.config.client_side_validation && integ_id.nil?
219
- fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.get_integration_api_v1_app_app_id_integration_integ_id_get"
210
+ @api_client.config.logger.debug 'Calling API: IntegrationApi.v1_integration_get ...'
220
211
  end
221
212
  # verify the required parameter 'app_id' is set
222
213
  if @api_client.config.client_side_validation && app_id.nil?
223
- fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.get_integration_api_v1_app_app_id_integration_integ_id_get"
214
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.v1_integration_get"
224
215
  end
225
216
  if @api_client.config.client_side_validation && app_id.to_s.length > 256
226
- fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.get_integration_api_v1_app_app_id_integration_integ_id_get, the character length must be smaller than or equal to 256.'
217
+ fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_get, the character length must be smaller than or equal to 256.'
227
218
  end
228
219
 
229
220
  if @api_client.config.client_side_validation && app_id.to_s.length < 1
230
- fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.get_integration_api_v1_app_app_id_integration_integ_id_get, the character length must be great than or equal to 1.'
221
+ fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_get, the character length must be great than or equal to 1.'
231
222
  end
232
223
 
233
224
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
234
225
  if @api_client.config.client_side_validation && app_id !~ pattern
235
- fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.get_integration_api_v1_app_app_id_integration_integ_id_get, must conform to the pattern #{pattern}."
226
+ fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.v1_integration_get, must conform to the pattern #{pattern}."
236
227
  end
237
228
 
229
+ # verify the required parameter 'integ_id' is set
230
+ if @api_client.config.client_side_validation && integ_id.nil?
231
+ fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.v1_integration_get"
232
+ end
238
233
  # resource path
239
- local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/'.sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
234
+ local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s))
240
235
 
241
236
  # query parameters
242
237
  query_params = opts[:query_params] || {}
@@ -245,7 +240,6 @@ module Svix
245
240
  header_params = opts[:header_params] || {}
246
241
  # HTTP header 'Accept' (if needed)
247
242
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
248
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
249
243
 
250
244
  # form parameters
251
245
  form_params = opts[:form_params] || {}
@@ -260,7 +254,7 @@ module Svix
260
254
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
261
255
 
262
256
  new_options = opts.merge(
263
- :operation => :"IntegrationApi.get_integration_api_v1_app_app_id_integration_integ_id_get",
257
+ :operation => :"IntegrationApi.v1_integration_get",
264
258
  :header_params => header_params,
265
259
  :query_params => query_params,
266
260
  :form_params => form_params,
@@ -271,57 +265,55 @@ module Svix
271
265
 
272
266
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
273
267
  if @api_client.config.debugging
274
- @api_client.config.logger.debug "API called: IntegrationApi#get_integration_api_v1_app_app_id_integration_integ_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
268
+ @api_client.config.logger.debug "API called: IntegrationApi#v1_integration_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
275
269
  end
276
270
  return data, status_code, headers
277
271
  end
278
272
 
279
273
  # Get Integration Key
280
274
  # Get an integration's key.
281
- # @param integ_id [String]
282
- # @param app_id [String]
275
+ # @param app_id [String] The app&#39;s ID or UID
276
+ # @param integ_id [String] The integ&#39;s ID
283
277
  # @param [Hash] opts the optional parameters
284
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
285
278
  # @return [IntegrationKeyOut]
286
- def get_integration_key_api_v1_app_app_id_integration_integ_id_key_get(integ_id, app_id, opts = {})
287
- data, _status_code, _headers = get_integration_key_api_v1_app_app_id_integration_integ_id_key_get_with_http_info(integ_id, app_id, opts)
279
+ def v1_integration_get_key(app_id, integ_id, opts = {})
280
+ data, _status_code, _headers = v1_integration_get_key_with_http_info(app_id, integ_id, opts)
288
281
  data
289
282
  end
290
283
 
291
284
  # Get Integration Key
292
285
  # Get an integration&#39;s key.
293
- # @param integ_id [String]
294
- # @param app_id [String]
286
+ # @param app_id [String] The app&#39;s ID or UID
287
+ # @param integ_id [String] The integ&#39;s ID
295
288
  # @param [Hash] opts the optional parameters
296
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
297
289
  # @return [Array<(IntegrationKeyOut, Integer, Hash)>] IntegrationKeyOut data, response status code and response headers
298
- def get_integration_key_api_v1_app_app_id_integration_integ_id_key_get_with_http_info(integ_id, app_id, opts = {})
290
+ def v1_integration_get_key_with_http_info(app_id, integ_id, opts = {})
299
291
  if @api_client.config.debugging
300
- @api_client.config.logger.debug 'Calling API: IntegrationApi.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get ...'
301
- end
302
- # verify the required parameter 'integ_id' is set
303
- if @api_client.config.client_side_validation && integ_id.nil?
304
- fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get"
292
+ @api_client.config.logger.debug 'Calling API: IntegrationApi.v1_integration_get_key ...'
305
293
  end
306
294
  # verify the required parameter 'app_id' is set
307
295
  if @api_client.config.client_side_validation && app_id.nil?
308
- fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get"
296
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.v1_integration_get_key"
309
297
  end
310
298
  if @api_client.config.client_side_validation && app_id.to_s.length > 256
311
- fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get, the character length must be smaller than or equal to 256.'
299
+ fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_get_key, the character length must be smaller than or equal to 256.'
312
300
  end
313
301
 
314
302
  if @api_client.config.client_side_validation && app_id.to_s.length < 1
315
- fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get, the character length must be great than or equal to 1.'
303
+ fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_get_key, the character length must be great than or equal to 1.'
316
304
  end
317
305
 
318
306
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
319
307
  if @api_client.config.client_side_validation && app_id !~ pattern
320
- fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get, must conform to the pattern #{pattern}."
308
+ fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.v1_integration_get_key, must conform to the pattern #{pattern}."
321
309
  end
322
310
 
311
+ # verify the required parameter 'integ_id' is set
312
+ if @api_client.config.client_side_validation && integ_id.nil?
313
+ fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.v1_integration_get_key"
314
+ end
323
315
  # resource path
324
- local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/key/'.sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
316
+ local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/key/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s))
325
317
 
326
318
  # query parameters
327
319
  query_params = opts[:query_params] || {}
@@ -330,7 +322,6 @@ module Svix
330
322
  header_params = opts[:header_params] || {}
331
323
  # HTTP header 'Accept' (if needed)
332
324
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
333
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
334
325
 
335
326
  # form parameters
336
327
  form_params = opts[:form_params] || {}
@@ -345,7 +336,7 @@ module Svix
345
336
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
346
337
 
347
338
  new_options = opts.merge(
348
- :operation => :"IntegrationApi.get_integration_key_api_v1_app_app_id_integration_integ_id_key_get",
339
+ :operation => :"IntegrationApi.v1_integration_get_key",
349
340
  :header_params => header_params,
350
341
  :query_params => query_params,
351
342
  :form_params => form_params,
@@ -356,51 +347,57 @@ module Svix
356
347
 
357
348
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
358
349
  if @api_client.config.debugging
359
- @api_client.config.logger.debug "API called: IntegrationApi#get_integration_key_api_v1_app_app_id_integration_integ_id_key_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
350
+ @api_client.config.logger.debug "API called: IntegrationApi#v1_integration_get_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
360
351
  end
361
352
  return data, status_code, headers
362
353
  end
363
354
 
364
355
  # List Integrations
365
356
  # List the application's integrations.
366
- # @param app_id [String]
357
+ # @param app_id [String] The app&#39;s ID or UID
367
358
  # @param [Hash] opts the optional parameters
368
- # @option opts [String] :iterator
369
- # @option opts [Integer] :limit (default to 50)
370
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
359
+ # @option opts [Integer] :limit
360
+ # @option opts [String] :iterator The integ&#39;s ID
371
361
  # @return [ListResponseIntegrationOut]
372
- def list_integrations_api_v1_app_app_id_integration_get(app_id, opts = {})
373
- data, _status_code, _headers = list_integrations_api_v1_app_app_id_integration_get_with_http_info(app_id, opts)
362
+ def v1_integration_list(app_id, opts = {})
363
+ data, _status_code, _headers = v1_integration_list_with_http_info(app_id, opts)
374
364
  data
375
365
  end
376
366
 
377
367
  # List Integrations
378
368
  # List the application&#39;s integrations.
379
- # @param app_id [String]
369
+ # @param app_id [String] The app&#39;s ID or UID
380
370
  # @param [Hash] opts the optional parameters
381
- # @option opts [String] :iterator
382
371
  # @option opts [Integer] :limit
383
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
372
+ # @option opts [String] :iterator The integ&#39;s ID
384
373
  # @return [Array<(ListResponseIntegrationOut, Integer, Hash)>] ListResponseIntegrationOut data, response status code and response headers
385
- def list_integrations_api_v1_app_app_id_integration_get_with_http_info(app_id, opts = {})
374
+ def v1_integration_list_with_http_info(app_id, opts = {})
386
375
  if @api_client.config.debugging
387
- @api_client.config.logger.debug 'Calling API: IntegrationApi.list_integrations_api_v1_app_app_id_integration_get ...'
376
+ @api_client.config.logger.debug 'Calling API: IntegrationApi.v1_integration_list ...'
388
377
  end
389
378
  # verify the required parameter 'app_id' is set
390
379
  if @api_client.config.client_side_validation && app_id.nil?
391
- fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.list_integrations_api_v1_app_app_id_integration_get"
380
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.v1_integration_list"
392
381
  end
393
382
  if @api_client.config.client_side_validation && app_id.to_s.length > 256
394
- fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.list_integrations_api_v1_app_app_id_integration_get, the character length must be smaller than or equal to 256.'
383
+ fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_list, the character length must be smaller than or equal to 256.'
395
384
  end
396
385
 
397
386
  if @api_client.config.client_side_validation && app_id.to_s.length < 1
398
- fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.list_integrations_api_v1_app_app_id_integration_get, the character length must be great than or equal to 1.'
387
+ fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_list, the character length must be great than or equal to 1.'
399
388
  end
400
389
 
401
390
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
402
391
  if @api_client.config.client_side_validation && app_id !~ pattern
403
- fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.list_integrations_api_v1_app_app_id_integration_get, must conform to the pattern #{pattern}."
392
+ fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.v1_integration_list, must conform to the pattern #{pattern}."
393
+ end
394
+
395
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
396
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling IntegrationApi.v1_integration_list, must be smaller than or equal to 250.'
397
+ end
398
+
399
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
400
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling IntegrationApi.v1_integration_list, must be greater than or equal to 1.'
404
401
  end
405
402
 
406
403
  # resource path
@@ -408,14 +405,13 @@ module Svix
408
405
 
409
406
  # query parameters
410
407
  query_params = opts[:query_params] || {}
411
- query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
412
408
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
409
+ query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
413
410
 
414
411
  # header parameters
415
412
  header_params = opts[:header_params] || {}
416
413
  # HTTP header 'Accept' (if needed)
417
414
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
418
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
419
415
 
420
416
  # form parameters
421
417
  form_params = opts[:form_params] || {}
@@ -430,7 +426,7 @@ module Svix
430
426
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
431
427
 
432
428
  new_options = opts.merge(
433
- :operation => :"IntegrationApi.list_integrations_api_v1_app_app_id_integration_get",
429
+ :operation => :"IntegrationApi.v1_integration_list",
434
430
  :header_params => header_params,
435
431
  :query_params => query_params,
436
432
  :form_params => form_params,
@@ -441,57 +437,57 @@ module Svix
441
437
 
442
438
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
443
439
  if @api_client.config.debugging
444
- @api_client.config.logger.debug "API called: IntegrationApi#list_integrations_api_v1_app_app_id_integration_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
440
+ @api_client.config.logger.debug "API called: IntegrationApi#v1_integration_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
445
441
  end
446
442
  return data, status_code, headers
447
443
  end
448
444
 
449
445
  # Rotate Integration Key
450
446
  # Rotate the integration's key. The previous key will be immediately revoked.
451
- # @param integ_id [String]
452
- # @param app_id [String]
447
+ # @param app_id [String] The app&#39;s ID or UID
448
+ # @param integ_id [String] The integ&#39;s ID
453
449
  # @param [Hash] opts the optional parameters
454
450
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
455
451
  # @return [IntegrationKeyOut]
456
- def rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post(integ_id, app_id, opts = {})
457
- data, _status_code, _headers = rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post_with_http_info(integ_id, app_id, opts)
452
+ def v1_integration_rotate_key(app_id, integ_id, opts = {})
453
+ data, _status_code, _headers = v1_integration_rotate_key_with_http_info(app_id, integ_id, opts)
458
454
  data
459
455
  end
460
456
 
461
457
  # Rotate Integration Key
462
458
  # Rotate the integration&#39;s key. The previous key will be immediately revoked.
463
- # @param integ_id [String]
464
- # @param app_id [String]
459
+ # @param app_id [String] The app&#39;s ID or UID
460
+ # @param integ_id [String] The integ&#39;s ID
465
461
  # @param [Hash] opts the optional parameters
466
462
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
467
463
  # @return [Array<(IntegrationKeyOut, Integer, Hash)>] IntegrationKeyOut data, response status code and response headers
468
- def rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post_with_http_info(integ_id, app_id, opts = {})
464
+ def v1_integration_rotate_key_with_http_info(app_id, integ_id, opts = {})
469
465
  if @api_client.config.debugging
470
- @api_client.config.logger.debug 'Calling API: IntegrationApi.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post ...'
471
- end
472
- # verify the required parameter 'integ_id' is set
473
- if @api_client.config.client_side_validation && integ_id.nil?
474
- fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post"
466
+ @api_client.config.logger.debug 'Calling API: IntegrationApi.v1_integration_rotate_key ...'
475
467
  end
476
468
  # verify the required parameter 'app_id' is set
477
469
  if @api_client.config.client_side_validation && app_id.nil?
478
- fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post"
470
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.v1_integration_rotate_key"
479
471
  end
480
472
  if @api_client.config.client_side_validation && app_id.to_s.length > 256
481
- fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post, the character length must be smaller than or equal to 256.'
473
+ fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_rotate_key, the character length must be smaller than or equal to 256.'
482
474
  end
483
475
 
484
476
  if @api_client.config.client_side_validation && app_id.to_s.length < 1
485
- fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post, the character length must be great than or equal to 1.'
477
+ fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_rotate_key, the character length must be great than or equal to 1.'
486
478
  end
487
479
 
488
480
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
489
481
  if @api_client.config.client_side_validation && app_id !~ pattern
490
- fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post, must conform to the pattern #{pattern}."
482
+ fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.v1_integration_rotate_key, must conform to the pattern #{pattern}."
491
483
  end
492
484
 
485
+ # verify the required parameter 'integ_id' is set
486
+ if @api_client.config.client_side_validation && integ_id.nil?
487
+ fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.v1_integration_rotate_key"
488
+ end
493
489
  # resource path
494
- local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/key/rotate/'.sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
490
+ local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/key/rotate/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s))
495
491
 
496
492
  # query parameters
497
493
  query_params = opts[:query_params] || {}
@@ -515,7 +511,7 @@ module Svix
515
511
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
516
512
 
517
513
  new_options = opts.merge(
518
- :operation => :"IntegrationApi.rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post",
514
+ :operation => :"IntegrationApi.v1_integration_rotate_key",
519
515
  :header_params => header_params,
520
516
  :query_params => query_params,
521
517
  :form_params => form_params,
@@ -526,63 +522,61 @@ module Svix
526
522
 
527
523
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
528
524
  if @api_client.config.debugging
529
- @api_client.config.logger.debug "API called: IntegrationApi#rotate_integration_key_api_v1_app_app_id_integration_integ_id_key_rotate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
525
+ @api_client.config.logger.debug "API called: IntegrationApi#v1_integration_rotate_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
530
526
  end
531
527
  return data, status_code, headers
532
528
  end
533
529
 
534
530
  # Update Integration
535
531
  # Update an integration.
536
- # @param integ_id [String]
537
- # @param app_id [String]
532
+ # @param app_id [String] The app&#39;s ID or UID
533
+ # @param integ_id [String] The integ&#39;s ID
538
534
  # @param integration_update [IntegrationUpdate]
539
535
  # @param [Hash] opts the optional parameters
540
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
541
536
  # @return [IntegrationOut]
542
- def update_integration_api_v1_app_app_id_integration_integ_id_put(integ_id, app_id, integration_update, opts = {})
543
- data, _status_code, _headers = update_integration_api_v1_app_app_id_integration_integ_id_put_with_http_info(integ_id, app_id, integration_update, opts)
537
+ def v1_integration_update(app_id, integ_id, integration_update, opts = {})
538
+ data, _status_code, _headers = v1_integration_update_with_http_info(app_id, integ_id, integration_update, opts)
544
539
  data
545
540
  end
546
541
 
547
542
  # Update Integration
548
543
  # Update an integration.
549
- # @param integ_id [String]
550
- # @param app_id [String]
544
+ # @param app_id [String] The app&#39;s ID or UID
545
+ # @param integ_id [String] The integ&#39;s ID
551
546
  # @param integration_update [IntegrationUpdate]
552
547
  # @param [Hash] opts the optional parameters
553
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
554
548
  # @return [Array<(IntegrationOut, Integer, Hash)>] IntegrationOut data, response status code and response headers
555
- def update_integration_api_v1_app_app_id_integration_integ_id_put_with_http_info(integ_id, app_id, integration_update, opts = {})
549
+ def v1_integration_update_with_http_info(app_id, integ_id, integration_update, opts = {})
556
550
  if @api_client.config.debugging
557
- @api_client.config.logger.debug 'Calling API: IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put ...'
558
- end
559
- # verify the required parameter 'integ_id' is set
560
- if @api_client.config.client_side_validation && integ_id.nil?
561
- fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put"
551
+ @api_client.config.logger.debug 'Calling API: IntegrationApi.v1_integration_update ...'
562
552
  end
563
553
  # verify the required parameter 'app_id' is set
564
554
  if @api_client.config.client_side_validation && app_id.nil?
565
- fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put"
555
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling IntegrationApi.v1_integration_update"
566
556
  end
567
557
  if @api_client.config.client_side_validation && app_id.to_s.length > 256
568
- fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put, the character length must be smaller than or equal to 256.'
558
+ fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_update, the character length must be smaller than or equal to 256.'
569
559
  end
570
560
 
571
561
  if @api_client.config.client_side_validation && app_id.to_s.length < 1
572
- fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put, the character length must be great than or equal to 1.'
562
+ fail ArgumentError, 'invalid value for "app_id" when calling IntegrationApi.v1_integration_update, the character length must be great than or equal to 1.'
573
563
  end
574
564
 
575
565
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
576
566
  if @api_client.config.client_side_validation && app_id !~ pattern
577
- fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put, must conform to the pattern #{pattern}."
567
+ fail ArgumentError, "invalid value for 'app_id' when calling IntegrationApi.v1_integration_update, must conform to the pattern #{pattern}."
578
568
  end
579
569
 
570
+ # verify the required parameter 'integ_id' is set
571
+ if @api_client.config.client_side_validation && integ_id.nil?
572
+ fail ArgumentError, "Missing the required parameter 'integ_id' when calling IntegrationApi.v1_integration_update"
573
+ end
580
574
  # verify the required parameter 'integration_update' is set
581
575
  if @api_client.config.client_side_validation && integration_update.nil?
582
- fail ArgumentError, "Missing the required parameter 'integration_update' when calling IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put"
576
+ fail ArgumentError, "Missing the required parameter 'integration_update' when calling IntegrationApi.v1_integration_update"
583
577
  end
584
578
  # resource path
585
- local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/'.sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
579
+ local_var_path = '/api/v1/app/{app_id}/integration/{integ_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'integ_id' + '}', CGI.escape(integ_id.to_s))
586
580
 
587
581
  # query parameters
588
582
  query_params = opts[:query_params] || {}
@@ -593,7 +587,6 @@ module Svix
593
587
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
594
588
  # HTTP header 'Content-Type'
595
589
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
596
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
597
590
 
598
591
  # form parameters
599
592
  form_params = opts[:form_params] || {}
@@ -608,7 +601,7 @@ module Svix
608
601
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
609
602
 
610
603
  new_options = opts.merge(
611
- :operation => :"IntegrationApi.update_integration_api_v1_app_app_id_integration_integ_id_put",
604
+ :operation => :"IntegrationApi.v1_integration_update",
612
605
  :header_params => header_params,
613
606
  :query_params => query_params,
614
607
  :form_params => form_params,
@@ -619,7 +612,7 @@ module Svix
619
612
 
620
613
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
621
614
  if @api_client.config.debugging
622
- @api_client.config.logger.debug "API called: IntegrationApi#update_integration_api_v1_app_app_id_integration_integ_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
615
+ @api_client.config.logger.debug "API called: IntegrationApi#v1_integration_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
623
616
  end
624
617
  return data, status_code, headers
625
618
  end