Class TransactionContext
- java.lang.Object
-
- com.thalesgroup.tmgsdk.mastercard.TransactionContext
-
public class TransactionContext extends Object
TheTransactionContextclass represents the context of a transaction, encompassing details such as the merchant name, transaction amount, and currency code.- Since:
- 3.0.0
- Version:
- 3.0.0
-
-
Constructor Summary
Constructors Constructor Description TransactionContext(String merchantName, String amount, String currencyCode)Constructs a newTransactionContextinstance with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAmount()Returns the transaction amount in ISO 4217 format.StringgetCurrencyCode()Returns the ISO 4217 currency code where both numeric and alpha-numeric values are supported.StringgetMerchantName()Returns the name of the merchant.
-
-
-
Constructor Detail
-
TransactionContext
public TransactionContext(@NonNull String merchantName, @NonNull String amount, @NonNull String currencyCode)
Constructs a newTransactionContextinstance with the specified parameters.- Parameters:
merchantName- The name of the merchant (which cannot be null).amount- The transaction amount (which cannot be null).currencyCode- The currency code used for the transaction (which cannot be null).
-
-
Method Detail
-
getMerchantName
@NonNull public String getMerchantName()
Returns the name of the merchant.- Returns:
- The merchant name.
-
getAmount
@NonNull public String getAmount()
Returns the transaction amount in ISO 4217 format. That is, with the correct number of digits after the decimal separator.- Returns:
- The representation of
Amountin ISO 4217 format.
-
-