public final class Util extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
calculateSessionValidity() |
static Amount |
createAmount(BigDecimal amount,
String currency)
Returns an Amount struct to use on requests
|
static Amount |
createAmount(String amount,
String currency)
Returns an Amount struct to use on requests
|
static int |
getDecimalPlaces(String currency) |
static <T> String |
implode(String glue,
List<T> list)
Joins a list of items to a single string using "glue" as separator
If the item is null, it will add as empty
|
static String |
toIndentedString(Object o)
Convert the given object to string with each line indented by 4 spaces
(except the first line).
|
public static <T> String implode(String glue, List<T> list)
T - type of elementsglue - separatorlist - list of elements to be joinedpublic static Amount createAmount(String amount, String currency)
amount - Defines the amountcurrency - Defines the amount currencypublic static Amount createAmount(BigDecimal amount, String currency)
amount - Defines the amountcurrency - Defines the amount currencypublic static int getDecimalPlaces(String currency)
public static String toIndentedString(Object o)
o - stringpublic static String calculateSessionValidity()
Copyright © 2022. All rights reserved.