@@ -147,68 +147,68 @@ public Lister<StatusChange> statusChanges(String key, String objectId) {
147
147
return new Lister <>(pageFetcher );
148
148
}
149
149
150
- public void book (String eventKey , List <?> objects ) {
151
- book (eventKey , objects , null , null );
150
+ public ChangeObjectStatusResult book (String eventKey , List <?> objects ) {
151
+ return book (eventKey , objects , null , null );
152
152
}
153
153
154
- public void book (String eventKey , List <?> objects , String holdToken ) {
155
- book (eventKey , objects , holdToken , null );
154
+ public ChangeObjectStatusResult book (String eventKey , List <?> objects , String holdToken ) {
155
+ return book (eventKey , objects , holdToken , null );
156
156
}
157
157
158
- public void book (String eventKey , List <?> objects , String holdToken , String orderId ) {
159
- changeObjectStatus (eventKey , objects , BOOKED , holdToken , orderId );
158
+ public ChangeObjectStatusResult book (String eventKey , List <?> objects , String holdToken , String orderId ) {
159
+ return changeObjectStatus (eventKey , objects , BOOKED , holdToken , orderId );
160
160
}
161
161
162
- public void book (String eventKey , BestAvailable bestAvailable ) {
163
- book (eventKey , bestAvailable , null , null );
162
+ public BestAvailableResult book (String eventKey , BestAvailable bestAvailable ) {
163
+ return book (eventKey , bestAvailable , null , null );
164
164
}
165
165
166
- public void book (String eventKey , BestAvailable bestAvailable , String holdToken ) {
167
- book (eventKey , bestAvailable , holdToken , null );
166
+ public BestAvailableResult book (String eventKey , BestAvailable bestAvailable , String holdToken ) {
167
+ return book (eventKey , bestAvailable , holdToken , null );
168
168
}
169
169
170
- public void book (String eventKey , BestAvailable bestAvailable , String holdToken , String orderId ) {
171
- changeObjectStatus (eventKey , bestAvailable , BOOKED , holdToken , orderId );
170
+ public BestAvailableResult book (String eventKey , BestAvailable bestAvailable , String holdToken , String orderId ) {
171
+ return changeObjectStatus (eventKey , bestAvailable , BOOKED , holdToken , orderId );
172
172
}
173
173
174
- public void book (List <String > eventKeys , List <?> objects , String holdToken , String orderId ) {
175
- changeObjectStatus (eventKeys , objects , BOOKED , holdToken , orderId );
174
+ public ChangeObjectStatusResult book (List <String > eventKeys , List <?> objects , String holdToken , String orderId ) {
175
+ return changeObjectStatus (eventKeys , objects , BOOKED , holdToken , orderId );
176
176
}
177
177
178
- public void hold (String eventKey , List <?> objects , String holdToken ) {
179
- hold (eventKey , objects , holdToken , null );
178
+ public ChangeObjectStatusResult hold (String eventKey , List <?> objects , String holdToken ) {
179
+ return hold (eventKey , objects , holdToken , null );
180
180
}
181
181
182
- public void hold (String eventKey , List <?> objects , String holdToken , String orderId ) {
183
- changeObjectStatus (eventKey , objects , HELD , holdToken , orderId );
182
+ public ChangeObjectStatusResult hold (String eventKey , List <?> objects , String holdToken , String orderId ) {
183
+ return changeObjectStatus (eventKey , objects , HELD , holdToken , orderId );
184
184
}
185
185
186
- public void hold (String eventKey , BestAvailable bestAvailable , String holdToken ) {
187
- hold (eventKey , bestAvailable , holdToken , null );
186
+ public BestAvailableResult hold (String eventKey , BestAvailable bestAvailable , String holdToken ) {
187
+ return hold (eventKey , bestAvailable , holdToken , null );
188
188
}
189
189
190
- public void hold (String eventKey , BestAvailable bestAvailable , String holdToken , String orderId ) {
191
- changeObjectStatus (eventKey , bestAvailable , HELD , holdToken , orderId );
190
+ public BestAvailableResult hold (String eventKey , BestAvailable bestAvailable , String holdToken , String orderId ) {
191
+ return changeObjectStatus (eventKey , bestAvailable , HELD , holdToken , orderId );
192
192
}
193
193
194
- public void hold (List <String > eventKeys , List <?> objects , String holdToken , String orderId ) {
195
- changeObjectStatus (eventKeys , objects , HELD , holdToken , orderId );
194
+ public ChangeObjectStatusResult hold (List <String > eventKeys , List <?> objects , String holdToken , String orderId ) {
195
+ return changeObjectStatus (eventKeys , objects , HELD , holdToken , orderId );
196
196
}
197
197
198
- public void release (String eventKey , List <?> objects ) {
199
- release (eventKey , objects , null , null );
198
+ public ChangeObjectStatusResult release (String eventKey , List <?> objects ) {
199
+ return release (eventKey , objects , null , null );
200
200
}
201
201
202
- public void release (String eventKey , List <?> objects , String holdToken ) {
203
- release (eventKey , objects , holdToken , null );
202
+ public ChangeObjectStatusResult release (String eventKey , List <?> objects , String holdToken ) {
203
+ return release (eventKey , objects , holdToken , null );
204
204
}
205
205
206
- public void release (String eventKey , List <?> objects , String holdToken , String orderId ) {
207
- changeObjectStatus (eventKey , objects , FREE , holdToken , orderId );
206
+ public ChangeObjectStatusResult release (String eventKey , List <?> objects , String holdToken , String orderId ) {
207
+ return changeObjectStatus (eventKey , objects , FREE , holdToken , orderId );
208
208
}
209
209
210
- public void release (List <String > eventKeys , List <?> objects , String holdToken , String orderId ) {
211
- changeObjectStatus (eventKeys , objects , FREE , holdToken , orderId );
210
+ public ChangeObjectStatusResult release (List <String > eventKeys , List <?> objects , String holdToken , String orderId ) {
211
+ return changeObjectStatus (eventKeys , objects , FREE , holdToken , orderId );
212
212
}
213
213
214
214
public BestAvailableResult changeObjectStatus (String eventKey , BestAvailable bestAvailable , String status ) {
@@ -227,30 +227,32 @@ public BestAvailableResult changeObjectStatus(String eventKey, BestAvailable bes
227
227
return gson ().fromJson (result .getBody (), BestAvailableResult .class );
228
228
}
229
229
230
- public void changeObjectStatus (String eventKey , List <?> objects , String status ) {
231
- changeObjectStatus (eventKey , objects , status , null , null );
230
+ public ChangeObjectStatusResult changeObjectStatus (String eventKey , List <?> objects , String status ) {
231
+ return changeObjectStatus (eventKey , objects , status , null , null );
232
232
}
233
233
234
- public void changeObjectStatus (String eventKey , List <?> objects , String status , String holdToken ) {
235
- changeObjectStatus (eventKey , objects , status , holdToken , null );
234
+ public ChangeObjectStatusResult changeObjectStatus (String eventKey , List <?> objects , String status , String holdToken ) {
235
+ return changeObjectStatus (eventKey , objects , status , holdToken , null );
236
236
}
237
237
238
- public void changeObjectStatus (String eventKey , List <?> objects , String status , String holdToken , String orderId ) {
239
- changeObjectStatus (singletonList (eventKey ), objects , status , holdToken , orderId );
238
+ public ChangeObjectStatusResult changeObjectStatus (String eventKey , List <?> objects , String status , String holdToken , String orderId ) {
239
+ return changeObjectStatus (singletonList (eventKey ), objects , status , holdToken , orderId );
240
240
}
241
241
242
- public void changeObjectStatus (List <String > eventKeys , List <?> objects , String status ) {
243
- changeObjectStatus (eventKeys , objects , status , null , null );
242
+ public ChangeObjectStatusResult changeObjectStatus (List <String > eventKeys , List <?> objects , String status ) {
243
+ return changeObjectStatus (eventKeys , objects , status , null , null );
244
244
}
245
245
246
- public void changeObjectStatus (List <String > eventKeys , List <?> objects , String status , String holdToken ) {
247
- changeObjectStatus (eventKeys , objects , status , holdToken , null );
246
+ public ChangeObjectStatusResult changeObjectStatus (List <String > eventKeys , List <?> objects , String status , String holdToken ) {
247
+ return changeObjectStatus (eventKeys , objects , status , holdToken , null );
248
248
}
249
249
250
- public void changeObjectStatus (List <String > eventKeys , List <?> objects , String status , String holdToken , String orderId ) {
251
- stringResponse (post (baseUrl + "/seasons/actions/change-object-status" )
250
+ public ChangeObjectStatusResult changeObjectStatus (List <String > eventKeys , List <?> objects , String status , String holdToken , String orderId ) {
251
+ HttpResponse < String > response = stringResponse (post (baseUrl + "/seasons/actions/change-object-status" )
252
252
.basicAuth (secretKey , null )
253
+ .queryString ("expand" , "labels" )
253
254
.body (changeObjectStatusRequest (eventKeys , toObjects (objects ), status , holdToken , orderId ).toString ()));
255
+ return gson ().fromJson (response .getBody (), ChangeObjectStatusResult .class );
254
256
}
255
257
256
258
private List <ObjectProperties > toObjects (List <?> objects ) {
0 commit comments