com.amazonaws.mobileconnectors.amazonmobileanalytics.monetization
Class MonetizationEventBuilder
java.lang.Object
com.amazonaws.mobileconnectors.amazonmobileanalytics.monetization.MonetizationEventBuilder
- Direct Known Subclasses:
- AmazonMonetizationEventBuilder, CustomMonetizationEventBuilder, GooglePlayMonetizationEventBuilder, VirtualMonetizationEventBuilder
public abstract class MonetizationEventBuilder
- extends java.lang.Object
Base class for handling the required attributes and metrics for monetization Events.
Currently, AmazonMonetizationEventBuilder is used to create
monetization events for Amazon purchases, GooglePlayMonetizationEventBuilder is used to create
monetization events for Google Play purchases and VirtualMonetizationEventBuilder is used to create
monetization events for virtual In-Game Store purchases.
This class can be extended if you need to record monetization events from other
purchase frameworks. Derived classes must override the isValid
method so that MonetizationEventBuilder knows if the derived builder is in a valid state. Derived builders
should then call the appropriate setters on this class to build a monetization event appropriate for their framework.
When creating derived classes, the following setters must be called on this class or else the builder will return null
- The ProductId must be set
- The Quantity must be set
- The Store must be set
- Either the (Currency and ItemPrice) or the ForrmattedItemPrice must be set
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
build
public AnalyticsEvent build()
- Builds a monetization event.
- Returns:
- A monetization event that can be recorded. If the builder is in
an invalid state, this method returns null.
Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.