public final class CustomEvent
extends java.lang.Object
| Constructor and Description |
|---|
CustomEvent(java.lang.String label)
Create a custom event without a specific revenue.
|
CustomEvent(java.lang.String label,
long revenue,
java.lang.String currency)
Create a custom event with a specific revenue value.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCurrency()
Returns the currency of the event's revenue.
|
java.lang.String |
getLabel()
Returns the name of the event
|
long |
getRevenue()
Returns the revenue value of the event
|
public CustomEvent(@NonNull
java.lang.String label)
label - the name of the event. The maximum allowed length is 256 charactersjava.lang.NullPointerException - when the label is nulljava.lang.IllegalArgumentException - when the label is empty or exceeds the maximum allowed lengthpublic CustomEvent(@NonNull
java.lang.String label,
long revenue,
@NonNull
java.lang.String currency)
label - the name of the event. The maximum allowed length is 256 charactersrevenue - the revenue value in milli-units. (e.g.: 1 EUR = 1000; 0,79 EUR = 799)currency - the ISO 4217 currency code of the revenue's currencyjava.lang.NullPointerException - when the label is nulljava.lang.IllegalArgumentException - when the label is empty or exceeds the maximum allowed lengthjava.lang.NullPointerException - when the currency string is emptyjava.lang.IllegalArgumentException - when the currency string is not a valid ISO 4217 code@NonNull public java.lang.String getLabel()
public long getRevenue()
@Nullable public java.lang.String getCurrency()