UserWise Unity SDK  3.0.0
Public Member Functions | Public Attributes | Events | List of all members
UserWiseSDK.Offers.OffersModule Class Reference

Acts as the public interface used for when managing offers and the related impressions. More...

Inheritance diagram for UserWiseSDK.Offers.OffersModule:
UserWiseSDK.Common.Modules.BaseModule< Offer >

Public Member Functions

void InitializeOfferImpression (Offer offer)
 Create a new OfferImpression for the provided Offer and the current player. More...
 
void UpdateOfferImpressionState (OfferImpression impression, OfferImpression.ImpressionState newState, Action< bool > onComplete)
 Updates the state of the OfferImpression through the UserWise API. If the offer attached to the impression is within ActiveOffers, we'll remove it, making it unusable. More...
 
- Public Member Functions inherited from UserWiseSDK.Common.Modules.BaseModule< Offer >
string GetModuleName ()
 Returns the module name. More...
 
Get (string id)
 
FindInActiveOrUpcoming (Predicate< T > predicate)
 

Public Attributes

DateTime? UpcomingStartsBefore = null
 Configures the DateTime that will be used to filter upcoming content returned from the UserWise API. More...
 

Events

EventHandler< OfferEventArgsOnOfferImpressionInitializationFailed
 Emitted when an offer impression initialization attempt failed to complete. More...
 
EventHandler< OfferImpressionEventArgsOnOfferImpressionInitialized
 Emitted when an offer impression initialization attempt succeeded. More...
 
- Events inherited from UserWiseSDK.Common.Modules.BaseModule< Offer >
EventHandler< EventArgs > OnLoadFailed
 Emitted when the data for this module could not be loaded from the API and/or cache. More...
 
EventHandler< OnLoadedEventArgsOnLoaded
 Emitted when the data for this module has been reloaded. Currently, either from the API, or through the cached data. More...
 
EventHandler< OnActiveEventArgs< T > > OnActive
 Emitted when a type of T has been marked as active. More...
 
EventHandler< OnInactiveEventArgs< T > > OnInactive
 Emitted when a type of T has been marked as inactive. More...
 

Additional Inherited Members

- Protected Member Functions inherited from UserWiseSDK.Common.Modules.BaseModule< Offer >
void EmitOnLoadFailed (object sender)
 
void EmitOnLoaded (object sender, OnLoadedEventArgs e)
 
void ResetModuleData ()
 
void LoadFromCache (ModuleCacheFile moduleCacheFile)
 
void WriteToCache (ModuleCacheFile moduleCacheFile)
 
- Protected Attributes inherited from UserWiseSDK.Common.Modules.BaseModule< Offer >
UserWise userWise
 
- Properties inherited from UserWiseSDK.Common.Modules.BaseModule< Offer >
List< T > Active [get, protected set]
 A List of active (available) module stored items. More...
 
List< T > Upcoming [get, protected set]
 A List of upcoming (soon to be available) module stored items. More...
 

Detailed Description

Acts as the public interface used for when managing offers and the related impressions.

Member Function Documentation

◆ InitializeOfferImpression()

void UserWiseSDK.Offers.OffersModule.InitializeOfferImpression ( Offer  offer)
inline

Create a new OfferImpression for the provided Offer and the current player.

Notification of success and failure is routed through the OnOfferImpressionInitializationFailed and OnOfferImpressionInitiailzed events respectively.

Parameters
offerOffer to create an impression for

◆ UpdateOfferImpressionState()

void UserWiseSDK.Offers.OffersModule.UpdateOfferImpressionState ( OfferImpression  impression,
OfferImpression.ImpressionState  newState,
Action< bool >  onComplete 
)
inline

Updates the state of the OfferImpression through the UserWise API. If the offer attached to the impression is within ActiveOffers, we'll remove it, making it unusable.

Parameters
impressionOfferImpression to update the state for
newStateNew state the offer impression should be in
onCompleteCalled once the offer impression state change has successfully (or not) ocurred on the UserWise servers.

If the state change was unsuccessful, false is supplied as the first parameter.

Member Data Documentation

◆ UpcomingStartsBefore

DateTime? UserWiseSDK.Offers.OffersModule.UpcomingStartsBefore = null

Configures the DateTime that will be used to filter upcoming content returned from the UserWise API.

Event Documentation

◆ OnOfferImpressionInitializationFailed

EventHandler<OfferEventArgs> UserWiseSDK.Offers.OffersModule.OnOfferImpressionInitializationFailed

Emitted when an offer impression initialization attempt failed to complete.

◆ OnOfferImpressionInitialized

EventHandler<OfferImpressionEventArgs> UserWiseSDK.Offers.OffersModule.OnOfferImpressionInitialized

Emitted when an offer impression initialization attempt succeeded.


The documentation for this class was generated from the following file: