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> </parent>
<artifactId>adapter-flow-lib</artifactId> <artifactId>adapter-flow-lib</artifactId>
<version>0.2.4</version> <version>0.2.5</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>adapter-flow-lib</name> <name>adapter-flow-lib</name>

View File

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

View File

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

View File

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