public final class Receipt
extends java.lang.Object
Constructor and Description |
---|
Receipt(ReceiptBuilder builder)
Creates an instance of the Receipt.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Compares this Receipt to the specified object.
|
java.util.Date |
getCancelDate()
Returns the cancel date for the purchase, or null if it is not canceled.
|
ProductType |
getProductType()
Returns the type of product.
|
java.util.Date |
getPurchaseDate()
Returns the purchase date for the purchase.
|
java.lang.String |
getReceiptId()
Returns a receipt ID which is a unique identifier of a purchase.
|
java.lang.String |
getSku()
Returns the SKU of the purchase.
|
int |
hashCode()
Returns a hash code for this Receipt.
|
boolean |
isCanceled()
Checks cancellation or expiration of the receipt.
|
org.json.JSONObject |
toJSON()
Utility method to return a JSON object containing the information for a
Receipt instance.
|
java.lang.String |
toString()
Utility method to return a String object that contains the information
for a Receipt instance.
|
public Receipt(ReceiptBuilder builder)
builder
- The builder for the Receipt.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getReceiptId()
public java.lang.String getSku()
getPurchaseDate()
and getCancelDate()
to determine the
start and end dates of the subscription.public ProductType getProductType()
public java.util.Date getPurchaseDate()
public java.util.Date getCancelDate()
public org.json.JSONObject toJSON()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isCanceled()