LUCampaignRequestFactory Class Reference
Inherits from | NSObject |
Declared in | LUCampaignRequestFactory.h LUCampaignRequestFactory.m |
Class Methods
requestForCampaignMetadataForLocationWithID:
Builds a request to return metadata on campaigns for locations with the given locationID
.
+ (LUAPIRequest *)requestForCampaignMetadataForLocationWithID:(NSNumber *)locationID
Parameters
- locationID
The ID of the location whose campaigns will be retrieved.
Discussion
Builds a request to return metadata on campaigns for locations with the given locationID
.
On success, this request will return an NSArray
of LUCampaignMetadata
instances. Each
LUCampaignMetadata
contains a campaignID
and an NSArray
of available representations.
Retrieve the campaign with that representation using
requestForCampaignWithMetadata:representationType:
.
Declared In
LUCampaignRequestFactory.h
requestForCampaignMetadataForMerchantWithID:
Builds a request to return metadata on campaigns for locations with the given merchantID
.
+ (LUAPIRequest *)requestForCampaignMetadataForMerchantWithID:(NSNumber *)merchantID
Parameters
- merchantID
The ID of the merchant whose campaigns will be retrieved.
Discussion
Builds a request to return metadata on campaigns for locations with the given merchantID
.
On success, this request will return an NSArray
of LUCampaignMetadata
instances. Each
LUCampaignMetadata
contains a campaignID
and an NSArray
of available representations.
Retrieve the campaign with that representation using
requestForCampaignWithMetadata:representationType:
.
Declared In
LUCampaignRequestFactory.h
requestForCampaignWithCode:
Builds a request to retrieve a campaign by its code. This is most commonly used when a user has scanned a QR code for the campaign. The value retrieved from the QR code can be used with this request to retrieve the associated campaign.
+ (LUAPIRequest *)requestForCampaignWithCode:(NSString *)code
Parameters
- code
The code of the campaign to retrieve.
Discussion
Builds a request to retrieve a campaign by its code. This is most commonly used when a user has scanned a QR code for the campaign. The value retrieved from the QR code can be used with this request to retrieve the associated campaign.
On success, this request will return the requested LUCampaign
instance.
Declared In
LUCampaignRequestFactory.h
requestForCampaignWithID:
Builds a request to retrieve a campaign by its unique ID.
+ (LUAPIRequest *)requestForCampaignWithID:(NSNumber *)campaignID
Parameters
- campaignID
The ID of the campaign to retrieve.
Discussion
Builds a request to retrieve a campaign by its unique ID.
On success, this request will return the requested LUCampaign
instance.
Declared In
LUCampaignRequestFactory.h
requestForCampaignWithMetadata:representationType:
Builds a request to retrieve a representation of the campaign with the given metadata. The campaign
metadata must include the given representationType
as one of its own representationTypes
.
+ (LUAPIRequest *)requestForCampaignWithMetadata:(LUCampaignMetadata *)campaignMetadata representationType:(LUCampaignRepresentationType)representationType
Discussion
Builds a request to retrieve a representation of the campaign with the given metadata. The campaign
metadata must include the given representationType
as one of its own representationTypes
.
On success, this request will return an instance of the campaign representation. For example,
if the representation type is LUCampaignRepresentationTypeBasicV1
, the request will return an
instance of LUCampaignRepresentationBasicV1
.
Declared In
LUCampaignRequestFactory.h
requestForMerchantsForCampaignWithID:
Builds a request to retrieve the merchants associated with the campaign. Only the merchant IDs are
returned; they are represented as an NSArray
of NSNumber
instances. If the campaign is global
(it applies to all merchants), then this request will return nil
.
+ (LUAPIRequest *)requestForMerchantsForCampaignWithID:(NSNumber *)campaignID
Parameters
- campaignID
The ID of the campaign whose merchants will be retrieved.
Discussion
Builds a request to retrieve the merchants associated with the campaign. Only the merchant IDs are
returned; they are represented as an NSArray
of NSNumber
instances. If the campaign is global
(it applies to all merchants), then this request will return nil
.
Declared In
LUCampaignRequestFactory.h