@LevelUpApi(contract=PUBLIC) public final class PaymentPreferenceRequestFactory extends AbstractRequestFactory
Constructor and Description |
---|
PaymentPreferenceRequestFactory(Context context,
AccessTokenRetriever retriever) |
Modifier and Type | Method and Description |
---|---|
AbstractRequest |
buildPaymentOptionsSummaryRequest()
Build a request to get
PaymentOptionsSummary . |
AbstractRequest |
buildSetPaymentPreferenceRequest(PaymentPreference paymentPreference)
Build a request to set a user's
PaymentPreference . |
getAccessTokenRetriever, getContext
public PaymentPreferenceRequestFactory(Context context, AccessTokenRetriever retriever)
context
- Application contextretriever
- the implementation of .AccessTokenRetriever
to use to get the User
's AccessToken
if needed.public AbstractRequest buildPaymentOptionsSummaryRequest()
PaymentOptionsSummary
. If an
access token is present, it must have the
Permissions.PERMISSION_MANAGE_USER_PAYMENT_METHODS
permission.AbstractRequest
to use to get the details
available payment options.@AccessTokenRequired @RequiresPermission(value="create_orders") public AbstractRequest buildSetPaymentPreferenceRequest(PaymentPreference paymentPreference)
PaymentPreference
.paymentPreference
- the user's PaymentPreference
.AbstractRequest
to use to get the details
available payment options.