From d63bf6047b427a9e515536ff7b4b05d05024a39f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20Rodr=C3=ADguez?= <127134616+armando-rodriguez-cko@users.noreply.github.com> Date: Fri, 11 Oct 2024 08:05:31 +0200 Subject: [PATCH] Update Card Metadata response (#444) --- src/main/java/com/checkout/common/CardType.java | 8 ++++---- .../metadata/card/AccountFundingTransaction.java | 11 +++++++++++ .../com/checkout/metadata/card/AftIndicator.java | 11 +++++++++++ .../checkout/metadata/card/CardMetadataPayouts.java | 7 +++++++ .../metadata/card/CardMetadataResponse.java | 3 +++ .../java/com/checkout/metadata/card/PullFunds.java | 13 +++++++++++++ .../com/checkout/metadata/card/SchemeMetadata.java | 8 +++----- 7 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 src/main/java/com/checkout/metadata/card/AccountFundingTransaction.java create mode 100644 src/main/java/com/checkout/metadata/card/AftIndicator.java create mode 100644 src/main/java/com/checkout/metadata/card/PullFunds.java diff --git a/src/main/java/com/checkout/common/CardType.java b/src/main/java/com/checkout/common/CardType.java index 85722f60..bd3a949f 100644 --- a/src/main/java/com/checkout/common/CardType.java +++ b/src/main/java/com/checkout/common/CardType.java @@ -4,15 +4,15 @@ public enum CardType { - @SerializedName(value = "Charge", alternate = {"CHARGE", "charge"}) - CHARGE, @SerializedName(value = "Credit", alternate = {"CREDIT", "credit"}) CREDIT, @SerializedName(value = "Debit", alternate = {"DEBIT", "debit"}) DEBIT, - @SerializedName(value = "Deferred Debit", alternate = {"DEFERRED DEBIT", "deferred_debit"}) - DEFERRED_DEBIT, @SerializedName(value = "Prepaid", alternate = {"PREPAID", "prepaid"}) PREPAID, + @SerializedName(value = "Charge", alternate = {"CHARGE", "charge"}) + CHARGE, + @SerializedName(value = "Deferred Debit", alternate = {"DEFERRED DEBIT", "deferred_debit"}) + DEFERRED_DEBIT, } diff --git a/src/main/java/com/checkout/metadata/card/AccountFundingTransaction.java b/src/main/java/com/checkout/metadata/card/AccountFundingTransaction.java new file mode 100644 index 00000000..af8f8557 --- /dev/null +++ b/src/main/java/com/checkout/metadata/card/AccountFundingTransaction.java @@ -0,0 +1,11 @@ +package com.checkout.metadata.card; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; + +@Data +public final class AccountFundingTransaction { + + @SerializedName("aft_indicator") + private AftIndicator aftIndicator; +} diff --git a/src/main/java/com/checkout/metadata/card/AftIndicator.java b/src/main/java/com/checkout/metadata/card/AftIndicator.java new file mode 100644 index 00000000..5ba3eb4f --- /dev/null +++ b/src/main/java/com/checkout/metadata/card/AftIndicator.java @@ -0,0 +1,11 @@ +package com.checkout.metadata.card; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; + +@Data +public final class AftIndicator { + + @SerializedName("pull_funds") + private PullFunds pullFunds; +} diff --git a/src/main/java/com/checkout/metadata/card/CardMetadataPayouts.java b/src/main/java/com/checkout/metadata/card/CardMetadataPayouts.java index db714986..3289b790 100644 --- a/src/main/java/com/checkout/metadata/card/CardMetadataPayouts.java +++ b/src/main/java/com/checkout/metadata/card/CardMetadataPayouts.java @@ -1,19 +1,26 @@ package com.checkout.metadata.card; +import com.google.gson.annotations.SerializedName; import lombok.Data; @Data public final class CardMetadataPayouts { + @SerializedName("domestic_non_money_transfer") private PayoutsTransactionsType domesticNonMoneyTransfer; + @SerializedName("cross_border_non_money_transfer") private PayoutsTransactionsType crossBorderNonMoneyTransfer; + @SerializedName("domestic_gambling") private PayoutsTransactionsType domesticGambling; + @SerializedName("cross_border_gambling") private PayoutsTransactionsType crossBorderGambling; + @SerializedName("domestic_money_transfer") private PayoutsTransactionsType domesticMoneyTransfer; + @SerializedName("cross_border_money_transfer") private PayoutsTransactionsType crossBorderMoneyTransfer; } diff --git a/src/main/java/com/checkout/metadata/card/CardMetadataResponse.java b/src/main/java/com/checkout/metadata/card/CardMetadataResponse.java index c894aad8..493f56f0 100644 --- a/src/main/java/com/checkout/metadata/card/CardMetadataResponse.java +++ b/src/main/java/com/checkout/metadata/card/CardMetadataResponse.java @@ -69,4 +69,7 @@ public final class CardMetadataResponse extends HttpMetadata { @SerializedName("scheme_metadata") private SchemeMetadata schemeMetadata; + + @SerializedName("account_funding_transaction") + private AccountFundingTransaction accountFundingTransaction; } diff --git a/src/main/java/com/checkout/metadata/card/PullFunds.java b/src/main/java/com/checkout/metadata/card/PullFunds.java new file mode 100644 index 00000000..9bd1d076 --- /dev/null +++ b/src/main/java/com/checkout/metadata/card/PullFunds.java @@ -0,0 +1,13 @@ +package com.checkout.metadata.card; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; + +@Data +public final class PullFunds { + + @SerializedName("cross_border") + private Boolean crossBorder; + + private Boolean domestic; +} diff --git a/src/main/java/com/checkout/metadata/card/SchemeMetadata.java b/src/main/java/com/checkout/metadata/card/SchemeMetadata.java index 2d8329ae..8fa2d9fa 100644 --- a/src/main/java/com/checkout/metadata/card/SchemeMetadata.java +++ b/src/main/java/com/checkout/metadata/card/SchemeMetadata.java @@ -1,17 +1,15 @@ package com.checkout.metadata.card; -import lombok.AllArgsConstructor; import lombok.Data; -import lombok.NoArgsConstructor; + +import java.util.List; @Data -@AllArgsConstructor -@NoArgsConstructor public final class SchemeMetadata { private PinlessDebitSchemeMetadata accel; - private PinlessDebitSchemeMetadata pulse; + private List pulse; private PinlessDebitSchemeMetadata nyce;