@Immutable @LevelUpApi(contract=PUBLIC) public final class OrderRequestFactory extends AbstractRequestFactory
Constructor and Description |
---|
OrderRequestFactory(Context context,
AccessTokenRetriever retriever)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
AbstractRequest |
newGetAppOrdersRequest(int page)
Builds a request to get a list of orders for the current user.
|
AbstractRequest |
newGetAppOrdersRequest(long appId,
int page)
Deprecated.
|
AbstractRequest |
newGetOrderRequest(String orderUuid)
Builds a request to get a single order.
|
getAccessTokenRetriever, getContext
public OrderRequestFactory(Context context, AccessTokenRetriever retriever)
context
- Application context.retriever
- the implementation of AccessTokenRetriever
to use to get the
User
's
AccessToken
.@LevelUpApi(contract=PUBLIC) @RequiresPermission(value="read_user_orders") @AccessTokenRequired public AbstractRequest newGetAppOrdersRequest(int page)
page
- the "page" of results to get because the endpoint supports pagination. The
expected first page from the web service starts at 1. The web service will return an
empty set if there are no more results to show@LevelUpApi(contract=PUBLIC) @RequiresPermission(value="read_user_orders") @AccessTokenRequired public AbstractRequest newGetOrderRequest(String orderUuid)
orderUuid
- the UUID of the order to request.@AccessTokenRequired @Deprecated @LevelUpApi(contract=INTERNAL) public AbstractRequest newGetAppOrdersRequest(long appId, int page)
newGetAppOrdersRequest(int)
.appId
- the ID of the app whose orders will be displayed.page
- the "page" of results to get because the endpoint supports pagination. The
expected first page from the web service starts at 1. The web service will return an
empty set if there are no more results to show