Class TransferUtils
java.lang.Object
es.kukenan.smartfi.microservice.transfer.utils.TransferUtils
Move money utilities.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconvertBeneficiaryCccAccountToIban(es.kukenan.smartfi.microservice.transfer.api.transfer.BeneficiaryRequestDto beneficiaryRequestDto, AccountType accountType) Converts the beneficiary CCC account to an IBAN format.static org.springframework.http.HttpHeaderscreatePropagationHeaders(es.kukenan.smartfi.common.context.config.ContextPropagationProperties properties, es.kukenan.smartfi.common.context.RequestContextManager contextManager, String userToken) Build context propagation headers.static voidGenerate Error code of Core by a CCC.static StringgenerateIbanByCcc(String ccc) Generate IBAN by a CCC.private static booleanChecks if the account type is CCC.static StringnormalizeCharNotPermitted(String original) Replace a text for the same without specil characters.static StringobfuscateAccountNumber(String accountNumber) Obfuscate Account Number.static StringobjectoToString(Object request) Object to string.
-
Field Details
-
CHAR_OBFUSCATOR
Char Obfuscator.- See Also:
-
IBAN_CODE_SUFFIX
Iban code suffix.- See Also:
-
IBAN_COUNTRY_CODE
Iban country code.- See Also:
-
-
Constructor Details
-
TransferUtils
public TransferUtils()
-
-
Method Details
-
normalizeCharNotPermitted
Replace a text for the same without specil characters.- Parameters:
original- string to replace- Returns:
- string replaced
-
generateIbanByCcc
Generate IBAN by a CCC.- Parameters:
ccc- CCC- Returns:
- IBAN
-
generateExceptionByCoreErrorCode
Generate Error code of Core by a CCC.- Parameters:
code- Error Code
-
obfuscateAccountNumber
Obfuscate Account Number.- Parameters:
accountNumber- CCC- Returns:
- account number obfuscated
-
objectoToString
Object to string.- Parameters:
request- request- Returns:
- object string.
-
createPropagationHeaders
public static org.springframework.http.HttpHeaders createPropagationHeaders(es.kukenan.smartfi.common.context.config.ContextPropagationProperties properties, es.kukenan.smartfi.common.context.RequestContextManager contextManager, String userToken) Build context propagation headers.- Parameters:
properties- ContextPropagationProperties.contextManager- RequestContextManager.userToken- auth info.- Returns:
- headers.
-
convertBeneficiaryCccAccountToIban
public static void convertBeneficiaryCccAccountToIban(es.kukenan.smartfi.microservice.transfer.api.transfer.BeneficiaryRequestDto beneficiaryRequestDto, AccountType accountType) Converts the beneficiary CCC account to an IBAN format.- Parameters:
beneficiaryRequestDto- beneficiary which CCC account is going to be convertedBeneficiaryRequestDto.accountType- account type of UserAccountType.
-
isCcc
Checks if the account type is CCC.- Parameters:
type- accout type.- Returns:
- true if account type is CCC else false.
-