@@ -35,6 +35,11 @@ public Map<String, Object> hold(String eventKey, List<String> labels) {
3535 return http .post (path (eventKey , "/hold" ), body ("labels" , labels ));
3636 }
3737
38+ /** Full hold request, including selections and replacement-hold semantics. */
39+ public Map <String , Object > hold (String eventKey , Map <String , Object > request ) {
40+ return http .post (path (eventKey , "/hold" ), request );
41+ }
42+
3843 public Map <String , Object > hold (String eventKey , List <String > labels , Long ttlMs , String idempotencyKey ) {
3944 return http .post (path (eventKey , "/hold" ), body ("labels" , labels , "ttlMs" , ttlMs ), idempotencyKey );
4045 }
@@ -158,6 +163,23 @@ public Map<String, Object> extendHold(String eventKey, String holdId, Long ttlMs
158163 return http .post (path (eventKey , "/extend" ), body ("holdId" , holdId , "ttlMs" , ttlMs ));
159164 }
160165
166+ public Map <String , Object > extendHold (
167+ String eventKey ,
168+ String holdId ,
169+ Long ttlMs ,
170+ List <String > channelIds ,
171+ Boolean ignoreChannelRestrictions ,
172+ String reason ) {
173+ return http .post (
174+ path (eventKey , "/extend" ),
175+ body (
176+ "holdId" , holdId ,
177+ "ttlMs" , ttlMs ,
178+ "channelIds" , channelIds ,
179+ "ignoreChannelRestrictions" , ignoreChannelRestrictions ,
180+ "reason" , reason ));
181+ }
182+
161183 /** Authoritative items and prices. Charge from this, not the browser. */
162184 public Map <String , Object > retrieveHold (String eventKey , String holdId ) {
163185 return http .get (path (eventKey , "/holds/" + encode (holdId )));
@@ -171,6 +193,13 @@ public Map<String, Object> book(String eventKey, String holdId, String bookingRe
171193 return http .post (path (eventKey , "/book" ), body ("holdId" , holdId , "bookingRef" , bookingRef (bookingRef )));
172194 }
173195
196+ /** Full book request, including optional labels beside a hold id. */
197+ public Map <String , Object > book (String eventKey , Map <String , Object > request ) {
198+ Map <String , Object > normalized = new java .util .LinkedHashMap <>(request );
199+ normalized .put ("bookingRef" , bookingRef ((String ) request .get ("bookingRef" )));
200+ return http .post (path (eventKey , "/book" ), normalized );
201+ }
202+
174203 public Map <String , Object > book (
175204 String eventKey ,
176205 String holdId ,
@@ -229,6 +258,10 @@ public Map<String, Object> block(String eventKey, List<String> labels) {
229258 return http .post (path (eventKey , "/block" ), body ("labels" , labels ));
230259 }
231260
261+ public Map <String , Object > block (String eventKey , List <String > labels , Long releaseAt ) {
262+ return http .post (path (eventKey , "/block" ), body ("labels" , labels , "releaseAt" , releaseAt ));
263+ }
264+
232265 public Map <String , Object > unblock (String eventKey , List <String > labels ) {
233266 return http .post (path (eventKey , "/unblock" ), body ("labels" , labels ));
234267 }
@@ -241,8 +274,8 @@ public Map<String, Object> retrieveAvailability(String eventKey) {
241274 return http .get (path (eventKey , "/availability" ));
242275 }
243276
244- public Map <String , Object > updateAvailability (String eventKey , Map <String , Object > fields ) {
245- return http .post (path (eventKey , "/availability" ), fields );
277+ public Map <String , Object > updateAvailability (String eventKey , Map <String , Object > rules ) {
278+ return http .post (path (eventKey , "/availability" ), body ( "rules" , rules ) );
246279 }
247280
248281 /** One page of booking lifecycle records, newest first. */
0 commit comments