Package sg.dex.starfish.impl.remote
Class RemotePurchase
java.lang.Object
sg.dex.starfish.impl.remote.RemotePurchase
- All Implemented Interfaces:
Purchase
public class RemotePurchase extends Object implements Purchase
This class representing an purchase managed via a remote agent.
This class included methods for create , get listing, get status and metadata of the purchase The instance of this class can be referred by using the purchase ID.
- Version:
- 0.5
- Author:
- Ayush
-
Method Summary
Modifier and Type Method Description static RemotePurchase
create(RemoteAgent agent, String id)
To get the Reference of Existing ListingListing
getListing()
Returns the Listing associated with this Purchase.Map<String,Object>
getMetaData()
Get the metadata for this Purchase as a nested MapString
status()
API to get the status of Purchase.
-
Method Details
-
create
To get the Reference of Existing Listing- Parameters:
agent
- agent on which the purchase instance need to be createdid
- id- Returns:
- RemotePurchase instance
-
getListing
Description copied from interface:Purchase
Returns the Listing associated with this Purchase.The listing may not be available in some circumstances (e.g. lack of access permission) in which case an exception will be thrown.
- Specified by:
getListing
in interfacePurchase
- Returns:
- The listing for this Purchase
-
status
Description copied from interface:Purchase
API to get the status of Purchase. Possible status can be : "wishlist", "ordered", "delivered" -
getMetaData
Description copied from interface:Purchase
Get the metadata for this Purchase as a nested Map- Specified by:
getMetaData
in interfacePurchase
- Returns:
- The metadata for this purchase
-