seatlayer 0.5.0 → 0.6.1
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 +4 -4
- data/CHANGELOG.md +10 -1
- data/README.md +75 -18
- data/lib/seatlayer/channels.rb +2 -4
- data/lib/seatlayer/inventory.rb +1 -2
- data/lib/seatlayer/resources.rb +16 -2
- data/lib/seatlayer/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: abe617b9eff9a2dbeb571b81e16f8d41096b4cb4d49f35a3461f03b292316a87
|
|
4
|
+
data.tar.gz: d901b82e10dd7194b726f7c3d4b8f2d642030a1458c42ae7a851b200a9b0ef9a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d12c27e2f846f0aca0f95e8cc064723f9ad5ff37a83c64a854529db34a4b4651865011e3634a4eacd48bed9214e8ee64e1bccf162db24ca21d020f035cd6f091
|
|
7
|
+
data.tar.gz: e764024fd33ae0ca89714490934a7bbac28a2527a0ccee40a1892b1d2292f6945deb575c28b69665f77fcb04dd2ba987b1ce80cdb0b512236a497386563ee9c3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.6.1
|
|
4
|
+
|
|
5
|
+
- Documentation only. Refreshes the README, adds frequently asked
|
|
6
|
+
questions, and aligns package metadata. No API or behaviour changes.
|
|
7
|
+
|
|
8
|
+
## 0.6.0 — 2026-08-23
|
|
9
|
+
|
|
10
|
+
- Added exact immutable Event configuration binding reads and compare-and-set
|
|
11
|
+
attach/detach through `events.retrieve_configuration_binding` and
|
|
12
|
+
`events.update_configuration_binding`. Updates remain deliberately single-attempt.
|
|
4
13
|
|
|
5
14
|
## 0.5.0 — 2026-08-21
|
|
6
15
|
|
data/README.md
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
# SeatLayer Ruby SDK
|
|
1
|
+
# SeatLayer Ruby Server SDK for Reserved Seating
|
|
2
2
|
|
|
3
3
|
[](https://github.com/seatlayer/seatlayer-ruby/actions/workflows/ci.yml)
|
|
4
4
|
[](https://rubygems.org/gems/seatlayer)
|
|
5
5
|
[](https://www.ruby-lang.org/)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
The official SeatLayer Ruby server SDK — the trusted side of a reserved-seating
|
|
9
|
+
integration. Inspect what a hold really contains, price from server-owned seating-chart
|
|
10
|
+
data, and book with a stable `booking_ref`, while managing charts, events, inventory,
|
|
11
|
+
allocations, and webhooks through one typed ticketing API client.
|
|
12
|
+
|
|
13
|
+
[`seatlayer` gem on RubyGems](https://rubygems.org/gems/seatlayer) ·
|
|
14
|
+
[SeatLayer server SDK documentation](https://docs.seatlayer.io/server-sdk/install/) ·
|
|
15
|
+
[SeatLayer reserved-seating platform](https://seatlayer.io/) ·
|
|
16
|
+
[SeatLayer JavaScript seat map SDK](https://www.npmjs.com/package/@seatlayer/js) ·
|
|
17
|
+
[Server API reference](https://docs.seatlayer.io/server-api/)
|
|
9
18
|
|
|
10
19
|
> **Server-side only.** This gem authenticates with your secret key. Never load it anywhere a
|
|
11
20
|
> ticket buyer can reach — browser surfaces get short-lived, origin-bound tokens that you mint here.
|
|
@@ -291,7 +300,7 @@ client.request("POST", "/v1/events/ev_1/some-new-route", body: { "qty" => 2 })
|
|
|
291
300
|
| --- | --- |
|
|
292
301
|
| `charts` | `list` `list_all` `create` `retrieve` `update` `delete` `copy` `archive` `unarchive` `publish` |
|
|
293
302
|
| `templates` | `instantiate_template` |
|
|
294
|
-
| `events` | `list` `list_all` `create` `retrieve` `update` `delete` `update_poster` `delete_poster` `update_chart` `close` `reopen` `archive` `retrieve_hold_ttl` `update_hold_ttl` `list_ticket_releases` `update_ticket_releases` `close_ticket_release` `retrieve_report` `retrieve_log` |
|
|
303
|
+
| `events` | `list` `list_all` `create` `retrieve` `retrieve_configuration_binding` `update_configuration_binding` `update` `delete` `update_poster` `delete_poster` `update_chart` `close` `reopen` `archive` `retrieve_hold_ttl` `update_hold_ttl` `list_ticket_releases` `update_ticket_releases` `close_ticket_release` `retrieve_report` `retrieve_log` |
|
|
295
304
|
| `inventory` | `hold` `hold_best_available` `book_best_available` `extend_hold` `retrieve_hold` `release` `book` `box_office_book` `unbook` `list_bookings` `retrieve_booking` `block` `unblock` `unblock_all` `retrieve_availability` `update_availability` |
|
|
296
305
|
| `channels` | `list_channels` `create_channel` `update_channel` `update_assignments` `list_allocation` `retrieve_access_preview` `retrieve_report` `pause` `unpause` `archive` `create_buyer_access_session` `list_buyer_access_sessions` `revoke_buyer_access_session` `create_access_link` `list_access_links` `rotate_access_link` `revoke_access_link` |
|
|
297
306
|
| `sessions` | `create_manage_session` `revoke_manage_session` `create_designer_session` `revoke_designer_session` |
|
|
@@ -316,32 +325,80 @@ Some API surface is intentionally unwrapped, not merely pending:
|
|
|
316
325
|
None of these are reachable through `request` as a supported path either — they are excluded from
|
|
317
326
|
the public manifest, not just from the wrapper.
|
|
318
327
|
|
|
319
|
-
##
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
+
## Frequently asked questions
|
|
329
|
+
|
|
330
|
+
### How do I book seats from Ruby?
|
|
331
|
+
|
|
332
|
+
Create a client with your secret key, obtain a hold id — either from the buyer's
|
|
333
|
+
browser session or by holding server-side — and call `inventory.book(event_key, hold_id: ..., booking_ref: ...)`.
|
|
334
|
+
`booking_ref` is your own stable order id and is the join between SeatLayer
|
|
335
|
+
inventory and your commercial order, so the same reference identifies the booking
|
|
336
|
+
in Booking History and when you later cancel it. For phone orders, box office, and
|
|
337
|
+
comps, `inventory.book_best_available` books outright with no browser involved.
|
|
338
|
+
|
|
339
|
+
### What does the server SDK do compared with the buyer SDK?
|
|
340
|
+
|
|
341
|
+
The buyer SDK runs where the ticket buyer is: it renders the interactive seating
|
|
342
|
+
chart, handles seat selection, and creates temporary holds. This server SDK is the
|
|
343
|
+
trusted side. It authenticates with your secret key, inspects what a hold actually
|
|
344
|
+
contains, prices from server-owned data, and books. Never bundle the secret key
|
|
345
|
+
into a browser or a mobile app — browser surfaces get short-lived, origin-bound
|
|
346
|
+
tokens that you mint here.
|
|
347
|
+
|
|
348
|
+
### How do temporary holds work server-side?
|
|
349
|
+
|
|
350
|
+
A hold reserves seats against concurrent buyers for a limited window.
|
|
351
|
+
`inventory.retrieve_hold(event_key, hold_id)` is the authoritative answer for what is held
|
|
352
|
+
and at what price, so charge from its `items` rather than from anything the browser
|
|
353
|
+
sent you. When an order runs longer than the checkout window, `inventory.extend_hold`
|
|
354
|
+
renews the hold instead of releasing and re-holding, which would hand the seats to
|
|
355
|
+
whoever is racing for them. Bookings carry the server's exact-selection plus
|
|
356
|
+
`booking_ref` safeguard, but the SDK sends each booking once — reconcile an unknown
|
|
357
|
+
outcome before trying again.
|
|
358
|
+
|
|
359
|
+
### Can I use my own payment provider?
|
|
360
|
+
|
|
361
|
+
Yes. SeatLayer never processes payment. Inspect the hold, compute the charge from
|
|
362
|
+
the returned `items` and their authoritative `unitPrice` and `currency`, take the
|
|
363
|
+
money through whichever provider you already use — Stripe, Adyen, Razorpay, or your
|
|
364
|
+
own — and then book the hold with your order id as `booking_ref`. SeatLayer owns
|
|
365
|
+
seating state, holds, booking concurrency, and the inventory ledger; your platform
|
|
366
|
+
owns payments, commercial orders, tickets, delivery, and refunds.
|
|
367
|
+
|
|
368
|
+
## Continue your Ruby integration
|
|
369
|
+
|
|
370
|
+
- [Follow the SeatLayer server SDK guide](https://docs.seatlayer.io/server-sdk/install/)
|
|
371
|
+
for installation, authentication, and the full hold-to-booking flow.
|
|
372
|
+
- [Handle errors, retries, and safe booking repeats](https://docs.seatlayer.io/server-sdk/reliability/)
|
|
373
|
+
before connecting a production order flow.
|
|
374
|
+
- [Verify SeatLayer webhooks](https://docs.seatlayer.io/server-sdk/webhooks/)
|
|
375
|
+
to react to holds, expiry, and bookings on your server.
|
|
376
|
+
- [Browse the SeatLayer server API reference](https://docs.seatlayer.io/server-api/events/)
|
|
377
|
+
for every endpoint behind this SDK.
|
|
378
|
+
- [Generate clients from the SeatLayer OpenAPI description](https://docs.seatlayer.io/openapi.json)
|
|
379
|
+
or explore the raw API surface.
|
|
380
|
+
- [Point AI coding agents at the SeatLayer docs index](https://docs.seatlayer.io/llms.txt)
|
|
381
|
+
(`llms.txt`) for an agent-readable map of the documentation.
|
|
382
|
+
- [Explore every SeatLayer SDK on GitHub](https://github.com/seatlayer)
|
|
383
|
+
across web, mobile, and server.
|
|
328
384
|
|
|
329
385
|
### Other SeatLayer SDKs
|
|
330
386
|
|
|
331
|
-
| Surface | Package |
|
|
332
|
-
|
|
333
|
-
|
|
|
387
|
+
| Surface | Package or source |
|
|
388
|
+
| --- | --- |
|
|
389
|
+
| JavaScript | [`@seatlayer/js`](https://www.npmjs.com/package/@seatlayer/js) |
|
|
334
390
|
| React | [`@seatlayer/react`](https://www.npmjs.com/package/@seatlayer/react) |
|
|
335
391
|
| React Native | [`@seatlayer/react-native`](https://www.npmjs.com/package/@seatlayer/react-native) |
|
|
336
392
|
| iOS | [`seatlayer-ios`](https://github.com/seatlayer/seatlayer-ios) |
|
|
337
|
-
| Android | [`seatlayer-android`](https://github.com/seatlayer/seatlayer-android) |
|
|
338
393
|
| Flutter | [`seatlayer`](https://pub.dev/packages/seatlayer) |
|
|
394
|
+
| Android | [`seatlayer-android`](https://github.com/seatlayer/seatlayer-android) |
|
|
339
395
|
| Node.js (server) | [`@seatlayer/server`](https://www.npmjs.com/package/@seatlayer/server) |
|
|
340
396
|
| Python (server) | [`seatlayer`](https://pypi.org/project/seatlayer/) |
|
|
341
397
|
| PHP (server) | [`seatlayer/seatlayer-php`](https://packagist.org/packages/seatlayer/seatlayer-php) |
|
|
342
|
-
|
|
|
343
|
-
| Go (server) | [`github.com/seatlayer/seatlayer-go`](https://pkg.go.dev/github.com/seatlayer/seatlayer-go) |
|
|
398
|
+
| Ruby (server) | [`seatlayer`](https://rubygems.org/gems/seatlayer) (this package) |
|
|
344
399
|
| .NET (server) | [`SeatLayer`](https://www.nuget.org/packages/SeatLayer) |
|
|
400
|
+
| Java (server) | [`io.seatlayer:seatlayer-java`](https://central.sonatype.com/artifact/io.seatlayer/seatlayer-java) |
|
|
401
|
+
| Go (server) | [`github.com/seatlayer/seatlayer-go`](https://pkg.go.dev/github.com/seatlayer/seatlayer-go) |
|
|
345
402
|
|
|
346
403
|
## Development
|
|
347
404
|
|
data/lib/seatlayer/channels.rb
CHANGED
|
@@ -63,7 +63,7 @@ module SeatLayer
|
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
# Explicit keywords document each security boundary carried by the token.
|
|
66
|
-
# rubocop:disable Metrics/ParameterLists
|
|
66
|
+
# rubocop:disable-next Metrics/ParameterLists
|
|
67
67
|
def create_buyer_access_session(event_key, include_public:, allowed_origin:, channel_ids: nil,
|
|
68
68
|
expires_in_seconds: nil, max_quantity: UNSET, buyer_ref: UNSET,
|
|
69
69
|
partner_ref: UNSET, client_request_id: UNSET, idempotency_key: nil)
|
|
@@ -75,7 +75,6 @@ module SeatLayer
|
|
|
75
75
|
@client.post("/v1/events/#{encode(event_key)}/buyer-access-sessions", body,
|
|
76
76
|
idempotency_key: idempotency_key)
|
|
77
77
|
end
|
|
78
|
-
# rubocop:enable Metrics/ParameterLists
|
|
79
78
|
|
|
80
79
|
def list_buyer_access_sessions(event_key, limit: nil)
|
|
81
80
|
@client.get("/v1/events/#{encode(event_key)}/buyer-access-sessions",
|
|
@@ -88,7 +87,7 @@ module SeatLayer
|
|
|
88
87
|
|
|
89
88
|
# The URL and capability in this response are revealed once. Persist them
|
|
90
89
|
# immediately; this mutation is deliberately never retried automatically.
|
|
91
|
-
# rubocop:disable Metrics/ParameterLists
|
|
90
|
+
# rubocop:disable-next Metrics/ParameterLists
|
|
92
91
|
def create_access_link(event_key, channel_id, label: UNSET, expires_at: nil,
|
|
93
92
|
max_redemptions: nil, max_quantity: nil,
|
|
94
93
|
session_ttl_seconds: nil, include_public: nil, reason: nil,
|
|
@@ -101,7 +100,6 @@ module SeatLayer
|
|
|
101
100
|
@client.post(path(event_key, "/#{encode(channel_id)}/access-links"), body,
|
|
102
101
|
idempotency_key: idempotency_key)
|
|
103
102
|
end
|
|
104
|
-
# rubocop:enable Metrics/ParameterLists
|
|
105
103
|
|
|
106
104
|
# Status only: the API never returns a previously revealed capability.
|
|
107
105
|
def list_access_links(event_key, channel_id)
|
data/lib/seatlayer/inventory.rb
CHANGED
|
@@ -186,7 +186,7 @@ module SeatLayer
|
|
|
186
186
|
# Mint a designer token so an organiser can edit a chart inside your own UI.
|
|
187
187
|
# Requires a chart id that already exists — create or copy one first.
|
|
188
188
|
# Explicit keywords keep each security and feature-policy boundary visible.
|
|
189
|
-
# rubocop:disable Metrics/ParameterLists
|
|
189
|
+
# rubocop:disable-next Metrics/ParameterLists
|
|
190
190
|
def create_designer_session(workspace_id:, chart_id:, allowed_origin:,
|
|
191
191
|
authority: nil, can_publish: nil, mode: nil,
|
|
192
192
|
safe_mode_options: nil, features: nil, expires_in_seconds: nil)
|
|
@@ -197,7 +197,6 @@ module SeatLayer
|
|
|
197
197
|
"expiresInSeconds" => expires_in_seconds })
|
|
198
198
|
@client.post("/v1/designer/sessions", body)
|
|
199
199
|
end
|
|
200
|
-
# rubocop:enable Metrics/ParameterLists
|
|
201
200
|
|
|
202
201
|
def revoke_designer_session(session_id)
|
|
203
202
|
@client.delete("/v1/designer/sessions/#{encode(session_id)}")
|
data/lib/seatlayer/resources.rb
CHANGED
|
@@ -175,7 +175,7 @@ module SeatLayer
|
|
|
175
175
|
end
|
|
176
176
|
end
|
|
177
177
|
|
|
178
|
-
# rubocop:disable Metrics/ParameterLists
|
|
178
|
+
# rubocop:disable-next Metrics/ParameterLists
|
|
179
179
|
def create(chart_id:, name: nil, slug: nil, starts_at: UNSET, venue: UNSET,
|
|
180
180
|
external_ref: UNSET, currency: UNSET, idempotency_key: nil,
|
|
181
181
|
description: UNSET, ends_at: UNSET, timezone: UNSET, locale: UNSET,
|
|
@@ -190,12 +190,26 @@ module SeatLayer
|
|
|
190
190
|
"/v1/events", body, idempotency_key: idempotency_key, retry_policy: :header_replay
|
|
191
191
|
)
|
|
192
192
|
end
|
|
193
|
-
# rubocop:enable Metrics/ParameterLists
|
|
194
193
|
|
|
195
194
|
def retrieve(event_key)
|
|
196
195
|
@client.get("/v1/events/#{encode(event_key)}")
|
|
197
196
|
end
|
|
198
197
|
|
|
198
|
+
# Read the Event's exact immutable configuration selection and audit trail.
|
|
199
|
+
def retrieve_configuration_binding(event_key)
|
|
200
|
+
@client.get("/v1/events/#{encode(event_key)}/event-configuration")
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Attach an exact published configuration version, or pass +nil+ to detach.
|
|
204
|
+
# The expected revision prevents one administrator from silently overwriting
|
|
205
|
+
# another, and the mutation remains deliberately single-attempt.
|
|
206
|
+
def update_configuration_binding(event_key, expected_revision:, configuration:)
|
|
207
|
+
@client.put(
|
|
208
|
+
"/v1/events/#{encode(event_key)}/event-configuration",
|
|
209
|
+
{ "expectedRevision" => expected_revision, "configuration" => configuration }
|
|
210
|
+
)
|
|
211
|
+
end
|
|
212
|
+
|
|
199
213
|
def update(event_key, fields)
|
|
200
214
|
@client.patch("/v1/events/#{encode(event_key)}", fields)
|
|
201
215
|
end
|
data/lib/seatlayer/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: seatlayer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SeatLayer
|
|
@@ -9,8 +9,9 @@ bindir: bin
|
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies: []
|
|
12
|
-
description: 'Server-side Ruby client for SeatLayer
|
|
13
|
-
|
|
12
|
+
description: 'Server-side Ruby client for SeatLayer reserved seating: seating charts,
|
|
13
|
+
events, seat maps, holds, seat booking, embed sessions and webhook verification,
|
|
14
|
+
with idempotency and retries built in.'
|
|
14
15
|
email:
|
|
15
16
|
- hello@seatlayer.io
|
|
16
17
|
executables: []
|