seatschart 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +552 -0
  4. data/lib/seatschart/api/api_keys_api.rb +364 -0
  5. data/lib/seatschart/api/assets_api.rb +95 -0
  6. data/lib/seatschart/api/audit_api.rb +88 -0
  7. data/lib/seatschart/api/auth_api.rb +1187 -0
  8. data/lib/seatschart/api/billing_api.rb +355 -0
  9. data/lib/seatschart/api/charts_api.rb +4195 -0
  10. data/lib/seatschart/api/default_api.rb +763 -0
  11. data/lib/seatschart/api/embed_api.rb +407 -0
  12. data/lib/seatschart/api/embed_origins_api.rb +281 -0
  13. data/lib/seatschart/api/event_log_api.rb +148 -0
  14. data/lib/seatschart/api/events_api.rb +6608 -0
  15. data/lib/seatschart/api/health_api.rb +77 -0
  16. data/lib/seatschart/api/map_designer_api.rb +135 -0
  17. data/lib/seatschart/api/object_status_api.rb +805 -0
  18. data/lib/seatschart/api/orders_api.rb +166 -0
  19. data/lib/seatschart/api/public_api.rb +455 -0
  20. data/lib/seatschart/api/quotes_api.rb +103 -0
  21. data/lib/seatschart/api/seasons_api.rb +5543 -0
  22. data/lib/seatschart/api/seats_api.rb +1103 -0
  23. data/lib/seatschart/api/sse_api.rb +83 -0
  24. data/lib/seatschart/api/team_api.rb +428 -0
  25. data/lib/seatschart/api/usage_api.rb +540 -0
  26. data/lib/seatschart/api/webhooks_api.rb +771 -0
  27. data/lib/seatschart/api/workspace_api.rb +1244 -0
  28. data/lib/seatschart/api_client.rb +394 -0
  29. data/lib/seatschart/api_error.rb +58 -0
  30. data/lib/seatschart/configuration.rb +316 -0
  31. data/lib/seatschart/models/delete_api_workspaces_by_workspace_id200_response.rb +283 -0
  32. data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response.rb +247 -0
  33. data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response_items_inner.rb +473 -0
  34. data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response_items_inner_published_by.rb +280 -0
  35. data/lib/seatschart/models/get_api_events_by_event_id_map_versions200_response.rb +247 -0
  36. data/lib/seatschart/models/get_api_events_by_event_id_map_versions200_response_items_inner.rb +444 -0
  37. data/lib/seatschart/models/get_api_events_by_event_id_seat_views200_response.rb +267 -0
  38. data/lib/seatschart/models/get_api_events_by_event_id_seat_views200_response_views_value.rb +273 -0
  39. data/lib/seatschart/models/get_api_events_by_event_id_seat_views404_response.rb +237 -0
  40. data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +388 -0
  41. data/lib/seatschart/models/get_api_monitoring_requests200_response_lanes.rb +237 -0
  42. data/lib/seatschart/models/get_api_monitoring_requests200_response_lanes_sales.rb +256 -0
  43. data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +286 -0
  44. data/lib/seatschart/models/get_api_workspace_integration200_response.rb +287 -0
  45. data/lib/seatschart/models/get_api_workspace_settings200_response.rb +329 -0
  46. data/lib/seatschart/models/get_api_workspace_settings200_response_bounds.rb +237 -0
  47. data/lib/seatschart/models/get_api_workspace_settings200_response_bounds_hold_period_minutes.rb +237 -0
  48. data/lib/seatschart/models/get_api_workspace_settings200_response_effective.rb +269 -0
  49. data/lib/seatschart/models/get_api_workspace_settings200_response_overrides.rb +241 -0
  50. data/lib/seatschart/models/get_api_workspace_settings200_response_sources.rb +339 -0
  51. data/lib/seatschart/models/get_api_workspaces200_response.rb +223 -0
  52. data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +423 -0
  53. data/lib/seatschart/models/patch_api_charts_by_chart_id_categories_by_category_id_request.rb +304 -0
  54. data/lib/seatschart/models/patch_api_charts_by_chart_id_request.rb +288 -0
  55. data/lib/seatschart/models/patch_api_events_by_event_id_inventory_channels_by_channel_key_id_request.rb +272 -0
  56. data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +448 -0
  57. data/lib/seatschart/models/patch_api_events_by_event_id_request_categories_inner.rb +343 -0
  58. data/lib/seatschart/models/patch_api_events_by_event_id_request_table_booking_config.rb +266 -0
  59. data/lib/seatschart/models/patch_api_keys_by_id_request.rb +292 -0
  60. data/lib/seatschart/models/patch_api_seasons_by_season_id_events_by_event_id_request.rb +221 -0
  61. data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +276 -0
  62. data/lib/seatschart/models/patch_api_team_members_by_user_id_request.rb +255 -0
  63. data/lib/seatschart/models/patch_api_webhooks_by_id_request.rb +291 -0
  64. data/lib/seatschart/models/patch_api_workspace_chart_validation_request.rb +224 -0
  65. data/lib/seatschart/models/patch_api_workspace_chart_validation_request_severities.rb +543 -0
  66. data/lib/seatschart/models/patch_api_workspace_integration_request.rb +257 -0
  67. data/lib/seatschart/models/patch_api_workspace_request.rb +249 -0
  68. data/lib/seatschart/models/patch_api_workspace_settings_request.rb +307 -0
  69. data/lib/seatschart/models/post_api_auth2fa_disable_request.rb +281 -0
  70. data/lib/seatschart/models/post_api_auth2fa_enable_request.rb +250 -0
  71. data/lib/seatschart/models/post_api_auth2fa_enroll_confirm_request.rb +295 -0
  72. data/lib/seatschart/models/post_api_auth2fa_enroll_start_request.rb +250 -0
  73. data/lib/seatschart/models/post_api_auth2fa_verify_request.rb +326 -0
  74. data/lib/seatschart/models/post_api_auth_accept_invite_request.rb +293 -0
  75. data/lib/seatschart/models/post_api_auth_login_request.rb +293 -0
  76. data/lib/seatschart/models/post_api_auth_logout_request.rb +242 -0
  77. data/lib/seatschart/models/post_api_auth_refresh_request.rb +292 -0
  78. data/lib/seatschart/models/post_api_auth_signup_request.rb +321 -0
  79. data/lib/seatschart/models/post_api_auth_switch_workspace_request.rb +249 -0
  80. data/lib/seatschart/models/post_api_billing_checkout_session_request.rb +249 -0
  81. data/lib/seatschart/models/post_api_billing_confirm_checkout_request.rb +249 -0
  82. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_archive200_response.rb +221 -0
  83. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_archive200_response_chart.rb +249 -0
  84. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_copy_to_workspace_request.rb +287 -0
  85. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request.rb +348 -0
  86. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner.rb +555 -0
  87. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner_accessibility.rb +356 -0
  88. data/lib/seatschart/models/post_api_charts_by_chart_id_categories_request.rb +361 -0
  89. data/lib/seatschart/models/post_api_charts_by_chart_id_categories_request_ticket_types_inner.rb +448 -0
  90. data/lib/seatschart/models/post_api_charts_by_chart_id_duplicate_request.rb +233 -0
  91. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response.rb +289 -0
  92. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response_issues_inner.rb +402 -0
  93. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish_request.rb +244 -0
  94. data/lib/seatschart/models/post_api_charts_by_chart_id_preview_link_request.rb +243 -0
  95. data/lib/seatschart/models/post_api_charts_by_chart_id_versions_by_version_actions_copy_request.rb +242 -0
  96. data/lib/seatschart/models/post_api_charts_request.rb +372 -0
  97. data/lib/seatschart/models/post_api_charts_request_categories_inner.rb +346 -0
  98. data/lib/seatschart/models/post_api_embed_origins_request.rb +249 -0
  99. data/lib/seatschart/models/post_api_embed_tokens_request.rb +394 -0
  100. data/lib/seatschart/models/post_api_events_actions_change_object_status_request.rb +251 -0
  101. data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner.rb +737 -0
  102. data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner_objects_inner.rb +104 -0
  103. data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner_objects_inner_any_of.rb +335 -0
  104. data/lib/seatschart/models/post_api_events_bulk_request.rb +332 -0
  105. data/lib/seatschart/models/post_api_events_bulk_request_events_inner.rb +398 -0
  106. data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request.rb +824 -0
  107. data/lib/seatschart/models/post_api_events_by_event_id_actions_override_season_status_request.rb +272 -0
  108. data/lib/seatschart/models/post_api_events_by_event_id_actions_update_extra_data_request.rb +260 -0
  109. data/lib/seatschart/models/post_api_events_by_event_id_actions_update_extra_data_request_objects_inner.rb +263 -0
  110. data/lib/seatschart/models/post_api_events_by_event_id_actions_use_season_status_request.rb +252 -0
  111. data/lib/seatschart/models/post_api_events_by_event_id_duplicate_request.rb +261 -0
  112. data/lib/seatschart/models/post_api_events_by_event_id_inventory_channels_assign_request.rb +321 -0
  113. data/lib/seatschart/models/post_api_events_by_event_id_inventory_channels_request.rb +323 -0
  114. data/lib/seatschart/models/post_api_events_by_event_id_inventory_for_sale_apply_request.rb +333 -0
  115. data/lib/seatschart/models/post_api_events_by_event_id_objects_actions_retrieve_request.rb +252 -0
  116. data/lib/seatschart/models/post_api_events_request.rb +502 -0
  117. data/lib/seatschart/models/post_api_events_request_category_overrides_value.rb +276 -0
  118. data/lib/seatschart/models/post_api_events_request_channels_inner.rb +360 -0
  119. data/lib/seatschart/models/post_api_events_request_for_sale_config.rb +295 -0
  120. data/lib/seatschart/models/post_api_events_request_table_booking_config.rb +267 -0
  121. data/lib/seatschart/models/post_api_extract_seats_request.rb +279 -0
  122. data/lib/seatschart/models/post_api_ga_confirm409_response.rb +271 -0
  123. data/lib/seatschart/models/post_api_ga_confirm_request.rb +687 -0
  124. data/lib/seatschart/models/post_api_ga_release_request.rb +385 -0
  125. data/lib/seatschart/models/post_api_ga_reserve_request.rb +527 -0
  126. data/lib/seatschart/models/post_api_hold_tokens_by_token_request.rb +249 -0
  127. data/lib/seatschart/models/post_api_hold_tokens_request.rb +391 -0
  128. data/lib/seatschart/models/post_api_keys_request.rb +299 -0
  129. data/lib/seatschart/models/post_api_orders_by_order_id_cancel_request.rb +249 -0
  130. data/lib/seatschart/models/post_api_quotes_request.rb +351 -0
  131. data/lib/seatschart/models/post_api_seasons_by_season_id_actions_add_events_request.rb +261 -0
  132. data/lib/seatschart/models/post_api_seasons_by_season_id_actions_create_events_request.rb +322 -0
  133. data/lib/seatschart/models/post_api_seasons_by_season_id_actions_create_events_request_events_inner.rb +289 -0
  134. data/lib/seatschart/models/post_api_seasons_by_season_id_actions_remove_events_request.rb +251 -0
  135. data/lib/seatschart/models/post_api_seasons_by_season_id_events_request.rb +267 -0
  136. data/lib/seatschart/models/post_api_seasons_by_season_id_inventory_sync_request.rb +235 -0
  137. data/lib/seatschart/models/post_api_seasons_by_season_id_partial_seasons_request.rb +279 -0
  138. data/lib/seatschart/models/post_api_seasons_request.rb +395 -0
  139. data/lib/seatschart/models/post_api_seats_best_available_request.rb +809 -0
  140. data/lib/seatschart/models/post_api_seats_confirm409_response.rb +271 -0
  141. data/lib/seatschart/models/post_api_seats_confirm_request.rb +711 -0
  142. data/lib/seatschart/models/post_api_seats_holds_renew_request.rb +249 -0
  143. data/lib/seatschart/models/post_api_seats_release_request.rb +387 -0
  144. data/lib/seatschart/models/post_api_seats_reserve_request.rb +561 -0
  145. data/lib/seatschart/models/post_api_team_invitations_request.rb +299 -0
  146. data/lib/seatschart/models/post_api_ticket_buyers_request.rb +252 -0
  147. data/lib/seatschart/models/post_api_viewer_tokens_request.rb +292 -0
  148. data/lib/seatschart/models/post_api_webhooks_request.rb +298 -0
  149. data/lib/seatschart/models/post_api_workspaces_request.rb +269 -0
  150. data/lib/seatschart/models/put_api_charts_by_chart_id_tags_request.rb +243 -0
  151. data/lib/seatschart/models/put_api_charts_by_chart_id_versions_by_version_thumbnail_request.rb +261 -0
  152. data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_definitions_request.rb +242 -0
  153. data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_definitions_request_channels_inner.rb +405 -0
  154. data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_request.rb +242 -0
  155. data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_request_assignments_inner.rb +320 -0
  156. data/lib/seatschart/models/put_api_events_by_event_id_inventory_for_sale_request.rb +333 -0
  157. data/lib/seatschart/models/put_api_events_by_event_id_pricing_request.rb +297 -0
  158. data/lib/seatschart/models/put_api_events_by_event_id_pricing_request_categories_inner.rb +295 -0
  159. data/lib/seatschart/models/put_api_events_by_event_id_pricing_request_categories_inner_ticket_types_inner.rb +425 -0
  160. data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request.rb +320 -0
  161. data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_buyer_limit.rb +259 -0
  162. data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_lot_plans_inner.rb +374 -0
  163. data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_lot_plans_inner_lots_inner.rb +364 -0
  164. data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_quotas_inner.rb +418 -0
  165. data/lib/seatschart/retry.rb +118 -0
  166. data/lib/seatschart/version.rb +15 -0
  167. data/lib/seatschart.rb +198 -0
  168. metadata +254 -0
