Skip to content

Commit

Permalink
Merge pull request #79 from Riskified/DEV-32224
Browse files Browse the repository at this point in the history
Depreciated Payment_type
  • Loading branch information
Gering112 authored Apr 15, 2022
2 parents f2c0770 + be9965e commit 89c7bfd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
9 changes: 2 additions & 7 deletions Riskified.SDK/Model/OrderElements/CreditCardPaymentDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Riskified.SDK.Model.OrderElements
{

[Obsolete("PaymentType not in use anymore", true)]
public enum PaymentType
{
credit_card, paypal
Expand Down Expand Up @@ -47,7 +47,6 @@ public CreditCardPaymentDetails(string avsResultCode,
StoredPaymentCreatedAt = storedPaymentCreatedAt;
StoredPaymentUpdatedAt = storedPaymentUpdatedAt;
Installments = installments;
PaymentType = PaymentType.credit_card;
}


Expand All @@ -71,11 +70,7 @@ public void Validate(Validations validationType = Validations.Weak)
}



[JsonProperty(PropertyName = "payment_type")]
[JsonConverter(typeof(StringEnumConverter))]
public PaymentType PaymentType { get; set; }


[JsonProperty(PropertyName = "avs_result_code")]
public string AvsResultCode { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion Riskified.SDK/Model/OrderElements/PaymentType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Riskified.SDK.Model.OrderElements
{

[Obsolete("payment_type not in use anymore", true)]
public enum PaymentType
{
[EnumMember(Value = "paypal")]
Expand Down
9 changes: 3 additions & 6 deletions Riskified.SDK/Model/OrderElements/PaypalPaymentDetails.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Riskified.SDK.Exceptions;
using Riskified.SDK.Model.OrderCheckoutElements;
Expand Down Expand Up @@ -28,7 +29,6 @@ public PaypalPaymentDetails(string paymentStatus, string authorizationId = null,
ProtectionEligibility = protectionEligibility;
PaymentStatus = paymentStatus;
PendingReason = PendingReason;
PaymentType = PaymentType.paypal;
}

/// <summary>
Expand All @@ -44,10 +44,7 @@ public void Validate(Validations validationType = Validations.Weak)
}
}

[JsonProperty(PropertyName = "payment_type")]
[JsonConverter(typeof(StringEnumConverter))]
public PaymentType PaymentType { get; set; }


[JsonProperty(PropertyName = "authorization_id")]
public string AuthorizationId { get; set; }

Expand Down
4 changes: 2 additions & 2 deletions Riskified.SDK/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.3.0")]
[assembly: AssemblyFileVersion("3.3.0")]
[assembly: AssemblyVersion("3.3.1")]
[assembly: AssemblyFileVersion("3.3.1")]

0 comments on commit 89c7bfd

Please sign in to comment.