Class RequestBundle
- java.lang.Object
-
- aero.panasonic.inflight.services.contentdiscovery.v1.RequestBase<Bundle>
-
- aero.panasonic.inflight.services.contentdiscovery.v1.RequestBundle
-
public class RequestBundle extends RequestBase<Bundle>
The Request Bundle class returns all bundles available for all content types. A bundles is a set of items that grouped together and sold for a single price. Examples: four tv episodes sold together at a single price or a movie sold with popcorn and a soda for a single price.
You can filter by content name, seat class and price.
The class is returned byContentDiscovery.getBundleRequest()(String)}. It has methods to execute request synchronously and asynchronously and also provides a set of Set methods for parameters.
-
-
Field Summary
-
Fields inherited from class aero.panasonic.inflight.services.contentdiscovery.v1.RequestBase
mLangCode, mSeatClass
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecuteAsync(ContentDiscovery.Listener<Bundle> listener)Gets bundles asynchronously.java.util.List<Bundle>executeSync()Gets bundles asynchronously.JSONObjectgetSocketPayload()voidsetPrice(java.lang.String price)Sets the price to filter the items.voidsetRootContentType(java.lang.String rootContentType)Specifies the root content type to filter result.voidsetSeatClass(java.lang.String seatClass)Specifies the seat class, such as first or business.-
Methods inherited from class aero.panasonic.inflight.services.contentdiscovery.v1.RequestBase
cancel, getRequestId, setRequestCancelling
-
-
-
-
Method Detail
-
setSeatClass
public void setSeatClass(java.lang.String seatClass)
Specifies the seat class, such as first or business. If not specified, SeatClass.All will be used.- Parameters:
seatClass- Only accepts strings provided bySeatClass, such as first, business or all.
-
setRootContentType
public void setRootContentType(java.lang.String rootContentType)
Specifies the root content type to filter result. If this is not called, contents for all types are returned.- Parameters:
rootContentType- Only accepts strings provided byRootContentType, such as media, games or ebooks.
-
setPrice
public void setPrice(java.lang.String price)
Sets the price to filter the items. The price can be a single price or price range, such as 'between $2.99 and $5.99'.- Parameters:
price- Sets the price range
-
executeAsync
public void executeAsync(ContentDiscovery.Listener<Bundle> listener)
Gets bundles asynchronously. Bundles are items that grouped together and sold for a single price.- Parameters:
listener- Data is passed back in the listener. If data is retrieved successfully,ContentDiscovery.Listener.onDataReceived(List, RequestBase)is called.
If error occurs,ContentDiscovery.Listener.onError(ContentDiscovery.Error, RequestBase)is called.
-
executeSync
public java.util.List<Bundle> executeSync() throws ContentDiscovery.Exception
Gets bundles asynchronously. Bundles are items that grouped together and sold for a single price.- Returns:
- List of bundles.
- Throws:
ContentDiscovery.Exception- if error occurs.
-
getSocketPayload
public JSONObject getSocketPayload()
- Specified by:
getSocketPayloadin classRequestBase<Bundle>
-
-