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.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +552 -0
- data/lib/seatschart/api/api_keys_api.rb +364 -0
- data/lib/seatschart/api/assets_api.rb +95 -0
- data/lib/seatschart/api/audit_api.rb +88 -0
- data/lib/seatschart/api/auth_api.rb +1187 -0
- data/lib/seatschart/api/billing_api.rb +355 -0
- data/lib/seatschart/api/charts_api.rb +4195 -0
- data/lib/seatschart/api/default_api.rb +763 -0
- data/lib/seatschart/api/embed_api.rb +407 -0
- data/lib/seatschart/api/embed_origins_api.rb +281 -0
- data/lib/seatschart/api/event_log_api.rb +148 -0
- data/lib/seatschart/api/events_api.rb +6608 -0
- data/lib/seatschart/api/health_api.rb +77 -0
- data/lib/seatschart/api/map_designer_api.rb +135 -0
- data/lib/seatschart/api/object_status_api.rb +805 -0
- data/lib/seatschart/api/orders_api.rb +166 -0
- data/lib/seatschart/api/public_api.rb +455 -0
- data/lib/seatschart/api/quotes_api.rb +103 -0
- data/lib/seatschart/api/seasons_api.rb +5543 -0
- data/lib/seatschart/api/seats_api.rb +1103 -0
- data/lib/seatschart/api/sse_api.rb +83 -0
- data/lib/seatschart/api/team_api.rb +428 -0
- data/lib/seatschart/api/usage_api.rb +540 -0
- data/lib/seatschart/api/webhooks_api.rb +771 -0
- data/lib/seatschart/api/workspace_api.rb +1244 -0
- data/lib/seatschart/api_client.rb +394 -0
- data/lib/seatschart/api_error.rb +58 -0
- data/lib/seatschart/configuration.rb +316 -0
- data/lib/seatschart/models/delete_api_workspaces_by_workspace_id200_response.rb +283 -0
- data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response.rb +247 -0
- data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response_items_inner.rb +473 -0
- data/lib/seatschart/models/get_api_charts_by_chart_id_versions200_response_items_inner_published_by.rb +280 -0
- data/lib/seatschart/models/get_api_events_by_event_id_map_versions200_response.rb +247 -0
- data/lib/seatschart/models/get_api_events_by_event_id_map_versions200_response_items_inner.rb +444 -0
- data/lib/seatschart/models/get_api_events_by_event_id_seat_views200_response.rb +267 -0
- data/lib/seatschart/models/get_api_events_by_event_id_seat_views200_response_views_value.rb +273 -0
- data/lib/seatschart/models/get_api_events_by_event_id_seat_views404_response.rb +237 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +388 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response_lanes.rb +237 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response_lanes_sales.rb +256 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +286 -0
- data/lib/seatschart/models/get_api_workspace_integration200_response.rb +287 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response.rb +329 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response_bounds.rb +237 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response_bounds_hold_period_minutes.rb +237 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response_effective.rb +269 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response_overrides.rb +241 -0
- data/lib/seatschart/models/get_api_workspace_settings200_response_sources.rb +339 -0
- data/lib/seatschart/models/get_api_workspaces200_response.rb +223 -0
- data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +423 -0
- data/lib/seatschart/models/patch_api_charts_by_chart_id_categories_by_category_id_request.rb +304 -0
- data/lib/seatschart/models/patch_api_charts_by_chart_id_request.rb +288 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_inventory_channels_by_channel_key_id_request.rb +272 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +448 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_request_categories_inner.rb +343 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_request_table_booking_config.rb +266 -0
- data/lib/seatschart/models/patch_api_keys_by_id_request.rb +292 -0
- data/lib/seatschart/models/patch_api_seasons_by_season_id_events_by_event_id_request.rb +221 -0
- data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +276 -0
- data/lib/seatschart/models/patch_api_team_members_by_user_id_request.rb +255 -0
- data/lib/seatschart/models/patch_api_webhooks_by_id_request.rb +291 -0
- data/lib/seatschart/models/patch_api_workspace_chart_validation_request.rb +224 -0
- data/lib/seatschart/models/patch_api_workspace_chart_validation_request_severities.rb +543 -0
- data/lib/seatschart/models/patch_api_workspace_integration_request.rb +257 -0
- data/lib/seatschart/models/patch_api_workspace_request.rb +249 -0
- data/lib/seatschart/models/patch_api_workspace_settings_request.rb +307 -0
- data/lib/seatschart/models/post_api_auth2fa_disable_request.rb +281 -0
- data/lib/seatschart/models/post_api_auth2fa_enable_request.rb +250 -0
- data/lib/seatschart/models/post_api_auth2fa_enroll_confirm_request.rb +295 -0
- data/lib/seatschart/models/post_api_auth2fa_enroll_start_request.rb +250 -0
- data/lib/seatschart/models/post_api_auth2fa_verify_request.rb +326 -0
- data/lib/seatschart/models/post_api_auth_accept_invite_request.rb +293 -0
- data/lib/seatschart/models/post_api_auth_login_request.rb +293 -0
- data/lib/seatschart/models/post_api_auth_logout_request.rb +242 -0
- data/lib/seatschart/models/post_api_auth_refresh_request.rb +292 -0
- data/lib/seatschart/models/post_api_auth_signup_request.rb +321 -0
- data/lib/seatschart/models/post_api_auth_switch_workspace_request.rb +249 -0
- data/lib/seatschart/models/post_api_billing_checkout_session_request.rb +249 -0
- data/lib/seatschart/models/post_api_billing_confirm_checkout_request.rb +249 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_archive200_response.rb +221 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_archive200_response_chart.rb +249 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_copy_to_workspace_request.rb +287 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request.rb +348 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner.rb +555 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner_accessibility.rb +356 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_categories_request.rb +361 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_categories_request_ticket_types_inner.rb +448 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_duplicate_request.rb +233 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response.rb +289 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response_issues_inner.rb +402 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish_request.rb +244 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_preview_link_request.rb +243 -0
- data/lib/seatschart/models/post_api_charts_by_chart_id_versions_by_version_actions_copy_request.rb +242 -0
- data/lib/seatschart/models/post_api_charts_request.rb +372 -0
- data/lib/seatschart/models/post_api_charts_request_categories_inner.rb +346 -0
- data/lib/seatschart/models/post_api_embed_origins_request.rb +249 -0
- data/lib/seatschart/models/post_api_embed_tokens_request.rb +394 -0
- data/lib/seatschart/models/post_api_events_actions_change_object_status_request.rb +251 -0
- data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner.rb +737 -0
- data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner_objects_inner.rb +104 -0
- data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner_objects_inner_any_of.rb +335 -0
- data/lib/seatschart/models/post_api_events_bulk_request.rb +332 -0
- data/lib/seatschart/models/post_api_events_bulk_request_events_inner.rb +398 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request.rb +824 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_override_season_status_request.rb +272 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_update_extra_data_request.rb +260 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_update_extra_data_request_objects_inner.rb +263 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_use_season_status_request.rb +252 -0
- data/lib/seatschart/models/post_api_events_by_event_id_duplicate_request.rb +261 -0
- data/lib/seatschart/models/post_api_events_by_event_id_inventory_channels_assign_request.rb +321 -0
- data/lib/seatschart/models/post_api_events_by_event_id_inventory_channels_request.rb +323 -0
- data/lib/seatschart/models/post_api_events_by_event_id_inventory_for_sale_apply_request.rb +333 -0
- data/lib/seatschart/models/post_api_events_by_event_id_objects_actions_retrieve_request.rb +252 -0
- data/lib/seatschart/models/post_api_events_request.rb +502 -0
- data/lib/seatschart/models/post_api_events_request_category_overrides_value.rb +276 -0
- data/lib/seatschart/models/post_api_events_request_channels_inner.rb +360 -0
- data/lib/seatschart/models/post_api_events_request_for_sale_config.rb +295 -0
- data/lib/seatschart/models/post_api_events_request_table_booking_config.rb +267 -0
- data/lib/seatschart/models/post_api_extract_seats_request.rb +279 -0
- data/lib/seatschart/models/post_api_ga_confirm409_response.rb +271 -0
- data/lib/seatschart/models/post_api_ga_confirm_request.rb +687 -0
- data/lib/seatschart/models/post_api_ga_release_request.rb +385 -0
- data/lib/seatschart/models/post_api_ga_reserve_request.rb +527 -0
- data/lib/seatschart/models/post_api_hold_tokens_by_token_request.rb +249 -0
- data/lib/seatschart/models/post_api_hold_tokens_request.rb +391 -0
- data/lib/seatschart/models/post_api_keys_request.rb +299 -0
- data/lib/seatschart/models/post_api_orders_by_order_id_cancel_request.rb +249 -0
- data/lib/seatschart/models/post_api_quotes_request.rb +351 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_actions_add_events_request.rb +261 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_actions_create_events_request.rb +322 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_actions_create_events_request_events_inner.rb +289 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_actions_remove_events_request.rb +251 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_events_request.rb +267 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_inventory_sync_request.rb +235 -0
- data/lib/seatschart/models/post_api_seasons_by_season_id_partial_seasons_request.rb +279 -0
- data/lib/seatschart/models/post_api_seasons_request.rb +395 -0
- data/lib/seatschart/models/post_api_seats_best_available_request.rb +809 -0
- data/lib/seatschart/models/post_api_seats_confirm409_response.rb +271 -0
- data/lib/seatschart/models/post_api_seats_confirm_request.rb +711 -0
- data/lib/seatschart/models/post_api_seats_holds_renew_request.rb +249 -0
- data/lib/seatschart/models/post_api_seats_release_request.rb +387 -0
- data/lib/seatschart/models/post_api_seats_reserve_request.rb +561 -0
- data/lib/seatschart/models/post_api_team_invitations_request.rb +299 -0
- data/lib/seatschart/models/post_api_ticket_buyers_request.rb +252 -0
- data/lib/seatschart/models/post_api_viewer_tokens_request.rb +292 -0
- data/lib/seatschart/models/post_api_webhooks_request.rb +298 -0
- data/lib/seatschart/models/post_api_workspaces_request.rb +269 -0
- data/lib/seatschart/models/put_api_charts_by_chart_id_tags_request.rb +243 -0
- data/lib/seatschart/models/put_api_charts_by_chart_id_versions_by_version_thumbnail_request.rb +261 -0
- data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_definitions_request.rb +242 -0
- data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_definitions_request_channels_inner.rb +405 -0
- data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_request.rb +242 -0
- data/lib/seatschart/models/put_api_events_by_event_id_inventory_channels_request_assignments_inner.rb +320 -0
- data/lib/seatschart/models/put_api_events_by_event_id_inventory_for_sale_request.rb +333 -0
- data/lib/seatschart/models/put_api_events_by_event_id_pricing_request.rb +297 -0
- data/lib/seatschart/models/put_api_events_by_event_id_pricing_request_categories_inner.rb +295 -0
- data/lib/seatschart/models/put_api_events_by_event_id_pricing_request_categories_inner_ticket_types_inner.rb +425 -0
- data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request.rb +320 -0
- data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_buyer_limit.rb +259 -0
- data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_lot_plans_inner.rb +374 -0
- data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_lot_plans_inner_lots_inner.rb +364 -0
- data/lib/seatschart/models/put_api_events_by_event_id_sales_rules_request_quotas_inner.rb +418 -0
- data/lib/seatschart/retry.rb +118 -0
- data/lib/seatschart/version.rb +15 -0
- data/lib/seatschart.rb +198 -0
- metadata +254 -0
|
@@ -0,0 +1,1103 @@
|
|
|
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 SeatsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# List sales channels
|
|
23
|
+
# Returns channel ids with per-order seat limits (web, box_office, partner). Pass `channel` on best-available, reserve, and confirm.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [nil]
|
|
26
|
+
def get_api_channels(opts = {})
|
|
27
|
+
get_api_channels_with_http_info(opts)
|
|
28
|
+
nil
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# List sales channels
|
|
32
|
+
# Returns channel ids with per-order seat limits (web, box_office, partner). Pass `channel` on best-available, reserve, and confirm.
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
35
|
+
def get_api_channels_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: SeatsApi.get_api_channels ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/api/channels'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = opts[:query_params] || {}
|
|
44
|
+
|
|
45
|
+
# header parameters
|
|
46
|
+
header_params = opts[:header_params] || {}
|
|
47
|
+
|
|
48
|
+
# form parameters
|
|
49
|
+
form_params = opts[:form_params] || {}
|
|
50
|
+
|
|
51
|
+
# http body (model)
|
|
52
|
+
post_body = opts[:debug_body]
|
|
53
|
+
|
|
54
|
+
# return_type
|
|
55
|
+
return_type = opts[:debug_return_type]
|
|
56
|
+
|
|
57
|
+
# auth_names
|
|
58
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
59
|
+
|
|
60
|
+
new_options = opts.merge(
|
|
61
|
+
:operation => :"SeatsApi.get_api_channels",
|
|
62
|
+
:header_params => header_params,
|
|
63
|
+
:query_params => query_params,
|
|
64
|
+
:form_params => form_params,
|
|
65
|
+
:body => post_body,
|
|
66
|
+
:auth_names => auth_names,
|
|
67
|
+
:return_type => return_type
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: SeatsApi#get_api_channels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Validate a hold-token session
|
|
78
|
+
# Returns seatIds and expiry for a live hold token. Does not mutate Redis locks or the hold:token JSON. 410 when expired, 404 when the token is not in this tenant.
|
|
79
|
+
# @param token [String]
|
|
80
|
+
# @param [Hash] opts the optional parameters
|
|
81
|
+
# @return [nil]
|
|
82
|
+
def get_api_hold_tokens_by_token(token, opts = {})
|
|
83
|
+
get_api_hold_tokens_by_token_with_http_info(token, opts)
|
|
84
|
+
nil
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Validate a hold-token session
|
|
88
|
+
# Returns seatIds and expiry for a live hold token. Does not mutate Redis locks or the hold:token JSON. 410 when expired, 404 when the token is not in this tenant.
|
|
89
|
+
# @param token [String]
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
92
|
+
def get_api_hold_tokens_by_token_with_http_info(token, opts = {})
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug 'Calling API: SeatsApi.get_api_hold_tokens_by_token ...'
|
|
95
|
+
end
|
|
96
|
+
# verify the required parameter 'token' is set
|
|
97
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
98
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling SeatsApi.get_api_hold_tokens_by_token"
|
|
99
|
+
end
|
|
100
|
+
if @api_client.config.client_side_validation && token.to_s.length > 36
|
|
101
|
+
fail ArgumentError, 'invalid value for "token" when calling SeatsApi.get_api_hold_tokens_by_token, the character length must be smaller than or equal to 36.'
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if @api_client.config.client_side_validation && token.to_s.length < 36
|
|
105
|
+
fail ArgumentError, 'invalid value for "token" when calling SeatsApi.get_api_hold_tokens_by_token, the character length must be great than or equal to 36.'
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# resource path
|
|
109
|
+
local_var_path = '/api/hold-tokens/{token}'.sub('{' + 'token' + '}', CGI.escape(token.to_s))
|
|
110
|
+
|
|
111
|
+
# query parameters
|
|
112
|
+
query_params = opts[:query_params] || {}
|
|
113
|
+
|
|
114
|
+
# header parameters
|
|
115
|
+
header_params = opts[:header_params] || {}
|
|
116
|
+
|
|
117
|
+
# form parameters
|
|
118
|
+
form_params = opts[:form_params] || {}
|
|
119
|
+
|
|
120
|
+
# http body (model)
|
|
121
|
+
post_body = opts[:debug_body]
|
|
122
|
+
|
|
123
|
+
# return_type
|
|
124
|
+
return_type = opts[:debug_return_type]
|
|
125
|
+
|
|
126
|
+
# auth_names
|
|
127
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
128
|
+
|
|
129
|
+
new_options = opts.merge(
|
|
130
|
+
:operation => :"SeatsApi.get_api_hold_tokens_by_token",
|
|
131
|
+
:header_params => header_params,
|
|
132
|
+
:query_params => query_params,
|
|
133
|
+
:form_params => form_params,
|
|
134
|
+
:body => post_body,
|
|
135
|
+
:auth_names => auth_names,
|
|
136
|
+
:return_type => return_type
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
140
|
+
if @api_client.config.debugging
|
|
141
|
+
@api_client.config.logger.debug "API called: SeatsApi#get_api_hold_tokens_by_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
142
|
+
end
|
|
143
|
+
return data, status_code, headers
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Event-group availability intersection by label
|
|
147
|
+
# A label is selectable only when it is free on every non-past member (cap 50). Does not join seasons. See docs/SEATSIO_PARITY.md.
|
|
148
|
+
# @param event_ids [String]
|
|
149
|
+
# @param [Hash] opts the optional parameters
|
|
150
|
+
# @return [nil]
|
|
151
|
+
def get_api_seats_group(event_ids, opts = {})
|
|
152
|
+
get_api_seats_group_with_http_info(event_ids, opts)
|
|
153
|
+
nil
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Event-group availability intersection by label
|
|
157
|
+
# A label is selectable only when it is free on every non-past member (cap 50). Does not join seasons. See docs/SEATSIO_PARITY.md.
|
|
158
|
+
# @param event_ids [String]
|
|
159
|
+
# @param [Hash] opts the optional parameters
|
|
160
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
161
|
+
def get_api_seats_group_with_http_info(event_ids, opts = {})
|
|
162
|
+
if @api_client.config.debugging
|
|
163
|
+
@api_client.config.logger.debug 'Calling API: SeatsApi.get_api_seats_group ...'
|
|
164
|
+
end
|
|
165
|
+
# verify the required parameter 'event_ids' is set
|
|
166
|
+
if @api_client.config.client_side_validation && event_ids.nil?
|
|
167
|
+
fail ArgumentError, "Missing the required parameter 'event_ids' when calling SeatsApi.get_api_seats_group"
|
|
168
|
+
end
|
|
169
|
+
if @api_client.config.client_side_validation && event_ids.to_s.length < 36
|
|
170
|
+
fail ArgumentError, 'invalid value for "event_ids" when calling SeatsApi.get_api_seats_group, the character length must be great than or equal to 36.'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# resource path
|
|
174
|
+
local_var_path = '/api/seats/group'
|
|
175
|
+
|
|
176
|
+
# query parameters
|
|
177
|
+
query_params = opts[:query_params] || {}
|
|
178
|
+
query_params[:'eventIds'] = event_ids
|
|
179
|
+
|
|
180
|
+
# header parameters
|
|
181
|
+
header_params = opts[:header_params] || {}
|
|
182
|
+
|
|
183
|
+
# form parameters
|
|
184
|
+
form_params = opts[:form_params] || {}
|
|
185
|
+
|
|
186
|
+
# http body (model)
|
|
187
|
+
post_body = opts[:debug_body]
|
|
188
|
+
|
|
189
|
+
# return_type
|
|
190
|
+
return_type = opts[:debug_return_type]
|
|
191
|
+
|
|
192
|
+
# auth_names
|
|
193
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
194
|
+
|
|
195
|
+
new_options = opts.merge(
|
|
196
|
+
:operation => :"SeatsApi.get_api_seats_group",
|
|
197
|
+
:header_params => header_params,
|
|
198
|
+
:query_params => query_params,
|
|
199
|
+
:form_params => form_params,
|
|
200
|
+
:body => post_body,
|
|
201
|
+
:auth_names => auth_names,
|
|
202
|
+
:return_type => return_type
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
206
|
+
if @api_client.config.debugging
|
|
207
|
+
@api_client.config.logger.debug "API called: SeatsApi#get_api_seats_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
208
|
+
end
|
|
209
|
+
return data, status_code, headers
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Confirm GA purchase (Postgres sold_count)
|
|
213
|
+
# Server-to-server only (`x-api-key`): commits GA capacity after payment. SeatsChart-catalog events require a durable quote and matching externalPaymentId/paidAmountCents/paidCurrency; partner-priced events accept the declared paidAmountCents without a quote and synced catalogs validate it (409 `price_mismatch`). The final ticketTypeId is re-checked against the event sales rules (409 `quota_exceeded`, `buyer_limit_exceeded`, `lot_sold_out`) and the quantity against the organizer's booking limits (409 `booking_limit_exceeded`; holds placed before the current limits were published stay confirmable). Previously accepted legacy receipts remain retryable. Consumer JWTs are rejected. Durably records Idempotency-Key and conditionally increments sold_count before reconciling Redis holds. **Idempotency-Key** required. Optional `ticketBuyerId` is stored on the GA receipt (inherited from the hold token when omitted). Quote failures return 409 with `error: quote_required` (no quoteId) or `error: quote_mismatch` (quote or payment attestation does not match).
|
|
214
|
+
# @param idempotency_key [String] Required. Reuse with the same request on retry; a different payload conflicts. Seat confirmation binds this key durably in PostgreSQL; hold mutations use bounded Redis receipts.
|
|
215
|
+
# @param post_api_ga_confirm_request [PostApiGaConfirmRequest]
|
|
216
|
+
# @param [Hash] opts the optional parameters
|
|
217
|
+
# @return [nil]
|
|
218
|
+
def post_api_ga_confirm(idempotency_key, post_api_ga_confirm_request, opts = {})
|
|
219
|
+
post_api_ga_confirm_with_http_info(idempotency_key, post_api_ga_confirm_request, opts)
|
|
220
|
+
nil
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Confirm GA purchase (Postgres sold_count)
|
|
224
|
+
# Server-to-server only (`x-api-key`): commits GA capacity after payment. SeatsChart-catalog events require a durable quote and matching externalPaymentId/paidAmountCents/paidCurrency; partner-priced events accept the declared paidAmountCents without a quote and synced catalogs validate it (409 `price_mismatch`). The final ticketTypeId is re-checked against the event sales rules (409 `quota_exceeded`, `buyer_limit_exceeded`, `lot_sold_out`) and the quantity against the organizer's booking limits (409 `booking_limit_exceeded`; holds placed before the current limits were published stay confirmable). Previously accepted legacy receipts remain retryable. Consumer JWTs are rejected. Durably records Idempotency-Key and conditionally increments sold_count before reconciling Redis holds. **Idempotency-Key** required. Optional `ticketBuyerId` is stored on the GA receipt (inherited from the hold token when omitted). Quote failures return 409 with `error: quote_required` (no quoteId) or `error: quote_mismatch` (quote or payment attestation does not match).
|
|
225
|
+
# @param idempotency_key [String] Required. Reuse with the same request on retry; a different payload conflicts. Seat confirmation binds this key durably in PostgreSQL; hold mutations use bounded Redis receipts.
|
|
226
|
+
# @param post_api_ga_confirm_request [PostApiGaConfirmRequest]
|
|
227
|
+
# @param [Hash] opts the optional parameters
|
|
228
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
229
|
+
def post_api_ga_confirm_with_http_info(idempotency_key, post_api_ga_confirm_request, opts = {})
|
|
230
|
+
if @api_client.config.debugging
|
|
231
|
+
@api_client.config.logger.debug 'Calling API: SeatsApi.post_api_ga_confirm ...'
|
|
232
|
+
end
|
|
233
|
+
# verify the required parameter 'idempotency_key' is set
|
|
234
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
235
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SeatsApi.post_api_ga_confirm"
|
|
236
|
+
end
|
|
237
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
238
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling SeatsApi.post_api_ga_confirm, the character length must be smaller than or equal to 255.'
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 1
|
|
242
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling SeatsApi.post_api_ga_confirm, the character length must be great than or equal to 1.'
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# verify the required parameter 'post_api_ga_confirm_request' is set
|
|
246
|
+
if @api_client.config.client_side_validation && post_api_ga_confirm_request.nil?
|
|
247
|
+
fail ArgumentError, "Missing the required parameter 'post_api_ga_confirm_request' when calling SeatsApi.post_api_ga_confirm"
|
|
248
|
+
end
|
|
249
|
+
# resource path
|
|
250
|
+
local_var_path = '/api/ga/confirm'
|
|
251
|
+
|
|
252
|
+
# query parameters
|
|
253
|
+
query_params = opts[:query_params] || {}
|
|
254
|
+
|
|
255
|
+
# header parameters
|
|
256
|
+
header_params = opts[:header_params] || {}
|
|
257
|
+
# HTTP header 'Accept' (if needed)
|
|
258
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
259
|
+
# HTTP header 'Content-Type'
|
|
260
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
261
|
+
if !content_type.nil?
|
|
262
|
+
header_params['Content-Type'] = content_type
|
|
263
|
+
end
|
|
264
|
+
header_params[:'idempotency-key'] = idempotency_key
|
|
265
|
+
|
|
266
|
+
# form parameters
|
|
267
|
+
form_params = opts[:form_params] || {}
|
|
268
|
+
|
|
269
|
+
# http body (model)
|
|
270
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_ga_confirm_request)
|
|
271
|
+
|
|
272
|
+
# return_type
|
|
273
|
+
return_type = opts[:debug_return_type]
|
|
274
|
+
|
|
275
|
+
# auth_names
|
|
276
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
277
|
+
|
|
278
|
+
new_options = opts.merge(
|
|
279
|
+
:operation => :"SeatsApi.post_api_ga_confirm",
|
|
280
|
+
:header_params => header_params,
|
|
281
|
+
:query_params => query_params,
|
|
282
|
+
:form_params => form_params,
|
|
283
|
+
:body => post_body,
|
|
284
|
+
:auth_names => auth_names,
|
|
285
|
+
:return_type => return_type
|
|
286
|
+
)
|
|
287
|
+
|
|
288
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
289
|
+
if @api_client.config.debugging
|
|
290
|
+
@api_client.config.logger.debug "API called: SeatsApi#post_api_ga_confirm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
291
|
+
end
|
|
292
|
+
return data, status_code, headers
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# Release a GA capacity hold
|
|
296
|
+
# Clears this user's Redis GA hold for an area. Optional `holdToken` is deleted when it matches tenant/event/user. **Idempotency-Key** required. Emits SSE `ga` and webhook `ga.released`.
|
|
297
|
+
# @param idempotency_key [String] Required. Reuse with the same request on retry; a different payload conflicts. Seat confirmation binds this key durably in PostgreSQL; hold mutations use bounded Redis receipts.
|
|
298
|
+
# @param post_api_ga_release_request [PostApiGaReleaseRequest]
|
|
299
|
+
# @param [Hash] opts the optional parameters
|
|
300
|
+
# @return [nil]
|
|
301
|
+
def post_api_ga_release(idempotency_key, post_api_ga_release_request, opts = {})
|
|
302
|
+
post_api_ga_release_with_http_info(idempotency_key, post_api_ga_release_request, opts)
|
|
303
|
+
nil
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# Release a GA capacity hold
|
|
307
|
+
# Clears this user's Redis GA hold for an area. Optional `holdToken` is deleted when it matches tenant/event/user. **Idempotency-Key** required. Emits SSE `ga` and webhook `ga.released`.
|
|
308
|
+
# @param idempotency_key [String] Required. Reuse with the same request on retry; a different payload conflicts. Seat confirmation binds this key durably in PostgreSQL; hold mutations use bounded Redis receipts.
|
|
309
|
+
# @param post_api_ga_release_request [PostApiGaReleaseRequest]
|
|
310
|
+
# @param [Hash] opts the optional parameters
|
|
311
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
312
|
+
def post_api_ga_release_with_http_info(idempotency_key, post_api_ga_release_request, opts = {})
|
|
313
|
+
if @api_client.config.debugging
|
|
314
|
+
@api_client.config.logger.debug 'Calling API: SeatsApi.post_api_ga_release ...'
|
|
315
|
+
end
|
|
316
|
+
# verify the required parameter 'idempotency_key' is set
|
|
317
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
318
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SeatsApi.post_api_ga_release"
|
|
319
|
+
end
|
|
320
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
321
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling SeatsApi.post_api_ga_release, the character length must be smaller than or equal to 255.'
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 1
|
|
325
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling SeatsApi.post_api_ga_release, the character length must be great than or equal to 1.'
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# verify the required parameter 'post_api_ga_release_request' is set
|
|
329
|
+
if @api_client.config.client_side_validation && post_api_ga_release_request.nil?
|
|
330
|
+
fail ArgumentError, "Missing the required parameter 'post_api_ga_release_request' when calling SeatsApi.post_api_ga_release"
|
|
331
|
+
end
|
|
332
|
+
# resource path
|
|
333
|
+
local_var_path = '/api/ga/release'
|
|
334
|
+
|
|
335
|
+
# query parameters
|
|
336
|
+
query_params = opts[:query_params] || {}
|
|
337
|
+
|
|
338
|
+
# header parameters
|
|
339
|
+
header_params = opts[:header_params] || {}
|
|
340
|
+
# HTTP header 'Content-Type'
|
|
341
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
342
|
+
if !content_type.nil?
|
|
343
|
+
header_params['Content-Type'] = content_type
|
|
344
|
+
end
|
|
345
|
+
header_params[:'idempotency-key'] = idempotency_key
|
|
346
|
+
|
|
347
|
+
# form parameters
|
|
348
|
+
form_params = opts[:form_params] || {}
|
|
349
|
+
|
|
350
|
+
# http body (model)
|
|
351
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_ga_release_request)
|
|
352
|
+
|
|
353
|
+
# return_type
|
|
354
|
+
return_type = opts[:debug_return_type]
|
|
355
|
+
|
|
356
|
+
# auth_names
|
|
357
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
358
|
+
|
|
359
|
+
new_options = opts.merge(
|
|
360
|
+
:operation => :"SeatsApi.post_api_ga_release",
|
|
361
|
+
:header_params => header_params,
|
|
362
|
+
:query_params => query_params,
|
|
363
|
+
:form_params => form_params,
|
|
364
|
+
:body => post_body,
|
|
365
|
+
:auth_names => auth_names,
|
|
366
|
+
:return_type => return_type
|
|
367
|
+
)
|
|
368
|
+
|
|
369
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
370
|
+
if @api_client.config.debugging
|
|
371
|
+
@api_client.config.logger.debug "API called: SeatsApi#post_api_ga_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
372
|
+
end
|
|
373
|
+
return data, status_code, headers
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
# Hold GA area capacity (Redis)
|
|
377
|
+
# Places a temporary hold on unnumbered GA capacity. **Idempotency-Key** is required; repeats within ~24h return the cached hold response. Optional `ticketBuyerId` is stored on the GA hold token and inherited by `POST /ga/confirm`. The organizer's booking limits cap `quantity` (designer *Max GA tickets per order*, else *Max seats per order*; strictest with the sales-channel default): 409 `booking_limit_exceeded` (`limit`, `current`, `requested`, `kind: \"ga\"`). GA tables sold as a whole (`shape.bookAs: \"whole\"`) take every place in one hold: any other `quantity` answers 409 `ga_table_whole` (`capacity`, `requested`).
|
|
378
|
+
# @param idempotency_key [String] Required. Reuse with the same request on retry; a different payload conflicts. Seat confirmation binds this key durably in PostgreSQL; hold mutations use bounded Redis receipts.
|
|
379
|
+
# @param post_api_ga_reserve_request [PostApiGaReserveRequest]
|
|
380
|
+
# @param [Hash] opts the optional parameters
|
|
381
|
+
# @return [nil]
|
|
382
|
+
def post_api_ga_reserve(idempotency_key, post_api_ga_reserve_request, opts = {})
|
|
383
|
+
post_api_ga_reserve_with_http_info(idempotency_key, post_api_ga_reserve_request, opts)
|
|
384
|
+
nil
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
# Hold GA area capacity (Redis)
|
|
388
|
+
# Places a temporary hold on unnumbered GA capacity. **Idempotency-Key** is required; repeats within ~24h return the cached hold response. Optional `ticketBuyerId` is stored on the GA hold token and inherited by `POST /ga/confirm`. The organizer's booking limits cap `quantity` (designer *Max GA tickets per order*, else *Max seats per order*; strictest with the sales-channel default): 409 `booking_limit_exceeded` (`limit`, `current`, `requested`, `kind: \"ga\"`). GA tables sold as a whole (`shape.bookAs: \"whole\"`) take every place in one hold: any other `quantity` answers 409 `ga_table_whole` (`capacity`, `requested`).
|
|
389
|
+
# @param idempotency_key [String] Required. Reuse with the same request on retry; a different payload conflicts. Seat confirmation binds this key durably in PostgreSQL; hold mutations use bounded Redis receipts.
|
|
390
|
+
# @param post_api_ga_reserve_request [PostApiGaReserveRequest]
|
|
391
|
+
# @param [Hash] opts the optional parameters
|
|
392
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
393
|
+
def post_api_ga_reserve_with_http_info(idempotency_key, post_api_ga_reserve_request, opts = {})
|
|
394
|
+
if @api_client.config.debugging
|
|
395
|
+
@api_client.config.logger.debug 'Calling API: SeatsApi.post_api_ga_reserve ...'
|
|
396
|
+
end
|
|
397
|
+
# verify the required parameter 'idempotency_key' is set
|
|
398
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
399
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SeatsApi.post_api_ga_reserve"
|
|
400
|
+
end
|
|
401
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
402
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling SeatsApi.post_api_ga_reserve, the character length must be smaller than or equal to 255.'
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length < 1
|
|
406
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling SeatsApi.post_api_ga_reserve, the character length must be great than or equal to 1.'
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
# verify the required parameter 'post_api_ga_reserve_request' is set
|
|
410
|
+
if @api_client.config.client_side_validation && post_api_ga_reserve_request.nil?
|
|
411
|
+
fail ArgumentError, "Missing the required parameter 'post_api_ga_reserve_request' when calling SeatsApi.post_api_ga_reserve"
|
|
412
|
+
end
|
|
413
|
+
# resource path
|
|
414
|
+
local_var_path = '/api/ga/reserve'
|
|
415
|
+
|
|
416
|
+
# query parameters
|
|
417
|
+
query_params = opts[:query_params] || {}
|
|
418
|
+
|
|
419
|
+
# header parameters
|
|
420
|
+
header_params = opts[:header_params] || {}
|
|
421
|
+
# HTTP header 'Content-Type'
|
|
422
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
423
|
+
if !content_type.nil?
|
|
424
|
+
header_params['Content-Type'] = content_type
|
|
425
|
+
end
|
|
426
|
+
header_params[:'idempotency-key'] = idempotency_key
|
|
427
|
+
|
|
428
|
+
# form parameters
|
|
429
|
+
form_params = opts[:form_params] || {}
|
|
430
|
+
|
|
431
|
+
# http body (model)
|
|
432
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_ga_reserve_request)
|
|
433
|
+
|
|
434
|
+
# return_type
|
|
435
|
+
return_type = opts[:debug_return_type]
|
|
436
|
+
|
|
437
|
+
# auth_names
|
|
438
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
439
|
+
|
|
440
|
+
new_options = opts.merge(
|
|
441
|
+
:operation => :"SeatsApi.post_api_ga_reserve",
|
|
442
|
+
:header_params => header_params,
|
|
443
|
+
:query_params => query_params,
|
|
444
|
+
:form_params => form_params,
|
|
445
|
+
:body => post_body,
|
|
446
|
+
:auth_names => auth_names,
|
|
447
|
+
:return_type => return_type
|
|
448
|
+
)
|
|
449
|
+
|
|
450
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
451
|
+
if @api_client.config.debugging
|
|
452
|
+
@api_client.config.logger.debug "API called: SeatsApi#post_api_ga_reserve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
453
|
+
end
|
|
454
|
+
return data, status_code, headers
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
# Create an empty hold-token session
|
|
458
|
+
# Seats.io-style session start. Attach seats via reserve using this token later, or renew TTL with POST /hold-tokens/:token. Optional `ticketBuyerId` (opaque partner buyer id) is stored on the session and inherited by its confirmation. Optional `expiresInMinutes` (1–120, seats.io `holdTokens.create(expiresInMinutes)`) sets the session lifetime instead of the workspace hold period; buyer tokens get 403.
|
|
459
|
+
# @param post_api_hold_tokens_request [PostApiHoldTokensRequest]
|
|
460
|
+
# @param [Hash] opts the optional parameters
|
|
461
|
+
# @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.
|
|
462
|
+
# @return [nil]
|
|
463
|
+
def post_api_hold_tokens(post_api_hold_tokens_request, opts = {})
|
|
464
|
+
post_api_hold_tokens_with_http_info(post_api_hold_tokens_request, opts)
|
|
465
|
+
nil
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
# Create an empty hold-token session
|
|
469
|
+
# Seats.io-style session start. Attach seats via reserve using this token later, or renew TTL with POST /hold-tokens/:token. Optional `ticketBuyerId` (opaque partner buyer id) is stored on the session and inherited by its confirmation. Optional `expiresInMinutes` (1–120, seats.io `holdTokens.create(expiresInMinutes)`) sets the session lifetime instead of the workspace hold period; buyer tokens get 403.
|
|
470
|
+
# @param post_api_hold_tokens_request [PostApiHoldTokensRequest]
|
|
471
|
+
# @param [Hash] opts the optional parameters
|
|
472
|
+
# @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.
|
|
473
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
474
|
+
def post_api_hold_tokens_with_http_info(post_api_hold_tokens_request, opts = {})
|
|
475
|
+
if @api_client.config.debugging
|
|
476
|
+
@api_client.config.logger.debug 'Calling API: SeatsApi.post_api_hold_tokens ...'
|
|
477
|
+
end
|
|
478
|
+
# verify the required parameter 'post_api_hold_tokens_request' is set
|
|
479
|
+
if @api_client.config.client_side_validation && post_api_hold_tokens_request.nil?
|
|
480
|
+
fail ArgumentError, "Missing the required parameter 'post_api_hold_tokens_request' when calling SeatsApi.post_api_hold_tokens"
|
|
481
|
+
end
|
|
482
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
483
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SeatsApi.post_api_hold_tokens, the character length must be smaller than or equal to 255.'
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
487
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SeatsApi.post_api_hold_tokens, the character length must be great than or equal to 1.'
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
# resource path
|
|
491
|
+
local_var_path = '/api/hold-tokens'
|
|
492
|
+
|
|
493
|
+
# query parameters
|
|
494
|
+
query_params = opts[:query_params] || {}
|
|
495
|
+
|
|
496
|
+
# header parameters
|
|
497
|
+
header_params = opts[:header_params] || {}
|
|
498
|
+
# HTTP header 'Content-Type'
|
|
499
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
500
|
+
if !content_type.nil?
|
|
501
|
+
header_params['Content-Type'] = content_type
|
|
502
|
+
end
|
|
503
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
504
|
+
|
|
505
|
+
# form parameters
|
|
506
|
+
form_params = opts[:form_params] || {}
|
|
507
|
+
|
|
508
|
+
# http body (model)
|
|
509
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_hold_tokens_request)
|
|
510
|
+
|
|
511
|
+
# return_type
|
|
512
|
+
return_type = opts[:debug_return_type]
|
|
513
|
+
|
|
514
|
+
# auth_names
|
|
515
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
516
|
+
|
|
517
|
+
new_options = opts.merge(
|
|
518
|
+
:operation => :"SeatsApi.post_api_hold_tokens",
|
|
519
|
+
:header_params => header_params,
|
|
520
|
+
:query_params => query_params,
|
|
521
|
+
:form_params => form_params,
|
|
522
|
+
:body => post_body,
|
|
523
|
+
:auth_names => auth_names,
|
|
524
|
+
:return_type => return_type
|
|
525
|
+
)
|
|
526
|
+
|
|
527
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
528
|
+
if @api_client.config.debugging
|
|
529
|
+
@api_client.config.logger.debug "API called: SeatsApi#post_api_hold_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
530
|
+
end
|
|
531
|
+
return data, status_code, headers
|
|
532
|
+
end
|
|
533
|
+
|
|
534
|
+
# Change hold-token expiration (max 2h from creation)
|
|
535
|
+
# @param token [String]
|
|
536
|
+
# @param post_api_hold_tokens_by_token_request [PostApiHoldTokensByTokenRequest]
|
|
537
|
+
# @param [Hash] opts the optional parameters
|
|
538
|
+
# @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.
|
|
539
|
+
# @return [nil]
|
|
540
|
+
def post_api_hold_tokens_by_token(token, post_api_hold_tokens_by_token_request, opts = {})
|
|
541
|
+
post_api_hold_tokens_by_token_with_http_info(token, post_api_hold_tokens_by_token_request, opts)
|
|
542
|
+
nil
|
|
543
|
+
end
|
|
544
|
+
|
|
545
|
+
# Change hold-token expiration (max 2h from creation)
|
|
546
|
+
# @param token [String]
|
|
547
|
+
# @param post_api_hold_tokens_by_token_request [PostApiHoldTokensByTokenRequest]
|
|
548
|
+
# @param [Hash] opts the optional parameters
|
|
549
|
+
# @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.
|
|
550
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
551
|
+
def post_api_hold_tokens_by_token_with_http_info(token, post_api_hold_tokens_by_token_request, opts = {})
|
|
552
|
+
if @api_client.config.debugging
|
|
553
|
+
@api_client.config.logger.debug 'Calling API: SeatsApi.post_api_hold_tokens_by_token ...'
|
|
554
|
+
end
|
|
555
|
+
# verify the required parameter 'token' is set
|
|
556
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
557
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling SeatsApi.post_api_hold_tokens_by_token"
|
|
558
|
+
end
|
|
559
|
+
if @api_client.config.client_side_validation && token.to_s.length > 36
|
|
560
|
+
fail ArgumentError, 'invalid value for "token" when calling SeatsApi.post_api_hold_tokens_by_token, the character length must be smaller than or equal to 36.'
|
|
561
|
+
end
|
|
562
|
+
|
|
563
|
+
if @api_client.config.client_side_validation && token.to_s.length < 36
|
|
564
|
+
fail ArgumentError, 'invalid value for "token" when calling SeatsApi.post_api_hold_tokens_by_token, the character length must be great than or equal to 36.'
|
|
565
|
+
end
|
|
566
|
+
|
|
567
|
+
# verify the required parameter 'post_api_hold_tokens_by_token_request' is set
|
|
568
|
+
if @api_client.config.client_side_validation && post_api_hold_tokens_by_token_request.nil?
|
|
569
|
+
fail ArgumentError, "Missing the required parameter 'post_api_hold_tokens_by_token_request' when calling SeatsApi.post_api_hold_tokens_by_token"
|
|
570
|
+
end
|
|
571
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
572
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SeatsApi.post_api_hold_tokens_by_token, the character length must be smaller than or equal to 255.'
|
|
573
|
+
end
|
|
574
|
+
|
|
575
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
576
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SeatsApi.post_api_hold_tokens_by_token, the character length must be great than or equal to 1.'
|
|
577
|
+
end
|
|
578
|
+
|
|
579
|
+
# resource path
|
|
580
|
+
local_var_path = '/api/hold-tokens/{token}'.sub('{' + 'token' + '}', CGI.escape(token.to_s))
|
|
581
|
+
|
|
582
|
+
# query parameters
|
|
583
|
+
query_params = opts[:query_params] || {}
|
|
584
|
+
|
|
585
|
+
# header parameters
|
|
586
|
+
header_params = opts[:header_params] || {}
|
|
587
|
+
# HTTP header 'Content-Type'
|
|
588
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
589
|
+
if !content_type.nil?
|
|
590
|
+
header_params['Content-Type'] = content_type
|
|
591
|
+
end
|
|
592
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
593
|
+
|
|
594
|
+
# form parameters
|
|
595
|
+
form_params = opts[:form_params] || {}
|
|
596
|
+
|
|
597
|
+
# http body (model)
|
|
598
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_hold_tokens_by_token_request)
|
|
599
|
+
|
|
600
|
+
# return_type
|
|
601
|
+
return_type = opts[:debug_return_type]
|
|
602
|
+
|
|
603
|
+
# auth_names
|
|
604
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
605
|
+
|
|
606
|
+
new_options = opts.merge(
|
|
607
|
+
:operation => :"SeatsApi.post_api_hold_tokens_by_token",
|
|
608
|
+
:header_params => header_params,
|
|
609
|
+
:query_params => query_params,
|
|
610
|
+
:form_params => form_params,
|
|
611
|
+
:body => post_body,
|
|
612
|
+
:auth_names => auth_names,
|
|
613
|
+
:return_type => return_type
|
|
614
|
+
)
|
|
615
|
+
|
|
616
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
617
|
+
if @api_client.config.debugging
|
|
618
|
+
@api_client.config.logger.debug "API called: SeatsApi#post_api_hold_tokens_by_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
619
|
+
end
|
|
620
|
+
return data, status_code, headers
|
|
621
|
+
end
|
|
622
|
+
|
|
623
|
+
# Suggest or atomically hold best available seats
|
|
624
|
+
# Returns seat IDs for the requested quantity, preferring adjacent same-row groups near the map center. Filter the candidate pool by `category` (or ordered `categories`, max 10: windows of the first category are tried before the second, and so on), optional `sectionId` (layout section id or name) and optional `zone` (layout zone id or name; seats resolve explicit zone assignment, then their section zone, then the zone outline) before ranking. `tryToPreventOrphanSeats` (default **true**) skips adjacent windows that would leave a single empty seat at either end of the run, falling back to them only when nothing else fits. `ticketTypes` (`{ ticketTypeId: count }`) sets `quantity` to the sum, restricts the search to categories whose ticket catalog offers every requested type, and returns `ticketTypes` (seatId → ticketTypeId) ready to send as `seatTicketTypes` on confirm; events without ticket types reject it. `accessibleSeats` (N) only returns windows containing at least N seats flagged `accessibility.wheelchair` in the published seat structure (409 when no such window exists). `channel` is salesChannel order limits only. Pass **`x-channel-key`** for inventory partitions — do not send the secret in the body. **`hold: false` (default):** suggest only — does not lock. **`hold: true`:** ranks up to 32 candidate windows across the category preferences, locks the first fit in one Lua call each (all-or-nothing per window), then O(cart) PG gates (available/forSale/channel); on gate failure releases only the locks it added. Requires **Idempotency-Key**, and `userId` unless `holdToken` is given. `holdToken` appends the seats to that existing hold session (same expiry bound; 409 `hold_token_conflict` when the session is expired, foreign, confirming or full). `extraData` is stored on the held seats (requires hold). Returns `hold_token` for confirm. The organizer's booking limits (designer *Max seats per order*) cap `quantity` and, with `holdToken`, the seats already on the token: best-available never picks more than allowed (409 `booking_limit_exceeded` with `limit`, `current`, `requested`). `sections` (max 20 section ids or names, XOR with `sectionId`) ranks across the union of those sections. **API keys / dashboard sessions only:** `channelKeys` (channel secret keys or ids) restricts the pool to public seats plus those channels, `ignoreChannels: true` allows every channel (both replace `x-channel-key`; buyers get 403). `orderId` (with `hold`) is stored on the held seats as `extraData.orderId` and echoed in the response; pass it as `externalOrderId` on confirm. **`status: \"booked\"`** (API keys with the `bookings` scope, or dashboard sessions allowed to change object statuses; buyers get 403) books the best window directly instead of holding it: the same administrative booking as POST /events/{eventId}/actions/book (one SQL transaction under the seat row locks; a seat held by a buyer is never taken; when a ranked window was taken meanwhile the next one is tried). Requires **Idempotency-Key**: the booking order id is derived from it, so a retry returns the same booking. `ticketTypes` are recorded per seat, `extraData` and `orderId` (as `extraData.orderId`) are stored on the booked seats. Response: `status: \"booked\"`, `booked: true`, `bookingOrderId` (cancel with POST /orders/{orderId}/cancel) and `objects` (status, extraData, orderId, ticketType per seat). `status: \"reservedByToken\"` is the same as `hold: true`. **`keepExtraData: true`** (hold or booked) keeps the seats' stored extraData and merges `extraData` / `orderId` on top instead of replacing it.
|
|
625
|
+
# @param post_api_seats_best_available_request [PostApiSeatsBestAvailableRequest]
|
|
626
|
+
# @param [Hash] opts the optional parameters
|
|
627
|
+
# @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.
|
|
628
|
+
# @return [nil]
|
|
629
|
+
def post_api_seats_best_available(post_api_seats_best_available_request, opts = {})
|
|
630
|
+
post_api_seats_best_available_with_http_info(post_api_seats_best_available_request, opts)
|
|
631
|
+
nil
|
|
632
|
+
end
|
|
633
|
+
|
|
634
|
+
# Suggest or atomically hold best available seats
|
|
635
|
+
# Returns seat IDs for the requested quantity, preferring adjacent same-row groups near the map center. Filter the candidate pool by `category` (or ordered `categories`, max 10: windows of the first category are tried before the second, and so on), optional `sectionId` (layout section id or name) and optional `zone` (layout zone id or name; seats resolve explicit zone assignment, then their section zone, then the zone outline) before ranking. `tryToPreventOrphanSeats` (default **true**) skips adjacent windows that would leave a single empty seat at either end of the run, falling back to them only when nothing else fits. `ticketTypes` (`{ ticketTypeId: count }`) sets `quantity` to the sum, restricts the search to categories whose ticket catalog offers every requested type, and returns `ticketTypes` (seatId → ticketTypeId) ready to send as `seatTicketTypes` on confirm; events without ticket types reject it. `accessibleSeats` (N) only returns windows containing at least N seats flagged `accessibility.wheelchair` in the published seat structure (409 when no such window exists). `channel` is salesChannel order limits only. Pass **`x-channel-key`** for inventory partitions — do not send the secret in the body. **`hold: false` (default):** suggest only — does not lock. **`hold: true`:** ranks up to 32 candidate windows across the category preferences, locks the first fit in one Lua call each (all-or-nothing per window), then O(cart) PG gates (available/forSale/channel); on gate failure releases only the locks it added. Requires **Idempotency-Key**, and `userId` unless `holdToken` is given. `holdToken` appends the seats to that existing hold session (same expiry bound; 409 `hold_token_conflict` when the session is expired, foreign, confirming or full). `extraData` is stored on the held seats (requires hold). Returns `hold_token` for confirm. The organizer's booking limits (designer *Max seats per order*) cap `quantity` and, with `holdToken`, the seats already on the token: best-available never picks more than allowed (409 `booking_limit_exceeded` with `limit`, `current`, `requested`). `sections` (max 20 section ids or names, XOR with `sectionId`) ranks across the union of those sections. **API keys / dashboard sessions only:** `channelKeys` (channel secret keys or ids) restricts the pool to public seats plus those channels, `ignoreChannels: true` allows every channel (both replace `x-channel-key`; buyers get 403). `orderId` (with `hold`) is stored on the held seats as `extraData.orderId` and echoed in the response; pass it as `externalOrderId` on confirm. **`status: \"booked\"`** (API keys with the `bookings` scope, or dashboard sessions allowed to change object statuses; buyers get 403) books the best window directly instead of holding it: the same administrative booking as POST /events/{eventId}/actions/book (one SQL transaction under the seat row locks; a seat held by a buyer is never taken; when a ranked window was taken meanwhile the next one is tried). Requires **Idempotency-Key**: the booking order id is derived from it, so a retry returns the same booking. `ticketTypes` are recorded per seat, `extraData` and `orderId` (as `extraData.orderId`) are stored on the booked seats. Response: `status: \"booked\"`, `booked: true`, `bookingOrderId` (cancel with POST /orders/{orderId}/cancel) and `objects` (status, extraData, orderId, ticketType per seat). `status: \"reservedByToken\"` is the same as `hold: true`. **`keepExtraData: true`** (hold or booked) keeps the seats' stored extraData and merges `extraData` / `orderId` on top instead of replacing it.
|
|
636
|
+
# @param post_api_seats_best_available_request [PostApiSeatsBestAvailableRequest]
|
|
637
|
+
# @param [Hash] opts the optional parameters
|
|
638
|
+
# @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.
|
|
639
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
640
|
+
def post_api_seats_best_available_with_http_info(post_api_seats_best_available_request, opts = {})
|
|
641
|
+
if @api_client.config.debugging
|
|
642
|
+
@api_client.config.logger.debug 'Calling API: SeatsApi.post_api_seats_best_available ...'
|
|
643
|
+
end
|
|
644
|
+
# verify the required parameter 'post_api_seats_best_available_request' is set
|
|
645
|
+
if @api_client.config.client_side_validation && post_api_seats_best_available_request.nil?
|
|
646
|
+
fail ArgumentError, "Missing the required parameter 'post_api_seats_best_available_request' when calling SeatsApi.post_api_seats_best_available"
|
|
647
|
+
end
|
|
648
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
649
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SeatsApi.post_api_seats_best_available, the character length must be smaller than or equal to 255.'
|
|
650
|
+
end
|
|
651
|
+
|
|
652
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
653
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SeatsApi.post_api_seats_best_available, the character length must be great than or equal to 1.'
|
|
654
|
+
end
|
|
655
|
+
|
|
656
|
+
# resource path
|
|
657
|
+
local_var_path = '/api/seats/best-available'
|
|
658
|
+
|
|
659
|
+
# query parameters
|
|
660
|
+
query_params = opts[:query_params] || {}
|
|
661
|
+
|
|
662
|
+
# header parameters
|
|
663
|
+
header_params = opts[:header_params] || {}
|
|
664
|
+
# HTTP header 'Content-Type'
|
|
665
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
666
|
+
if !content_type.nil?
|
|
667
|
+
header_params['Content-Type'] = content_type
|
|
668
|
+
end
|
|
669
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
670
|
+
|
|
671
|
+
# form parameters
|
|
672
|
+
form_params = opts[:form_params] || {}
|
|
673
|
+
|
|
674
|
+
# http body (model)
|
|
675
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_seats_best_available_request)
|
|
676
|
+
|
|
677
|
+
# return_type
|
|
678
|
+
return_type = opts[:debug_return_type]
|
|
679
|
+
|
|
680
|
+
# auth_names
|
|
681
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
682
|
+
|
|
683
|
+
new_options = opts.merge(
|
|
684
|
+
:operation => :"SeatsApi.post_api_seats_best_available",
|
|
685
|
+
:header_params => header_params,
|
|
686
|
+
:query_params => query_params,
|
|
687
|
+
:form_params => form_params,
|
|
688
|
+
:body => post_body,
|
|
689
|
+
:auth_names => auth_names,
|
|
690
|
+
:return_type => return_type
|
|
691
|
+
)
|
|
692
|
+
|
|
693
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
694
|
+
if @api_client.config.debugging
|
|
695
|
+
@api_client.config.logger.debug "API called: SeatsApi#post_api_seats_best_available\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
696
|
+
end
|
|
697
|
+
return data, status_code, headers
|
|
698
|
+
end
|
|
699
|
+
|
|
700
|
+
# Accept a durable confirmation intent before asynchronous seat materialization
|
|
701
|
+
# Server-to-server only (`x-api-key`). **Pricing source** (workspace integration mode or event sales rules): `partner` events confirm the declared `seatTicketTypes` and `seatPrices` (or `paidAmountCents`) without a quote; `synced_catalog` events validate them against the pushed price table (409 `price_mismatch`, `price_table_missing`, `ticket_type_required`); `seatschart_catalog` events require a durable catalog quote created before external payment. Final ticket types are re-checked against the event quotas and buyer limit (409 `quota_exceeded`, `buyer_limit_exceeded`, `lot_sold_out`). Configure event currency before quoting. The organizer's booking limits are re-checked (defence in depth; holds enforce them atomically): 409 `booking_limit_exceeded` (`limit`, `requested`), except for holds placed before the current limits were published. After verifying payment with your provider, send quoteId, externalPaymentId, paidAmountCents, paidCurrency and the **`holdToken`** capability returned via `POST /api/seats/reserve`. These payment fields are the authenticated partner's attestation, not gateway verification by SeatsChart. Retries of already accepted legacy decisions remain supported without a quote. Consumer JWTs are rejected — confirmation must not run from the browser. Validates Redis holds, then commits the order and requested items in PostgreSQL before 202. Stream delivery is a best-effort trigger; pending SQL items are reconciled by the worker. Provide externalOrderId for stable partner identity. Legacy callers use a durable tenant-scoped Idempotency-Key identity. Season/group holds require scope=hold and the full source seatIds set; all frozen destinations form one atomic order. GET /api/orders/:orderId reports the atomic cart outcome. HTTP keys are durably bound to the authenticated credential and request; changed payload returns 409. Optional `ticketBuyerId` (opaque partner buyer id) is stored on the order, its reservations and object statuses; when omitted it is inherited from the hold token. Quote failures return 409 with `error: quote_required` (no quoteId) or `error: quote_mismatch` (quote or payment attestation does not match).
|
|
702
|
+
# @param x_api_key [String] Partner B2B API key (required for payment commit).
|
|
703
|
+
# @param idempotency_key [String] Required key (max 255 chars after trim); durable fallback identity when externalOrderId is omitted.
|
|
704
|
+
# @param post_api_seats_confirm_request [PostApiSeatsConfirmRequest]
|
|
705
|
+
# @param [Hash] opts the optional parameters
|
|
706
|
+
# @option opts [String] :x_tenant_id Ignored for bootstrap env keys (bound to DEFAULT_TENANT_ID). Dashboard `sk_live_…` keys are tenant-scoped by hash.
|
|
707
|
+
# @return [nil]
|
|
708
|
+
def post_api_seats_confirm(x_api_key, idempotency_key, post_api_seats_confirm_request, opts = {})
|
|
709
|
+
post_api_seats_confirm_with_http_info(x_api_key, idempotency_key, post_api_seats_confirm_request, opts)
|
|
710
|
+
nil
|
|
711
|
+
end
|
|
712
|
+
|
|
713
|
+
# Accept a durable confirmation intent before asynchronous seat materialization
|
|
714
|
+
# Server-to-server only (`x-api-key`). **Pricing source** (workspace integration mode or event sales rules): `partner` events confirm the declared `seatTicketTypes` and `seatPrices` (or `paidAmountCents`) without a quote; `synced_catalog` events validate them against the pushed price table (409 `price_mismatch`, `price_table_missing`, `ticket_type_required`); `seatschart_catalog` events require a durable catalog quote created before external payment. Final ticket types are re-checked against the event quotas and buyer limit (409 `quota_exceeded`, `buyer_limit_exceeded`, `lot_sold_out`). Configure event currency before quoting. The organizer's booking limits are re-checked (defence in depth; holds enforce them atomically): 409 `booking_limit_exceeded` (`limit`, `requested`), except for holds placed before the current limits were published. After verifying payment with your provider, send quoteId, externalPaymentId, paidAmountCents, paidCurrency and the **`holdToken`** capability returned via `POST /api/seats/reserve`. These payment fields are the authenticated partner's attestation, not gateway verification by SeatsChart. Retries of already accepted legacy decisions remain supported without a quote. Consumer JWTs are rejected — confirmation must not run from the browser. Validates Redis holds, then commits the order and requested items in PostgreSQL before 202. Stream delivery is a best-effort trigger; pending SQL items are reconciled by the worker. Provide externalOrderId for stable partner identity. Legacy callers use a durable tenant-scoped Idempotency-Key identity. Season/group holds require scope=hold and the full source seatIds set; all frozen destinations form one atomic order. GET /api/orders/:orderId reports the atomic cart outcome. HTTP keys are durably bound to the authenticated credential and request; changed payload returns 409. Optional `ticketBuyerId` (opaque partner buyer id) is stored on the order, its reservations and object statuses; when omitted it is inherited from the hold token. Quote failures return 409 with `error: quote_required` (no quoteId) or `error: quote_mismatch` (quote or payment attestation does not match).
|
|
715
|
+
# @param x_api_key [String] Partner B2B API key (required for payment commit).
|
|
716
|
+
# @param idempotency_key [String] Required key (max 255 chars after trim); durable fallback identity when externalOrderId is omitted.
|
|
717
|
+
# @param post_api_seats_confirm_request [PostApiSeatsConfirmRequest]
|
|
718
|
+
# @param [Hash] opts the optional parameters
|
|
719
|
+
# @option opts [String] :x_tenant_id Ignored for bootstrap env keys (bound to DEFAULT_TENANT_ID). Dashboard `sk_live_…` keys are tenant-scoped by hash.
|
|
720
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
721
|
+
def post_api_seats_confirm_with_http_info(x_api_key, idempotency_key, post_api_seats_confirm_request, opts = {})
|
|
722
|
+
if @api_client.config.debugging
|
|
723
|
+
@api_client.config.logger.debug 'Calling API: SeatsApi.post_api_seats_confirm ...'
|
|
724
|
+
end
|
|
725
|
+
# verify the required parameter 'x_api_key' is set
|
|
726
|
+
if @api_client.config.client_side_validation && x_api_key.nil?
|
|
727
|
+
fail ArgumentError, "Missing the required parameter 'x_api_key' when calling SeatsApi.post_api_seats_confirm"
|
|
728
|
+
end
|
|
729
|
+
# verify the required parameter 'idempotency_key' is set
|
|
730
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
731
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SeatsApi.post_api_seats_confirm"
|
|
732
|
+
end
|
|
733
|
+
# verify the required parameter 'post_api_seats_confirm_request' is set
|
|
734
|
+
if @api_client.config.client_side_validation && post_api_seats_confirm_request.nil?
|
|
735
|
+
fail ArgumentError, "Missing the required parameter 'post_api_seats_confirm_request' when calling SeatsApi.post_api_seats_confirm"
|
|
736
|
+
end
|
|
737
|
+
# resource path
|
|
738
|
+
local_var_path = '/api/seats/confirm'
|
|
739
|
+
|
|
740
|
+
# query parameters
|
|
741
|
+
query_params = opts[:query_params] || {}
|
|
742
|
+
|
|
743
|
+
# header parameters
|
|
744
|
+
header_params = opts[:header_params] || {}
|
|
745
|
+
# HTTP header 'Accept' (if needed)
|
|
746
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
747
|
+
# HTTP header 'Content-Type'
|
|
748
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
749
|
+
if !content_type.nil?
|
|
750
|
+
header_params['Content-Type'] = content_type
|
|
751
|
+
end
|
|
752
|
+
header_params[:'x-api-key'] = x_api_key
|
|
753
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
754
|
+
header_params[:'x-tenant-id'] = opts[:'x_tenant_id'] if !opts[:'x_tenant_id'].nil?
|
|
755
|
+
|
|
756
|
+
# form parameters
|
|
757
|
+
form_params = opts[:form_params] || {}
|
|
758
|
+
|
|
759
|
+
# http body (model)
|
|
760
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_seats_confirm_request)
|
|
761
|
+
|
|
762
|
+
# return_type
|
|
763
|
+
return_type = opts[:debug_return_type]
|
|
764
|
+
|
|
765
|
+
# auth_names
|
|
766
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
767
|
+
|
|
768
|
+
new_options = opts.merge(
|
|
769
|
+
:operation => :"SeatsApi.post_api_seats_confirm",
|
|
770
|
+
:header_params => header_params,
|
|
771
|
+
:query_params => query_params,
|
|
772
|
+
:form_params => form_params,
|
|
773
|
+
:body => post_body,
|
|
774
|
+
:auth_names => auth_names,
|
|
775
|
+
:return_type => return_type
|
|
776
|
+
)
|
|
777
|
+
|
|
778
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
779
|
+
if @api_client.config.debugging
|
|
780
|
+
@api_client.config.logger.debug "API called: SeatsApi#post_api_seats_confirm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
781
|
+
end
|
|
782
|
+
return data, status_code, headers
|
|
783
|
+
end
|
|
784
|
+
|
|
785
|
+
# Release all seats held by a hold token
|
|
786
|
+
# Explicit abandon checkout — clears seat locks and GA holds, emits SSE `seat`/`ga` available. Idempotent when token already expired.
|
|
787
|
+
# @param post_api_seats_holds_renew_request [PostApiSeatsHoldsRenewRequest]
|
|
788
|
+
# @param [Hash] opts the optional parameters
|
|
789
|
+
# @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.
|
|
790
|
+
# @return [nil]
|
|
791
|
+
def post_api_seats_holds_release(post_api_seats_holds_renew_request, opts = {})
|
|
792
|
+
post_api_seats_holds_release_with_http_info(post_api_seats_holds_renew_request, opts)
|
|
793
|
+
nil
|
|
794
|
+
end
|
|
795
|
+
|
|
796
|
+
# Release all seats held by a hold token
|
|
797
|
+
# Explicit abandon checkout — clears seat locks and GA holds, emits SSE `seat`/`ga` available. Idempotent when token already expired.
|
|
798
|
+
# @param post_api_seats_holds_renew_request [PostApiSeatsHoldsRenewRequest]
|
|
799
|
+
# @param [Hash] opts the optional parameters
|
|
800
|
+
# @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.
|
|
801
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
802
|
+
def post_api_seats_holds_release_with_http_info(post_api_seats_holds_renew_request, opts = {})
|
|
803
|
+
if @api_client.config.debugging
|
|
804
|
+
@api_client.config.logger.debug 'Calling API: SeatsApi.post_api_seats_holds_release ...'
|
|
805
|
+
end
|
|
806
|
+
# verify the required parameter 'post_api_seats_holds_renew_request' is set
|
|
807
|
+
if @api_client.config.client_side_validation && post_api_seats_holds_renew_request.nil?
|
|
808
|
+
fail ArgumentError, "Missing the required parameter 'post_api_seats_holds_renew_request' when calling SeatsApi.post_api_seats_holds_release"
|
|
809
|
+
end
|
|
810
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
811
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SeatsApi.post_api_seats_holds_release, the character length must be smaller than or equal to 255.'
|
|
812
|
+
end
|
|
813
|
+
|
|
814
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
815
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SeatsApi.post_api_seats_holds_release, the character length must be great than or equal to 1.'
|
|
816
|
+
end
|
|
817
|
+
|
|
818
|
+
# resource path
|
|
819
|
+
local_var_path = '/api/seats/holds/release'
|
|
820
|
+
|
|
821
|
+
# query parameters
|
|
822
|
+
query_params = opts[:query_params] || {}
|
|
823
|
+
|
|
824
|
+
# header parameters
|
|
825
|
+
header_params = opts[:header_params] || {}
|
|
826
|
+
# HTTP header 'Content-Type'
|
|
827
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
828
|
+
if !content_type.nil?
|
|
829
|
+
header_params['Content-Type'] = content_type
|
|
830
|
+
end
|
|
831
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
832
|
+
|
|
833
|
+
# form parameters
|
|
834
|
+
form_params = opts[:form_params] || {}
|
|
835
|
+
|
|
836
|
+
# http body (model)
|
|
837
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_seats_holds_renew_request)
|
|
838
|
+
|
|
839
|
+
# return_type
|
|
840
|
+
return_type = opts[:debug_return_type]
|
|
841
|
+
|
|
842
|
+
# auth_names
|
|
843
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
844
|
+
|
|
845
|
+
new_options = opts.merge(
|
|
846
|
+
:operation => :"SeatsApi.post_api_seats_holds_release",
|
|
847
|
+
:header_params => header_params,
|
|
848
|
+
:query_params => query_params,
|
|
849
|
+
:form_params => form_params,
|
|
850
|
+
:body => post_body,
|
|
851
|
+
:auth_names => auth_names,
|
|
852
|
+
:return_type => return_type
|
|
853
|
+
)
|
|
854
|
+
|
|
855
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
856
|
+
if @api_client.config.debugging
|
|
857
|
+
@api_client.config.logger.debug "API called: SeatsApi#post_api_seats_holds_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
858
|
+
end
|
|
859
|
+
return data, status_code, headers
|
|
860
|
+
end
|
|
861
|
+
|
|
862
|
+
# Renew Redis TTL for all seats in a hold session
|
|
863
|
+
# Seat sessions require a capability. Renews only existing owned locks, capped at two hours from creation; never recreates expired locks. GA-only tokens retain their separate legacy lifecycle.
|
|
864
|
+
# @param post_api_seats_holds_renew_request [PostApiSeatsHoldsRenewRequest]
|
|
865
|
+
# @param [Hash] opts the optional parameters
|
|
866
|
+
# @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.
|
|
867
|
+
# @return [nil]
|
|
868
|
+
def post_api_seats_holds_renew(post_api_seats_holds_renew_request, opts = {})
|
|
869
|
+
post_api_seats_holds_renew_with_http_info(post_api_seats_holds_renew_request, opts)
|
|
870
|
+
nil
|
|
871
|
+
end
|
|
872
|
+
|
|
873
|
+
# Renew Redis TTL for all seats in a hold session
|
|
874
|
+
# Seat sessions require a capability. Renews only existing owned locks, capped at two hours from creation; never recreates expired locks. GA-only tokens retain their separate legacy lifecycle.
|
|
875
|
+
# @param post_api_seats_holds_renew_request [PostApiSeatsHoldsRenewRequest]
|
|
876
|
+
# @param [Hash] opts the optional parameters
|
|
877
|
+
# @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.
|
|
878
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
879
|
+
def post_api_seats_holds_renew_with_http_info(post_api_seats_holds_renew_request, opts = {})
|
|
880
|
+
if @api_client.config.debugging
|
|
881
|
+
@api_client.config.logger.debug 'Calling API: SeatsApi.post_api_seats_holds_renew ...'
|
|
882
|
+
end
|
|
883
|
+
# verify the required parameter 'post_api_seats_holds_renew_request' is set
|
|
884
|
+
if @api_client.config.client_side_validation && post_api_seats_holds_renew_request.nil?
|
|
885
|
+
fail ArgumentError, "Missing the required parameter 'post_api_seats_holds_renew_request' when calling SeatsApi.post_api_seats_holds_renew"
|
|
886
|
+
end
|
|
887
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
888
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SeatsApi.post_api_seats_holds_renew, the character length must be smaller than or equal to 255.'
|
|
889
|
+
end
|
|
890
|
+
|
|
891
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
892
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling SeatsApi.post_api_seats_holds_renew, the character length must be great than or equal to 1.'
|
|
893
|
+
end
|
|
894
|
+
|
|
895
|
+
# resource path
|
|
896
|
+
local_var_path = '/api/seats/holds/renew'
|
|
897
|
+
|
|
898
|
+
# query parameters
|
|
899
|
+
query_params = opts[:query_params] || {}
|
|
900
|
+
|
|
901
|
+
# header parameters
|
|
902
|
+
header_params = opts[:header_params] || {}
|
|
903
|
+
# HTTP header 'Content-Type'
|
|
904
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
905
|
+
if !content_type.nil?
|
|
906
|
+
header_params['Content-Type'] = content_type
|
|
907
|
+
end
|
|
908
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
909
|
+
|
|
910
|
+
# form parameters
|
|
911
|
+
form_params = opts[:form_params] || {}
|
|
912
|
+
|
|
913
|
+
# http body (model)
|
|
914
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_seats_holds_renew_request)
|
|
915
|
+
|
|
916
|
+
# return_type
|
|
917
|
+
return_type = opts[:debug_return_type]
|
|
918
|
+
|
|
919
|
+
# auth_names
|
|
920
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
921
|
+
|
|
922
|
+
new_options = opts.merge(
|
|
923
|
+
:operation => :"SeatsApi.post_api_seats_holds_renew",
|
|
924
|
+
:header_params => header_params,
|
|
925
|
+
:query_params => query_params,
|
|
926
|
+
:form_params => form_params,
|
|
927
|
+
:body => post_body,
|
|
928
|
+
:auth_names => auth_names,
|
|
929
|
+
:return_type => return_type
|
|
930
|
+
)
|
|
931
|
+
|
|
932
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
933
|
+
if @api_client.config.debugging
|
|
934
|
+
@api_client.config.logger.debug "API called: SeatsApi#post_api_seats_holds_renew\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
935
|
+
end
|
|
936
|
+
return data, status_code, headers
|
|
937
|
+
end
|
|
938
|
+
|
|
939
|
+
# Clear Redis TTL holds before expiry (checkout abandoned / declined)
|
|
940
|
+
# Deletes KeyDB TTL seat locks when they are authorized by the **`holdToken`** capability, rejects seats already sold in Postgres, publishes **`SSE` `available`** only for locks actually removed. **`Idempotency-Key`** header is **required**; repeats within ~24h return the cached response (no duplicate side effects). Also: **`x-api-key`** or **`Authorization: Bearer`**.
|
|
941
|
+
# @param idempotency_key [String] Required deduplication key (max 255 chars after trim); 24h cache replay in Redis per tenant + route.
|
|
942
|
+
# @param post_api_seats_release_request [PostApiSeatsReleaseRequest]
|
|
943
|
+
# @param [Hash] opts the optional parameters
|
|
944
|
+
# @option opts [String] :x_api_key Partner B2B API key (alternative to Bearer).
|
|
945
|
+
# @option opts [String] :authorization Bearer + HS256 JWT for B2C clients.
|
|
946
|
+
# @option opts [String] :x_tenant_id Tenant id for partner integrations.
|
|
947
|
+
# @return [nil]
|
|
948
|
+
def post_api_seats_release(idempotency_key, post_api_seats_release_request, opts = {})
|
|
949
|
+
post_api_seats_release_with_http_info(idempotency_key, post_api_seats_release_request, opts)
|
|
950
|
+
nil
|
|
951
|
+
end
|
|
952
|
+
|
|
953
|
+
# Clear Redis TTL holds before expiry (checkout abandoned / declined)
|
|
954
|
+
# Deletes KeyDB TTL seat locks when they are authorized by the **`holdToken`** capability, rejects seats already sold in Postgres, publishes **`SSE` `available`** only for locks actually removed. **`Idempotency-Key`** header is **required**; repeats within ~24h return the cached response (no duplicate side effects). Also: **`x-api-key`** or **`Authorization: Bearer`**.
|
|
955
|
+
# @param idempotency_key [String] Required deduplication key (max 255 chars after trim); 24h cache replay in Redis per tenant + route.
|
|
956
|
+
# @param post_api_seats_release_request [PostApiSeatsReleaseRequest]
|
|
957
|
+
# @param [Hash] opts the optional parameters
|
|
958
|
+
# @option opts [String] :x_api_key Partner B2B API key (alternative to Bearer).
|
|
959
|
+
# @option opts [String] :authorization Bearer + HS256 JWT for B2C clients.
|
|
960
|
+
# @option opts [String] :x_tenant_id Tenant id for partner integrations.
|
|
961
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
962
|
+
def post_api_seats_release_with_http_info(idempotency_key, post_api_seats_release_request, opts = {})
|
|
963
|
+
if @api_client.config.debugging
|
|
964
|
+
@api_client.config.logger.debug 'Calling API: SeatsApi.post_api_seats_release ...'
|
|
965
|
+
end
|
|
966
|
+
# verify the required parameter 'idempotency_key' is set
|
|
967
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
968
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SeatsApi.post_api_seats_release"
|
|
969
|
+
end
|
|
970
|
+
# verify the required parameter 'post_api_seats_release_request' is set
|
|
971
|
+
if @api_client.config.client_side_validation && post_api_seats_release_request.nil?
|
|
972
|
+
fail ArgumentError, "Missing the required parameter 'post_api_seats_release_request' when calling SeatsApi.post_api_seats_release"
|
|
973
|
+
end
|
|
974
|
+
# resource path
|
|
975
|
+
local_var_path = '/api/seats/release'
|
|
976
|
+
|
|
977
|
+
# query parameters
|
|
978
|
+
query_params = opts[:query_params] || {}
|
|
979
|
+
|
|
980
|
+
# header parameters
|
|
981
|
+
header_params = opts[:header_params] || {}
|
|
982
|
+
# HTTP header 'Content-Type'
|
|
983
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
984
|
+
if !content_type.nil?
|
|
985
|
+
header_params['Content-Type'] = content_type
|
|
986
|
+
end
|
|
987
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
988
|
+
header_params[:'x-api-key'] = opts[:'x_api_key'] if !opts[:'x_api_key'].nil?
|
|
989
|
+
header_params[:'Authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
|
990
|
+
header_params[:'x-tenant-id'] = opts[:'x_tenant_id'] if !opts[:'x_tenant_id'].nil?
|
|
991
|
+
|
|
992
|
+
# form parameters
|
|
993
|
+
form_params = opts[:form_params] || {}
|
|
994
|
+
|
|
995
|
+
# http body (model)
|
|
996
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_seats_release_request)
|
|
997
|
+
|
|
998
|
+
# return_type
|
|
999
|
+
return_type = opts[:debug_return_type]
|
|
1000
|
+
|
|
1001
|
+
# auth_names
|
|
1002
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
1003
|
+
|
|
1004
|
+
new_options = opts.merge(
|
|
1005
|
+
:operation => :"SeatsApi.post_api_seats_release",
|
|
1006
|
+
:header_params => header_params,
|
|
1007
|
+
:query_params => query_params,
|
|
1008
|
+
:form_params => form_params,
|
|
1009
|
+
:body => post_body,
|
|
1010
|
+
:auth_names => auth_names,
|
|
1011
|
+
:return_type => return_type
|
|
1012
|
+
)
|
|
1013
|
+
|
|
1014
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1015
|
+
if @api_client.config.debugging
|
|
1016
|
+
@api_client.config.logger.debug "API called: SeatsApi#post_api_seats_release\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1017
|
+
end
|
|
1018
|
+
return data, status_code, headers
|
|
1019
|
+
end
|
|
1020
|
+
|
|
1021
|
+
# Place a temporary Redis hold (Lua TTL) before payment
|
|
1022
|
+
# JSON body: `eventId`, `seatIds` (1–64 UUIDs, unique), `userId`, optional `holdToken` capability to append seats to an existing session. `userId` is customer metadata, never ownership proof. Renew/append share a two-hour maximum session lifetime. Optional `ticketBuyerId` (opaque partner buyer id) is stored on a new hold token and inherited by its confirmation. `eventId` also accepts the event key. Headers: **x-api-key** (B2B) *or* **Authorization: Bearer** (HS256 JWT); optional **x-tenant-id**; **`Idempotency-Key` is required** (1–255 chars after trim; use a fresh UUID v4 per checkout attempt). Repeats with the same key within ~24h return the cached HTTP status and JSON without re-running the Lua lock. Applies Redis TTL locks (**default 600 s**, overridden by **`SEAT_HOLD_TTL_SEC`**, or by the workspace **hold period** setting — `PATCH /workspace/settings`) with SSE `seat` → **`locked`**; Postgres remains **`available`** until **`POST /api/seats/confirm`** persists **`sold`** via the reservation worker. A hold token holds at most the workspace `maxSeatsPerHoldToken` seats (409 `seat_limit`). **Booking limits:** the organizer's *Max seats per order* (designer → Booking limits, stored as `layoutMeta.bookingRules` of the published chart/event layout) caps the seats one hold token holds, appends included, checked in the same atomic call as the locks (parallel appends cannot exceed it); the strictest of the sales-channel default, this limit, the per-buyer limit and `maxSeatsPerHoldToken` wins. Refused with 409 `booking_limit_exceeded` (`limit`, `current` seats already on the token, `requested`, `kind: \"seats\"`). Holds placed before a lower limit was published keep their seats and stay confirmable; they only cannot grow. With ticket buyer validation on, buyer tokens must carry a bound ticket buyer id (403 `ticket_buyer_required` / `ticket_buyer_mismatch`).
|
|
1023
|
+
# @param idempotency_key [String] Required deduplication key (max 255 chars after trim; UUID v4 recommended). 24h idempotent cache replay in Redis per tenant.
|
|
1024
|
+
# @param post_api_seats_reserve_request [PostApiSeatsReserveRequest]
|
|
1025
|
+
# @param [Hash] opts the optional parameters
|
|
1026
|
+
# @option opts [String] :x_api_key Partner B2B API key (alternative to Bearer).
|
|
1027
|
+
# @option opts [String] :authorization Bearer + HS256 JWT for B2C clients.
|
|
1028
|
+
# @option opts [String] :x_tenant_id Tenant id for partner integrations.
|
|
1029
|
+
# @return [nil]
|
|
1030
|
+
def post_api_seats_reserve(idempotency_key, post_api_seats_reserve_request, opts = {})
|
|
1031
|
+
post_api_seats_reserve_with_http_info(idempotency_key, post_api_seats_reserve_request, opts)
|
|
1032
|
+
nil
|
|
1033
|
+
end
|
|
1034
|
+
|
|
1035
|
+
# Place a temporary Redis hold (Lua TTL) before payment
|
|
1036
|
+
# JSON body: `eventId`, `seatIds` (1–64 UUIDs, unique), `userId`, optional `holdToken` capability to append seats to an existing session. `userId` is customer metadata, never ownership proof. Renew/append share a two-hour maximum session lifetime. Optional `ticketBuyerId` (opaque partner buyer id) is stored on a new hold token and inherited by its confirmation. `eventId` also accepts the event key. Headers: **x-api-key** (B2B) *or* **Authorization: Bearer** (HS256 JWT); optional **x-tenant-id**; **`Idempotency-Key` is required** (1–255 chars after trim; use a fresh UUID v4 per checkout attempt). Repeats with the same key within ~24h return the cached HTTP status and JSON without re-running the Lua lock. Applies Redis TTL locks (**default 600 s**, overridden by **`SEAT_HOLD_TTL_SEC`**, or by the workspace **hold period** setting — `PATCH /workspace/settings`) with SSE `seat` → **`locked`**; Postgres remains **`available`** until **`POST /api/seats/confirm`** persists **`sold`** via the reservation worker. A hold token holds at most the workspace `maxSeatsPerHoldToken` seats (409 `seat_limit`). **Booking limits:** the organizer's *Max seats per order* (designer → Booking limits, stored as `layoutMeta.bookingRules` of the published chart/event layout) caps the seats one hold token holds, appends included, checked in the same atomic call as the locks (parallel appends cannot exceed it); the strictest of the sales-channel default, this limit, the per-buyer limit and `maxSeatsPerHoldToken` wins. Refused with 409 `booking_limit_exceeded` (`limit`, `current` seats already on the token, `requested`, `kind: \"seats\"`). Holds placed before a lower limit was published keep their seats and stay confirmable; they only cannot grow. With ticket buyer validation on, buyer tokens must carry a bound ticket buyer id (403 `ticket_buyer_required` / `ticket_buyer_mismatch`).
|
|
1037
|
+
# @param idempotency_key [String] Required deduplication key (max 255 chars after trim; UUID v4 recommended). 24h idempotent cache replay in Redis per tenant.
|
|
1038
|
+
# @param post_api_seats_reserve_request [PostApiSeatsReserveRequest]
|
|
1039
|
+
# @param [Hash] opts the optional parameters
|
|
1040
|
+
# @option opts [String] :x_api_key Partner B2B API key (alternative to Bearer).
|
|
1041
|
+
# @option opts [String] :authorization Bearer + HS256 JWT for B2C clients.
|
|
1042
|
+
# @option opts [String] :x_tenant_id Tenant id for partner integrations.
|
|
1043
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1044
|
+
def post_api_seats_reserve_with_http_info(idempotency_key, post_api_seats_reserve_request, opts = {})
|
|
1045
|
+
if @api_client.config.debugging
|
|
1046
|
+
@api_client.config.logger.debug 'Calling API: SeatsApi.post_api_seats_reserve ...'
|
|
1047
|
+
end
|
|
1048
|
+
# verify the required parameter 'idempotency_key' is set
|
|
1049
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
1050
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SeatsApi.post_api_seats_reserve"
|
|
1051
|
+
end
|
|
1052
|
+
# verify the required parameter 'post_api_seats_reserve_request' is set
|
|
1053
|
+
if @api_client.config.client_side_validation && post_api_seats_reserve_request.nil?
|
|
1054
|
+
fail ArgumentError, "Missing the required parameter 'post_api_seats_reserve_request' when calling SeatsApi.post_api_seats_reserve"
|
|
1055
|
+
end
|
|
1056
|
+
# resource path
|
|
1057
|
+
local_var_path = '/api/seats/reserve'
|
|
1058
|
+
|
|
1059
|
+
# query parameters
|
|
1060
|
+
query_params = opts[:query_params] || {}
|
|
1061
|
+
|
|
1062
|
+
# header parameters
|
|
1063
|
+
header_params = opts[:header_params] || {}
|
|
1064
|
+
# HTTP header 'Content-Type'
|
|
1065
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
1066
|
+
if !content_type.nil?
|
|
1067
|
+
header_params['Content-Type'] = content_type
|
|
1068
|
+
end
|
|
1069
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
1070
|
+
header_params[:'x-api-key'] = opts[:'x_api_key'] if !opts[:'x_api_key'].nil?
|
|
1071
|
+
header_params[:'Authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
|
1072
|
+
header_params[:'x-tenant-id'] = opts[:'x_tenant_id'] if !opts[:'x_tenant_id'].nil?
|
|
1073
|
+
|
|
1074
|
+
# form parameters
|
|
1075
|
+
form_params = opts[:form_params] || {}
|
|
1076
|
+
|
|
1077
|
+
# http body (model)
|
|
1078
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_seats_reserve_request)
|
|
1079
|
+
|
|
1080
|
+
# return_type
|
|
1081
|
+
return_type = opts[:debug_return_type]
|
|
1082
|
+
|
|
1083
|
+
# auth_names
|
|
1084
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
1085
|
+
|
|
1086
|
+
new_options = opts.merge(
|
|
1087
|
+
:operation => :"SeatsApi.post_api_seats_reserve",
|
|
1088
|
+
:header_params => header_params,
|
|
1089
|
+
:query_params => query_params,
|
|
1090
|
+
:form_params => form_params,
|
|
1091
|
+
:body => post_body,
|
|
1092
|
+
:auth_names => auth_names,
|
|
1093
|
+
:return_type => return_type
|
|
1094
|
+
)
|
|
1095
|
+
|
|
1096
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1097
|
+
if @api_client.config.debugging
|
|
1098
|
+
@api_client.config.logger.debug "API called: SeatsApi#post_api_seats_reserve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1099
|
+
end
|
|
1100
|
+
return data, status_code, headers
|
|
1101
|
+
end
|
|
1102
|
+
end
|
|
1103
|
+
end
|