@Immutable @LevelUpApi(contract=PUBLIC) public final class CampaignRequestFactory extends AbstractRequestFactory
| Modifier and Type | Class and Description |
|---|---|
static class |
CampaignRequestFactory.IconSize
Represents icon sizes for icon requests.
|
| Constructor and Description |
|---|
CampaignRequestFactory(Context context,
AccessTokenRetriever retriever) |
| Modifier and Type | Method and Description |
|---|---|
AbstractRequest |
buildGetCampaignDetailsByRepresentationType(CampaignMetadata metadata,
CampaignRepresentationType representationType) |
AbstractRequest |
buildGetCampaignIcon(long campaignWebServiceId,
CampaignRequestFactory.IconSize iconSize) |
AbstractRequest |
buildGetCampaignImageRequest(Context context,
long campaignWebServiceId) |
AbstractRequest |
buildGetCampaignMerchantsRequest(long campaignWebServiceId) |
AbstractRequest |
buildGetCampaignRequest(int campaignId)
Build a request to get the details of a campaign.
|
getAccessTokenRetriever, getContextpublic CampaignRequestFactory(Context context, AccessTokenRetriever retriever)
context - the Application context.retriever - the implementation of AccessTokenRetriever to use to get the
User's
AccessToken.public AbstractRequest buildGetCampaignRequest(int campaignId)
campaignId - the ID of the campaign to get the details of.AbstractRequest to use to get the details of the campaign.public AbstractRequest buildGetCampaignImageRequest(Context context, long campaignWebServiceId)
context - the Application context.campaignWebServiceId - the web service ID of the
Campaign to get the image for.AbstractRequest that represents a request to the web service to get the
image for a Campaign with the web service ID
passed.public AbstractRequest buildGetCampaignMerchantsRequest(long campaignWebServiceId)
campaignWebServiceId - the web service ID of the
Campaign to get the merchants for.AbstractRequest that represents a request to the web service to get the
list of merchant IDs that its credit is valid at.@LevelUpApi(contract=PUBLIC) @RequiresPermission(value="manage_user_campaigns") public AbstractRequest buildGetCampaignDetailsByRepresentationType(CampaignMetadata metadata, CampaignRepresentationType representationType)
metadata - the campaign metadata to get details about.representationType - the type of details to retrieve.AbstractRequest that represents a request to the web service to get
details for a specific campaign based on the .CampaignRepresentationTypes.@LevelUpApi(contract=PUBLIC) public AbstractRequest buildGetCampaignIcon(long campaignWebServiceId, CampaignRequestFactory.IconSize iconSize)
campaignWebServiceId - the campaign id to get an icon for.iconSize - the icon size to retrieve.AbstractRequest that represents a request to the web service to get
an icon for the specific campaign at the specified size.