@Immutable @LevelUpApi(contract=PUBLIC) public final class ClaimRequestFactory extends AbstractRequestFactory
Campaign
s.Constructor and Description |
---|
ClaimRequestFactory(Context context,
AccessTokenRetriever retriever) |
Modifier and Type | Method and Description |
---|---|
AbstractRequest |
buildClaimCampaignRequest(String code)
Build a request to claim a generic campaign by its cohort code.
|
AbstractRequest |
buildClaimLegacyLoyaltyRequest(int loyaltyCampaignId,
String loyaltyId)
Build a request to claim a "Legacy Loyalty" campaign.
|
getAccessTokenRetriever, getContext
public ClaimRequestFactory(Context context, AccessTokenRetriever retriever)
context
- the Application context.retriever
- the implementation of AccessTokenRetriever
to use to get the
User
's
AccessToken
.@LevelUpApi(contract=PUBLIC) @RequiresPermission(value="manage_user_campaigns") @AccessTokenRequired public AbstractRequest buildClaimLegacyLoyaltyRequest(int loyaltyCampaignId, String loyaltyId)
loyaltyCampaignId
- the web service ID of the legacy loyalty campaign.loyaltyId
- the user's ID from their legacy loyalty program.AbstractRequest
to use to claim the legacy loyalty campaign.@LevelUpApi(contract=PUBLIC) @RequiresPermission(value="manage_user_campaigns") @AccessTokenRequired public AbstractRequest buildClaimCampaignRequest(String code)
code
- the code to claim.AbstractRequest
to use to claim the
Campaign
.