Package host.anzo.eossdk.eos.sdk.ecom
Class EOS_Ecom_Transaction
java.lang.Object
com.sun.jna.PointerType
host.anzo.eossdk.eos.sdk.ecom.EOS_Ecom_Transaction
- All Implemented Interfaces:
com.sun.jna.NativeMapped
,AutoCloseable
- Direct Known Subclasses:
EOS_Ecom_Transaction.ByReference
,EOS_Ecom_Transaction.ByValue
This handle is copied when EOS_Ecom_CopyTransactionById or EOS_Ecom_CopyTransactionByIndex is called.
A EOS_Ecom_CheckoutCallbackInfo provides the ID for the copy.
After being copied, EOS_Ecom_Transaction_Release must be called.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Fetches an entitlement from a given index.int
Fetch the number of entitlements that are part of this transaction.getTransactionId
(ByteBuffer outBuffer, IntBuffer inOutBufferLength) The Ecom Transaction Interface exposes getters for accessing information about a completed transaction.void
release()
Release the memory associated with an EOS_Ecom_HTransaction.Methods inherited from class com.sun.jna.PointerType
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
-
Constructor Details
-
EOS_Ecom_Transaction
public EOS_Ecom_Transaction(com.sun.jna.Pointer address) -
EOS_Ecom_Transaction
public EOS_Ecom_Transaction()
-
-
Method Details
-
getTransactionId
The Ecom Transaction Interface exposes getters for accessing information about a completed transaction. All Ecom Transaction Interface calls take a handle of type EOS_Ecom_HTransaction as the first parameter. An EOS_Ecom_HTransaction handle is originally returned as part of the EOS_Ecom_CheckoutCallbackInfo struct. An EOS_Ecom_HTransaction handle can also be retrieved from an EOSEcom handle using EOS_Ecom_CopyTransactionByIndex. It is expected that after a transaction that EOS_Ecom_Transaction_Release is called. When EOS_Platform_Release is called any remaining transactions will also be released. -
getEntitlementsCount
Fetch the number of entitlements that are part of this transaction.- Parameters:
options
- structure containing the Epic Account ID being accessed- Returns:
- the number of entitlements found.
- See Also:
-
copyEntitlementByIndex
public EOS_Ecom_Entitlement copyEntitlementByIndex(EOS_Ecom_Transaction_CopyEntitlementByIndexOptions options) throws EOSException Fetches an entitlement from a given index.- Parameters:
options
- structure containing the index being accessed- Returns:
- the entitlement for the given index, if it exists and is valid, use EOS_Ecom_Entitlement_Release when finished
- Throws:
EOSEcomEntitlementStaleException
- if the entitlement information is stale and passed out in OutEntitlementEOSInvalidParametersException
- if you pass a null pointer for the out parameterEOSNotFoundException
- if the entitlement is not foundEOSException
- See Also:
-
release
public void release()Release the memory associated with an EOS_Ecom_HTransaction. Is expected to be called after being received from a EOS_Ecom_CheckoutCallbackInfo. -
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-