-
- All Implemented Interfaces:
-
android.os.Parcelable
,java.io.Serializable
public class MenigaOffer implements Parcelable, Serializable
Copyright 2017 Meniga Iceland Inc.
-
-
Field Summary
-
Method Summary
-
-
Method Detail
-
setOperator
static void setOperator(MenigaOfferOperations operator)
Sets the api operator for doing api calls
- Parameters:
operator
- An object that implements the MenigaOfferOperations interface for carrying out api operations on this class.
-
isMerchantDeclined
boolean isMerchantDeclined()
-
isActivateOfferOnFirstPurchase
boolean isActivateOfferOnFirstPurchase()
-
hashCode
int hashCode()
-
fetch
static Result<MenigaOfferPage> fetch(int skip, int take, List<OfferFilterState> states, List<Long> offerIds, boolean expiredWithRedemptionOnly)
Returns offers and relevant meta data.
- Parameters:
skip
- how many offers should be skippedtake
- how many offers should be taken per pagestates
- state of offers that should be fetched.offerIds
- specific offers ids to fetchexpiredWithRedemptionOnly
- Fetch only excpired offers that have redemptions
-
fetch
static Result<MenigaOffer> fetch(long id)
Returns offer with specific id
- Parameters:
id
- specific offer id
-
fetch
static Result<MenigaOffer> fetch(String validationToken)
Returns offer with specific validation token
- Parameters:
validationToken
- specific offer validation token
-
fetch
@Deprecated() static Result<MenigaOfferPage> fetch(List<OfferFilterState> states)
Returns offers and relevant meta data.
- Parameters:
states
- state of offers that should be fetched.
-
fetchId
@Deprecated() static Result<MenigaOfferPage> fetchId(List<Long> offerIds)
Returns offers and relevant meta data by specific ids
- Parameters:
offerIds
- specific offer ids to fetch.
-
fetch
static Result<MenigaOfferPage> fetch(int skip, int take)
Returns offers and relevant meta data
- Parameters:
skip
- number of records to skiptake
- Number of records to return
-
activateByToken
Result<Void> activateByToken()
Activate offer by offer by validation token
-
activateByToken
static Result<Void> activateByToken(String validationToken)
-
markAsSeen
Result<Void> markAsSeen()
Mark offer as seen
-
fetchSimilarBrandSpendingDetails
Result<MenigaSimilarBrandSpendingDetails> fetchSimilarBrandSpendingDetails()
Fetch similar brand spending details
-
fetchSimilarBrandSpendingDetailsById
static Result<MenigaSimilarBrandSpendingDetails> fetchSimilarBrandSpendingDetailsById(int id)
Fetch similar brand spending details by offer id
- Parameters:
id
- offer id of the offer for which the details are to be retrieved
-
fetchRedemptions
Result<MenigaRedemptions> fetchRedemptions()
Fetch redemption transactions
-
fetchRedemptionsById
static Result<MenigaRedemptions> fetchRedemptionsById(int id)
Fetch redemption transactions by offer id
- Parameters:
id
- offer id of the offer for which the redemption transactions are to be retrieved
-
fetchNearbyMerchantLocations
Result<MenigaOfferMerchantLocationPage> fetchNearbyMerchantLocations(Double latitude, Double longitude, Double radiumKm, Integer limitLocations)
Fetch nearby merchant locations
- Parameters:
latitude
- central latitude for location filteringlongitude
- central longitude for location filteringradiumKm
- radius in km for location filteringlimitLocations
- the maximum number of locations to be returned (per offer)
-
fetchNearbyMerchantLocationsById
static Result<MenigaOfferMerchantLocationPage> fetchNearbyMerchantLocationsById(int id, Double latitude, Double longitude, Double radiumKm, Integer limitLocations)
Fetch nearby merchant locations by offer id
- Parameters:
id
- offer id of the offer for which the locations are to be retrievedlatitude
- central latitude for location filteringlongitude
- central longitude for location filteringradiumKm
- radius in km for location filteringlimitLocations
- the maximum number of locations to be returned (per offer)
-
describeContents
int describeContents()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
getId
long getId()
-
getDescription
String getDescription()
-
getBrandId
Long getBrandId()
-
getBrandName
String getBrandName()
-
getValidationToken
String getValidationToken()
-
getState
OfferState getState()
-
getRewardType
RewardType getRewardType()
-
getReward
MenigaDecimal getReward()
-
getTotalRedeemedAmount
MenigaDecimal getTotalRedeemedAmount()
-
getMinimumPurchaseAmount
MenigaDecimal getMinimumPurchaseAmount()
-
getMaximumRedemptionPerOffer
MenigaDecimal getMaximumRedemptionPerOffer()
-
getMaximumRedemptionPerPurchase
MenigaDecimal getMaximumRedemptionPerPurchase()
-
getMinimumAccumulatedAmount
MenigaDecimal getMinimumAccumulatedAmount()
-
getMaximumPurchase
Integer getMaximumPurchase()
-
getLastReimbursementAmount
MenigaDecimal getLastReimbursementAmount()
-
getLastReimbursementDate
DateTime getLastReimbursementDate()
-
getScheduledReimbursementAmount
MenigaDecimal getScheduledReimbursementAmount()
-
getScheduledReimbursementDate
DateTime getScheduledReimbursementDate()
-
getDaysLeft
int getDaysLeft()
-
getValidFrom
DateTime getValidFrom()
-
getValidTo
DateTime getValidTo()
-
getActivatedDate
DateTime getActivatedDate()
-
getDeclineDate
DateTime getDeclineDate()
-
getMerchantName
String getMerchantName()
-
getRelevanceHook
RelevanceHookDisplay getRelevanceHook()
-
getTotalSpendingAtSimilarBrands
MenigaDecimal getTotalSpendingAtSimilarBrands()
-
getTotalSpendingOnOffer
MenigaDecimal getTotalSpendingOnOffer()
-
getOfferSimilarBrandsSpendingRatio
MenigaDecimal getOfferSimilarBrandsSpendingRatio()
-
getMerchantLocations
List<MenigaOfferMerchantLocation> getMerchantLocations()
-
getWebUriLabel
String getWebUriLabel()
-
-
-
-