Add currency name (#77)

This commit is contained in:
Egor Cherniak 2024-02-02 09:56:55 +03:00 committed by GitHub
parent f5a59d2032
commit 352d468a4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 1 deletions

View File

@ -12,7 +12,7 @@
</parent>
<artifactId>adapter-flow-lib</artifactId>
<version>0.2.4</version>
<version>0.2.5</version>
<packaging>jar</packaging>
<name>adapter-flow-lib</name>

View File

@ -80,6 +80,7 @@ public class CtxToEntryModelConverter implements Converter<PaymentContext, Entry
.invoiceFormatPaymentId(invoiceFormatPaymentId)
.createdAt(paymentInfo.getPayment().getCreatedAt())
.currency(Currency.builder()
.name(payment.getCost().getCurrency().getName())
.symbolicCode(payment.getCost().getCurrency().getSymbolicCode())
.numericCode(payment.getCost().getCurrency().getNumericCode())
.build()

View File

@ -69,6 +69,7 @@ public class RecCtxToEntryModelConverter implements Converter<RecurrentTokenCont
.paymentId(orderId)
.invoiceFormatPaymentId(invoiceFormatPaymentId)
.currency(Currency.builder()
.name(recurrentPaymentTool.getMinimalPaymentCost().getCurrency().getName())
.symbolicCode(
recurrentPaymentTool.getMinimalPaymentCost().getCurrency().getSymbolicCode())
.numericCode(

View File

@ -11,6 +11,11 @@ import lombok.experimental.SuperBuilder;
@AllArgsConstructor
public class Currency {
/**
* Currency name
*/
private String name;
/**
* Currency code ISO 4217 in symbolic format (e.g., "USD" for United States dollar)
*/