From da32d63e584d010ccdd805455bf313b4628bfe10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20Rodr=C3=ADguez?= <127134616+armando-rodriguez-cko@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:40:18 +0200 Subject: [PATCH] Add type property to items in payment context. Payment Link Update. (#431) * Add type property to items in payment context * Update card metadata response * Update payment link request and challenge indicator and exemption --- src/CheckoutSdk/Common/ChallengeIndicatorType.cs | 15 +-------------- src/CheckoutSdk/Common/Exemption.cs | 5 ++++- .../Metadata/Card/AccountFundingTransaction.cs | 7 +++++++ src/CheckoutSdk/Metadata/Card/AftIndicator.cs | 7 +++++++ .../Metadata/Card/CardMetadataResponse.cs | 2 ++ src/CheckoutSdk/Metadata/Card/PullFunds.cs | 9 +++++++++ src/CheckoutSdk/Metadata/Card/SchemeMetadata.cs | 10 ++++++---- .../Payments/Contexts/PaymentContextItemType.cs | 13 +++++++++++++ .../Payments/Contexts/PaymentContextsItems.cs | 1 + .../Payments/Links/PaymentLinkRequest.cs | 9 +++++++++ 10 files changed, 59 insertions(+), 19 deletions(-) create mode 100644 src/CheckoutSdk/Metadata/Card/AccountFundingTransaction.cs create mode 100644 src/CheckoutSdk/Metadata/Card/AftIndicator.cs create mode 100644 src/CheckoutSdk/Metadata/Card/PullFunds.cs create mode 100644 src/CheckoutSdk/Payments/Contexts/PaymentContextItemType.cs diff --git a/src/CheckoutSdk/Common/ChallengeIndicatorType.cs b/src/CheckoutSdk/Common/ChallengeIndicatorType.cs index e4b70651..0556cc5b 100644 --- a/src/CheckoutSdk/Common/ChallengeIndicatorType.cs +++ b/src/CheckoutSdk/Common/ChallengeIndicatorType.cs @@ -9,12 +9,6 @@ public enum ChallengeIndicatorType [EnumMember(Value = "challenge_requested_mandate")] ChallengeRequestedMandate, - - [EnumMember(Value = "data_share")] - DataShare, - - [EnumMember(Value = "low_value")] - LowValue, [EnumMember(Value = "no_challenge_requested")] NoChallengeRequested, @@ -22,13 +16,6 @@ public enum ChallengeIndicatorType [EnumMember(Value = "no_preference")] NoPreference, - [EnumMember(Value = "transaction_risk_assessment")] - TransactionRiskAssessment, - - [EnumMember(Value = "trusted_listing")] - TrustedListing, - - [EnumMember(Value = "trusted_listing_prompt")] - TrustedListingPrompt + } } \ No newline at end of file diff --git a/src/CheckoutSdk/Common/Exemption.cs b/src/CheckoutSdk/Common/Exemption.cs index 442fa234..ef2974e6 100644 --- a/src/CheckoutSdk/Common/Exemption.cs +++ b/src/CheckoutSdk/Common/Exemption.cs @@ -28,6 +28,9 @@ public enum Exemption TransactionRiskAssessment, [EnumMember(Value = "trusted_listing")] - TrustedListing + TrustedListing, + + [EnumMember(Value = "trusted_listing_prompt")] + TrustedListingPrompt } } \ No newline at end of file diff --git a/src/CheckoutSdk/Metadata/Card/AccountFundingTransaction.cs b/src/CheckoutSdk/Metadata/Card/AccountFundingTransaction.cs new file mode 100644 index 00000000..0e5b1efe --- /dev/null +++ b/src/CheckoutSdk/Metadata/Card/AccountFundingTransaction.cs @@ -0,0 +1,7 @@ +namespace Checkout.Metadata.Card +{ + public class AccountFundingTransaction + { + public AftIndicator AftIndicator { get; set; } + } +} \ No newline at end of file diff --git a/src/CheckoutSdk/Metadata/Card/AftIndicator.cs b/src/CheckoutSdk/Metadata/Card/AftIndicator.cs new file mode 100644 index 00000000..522d7a09 --- /dev/null +++ b/src/CheckoutSdk/Metadata/Card/AftIndicator.cs @@ -0,0 +1,7 @@ +namespace Checkout.Metadata.Card +{ + public class AftIndicator + { + public PullFunds PullFunds { get; set; } + } +} \ No newline at end of file diff --git a/src/CheckoutSdk/Metadata/Card/CardMetadataResponse.cs b/src/CheckoutSdk/Metadata/Card/CardMetadataResponse.cs index 08f6f584..af3b9ecd 100644 --- a/src/CheckoutSdk/Metadata/Card/CardMetadataResponse.cs +++ b/src/CheckoutSdk/Metadata/Card/CardMetadataResponse.cs @@ -40,5 +40,7 @@ public class CardMetadataResponse : HttpMetadata public CardMetadataPayouts CardPayouts { get; set; } public SchemeMetadata SchemeMetadata { get; set; } + + public AccountFundingTransaction AccountFundingTransaction { get; set; } } } \ No newline at end of file diff --git a/src/CheckoutSdk/Metadata/Card/PullFunds.cs b/src/CheckoutSdk/Metadata/Card/PullFunds.cs new file mode 100644 index 00000000..b17c5890 --- /dev/null +++ b/src/CheckoutSdk/Metadata/Card/PullFunds.cs @@ -0,0 +1,9 @@ +namespace Checkout.Metadata.Card +{ + public class PullFunds + { + public bool? CrossBorder { get; set; } + + public bool? Domestic { get; set; } + } +} \ No newline at end of file diff --git a/src/CheckoutSdk/Metadata/Card/SchemeMetadata.cs b/src/CheckoutSdk/Metadata/Card/SchemeMetadata.cs index f18be20c..617d0d1d 100644 --- a/src/CheckoutSdk/Metadata/Card/SchemeMetadata.cs +++ b/src/CheckoutSdk/Metadata/Card/SchemeMetadata.cs @@ -1,10 +1,12 @@ +using System.Collections.Generic; + namespace Checkout.Metadata.Card { public class SchemeMetadata { - public PinlessDebitSchemeMetadata Accel { get; set; } - public PinlessDebitSchemeMetadata Pulse { get; set; } - public PinlessDebitSchemeMetadata Nyce { get; set; } - public PinlessDebitSchemeMetadata Star { get; set; } + public IList Accel { get; set; } + public IList Pulse { get; set; } + public IList Nyce { get; set; } + public IList Star { get; set; } } } \ No newline at end of file diff --git a/src/CheckoutSdk/Payments/Contexts/PaymentContextItemType.cs b/src/CheckoutSdk/Payments/Contexts/PaymentContextItemType.cs new file mode 100644 index 00000000..91601a27 --- /dev/null +++ b/src/CheckoutSdk/Payments/Contexts/PaymentContextItemType.cs @@ -0,0 +1,13 @@ +using System.Runtime.Serialization; + +namespace Checkout.Payments.Contexts +{ + public enum PaymentContextItemType + { + [EnumMember(Value = "physical")] + Physical, + + [EnumMember(Value = "digital")] + Digital, + } +} \ No newline at end of file diff --git a/src/CheckoutSdk/Payments/Contexts/PaymentContextsItems.cs b/src/CheckoutSdk/Payments/Contexts/PaymentContextsItems.cs index 569ab2c6..3badd47c 100644 --- a/src/CheckoutSdk/Payments/Contexts/PaymentContextsItems.cs +++ b/src/CheckoutSdk/Payments/Contexts/PaymentContextsItems.cs @@ -2,6 +2,7 @@ namespace Checkout.Payments.Contexts { public class PaymentContextsItems { + public PaymentContextItemType? Type { get; set; } public string Name { get; set; } public int Quantity { get; set; } diff --git a/src/CheckoutSdk/Payments/Links/PaymentLinkRequest.cs b/src/CheckoutSdk/Payments/Links/PaymentLinkRequest.cs index 5540135f..a00c534a 100644 --- a/src/CheckoutSdk/Payments/Links/PaymentLinkRequest.cs +++ b/src/CheckoutSdk/Payments/Links/PaymentLinkRequest.cs @@ -1,7 +1,10 @@ using Checkout.Common; +using Checkout.Payments.Request; +using Checkout.Payments.Sender; using Newtonsoft.Json; using System; using System.Collections.Generic; +using Product = Checkout.Common.Product; namespace Checkout.Payments.Links { @@ -35,6 +38,10 @@ public class PaymentLinkRequest public RiskRequest Risk { get; set; } + public PaymentRetryRequest CustomerRetry { get; set; } + + public PaymentSender Sender { get; set; } + public string ReturnUrl { get; set; } public string Locale { get; set; } @@ -50,6 +57,8 @@ public class PaymentLinkRequest public BillingDescriptor BillingDescriptor { get; set; } public IList AllowPaymentMethods { get; set; } + + public IList DisabledPaymentMethods { get; set; } //Not available on Previous