@@ -0,0 +1,771 @@
1
+ =begin
2
+ #SeatsChart API
3
+
4
+ #Seat inventory and locking API for B2B2C integrations. Authenticate using `x-api-key` (partners) or `Authorization: Bearer` with an HS256 JWT.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module SeatsChart
16
+ class WebhooksApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete a webhook
23
+ # Removes the registration permanently. Idempotent `404` applies when the webhook id is unknown or belongs to another tenant.
24
+ # @param id [String] Webhook UUID (stored lowercase)
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
27
+ # @return [nil]
28
+ def delete_api_webhooks_by_id(id, opts = {})
29
+ delete_api_webhooks_by_id_with_http_info(id, opts)
30
+ nil
31
+ end
32
+
33
+ # Delete a webhook
34
+ # Removes the registration permanently. Idempotent `404` applies when the webhook id is unknown or belongs to another tenant.
35
+ # @param id [String] Webhook UUID (stored lowercase)
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
38
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
+ def delete_api_webhooks_by_id_with_http_info(id, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.delete_api_webhooks_by_id ...'
42
+ end
43
+ # verify the required parameter 'id' is set
44
+ if @api_client.config.client_side_validation && id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.delete_api_webhooks_by_id"
46
+ end
47
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
48
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WebhooksApi.delete_api_webhooks_by_id, the character length must be smaller than or equal to 255.'
49
+ end
50
+
51
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
52
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WebhooksApi.delete_api_webhooks_by_id, the character length must be great than or equal to 1.'
53
+ end
54
+
55
+ # resource path
56
+ local_var_path = '/api/webhooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
57
+
58
+ # query parameters
59
+ query_params = opts[:query_params] || {}
60
+
61
+ # header parameters
62
+ header_params = opts[:header_params] || {}
63
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
64
+
65
+ # form parameters
66
+ form_params = opts[:form_params] || {}
67
+
68
+ # http body (model)
69
+ post_body = opts[:debug_body]
70
+
71
+ # return_type
72
+ return_type = opts[:debug_return_type]
73
+
74
+ # auth_names
75
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
76
+
77
+ new_options = opts.merge(
78
+ :operation => :"WebhooksApi.delete_api_webhooks_by_id",
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names,
84
+ :return_type => return_type
85
+ )
86
+
87
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
88
+ if @api_client.config.debugging
89
+ @api_client.config.logger.debug "API called: WebhooksApi#delete_api_webhooks_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
90
+ end
91
+ return data, status_code, headers
92
+ end
93
+
94
+ # List webhooks for the authenticated tenant
95
+ # Returns all outbound webhook endpoints of the authenticated tenant with their event-type subscription (`eventTypes`, `[\"*\"]` = all) and the outcome of the most recent delivery (`lastDelivery`). Requires the `webhooks` scope for scoped API keys.
96
+ # @param [Hash] opts the optional parameters
97
+ # @return [nil]
98
+ def get_api_webhooks(opts = {})
99
+ get_api_webhooks_with_http_info(opts)
100
+ nil
101
+ end
102
+
103
+ # List webhooks for the authenticated tenant
104
+ # Returns all outbound webhook endpoints of the authenticated tenant with their event-type subscription (&#x60;eventTypes&#x60;, &#x60;[\&quot;*\&quot;]&#x60; &#x3D; all) and the outcome of the most recent delivery (&#x60;lastDelivery&#x60;). Requires the &#x60;webhooks&#x60; scope for scoped API keys.
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
107
+ def get_api_webhooks_with_http_info(opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.get_api_webhooks ...'
110
+ end
111
+ # resource path
112
+ local_var_path = '/api/webhooks'
113
+
114
+ # query parameters
115
+ query_params = opts[:query_params] || {}
116
+
117
+ # header parameters
118
+ header_params = opts[:header_params] || {}
119
+
120
+ # form parameters
121
+ form_params = opts[:form_params] || {}
122
+
123
+ # http body (model)
124
+ post_body = opts[:debug_body]
125
+
126
+ # return_type
127
+ return_type = opts[:debug_return_type]
128
+
129
+ # auth_names
130
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
131
+
132
+ new_options = opts.merge(
133
+ :operation => :"WebhooksApi.get_api_webhooks",
134
+ :header_params => header_params,
135
+ :query_params => query_params,
136
+ :form_params => form_params,
137
+ :body => post_body,
138
+ :auth_names => auth_names,
139
+ :return_type => return_type
140
+ )
141
+
142
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: WebhooksApi#get_api_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+
149
+ # List deliveries of a webhook endpoint
150
+ # Newest first, cursor-paginated (`nextCursor`). Combines the durable SQL outbox (`reservations.confirmed`, retried with exponential backoff) with fire-and-forget dispatches (`holds.*`, `ga.*`, `objects.updated`, …), test events and replays. Entries expose event id, type, status, attempts, HTTP status and a stable error code only — never response bodies, URLs or credentials. Direct-send entries are retained for `WEBHOOK_DELIVERY_RETENTION_DAYS` (default 30).
151
+ # @param id [String] Webhook UUID (stored lowercase)
152
+ # @param [Hash] opts the optional parameters
153
+ # @option opts [Float] :limit Page size (1..100, default 20).
154
+ # @option opts [String] :cursor Opaque &#x60;nextCursor&#x60; value from the previous page.
155
+ # @option opts [String] :status &#x60;pending&#x60; also matches deliveries currently being attempted (&#x60;processing&#x60;).
156
+ # @option opts [String] :event_type
157
+ # @option opts [String] :source
158
+ # @return [nil]
159
+ def get_api_webhooks_by_id_deliveries(id, opts = {})
160
+ get_api_webhooks_by_id_deliveries_with_http_info(id, opts)
161
+ nil
162
+ end
163
+
164
+ # List deliveries of a webhook endpoint
165
+ # Newest first, cursor-paginated (&#x60;nextCursor&#x60;). Combines the durable SQL outbox (&#x60;reservations.confirmed&#x60;, retried with exponential backoff) with fire-and-forget dispatches (&#x60;holds.*&#x60;, &#x60;ga.*&#x60;, &#x60;objects.updated&#x60;, …), test events and replays. Entries expose event id, type, status, attempts, HTTP status and a stable error code only — never response bodies, URLs or credentials. Direct-send entries are retained for &#x60;WEBHOOK_DELIVERY_RETENTION_DAYS&#x60; (default 30).
166
+ # @param id [String] Webhook UUID (stored lowercase)
167
+ # @param [Hash] opts the optional parameters
168
+ # @option opts [Float] :limit Page size (1..100, default 20).
169
+ # @option opts [String] :cursor Opaque &#x60;nextCursor&#x60; value from the previous page.
170
+ # @option opts [String] :status &#x60;pending&#x60; also matches deliveries currently being attempted (&#x60;processing&#x60;).
171
+ # @option opts [String] :event_type
172
+ # @option opts [String] :source
173
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
174
+ def get_api_webhooks_by_id_deliveries_with_http_info(id, opts = {})
175
+ if @api_client.config.debugging
176
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.get_api_webhooks_by_id_deliveries ...'
177
+ end
178
+ # verify the required parameter 'id' is set
179
+ if @api_client.config.client_side_validation && id.nil?
180
+ fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.get_api_webhooks_by_id_deliveries"
181
+ end
182
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
183
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WebhooksApi.get_api_webhooks_by_id_deliveries, must be smaller than or equal to 100.'
184
+ end
185
+
186
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
187
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WebhooksApi.get_api_webhooks_by_id_deliveries, must be greater than or equal to 1.'
188
+ end
189
+
190
+ if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length > 512
191
+ fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling WebhooksApi.get_api_webhooks_by_id_deliveries, the character length must be smaller than or equal to 512.'
192
+ end
193
+
194
+ if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length < 1
195
+ fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling WebhooksApi.get_api_webhooks_by_id_deliveries, the character length must be great than or equal to 1.'
196
+ end
197
+
198
+ pattern = Regexp.new(/^[A-Za-z0-9_-]+$/)
199
+ if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'] !~ pattern
200
+ fail ArgumentError, "invalid value for 'opts[:\"cursor\"]' when calling WebhooksApi.get_api_webhooks_by_id_deliveries, must conform to the pattern #{pattern}."
201
+ end
202
+
203
+ allowable_values = ["delivered", "failed", "pending"]
204
+ if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
205
+ fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
206
+ end
207
+ if @api_client.config.client_side_validation && !opts[:'event_type'].nil? && opts[:'event_type'].to_s.length > 64
208
+ fail ArgumentError, 'invalid value for "opts[:"event_type"]" when calling WebhooksApi.get_api_webhooks_by_id_deliveries, the character length must be smaller than or equal to 64.'
209
+ end
210
+
211
+ if @api_client.config.client_side_validation && !opts[:'event_type'].nil? && opts[:'event_type'].to_s.length < 1
212
+ fail ArgumentError, 'invalid value for "opts[:"event_type"]" when calling WebhooksApi.get_api_webhooks_by_id_deliveries, the character length must be great than or equal to 1.'
213
+ end
214
+
215
+ pattern = Regexp.new(/^[a-z.]+$/)
216
+ if @api_client.config.client_side_validation && !opts[:'event_type'].nil? && opts[:'event_type'] !~ pattern
217
+ fail ArgumentError, "invalid value for 'opts[:\"event_type\"]' when calling WebhooksApi.get_api_webhooks_by_id_deliveries, must conform to the pattern #{pattern}."
218
+ end
219
+
220
+ allowable_values = ["outbox", "dispatch", "test", "replay"]
221
+ if @api_client.config.client_side_validation && opts[:'source'] && !allowable_values.include?(opts[:'source'])
222
+ fail ArgumentError, "invalid value for \"source\", must be one of #{allowable_values}"
223
+ end
224
+ # resource path
225
+ local_var_path = '/api/webhooks/{id}/deliveries'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
226
+
227
+ # query parameters
228
+ query_params = opts[:query_params] || {}
229
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
230
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
231
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
232
+ query_params[:'eventType'] = opts[:'event_type'] if !opts[:'event_type'].nil?
233
+ query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil?
234
+
235
+ # header parameters
236
+ header_params = opts[:header_params] || {}
237
+
238
+ # form parameters
239
+ form_params = opts[:form_params] || {}
240
+
241
+ # http body (model)
242
+ post_body = opts[:debug_body]
243
+
244
+ # return_type
245
+ return_type = opts[:debug_return_type]
246
+
247
+ # auth_names
248
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
249
+
250
+ new_options = opts.merge(
251
+ :operation => :"WebhooksApi.get_api_webhooks_by_id_deliveries",
252
+ :header_params => header_params,
253
+ :query_params => query_params,
254
+ :form_params => form_params,
255
+ :body => post_body,
256
+ :auth_names => auth_names,
257
+ :return_type => return_type
258
+ )
259
+
260
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
261
+ if @api_client.config.debugging
262
+ @api_client.config.logger.debug "API called: WebhooksApi#get_api_webhooks_by_id_deliveries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
263
+ end
264
+ return data, status_code, headers
265
+ end
266
+
267
+ # Get one webhook delivery with its request payload
268
+ # Same fields as the list plus `payload`: the JSON request body that was sent (identical bytes are re-sent by replay). Remote response bodies are never stored.
269
+ # @param id [String] Webhook UUID (stored lowercase)
270
+ # @param delivery_id [String]
271
+ # @param [Hash] opts the optional parameters
272
+ # @return [nil]
273
+ def get_api_webhooks_by_id_deliveries_by_delivery_id(id, delivery_id, opts = {})
274
+ get_api_webhooks_by_id_deliveries_by_delivery_id_with_http_info(id, delivery_id, opts)
275
+ nil
276
+ end
277
+
278
+ # Get one webhook delivery with its request payload
279
+ # Same fields as the list plus &#x60;payload&#x60;: the JSON request body that was sent (identical bytes are re-sent by replay). Remote response bodies are never stored.
280
+ # @param id [String] Webhook UUID (stored lowercase)
281
+ # @param delivery_id [String]
282
+ # @param [Hash] opts the optional parameters
283
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
284
+ def get_api_webhooks_by_id_deliveries_by_delivery_id_with_http_info(id, delivery_id, opts = {})
285
+ if @api_client.config.debugging
286
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.get_api_webhooks_by_id_deliveries_by_delivery_id ...'
287
+ end
288
+ # verify the required parameter 'id' is set
289
+ if @api_client.config.client_side_validation && id.nil?
290
+ fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.get_api_webhooks_by_id_deliveries_by_delivery_id"
291
+ end
292
+ # verify the required parameter 'delivery_id' is set
293
+ if @api_client.config.client_side_validation && delivery_id.nil?
294
+ fail ArgumentError, "Missing the required parameter 'delivery_id' when calling WebhooksApi.get_api_webhooks_by_id_deliveries_by_delivery_id"
295
+ end
296
+ # resource path
297
+ local_var_path = '/api/webhooks/{id}/deliveries/{deliveryId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'deliveryId' + '}', CGI.escape(delivery_id.to_s))
298
+
299
+ # query parameters
300
+ query_params = opts[:query_params] || {}
301
+
302
+ # header parameters
303
+ header_params = opts[:header_params] || {}
304
+
305
+ # form parameters
306
+ form_params = opts[:form_params] || {}
307
+
308
+ # http body (model)
309
+ post_body = opts[:debug_body]
310
+
311
+ # return_type
312
+ return_type = opts[:debug_return_type]
313
+
314
+ # auth_names
315
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
316
+
317
+ new_options = opts.merge(
318
+ :operation => :"WebhooksApi.get_api_webhooks_by_id_deliveries_by_delivery_id",
319
+ :header_params => header_params,
320
+ :query_params => query_params,
321
+ :form_params => form_params,
322
+ :body => post_body,
323
+ :auth_names => auth_names,
324
+ :return_type => return_type
325
+ )
326
+
327
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
328
+ if @api_client.config.debugging
329
+ @api_client.config.logger.debug "API called: WebhooksApi#get_api_webhooks_by_id_deliveries_by_delivery_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
330
+ end
331
+ return data, status_code, headers
332
+ end
333
+
334
+ # List subscribable webhook event types
335
+ # Event types an endpoint can subscribe to through `eventTypes`. `webhook.test` is sent only by `POST /api/webhooks/{id}/test` and cannot be subscribed to.
336
+ # @param [Hash] opts the optional parameters
337
+ # @return [nil]
338
+ def get_api_webhooks_event_types(opts = {})
339
+ get_api_webhooks_event_types_with_http_info(opts)
340
+ nil
341
+ end
342
+
343
+ # List subscribable webhook event types
344
+ # Event types an endpoint can subscribe to through &#x60;eventTypes&#x60;. &#x60;webhook.test&#x60; is sent only by &#x60;POST /api/webhooks/{id}/test&#x60; and cannot be subscribed to.
345
+ # @param [Hash] opts the optional parameters
346
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
347
+ def get_api_webhooks_event_types_with_http_info(opts = {})
348
+ if @api_client.config.debugging
349
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.get_api_webhooks_event_types ...'
350
+ end
351
+ # resource path
352
+ local_var_path = '/api/webhooks/event-types'
353
+
354
+ # query parameters
355
+ query_params = opts[:query_params] || {}
356
+
357
+ # header parameters
358
+ header_params = opts[:header_params] || {}
359
+
360
+ # form parameters
361
+ form_params = opts[:form_params] || {}
362
+
363
+ # http body (model)
364
+ post_body = opts[:debug_body]
365
+
366
+ # return_type
367
+ return_type = opts[:debug_return_type]
368
+
369
+ # auth_names
370
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
371
+
372
+ new_options = opts.merge(
373
+ :operation => :"WebhooksApi.get_api_webhooks_event_types",
374
+ :header_params => header_params,
375
+ :query_params => query_params,
376
+ :form_params => form_params,
377
+ :body => post_body,
378
+ :auth_names => auth_names,
379
+ :return_type => return_type
380
+ )
381
+
382
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
383
+ if @api_client.config.debugging
384
+ @api_client.config.logger.debug "API called: WebhooksApi#get_api_webhooks_event_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
385
+ end
386
+ return data, status_code, headers
387
+ end
388
+
389
+ # Update a webhook
390
+ # Partial update of `url`, `isActive` and/or `eventTypes` (`[\"*\"]` = every type). Subscription changes apply to events emitted afterwards; queued outbox retries keep their original destinations. Only webhooks owned by the authenticated tenant can be modified.
391
+ # @param id [String] Webhook UUID (stored lowercase)
392
+ # @param patch_api_webhooks_by_id_request [PatchApiWebhooksByIdRequest]
393
+ # @param [Hash] opts the optional parameters
394
+ # @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
395
+ # @return [nil]
396
+ def patch_api_webhooks_by_id(id, patch_api_webhooks_by_id_request, opts = {})
397
+ patch_api_webhooks_by_id_with_http_info(id, patch_api_webhooks_by_id_request, opts)
398
+ nil
399
+ end
400
+
401
+ # Update a webhook
402
+ # Partial update of &#x60;url&#x60;, &#x60;isActive&#x60; and/or &#x60;eventTypes&#x60; (&#x60;[\&quot;*\&quot;]&#x60; &#x3D; every type). Subscription changes apply to events emitted afterwards; queued outbox retries keep their original destinations. Only webhooks owned by the authenticated tenant can be modified.
403
+ # @param id [String] Webhook UUID (stored lowercase)
404
+ # @param patch_api_webhooks_by_id_request [PatchApiWebhooksByIdRequest]
405
+ # @param [Hash] opts the optional parameters
406
+ # @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
407
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
408
+ def patch_api_webhooks_by_id_with_http_info(id, patch_api_webhooks_by_id_request, opts = {})
409
+ if @api_client.config.debugging
410
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.patch_api_webhooks_by_id ...'
411
+ end
412
+ # verify the required parameter 'id' is set
413
+ if @api_client.config.client_side_validation && id.nil?
414
+ fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.patch_api_webhooks_by_id"
415
+ end
416
+ # verify the required parameter 'patch_api_webhooks_by_id_request' is set
417
+ if @api_client.config.client_side_validation && patch_api_webhooks_by_id_request.nil?
418
+ fail ArgumentError, "Missing the required parameter 'patch_api_webhooks_by_id_request' when calling WebhooksApi.patch_api_webhooks_by_id"
419
+ end
420
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
421
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WebhooksApi.patch_api_webhooks_by_id, the character length must be smaller than or equal to 255.'
422
+ end
423
+
424
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
425
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WebhooksApi.patch_api_webhooks_by_id, the character length must be great than or equal to 1.'
426
+ end
427
+
428
+ # resource path
429
+ local_var_path = '/api/webhooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
430
+
431
+ # query parameters
432
+ query_params = opts[:query_params] || {}
433
+
434
+ # header parameters
435
+ header_params = opts[:header_params] || {}
436
+ # HTTP header 'Content-Type'
437
+ content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
438
+ if !content_type.nil?
439
+ header_params['Content-Type'] = content_type
440
+ end
441
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
442
+
443
+ # form parameters
444
+ form_params = opts[:form_params] || {}
445
+
446
+ # http body (model)
447
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_api_webhooks_by_id_request)
448
+
449
+ # return_type
450
+ return_type = opts[:debug_return_type]
451
+
452
+ # auth_names
453
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
454
+
455
+ new_options = opts.merge(
456
+ :operation => :"WebhooksApi.patch_api_webhooks_by_id",
457
+ :header_params => header_params,
458
+ :query_params => query_params,
459
+ :form_params => form_params,
460
+ :body => post_body,
461
+ :auth_names => auth_names,
462
+ :return_type => return_type
463
+ )
464
+
465
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
466
+ if @api_client.config.debugging
467
+ @api_client.config.logger.debug "API called: WebhooksApi#patch_api_webhooks_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
468
+ end
469
+ return data, status_code, headers
470
+ end
471
+
472
+ # Create a webhook endpoint
473
+ # Registers an HTTPS callback URL (except `http://localhost` / `127.0.0.1` only for local development). Duplicate URLs per tenant are rejected with `409 Conflict`. `eventTypes` defaults to `[\"*\"]` (every type); unknown types are rejected with `400`. The response includes `signingSecret` exactly once: deliveries to this endpoint carry `x-seatschart-signature: sha256=<hex HMAC-SHA256 of the raw body>` keyed with it, plus `x-seatschart-timestamp` and `x-seatschart-signature-v2: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.rawBody\">` (recommended: verify v1 in constant time and reject timestamps more than 5 minutes old), `X-SeatsChart-Event` and `X-SeatsChart-Event-Id`. In production the host is DNS-resolved at registration and refused when any record is loopback, private, link-local, CGNAT or metadata; every send re-resolves and pins a public address and never follows redirects.
474
+ # @param post_api_webhooks_request [PostApiWebhooksRequest]
475
+ # @param [Hash] opts the optional parameters
476
+ # @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
477
+ # @return [nil]
478
+ def post_api_webhooks(post_api_webhooks_request, opts = {})
479
+ post_api_webhooks_with_http_info(post_api_webhooks_request, opts)
480
+ nil
481
+ end
482
+
483
+ # Create a webhook endpoint
484
+ # Registers an HTTPS callback URL (except &#x60;http://localhost&#x60; / &#x60;127.0.0.1&#x60; only for local development). Duplicate URLs per tenant are rejected with &#x60;409 Conflict&#x60;. &#x60;eventTypes&#x60; defaults to &#x60;[\&quot;*\&quot;]&#x60; (every type); unknown types are rejected with &#x60;400&#x60;. The response includes &#x60;signingSecret&#x60; exactly once: deliveries to this endpoint carry &#x60;x-seatschart-signature: sha256&#x3D;&lt;hex HMAC-SHA256 of the raw body&gt;&#x60; keyed with it, plus &#x60;x-seatschart-timestamp&#x60; and &#x60;x-seatschart-signature-v2: t&#x3D;&lt;unix seconds&gt;,v1&#x3D;&lt;hex HMAC-SHA256 of \&quot;t.rawBody\&quot;&gt;&#x60; (recommended: verify v1 in constant time and reject timestamps more than 5 minutes old), &#x60;X-SeatsChart-Event&#x60; and &#x60;X-SeatsChart-Event-Id&#x60;. In production the host is DNS-resolved at registration and refused when any record is loopback, private, link-local, CGNAT or metadata; every send re-resolves and pins a public address and never follows redirects.
485
+ # @param post_api_webhooks_request [PostApiWebhooksRequest]
486
+ # @param [Hash] opts the optional parameters
487
+ # @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
488
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
489
+ def post_api_webhooks_with_http_info(post_api_webhooks_request, opts = {})
490
+ if @api_client.config.debugging
491
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.post_api_webhooks ...'
492
+ end
493
+ # verify the required parameter 'post_api_webhooks_request' is set
494
+ if @api_client.config.client_side_validation && post_api_webhooks_request.nil?
495
+ fail ArgumentError, "Missing the required parameter 'post_api_webhooks_request' when calling WebhooksApi.post_api_webhooks"
496
+ end
497
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
498
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WebhooksApi.post_api_webhooks, the character length must be smaller than or equal to 255.'
499
+ end
500
+
501
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
502
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WebhooksApi.post_api_webhooks, the character length must be great than or equal to 1.'
503
+ end
504
+
505
+ # resource path
506
+ local_var_path = '/api/webhooks'
507
+
508
+ # query parameters
509
+ query_params = opts[:query_params] || {}
510
+
511
+ # header parameters
512
+ header_params = opts[:header_params] || {}
513
+ # HTTP header 'Content-Type'
514
+ content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
515
+ if !content_type.nil?
516
+ header_params['Content-Type'] = content_type
517
+ end
518
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
519
+
520
+ # form parameters
521
+ form_params = opts[:form_params] || {}
522
+
523
+ # http body (model)
524
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_webhooks_request)
525
+
526
+ # return_type
527
+ return_type = opts[:debug_return_type]
528
+
529
+ # auth_names
530
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
531
+
532
+ new_options = opts.merge(
533
+ :operation => :"WebhooksApi.post_api_webhooks",
534
+ :header_params => header_params,
535
+ :query_params => query_params,
536
+ :form_params => form_params,
537
+ :body => post_body,
538
+ :auth_names => auth_names,
539
+ :return_type => return_type
540
+ )
541
+
542
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
543
+ if @api_client.config.debugging
544
+ @api_client.config.logger.debug "API called: WebhooksApi#post_api_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
545
+ end
546
+ return data, status_code, headers
547
+ end
548
+
549
+ # Replay a webhook delivery
550
+ # Re-sends the identical request body and `X-SeatsChart-Event-Id` of the original delivery, signed with the endpoint’s CURRENT secret (`x-seatschart-signature`), so receivers can deduplicate by event id. One synchronous attempt; the result is recorded as a new `replay` delivery and returned with `200` whether the remote accepted it or not (inspect `delivery.status`). Works for paused endpoints. Rate limited per workspace (`WEBHOOK_MANUAL_SEND_MAX` per `WEBHOOK_MANUAL_SEND_WINDOW_SEC`, default 30/60 s): `429` with `Retry-After`.
551
+ # @param id [String] Webhook UUID (stored lowercase)
552
+ # @param delivery_id [String]
553
+ # @param [Hash] opts the optional parameters
554
+ # @option opts [String] :idempotency_key Optional. Repeating a replay with the same key returns the first result instead of sending again.
555
+ # @return [nil]
556
+ def post_api_webhooks_by_id_deliveries_by_delivery_id_replay(id, delivery_id, opts = {})
557
+ post_api_webhooks_by_id_deliveries_by_delivery_id_replay_with_http_info(id, delivery_id, opts)
558
+ nil
559
+ end
560
+
561
+ # Replay a webhook delivery
562
+ # Re-sends the identical request body and &#x60;X-SeatsChart-Event-Id&#x60; of the original delivery, signed with the endpoint’s CURRENT secret (&#x60;x-seatschart-signature&#x60;), so receivers can deduplicate by event id. One synchronous attempt; the result is recorded as a new &#x60;replay&#x60; delivery and returned with &#x60;200&#x60; whether the remote accepted it or not (inspect &#x60;delivery.status&#x60;). Works for paused endpoints. Rate limited per workspace (&#x60;WEBHOOK_MANUAL_SEND_MAX&#x60; per &#x60;WEBHOOK_MANUAL_SEND_WINDOW_SEC&#x60;, default 30/60 s): &#x60;429&#x60; with &#x60;Retry-After&#x60;.
563
+ # @param id [String] Webhook UUID (stored lowercase)
564
+ # @param delivery_id [String]
565
+ # @param [Hash] opts the optional parameters
566
+ # @option opts [String] :idempotency_key Optional. Repeating a replay with the same key returns the first result instead of sending again.
567
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
568
+ def post_api_webhooks_by_id_deliveries_by_delivery_id_replay_with_http_info(id, delivery_id, opts = {})
569
+ if @api_client.config.debugging
570
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.post_api_webhooks_by_id_deliveries_by_delivery_id_replay ...'
571
+ end
572
+ # verify the required parameter 'id' is set
573
+ if @api_client.config.client_side_validation && id.nil?
574
+ fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.post_api_webhooks_by_id_deliveries_by_delivery_id_replay"
575
+ end
576
+ # verify the required parameter 'delivery_id' is set
577
+ if @api_client.config.client_side_validation && delivery_id.nil?
578
+ fail ArgumentError, "Missing the required parameter 'delivery_id' when calling WebhooksApi.post_api_webhooks_by_id_deliveries_by_delivery_id_replay"
579
+ end
580
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
581
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WebhooksApi.post_api_webhooks_by_id_deliveries_by_delivery_id_replay, the character length must be smaller than or equal to 255.'
582
+ end
583
+
584
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
585
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WebhooksApi.post_api_webhooks_by_id_deliveries_by_delivery_id_replay, the character length must be great than or equal to 1.'
586
+ end
587
+
588
+ # resource path
589
+ local_var_path = '/api/webhooks/{id}/deliveries/{deliveryId}/replay'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'deliveryId' + '}', CGI.escape(delivery_id.to_s))
590
+
591
+ # query parameters
592
+ query_params = opts[:query_params] || {}
593
+
594
+ # header parameters
595
+ header_params = opts[:header_params] || {}
596
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
597
+
598
+ # form parameters
599
+ form_params = opts[:form_params] || {}
600
+
601
+ # http body (model)
602
+ post_body = opts[:debug_body]
603
+
604
+ # return_type
605
+ return_type = opts[:debug_return_type]
606
+
607
+ # auth_names
608
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
609
+
610
+ new_options = opts.merge(
611
+ :operation => :"WebhooksApi.post_api_webhooks_by_id_deliveries_by_delivery_id_replay",
612
+ :header_params => header_params,
613
+ :query_params => query_params,
614
+ :form_params => form_params,
615
+ :body => post_body,
616
+ :auth_names => auth_names,
617
+ :return_type => return_type
618
+ )
619
+
620
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
621
+ if @api_client.config.debugging
622
+ @api_client.config.logger.debug "API called: WebhooksApi#post_api_webhooks_by_id_deliveries_by_delivery_id_replay\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
623
+ end
624
+ return data, status_code, headers
625
+ end
626
+
627
+ # Rotate a webhook signing secret
628
+ # Replaces the endpoint HMAC key and returns the new `signingSecret` once. The old key stops working immediately, including for queued retries. Endpoints created before per-endpoint secrets are signed with the deployment `WEBHOOK_SIGNING_SECRET` until rotated.
629
+ # @param id [String] Webhook UUID (stored lowercase)
630
+ # @param [Hash] opts the optional parameters
631
+ # @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
632
+ # @return [nil]
633
+ def post_api_webhooks_by_id_rotate_secret(id, opts = {})
634
+ post_api_webhooks_by_id_rotate_secret_with_http_info(id, opts)
635
+ nil
636
+ end
637
+
638
+ # Rotate a webhook signing secret
639
+ # Replaces the endpoint HMAC key and returns the new &#x60;signingSecret&#x60; once. The old key stops working immediately, including for queued retries. Endpoints created before per-endpoint secrets are signed with the deployment &#x60;WEBHOOK_SIGNING_SECRET&#x60; until rotated.
640
+ # @param id [String] Webhook UUID (stored lowercase)
641
+ # @param [Hash] opts the optional parameters
642
+ # @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
643
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
644
+ def post_api_webhooks_by_id_rotate_secret_with_http_info(id, opts = {})
645
+ if @api_client.config.debugging
646
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.post_api_webhooks_by_id_rotate_secret ...'
647
+ end
648
+ # verify the required parameter 'id' is set
649
+ if @api_client.config.client_side_validation && id.nil?
650
+ fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.post_api_webhooks_by_id_rotate_secret"
651
+ end
652
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
653
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WebhooksApi.post_api_webhooks_by_id_rotate_secret, the character length must be smaller than or equal to 255.'
654
+ end
655
+
656
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
657
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WebhooksApi.post_api_webhooks_by_id_rotate_secret, the character length must be great than or equal to 1.'
658
+ end
659
+
660
+ # resource path
661
+ local_var_path = '/api/webhooks/{id}/rotate-secret'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
662
+
663
+ # query parameters
664
+ query_params = opts[:query_params] || {}
665
+
666
+ # header parameters
667
+ header_params = opts[:header_params] || {}
668
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
669
+
670
+ # form parameters
671
+ form_params = opts[:form_params] || {}
672
+
673
+ # http body (model)
674
+ post_body = opts[:debug_body]
675
+
676
+ # return_type
677
+ return_type = opts[:debug_return_type]
678
+
679
+ # auth_names
680
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
681
+
682
+ new_options = opts.merge(
683
+ :operation => :"WebhooksApi.post_api_webhooks_by_id_rotate_secret",
684
+ :header_params => header_params,
685
+ :query_params => query_params,
686
+ :form_params => form_params,
687
+ :body => post_body,
688
+ :auth_names => auth_names,
689
+ :return_type => return_type
690
+ )
691
+
692
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
693
+ if @api_client.config.debugging
694
+ @api_client.config.logger.debug "API called: WebhooksApi#post_api_webhooks_by_id_rotate_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
695
+ end
696
+ return data, status_code, headers
697
+ end
698
+
699
+ # Send a signed test event
700
+ # Sends `{\"eventId\",\"type\":\"webhook.test\",\"occurred_at\",\"tenant_id\",\"test\":true,\"items\":[]}` signed with the endpoint’s current secret, regardless of its event-type subscription or paused state. One synchronous attempt recorded as a `test` delivery; `200` with `delivery.status` `delivered` or `failed` (`httpStatus`, `lastErrorCode`). Shares the replay rate limit (`429` + `Retry-After`).
701
+ # @param id [String] Webhook UUID (stored lowercase)
702
+ # @param [Hash] opts the optional parameters
703
+ # @option opts [String] :idempotency_key
704
+ # @return [nil]
705
+ def post_api_webhooks_by_id_test(id, opts = {})
706
+ post_api_webhooks_by_id_test_with_http_info(id, opts)
707
+ nil
708
+ end
709
+
710
+ # Send a signed test event
711
+ # Sends &#x60;{\&quot;eventId\&quot;,\&quot;type\&quot;:\&quot;webhook.test\&quot;,\&quot;occurred_at\&quot;,\&quot;tenant_id\&quot;,\&quot;test\&quot;:true,\&quot;items\&quot;:[]}&#x60; signed with the endpoint’s current secret, regardless of its event-type subscription or paused state. One synchronous attempt recorded as a &#x60;test&#x60; delivery; &#x60;200&#x60; with &#x60;delivery.status&#x60; &#x60;delivered&#x60; or &#x60;failed&#x60; (&#x60;httpStatus&#x60;, &#x60;lastErrorCode&#x60;). Shares the replay rate limit (&#x60;429&#x60; + &#x60;Retry-After&#x60;).
712
+ # @param id [String] Webhook UUID (stored lowercase)
713
+ # @param [Hash] opts the optional parameters
714
+ # @option opts [String] :idempotency_key
715
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
716
+ def post_api_webhooks_by_id_test_with_http_info(id, opts = {})
717
+ if @api_client.config.debugging
718
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.post_api_webhooks_by_id_test ...'
719
+ end
720
+ # verify the required parameter 'id' is set
721
+ if @api_client.config.client_side_validation && id.nil?
722
+ fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.post_api_webhooks_by_id_test"
723
+ end
724
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
725
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WebhooksApi.post_api_webhooks_by_id_test, the character length must be smaller than or equal to 255.'
726
+ end
727
+
728
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
729
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WebhooksApi.post_api_webhooks_by_id_test, the character length must be great than or equal to 1.'
730
+ end
731
+
732
+ # resource path
733
+ local_var_path = '/api/webhooks/{id}/test'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
734
+
735
+ # query parameters
736
+ query_params = opts[:query_params] || {}
737
+
738
+ # header parameters
739
+ header_params = opts[:header_params] || {}
740
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
741
+
742
+ # form parameters
743
+ form_params = opts[:form_params] || {}
744
+
745
+ # http body (model)
746
+ post_body = opts[:debug_body]
747
+
748
+ # return_type
749
+ return_type = opts[:debug_return_type]
750
+
751
+ # auth_names
752
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
753
+
754
+ new_options = opts.merge(
755
+ :operation => :"WebhooksApi.post_api_webhooks_by_id_test",
756
+ :header_params => header_params,
757
+ :query_params => query_params,
758
+ :form_params => form_params,
759
+ :body => post_body,
760
+ :auth_names => auth_names,
761
+ :return_type => return_type
762
+ )
763
+
764
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
765
+ if @api_client.config.debugging
766
+ @api_client.config.logger.debug "API called: WebhooksApi#post_api_webhooks_by_id_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
767
+ end
768
+ return data, status_code, headers
769
+ end
770
+ end
771
+ end