diff --git a/Adyen.Test/PaymentTest.cs b/Adyen.Test/PaymentTest.cs
index 0e2ea1b7c..dd0dbe777 100644
--- a/Adyen.Test/PaymentTest.cs
+++ b/Adyen.Test/PaymentTest.cs
@@ -157,6 +157,15 @@ public void TestCaptureDelaySerialization()
Assert.IsTrue(jsonString.Contains("\"captureDelayHours\": 0,"));
Assert.IsFalse(jsonString.Contains("\"fraudOffset\": 0"));
}
+
+ [TestMethod]
+ public void TestCaptureDelayDeserializationWithFromJson()
+ {
+ var paymentRequest = MockPaymentData.CreateFullPaymentRequest3D();
+ string jsonString = paymentRequest.ToJson();
+ PaymentRequest3d paymentRequest3d = PaymentRequest3d.FromJson(jsonString);
+ Assert.AreEqual(paymentRequest, paymentRequest3d);
+ }
[TestMethod]
public void TestAuthenticationResult3ds1Success()
diff --git a/Adyen/Model/Payment/AccountInfo.cs b/Adyen/Model/Payment/AccountInfo.cs
index 74baac9cb..334649cff 100644
--- a/Adyen/Model/Payment/AccountInfo.cs
+++ b/Adyen/Model/Payment/AccountInfo.cs
@@ -462,6 +462,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AccountInfo object from the json payload
+ ///
+ /// AccountInfo
+ public static AccountInfo FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AcctInfo.cs b/Adyen/Model/Payment/AcctInfo.cs
index b0a3e63f5..704f012a8 100644
--- a/Adyen/Model/Payment/AcctInfo.cs
+++ b/Adyen/Model/Payment/AcctInfo.cs
@@ -444,6 +444,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AcctInfo object from the json payload
+ ///
+ /// AcctInfo
+ public static AcctInfo FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AdditionalData3DSecure.cs b/Adyen/Model/Payment/AdditionalData3DSecure.cs
index 526e860ac..d13c4d2d8 100644
--- a/Adyen/Model/Payment/AdditionalData3DSecure.cs
+++ b/Adyen/Model/Payment/AdditionalData3DSecure.cs
@@ -158,6 +158,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalData3DSecure object from the json payload
+ ///
+ /// AdditionalData3DSecure
+ public static AdditionalData3DSecure FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AdditionalDataAirline.cs b/Adyen/Model/Payment/AdditionalDataAirline.cs
index ffc34ea71..a2b4816df 100644
--- a/Adyen/Model/Payment/AdditionalDataAirline.cs
+++ b/Adyen/Model/Payment/AdditionalDataAirline.cs
@@ -49,6 +49,7 @@ protected AdditionalDataAirline() { }
/// The alphanumeric customer reference number. * Encoding: ASCII * maxLength: 20 characters * If you send more than 20 characters, the customer reference number is truncated * Must not be all spaces.
/// A code that identifies the type of item bought. The description of the code can appear on credit card statements. * Encoding: ASCII * Example: Passenger ticket = 01 * minLength: 2 characters * maxLength: 2 characters.
/// The flight departure date. Local time `(HH:mm)` is optional. * Date format: `yyyy-MM-dd` * Date and time format: `yyyy-MM-dd HH:mm` * minLength: 10 characters * maxLength: 16 characters.
+ /// The date that the ticket was issued to the passenger. * minLength: 6 characters * maxLength: 6 characters * Date format: YYMMDD.
/// The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces *Must not be all zeros..
/// A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces *Must not be all zeros..
/// Date and time of travel in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format `yyyy-MM-dd HH:mm`. * Encoding: ASCII * minLength: 16 characters * maxLength: 16 characters.
@@ -68,7 +69,7 @@ protected AdditionalDataAirline() { }
/// The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces *Must not be all zeros..
/// The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces *Must not be all zeros..
/// The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces *Must not be all zeros..
- public AdditionalDataAirline(string airlineAgencyInvoiceNumber = default(string), string airlineAgencyPlanName = default(string), string airlineAirlineCode = default(string), string airlineAirlineDesignatorCode = default(string), string airlineBoardingFee = default(string), string airlineComputerizedReservationSystem = default(string), string airlineCustomerReferenceNumber = default(string), string airlineDocumentType = default(string), string airlineFlightDate = default(string), string airlineLegCarrierCode = default(string), string airlineLegClassOfTravel = default(string), string airlineLegDateOfTravel = default(string), string airlineLegDepartAirport = default(string), string airlineLegDepartTax = default(string), string airlineLegDestinationCode = default(string), string airlineLegFareBaseCode = default(string), string airlineLegFlightNumber = default(string), string airlineLegStopOverCode = default(string), string airlinePassengerDateOfBirth = default(string), string airlinePassengerFirstName = default(string), string airlinePassengerLastName = default(string), string airlinePassengerTelephoneNumber = default(string), string airlinePassengerTravellerType = default(string), string airlinePassengerName = default(string), string airlineTicketIssueAddress = default(string), string airlineTicketNumber = default(string), string airlineTravelAgencyCode = default(string), string airlineTravelAgencyName = default(string))
+ public AdditionalDataAirline(string airlineAgencyInvoiceNumber = default(string), string airlineAgencyPlanName = default(string), string airlineAirlineCode = default(string), string airlineAirlineDesignatorCode = default(string), string airlineBoardingFee = default(string), string airlineComputerizedReservationSystem = default(string), string airlineCustomerReferenceNumber = default(string), string airlineDocumentType = default(string), string airlineFlightDate = default(string), string airlineIssueDate = default(string), string airlineLegCarrierCode = default(string), string airlineLegClassOfTravel = default(string), string airlineLegDateOfTravel = default(string), string airlineLegDepartAirport = default(string), string airlineLegDepartTax = default(string), string airlineLegDestinationCode = default(string), string airlineLegFareBaseCode = default(string), string airlineLegFlightNumber = default(string), string airlineLegStopOverCode = default(string), string airlinePassengerDateOfBirth = default(string), string airlinePassengerFirstName = default(string), string airlinePassengerLastName = default(string), string airlinePassengerTelephoneNumber = default(string), string airlinePassengerTravellerType = default(string), string airlinePassengerName = default(string), string airlineTicketIssueAddress = default(string), string airlineTicketNumber = default(string), string airlineTravelAgencyCode = default(string), string airlineTravelAgencyName = default(string))
{
this.AirlinePassengerName = airlinePassengerName;
this.AirlineAgencyInvoiceNumber = airlineAgencyInvoiceNumber;
@@ -80,6 +81,7 @@ protected AdditionalDataAirline() { }
this.AirlineCustomerReferenceNumber = airlineCustomerReferenceNumber;
this.AirlineDocumentType = airlineDocumentType;
this.AirlineFlightDate = airlineFlightDate;
+ this.AirlineIssueDate = airlineIssueDate;
this.AirlineLegCarrierCode = airlineLegCarrierCode;
this.AirlineLegClassOfTravel = airlineLegClassOfTravel;
this.AirlineLegDateOfTravel = airlineLegDateOfTravel;
@@ -163,6 +165,13 @@ protected AdditionalDataAirline() { }
[DataMember(Name = "airline.flight_date", EmitDefaultValue = false)]
public string AirlineFlightDate { get; set; }
+ ///
+ /// The date that the ticket was issued to the passenger. * minLength: 6 characters * maxLength: 6 characters * Date format: YYMMDD
+ ///
+ /// The date that the ticket was issued to the passenger. * minLength: 6 characters * maxLength: 6 characters * Date format: YYMMDD
+ [DataMember(Name = "airline.issue_date", EmitDefaultValue = false)]
+ public string AirlineIssueDate { get; set; }
+
///
/// The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces *Must not be all zeros.
///
@@ -313,6 +322,7 @@ public override string ToString()
sb.Append(" AirlineCustomerReferenceNumber: ").Append(AirlineCustomerReferenceNumber).Append("\n");
sb.Append(" AirlineDocumentType: ").Append(AirlineDocumentType).Append("\n");
sb.Append(" AirlineFlightDate: ").Append(AirlineFlightDate).Append("\n");
+ sb.Append(" AirlineIssueDate: ").Append(AirlineIssueDate).Append("\n");
sb.Append(" AirlineLegCarrierCode: ").Append(AirlineLegCarrierCode).Append("\n");
sb.Append(" AirlineLegClassOfTravel: ").Append(AirlineLegClassOfTravel).Append("\n");
sb.Append(" AirlineLegDateOfTravel: ").Append(AirlineLegDateOfTravel).Append("\n");
@@ -344,6 +354,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalDataAirline object from the json payload
+ ///
+ /// AdditionalDataAirline
+ public static AdditionalDataAirline FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
@@ -412,6 +431,11 @@ public bool Equals(AdditionalDataAirline input)
(this.AirlineFlightDate != null &&
this.AirlineFlightDate.Equals(input.AirlineFlightDate))
) &&
+ (
+ this.AirlineIssueDate == input.AirlineIssueDate ||
+ (this.AirlineIssueDate != null &&
+ this.AirlineIssueDate.Equals(input.AirlineIssueDate))
+ ) &&
(
this.AirlineLegCarrierCode == input.AirlineLegCarrierCode ||
(this.AirlineLegCarrierCode != null &&
@@ -554,6 +578,10 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + this.AirlineFlightDate.GetHashCode();
}
+ if (this.AirlineIssueDate != null)
+ {
+ hashCode = (hashCode * 59) + this.AirlineIssueDate.GetHashCode();
+ }
if (this.AirlineLegCarrierCode != null)
{
hashCode = (hashCode * 59) + this.AirlineLegCarrierCode.GetHashCode();
diff --git a/Adyen/Model/Payment/AdditionalDataCarRental.cs b/Adyen/Model/Payment/AdditionalDataCarRental.cs
index 93b8e2e3a..f1ffbfbf4 100644
--- a/Adyen/Model/Payment/AdditionalDataCarRental.cs
+++ b/Adyen/Model/Payment/AdditionalDataCarRental.cs
@@ -289,6 +289,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalDataCarRental object from the json payload
+ ///
+ /// AdditionalDataCarRental
+ public static AdditionalDataCarRental FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AdditionalDataCommon.cs b/Adyen/Model/Payment/AdditionalDataCommon.cs
index a95c21dab..4856ea581 100644
--- a/Adyen/Model/Payment/AdditionalDataCommon.cs
+++ b/Adyen/Model/Payment/AdditionalDataCommon.cs
@@ -240,6 +240,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalDataCommon object from the json payload
+ ///
+ /// AdditionalDataCommon
+ public static AdditionalDataCommon FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AdditionalDataLevel23.cs b/Adyen/Model/Payment/AdditionalDataLevel23.cs
index 72cd8ec6e..e74fda572 100644
--- a/Adyen/Model/Payment/AdditionalDataLevel23.cs
+++ b/Adyen/Model/Payment/AdditionalDataLevel23.cs
@@ -229,6 +229,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalDataLevel23 object from the json payload
+ ///
+ /// AdditionalDataLevel23
+ public static AdditionalDataLevel23 FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AdditionalDataLodging.cs b/Adyen/Model/Payment/AdditionalDataLodging.cs
index e620bdca1..f137e875d 100644
--- a/Adyen/Model/Payment/AdditionalDataLodging.cs
+++ b/Adyen/Model/Payment/AdditionalDataLodging.cs
@@ -35,6 +35,7 @@ public partial class AdditionalDataLodging : IEquatable,
///
/// Initializes a new instance of the class.
///
+ /// A code that corresponds to the category of lodging charges for the payment. Possible values: * 1: Lodging * 2: No show reservation * 3: Advanced deposit.
/// The arrival date. * Date format: **yyyyMmDd**. For example, for 2023 April 22, **20230422**..
/// The departure date. * Date format: **yyyyMmDd**. For example, for 2023 April 22, **20230422**..
/// The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros..
@@ -51,8 +52,9 @@ public partial class AdditionalDataLodging : IEquatable,
/// The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number.
/// The number of nights. This should be included in the auth message. * Format: numeric * Max length: 4 characters.
/// Indicates what market-specific dataset will be submitted. Must be 'H' for Hotel. This should be included in the auth message. * Format: alphanumeric * Max length: 1 character.
- public AdditionalDataLodging(string lodgingCheckInDate = default(string), string lodgingCheckOutDate = default(string), string lodgingCustomerServiceTollFreeNumber = default(string), string lodgingFireSafetyActIndicator = default(string), string lodgingFolioCashAdvances = default(string), string lodgingFolioNumber = default(string), string lodgingFoodBeverageCharges = default(string), string lodgingNoShowIndicator = default(string), string lodgingPrepaidExpenses = default(string), string lodgingPropertyPhoneNumber = default(string), string lodgingRoom1NumberOfNights = default(string), string lodgingRoom1Rate = default(string), string lodgingTotalRoomTax = default(string), string lodgingTotalTax = default(string), string travelEntertainmentAuthDataDuration = default(string), string travelEntertainmentAuthDataMarket = default(string))
+ public AdditionalDataLodging(string lodgingSpecialProgramCode = default(string), string lodgingCheckInDate = default(string), string lodgingCheckOutDate = default(string), string lodgingCustomerServiceTollFreeNumber = default(string), string lodgingFireSafetyActIndicator = default(string), string lodgingFolioCashAdvances = default(string), string lodgingFolioNumber = default(string), string lodgingFoodBeverageCharges = default(string), string lodgingNoShowIndicator = default(string), string lodgingPrepaidExpenses = default(string), string lodgingPropertyPhoneNumber = default(string), string lodgingRoom1NumberOfNights = default(string), string lodgingRoom1Rate = default(string), string lodgingTotalRoomTax = default(string), string lodgingTotalTax = default(string), string travelEntertainmentAuthDataDuration = default(string), string travelEntertainmentAuthDataMarket = default(string))
{
+ this.LodgingSpecialProgramCode = lodgingSpecialProgramCode;
this.LodgingCheckInDate = lodgingCheckInDate;
this.LodgingCheckOutDate = lodgingCheckOutDate;
this.LodgingCustomerServiceTollFreeNumber = lodgingCustomerServiceTollFreeNumber;
@@ -71,6 +73,13 @@ public partial class AdditionalDataLodging : IEquatable,
this.TravelEntertainmentAuthDataMarket = travelEntertainmentAuthDataMarket;
}
+ ///
+ /// A code that corresponds to the category of lodging charges for the payment. Possible values: * 1: Lodging * 2: No show reservation * 3: Advanced deposit
+ ///
+ /// A code that corresponds to the category of lodging charges for the payment. Possible values: * 1: Lodging * 2: No show reservation * 3: Advanced deposit
+ [DataMember(Name = "lodging.SpecialProgramCode", EmitDefaultValue = false)]
+ public string LodgingSpecialProgramCode { get; set; }
+
///
/// The arrival date. * Date format: **yyyyMmDd**. For example, for 2023 April 22, **20230422**.
///
@@ -191,6 +200,7 @@ public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class AdditionalDataLodging {\n");
+ sb.Append(" LodgingSpecialProgramCode: ").Append(LodgingSpecialProgramCode).Append("\n");
sb.Append(" LodgingCheckInDate: ").Append(LodgingCheckInDate).Append("\n");
sb.Append(" LodgingCheckOutDate: ").Append(LodgingCheckOutDate).Append("\n");
sb.Append(" LodgingCustomerServiceTollFreeNumber: ").Append(LodgingCustomerServiceTollFreeNumber).Append("\n");
@@ -219,6 +229,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalDataLodging object from the json payload
+ ///
+ /// AdditionalDataLodging
+ public static AdditionalDataLodging FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
@@ -242,6 +261,11 @@ public bool Equals(AdditionalDataLodging input)
return false;
}
return
+ (
+ this.LodgingSpecialProgramCode == input.LodgingSpecialProgramCode ||
+ (this.LodgingSpecialProgramCode != null &&
+ this.LodgingSpecialProgramCode.Equals(input.LodgingSpecialProgramCode))
+ ) &&
(
this.LodgingCheckInDate == input.LodgingCheckInDate ||
(this.LodgingCheckInDate != null &&
@@ -333,6 +357,10 @@ public override int GetHashCode()
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
+ if (this.LodgingSpecialProgramCode != null)
+ {
+ hashCode = (hashCode * 59) + this.LodgingSpecialProgramCode.GetHashCode();
+ }
if (this.LodgingCheckInDate != null)
{
hashCode = (hashCode * 59) + this.LodgingCheckInDate.GetHashCode();
diff --git a/Adyen/Model/Payment/AdditionalDataModifications.cs b/Adyen/Model/Payment/AdditionalDataModifications.cs
index f4b5720fc..859202485 100644
--- a/Adyen/Model/Payment/AdditionalDataModifications.cs
+++ b/Adyen/Model/Payment/AdditionalDataModifications.cs
@@ -69,6 +69,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalDataModifications object from the json payload
+ ///
+ /// AdditionalDataModifications
+ public static AdditionalDataModifications FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AdditionalDataOpenInvoice.cs b/Adyen/Model/Payment/AdditionalDataOpenInvoice.cs
index 6e7fbb582..741c13f3b 100644
--- a/Adyen/Model/Payment/AdditionalDataOpenInvoice.cs
+++ b/Adyen/Model/Payment/AdditionalDataOpenInvoice.cs
@@ -239,6 +239,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalDataOpenInvoice object from the json payload
+ ///
+ /// AdditionalDataOpenInvoice
+ public static AdditionalDataOpenInvoice FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AdditionalDataOpi.cs b/Adyen/Model/Payment/AdditionalDataOpi.cs
index 8294dc879..09fade0be 100644
--- a/Adyen/Model/Payment/AdditionalDataOpi.cs
+++ b/Adyen/Model/Payment/AdditionalDataOpi.cs
@@ -69,6 +69,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalDataOpi object from the json payload
+ ///
+ /// AdditionalDataOpi
+ public static AdditionalDataOpi FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AdditionalDataRatepay.cs b/Adyen/Model/Payment/AdditionalDataRatepay.cs
index 2f5c47d1e..d9b0ba2c0 100644
--- a/Adyen/Model/Payment/AdditionalDataRatepay.cs
+++ b/Adyen/Model/Payment/AdditionalDataRatepay.cs
@@ -139,6 +139,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalDataRatepay object from the json payload
+ ///
+ /// AdditionalDataRatepay
+ public static AdditionalDataRatepay FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AdditionalDataRetry.cs b/Adyen/Model/Payment/AdditionalDataRetry.cs
index f10cf24d1..35dffcebf 100644
--- a/Adyen/Model/Payment/AdditionalDataRetry.cs
+++ b/Adyen/Model/Payment/AdditionalDataRetry.cs
@@ -89,6 +89,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalDataRetry object from the json payload
+ ///
+ /// AdditionalDataRetry
+ public static AdditionalDataRetry FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AdditionalDataRisk.cs b/Adyen/Model/Payment/AdditionalDataRisk.cs
index 7ecf61aa6..e013315a6 100644
--- a/Adyen/Model/Payment/AdditionalDataRisk.cs
+++ b/Adyen/Model/Payment/AdditionalDataRisk.cs
@@ -269,6 +269,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalDataRisk object from the json payload
+ ///
+ /// AdditionalDataRisk
+ public static AdditionalDataRisk FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AdditionalDataRiskStandalone.cs b/Adyen/Model/Payment/AdditionalDataRiskStandalone.cs
index 35c39934c..ec90ed68d 100644
--- a/Adyen/Model/Payment/AdditionalDataRiskStandalone.cs
+++ b/Adyen/Model/Payment/AdditionalDataRiskStandalone.cs
@@ -44,7 +44,7 @@ public partial class AdditionalDataRiskStandalone : IEquatableAllowed values: * **Eligible** — Merchant is protected by PayPal's Seller Protection Policy for Unauthorized Payments and Item Not Received. * **PartiallyEligible** — Merchant is protected by PayPal's Seller Protection Policy for Item Not Received. * **Ineligible** — Merchant is not protected under the Seller Protection Policy..
/// Unique transaction ID of the payment..
/// Raw AVS result received from the acquirer, where available. Example: D.
- /// The Bank Identification Number of a credit card, which is the first six digits of a card number. Required for [tokenized card request](https://docs.adyen.com/risk-management/standalone-risk#tokenised-pan-request)..
+ /// The Bank Identification Number of a credit card, which is the first six digits of a card number. Required for [tokenized card request](https://docs.adyen.com/online-payments/tokenization)..
/// Raw CVC result received from the acquirer, where available. Example: 1.
/// Unique identifier or token for the shopper's card details..
/// A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true.
@@ -133,9 +133,9 @@ public partial class AdditionalDataRiskStandalone : IEquatable
- /// The Bank Identification Number of a credit card, which is the first six digits of a card number. Required for [tokenized card request](https://docs.adyen.com/risk-management/standalone-risk#tokenised-pan-request).
+ /// The Bank Identification Number of a credit card, which is the first six digits of a card number. Required for [tokenized card request](https://docs.adyen.com/online-payments/tokenization).
///
- /// The Bank Identification Number of a credit card, which is the first six digits of a card number. Required for [tokenized card request](https://docs.adyen.com/risk-management/standalone-risk#tokenised-pan-request).
+ /// The Bank Identification Number of a credit card, which is the first six digits of a card number. Required for [tokenized card request](https://docs.adyen.com/online-payments/tokenization).
[DataMember(Name = "bin", EmitDefaultValue = false)]
public string Bin { get; set; }
@@ -209,6 +209,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalDataRiskStandalone object from the json payload
+ ///
+ /// AdditionalDataRiskStandalone
+ public static AdditionalDataRiskStandalone FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AdditionalDataSubMerchant.cs b/Adyen/Model/Payment/AdditionalDataSubMerchant.cs
index 454a1c19d..e0d31161a 100644
--- a/Adyen/Model/Payment/AdditionalDataSubMerchant.cs
+++ b/Adyen/Model/Payment/AdditionalDataSubMerchant.cs
@@ -159,6 +159,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalDataSubMerchant object from the json payload
+ ///
+ /// AdditionalDataSubMerchant
+ public static AdditionalDataSubMerchant FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AdditionalDataTemporaryServices.cs b/Adyen/Model/Payment/AdditionalDataTemporaryServices.cs
index c53088e47..b3ec93859 100644
--- a/Adyen/Model/Payment/AdditionalDataTemporaryServices.cs
+++ b/Adyen/Model/Payment/AdditionalDataTemporaryServices.cs
@@ -149,6 +149,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalDataTemporaryServices object from the json payload
+ ///
+ /// AdditionalDataTemporaryServices
+ public static AdditionalDataTemporaryServices FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AdditionalDataWallets.cs b/Adyen/Model/Payment/AdditionalDataWallets.cs
index a880cd365..9df4795cc 100644
--- a/Adyen/Model/Payment/AdditionalDataWallets.cs
+++ b/Adyen/Model/Payment/AdditionalDataWallets.cs
@@ -119,6 +119,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdditionalDataWallets object from the json payload
+ ///
+ /// AdditionalDataWallets
+ public static AdditionalDataWallets FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/Address.cs b/Adyen/Model/Payment/Address.cs
index cb2aa0e75..0553f01c4 100644
--- a/Adyen/Model/Payment/Address.cs
+++ b/Adyen/Model/Payment/Address.cs
@@ -124,6 +124,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the Address object from the json payload
+ ///
+ /// Address
+ public static Address FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AdjustAuthorisationRequest.cs b/Adyen/Model/Payment/AdjustAuthorisationRequest.cs
index 385213cfa..9112684d9 100644
--- a/Adyen/Model/Payment/AdjustAuthorisationRequest.cs
+++ b/Adyen/Model/Payment/AdjustAuthorisationRequest.cs
@@ -171,6 +171,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AdjustAuthorisationRequest object from the json payload
+ ///
+ /// AdjustAuthorisationRequest
+ public static AdjustAuthorisationRequest FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/Amount.cs b/Adyen/Model/Payment/Amount.cs
index 9c4a04602..3c26c5153 100644
--- a/Adyen/Model/Payment/Amount.cs
+++ b/Adyen/Model/Payment/Amount.cs
@@ -84,6 +84,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the Amount object from the json payload
+ ///
+ /// Amount
+ public static Amount FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ApplicationInfo.cs b/Adyen/Model/Payment/ApplicationInfo.cs
index 7d31e41a3..155d8daa7 100644
--- a/Adyen/Model/Payment/ApplicationInfo.cs
+++ b/Adyen/Model/Payment/ApplicationInfo.cs
@@ -113,6 +113,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ApplicationInfo object from the json payload
+ ///
+ /// ApplicationInfo
+ public static ApplicationInfo FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AuthenticationResultRequest.cs b/Adyen/Model/Payment/AuthenticationResultRequest.cs
index 3535d34ab..4fc5fa8ad 100644
--- a/Adyen/Model/Payment/AuthenticationResultRequest.cs
+++ b/Adyen/Model/Payment/AuthenticationResultRequest.cs
@@ -84,6 +84,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AuthenticationResultRequest object from the json payload
+ ///
+ /// AuthenticationResultRequest
+ public static AuthenticationResultRequest FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/AuthenticationResultResponse.cs b/Adyen/Model/Payment/AuthenticationResultResponse.cs
index bf7663063..332c2bc3f 100644
--- a/Adyen/Model/Payment/AuthenticationResultResponse.cs
+++ b/Adyen/Model/Payment/AuthenticationResultResponse.cs
@@ -77,6 +77,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the AuthenticationResultResponse object from the json payload
+ ///
+ /// AuthenticationResultResponse
+ public static AuthenticationResultResponse FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/BankAccount.cs b/Adyen/Model/Payment/BankAccount.cs
index 054187d60..120988c97 100644
--- a/Adyen/Model/Payment/BankAccount.cs
+++ b/Adyen/Model/Payment/BankAccount.cs
@@ -149,6 +149,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the BankAccount object from the json payload
+ ///
+ /// BankAccount
+ public static BankAccount FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/BrowserInfo.cs b/Adyen/Model/Payment/BrowserInfo.cs
index 03d513c53..f006f4501 100644
--- a/Adyen/Model/Payment/BrowserInfo.cs
+++ b/Adyen/Model/Payment/BrowserInfo.cs
@@ -154,6 +154,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the BrowserInfo object from the json payload
+ ///
+ /// BrowserInfo
+ public static BrowserInfo FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/CancelOrRefundRequest.cs b/Adyen/Model/Payment/CancelOrRefundRequest.cs
index 9ce5dc015..559f2cd4e 100644
--- a/Adyen/Model/Payment/CancelOrRefundRequest.cs
+++ b/Adyen/Model/Payment/CancelOrRefundRequest.cs
@@ -152,6 +152,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the CancelOrRefundRequest object from the json payload
+ ///
+ /// CancelOrRefundRequest
+ public static CancelOrRefundRequest FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/CancelRequest.cs b/Adyen/Model/Payment/CancelRequest.cs
index 7c6101dd5..08ca02124 100644
--- a/Adyen/Model/Payment/CancelRequest.cs
+++ b/Adyen/Model/Payment/CancelRequest.cs
@@ -162,6 +162,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the CancelRequest object from the json payload
+ ///
+ /// CancelRequest
+ public static CancelRequest FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/CaptureRequest.cs b/Adyen/Model/Payment/CaptureRequest.cs
index ec8281863..c53db702f 100644
--- a/Adyen/Model/Payment/CaptureRequest.cs
+++ b/Adyen/Model/Payment/CaptureRequest.cs
@@ -171,6 +171,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the CaptureRequest object from the json payload
+ ///
+ /// CaptureRequest
+ public static CaptureRequest FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/Card.cs b/Adyen/Model/Payment/Card.cs
index 152e92213..232665452 100644
--- a/Adyen/Model/Payment/Card.cs
+++ b/Adyen/Model/Payment/Card.cs
@@ -139,6 +139,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the Card object from the json payload
+ ///
+ /// Card
+ public static Card FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/CommonField.cs b/Adyen/Model/Payment/CommonField.cs
index d2ef2c8ef..c0525a852 100644
--- a/Adyen/Model/Payment/CommonField.cs
+++ b/Adyen/Model/Payment/CommonField.cs
@@ -79,6 +79,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the CommonField object from the json payload
+ ///
+ /// CommonField
+ public static CommonField FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/DeviceRenderOptions.cs b/Adyen/Model/Payment/DeviceRenderOptions.cs
index 802881ba7..ff6404ac1 100644
--- a/Adyen/Model/Payment/DeviceRenderOptions.cs
+++ b/Adyen/Model/Payment/DeviceRenderOptions.cs
@@ -104,14 +104,6 @@ public enum SdkUiTypeEnum
}
-
-
- ///
- /// UI types supported for displaying specific challenges. Allowed values: * text * singleSelect * outOfBand * otherHtml * multiSelect
- ///
- /// UI types supported for displaying specific challenges. Allowed values: * text * singleSelect * outOfBand * otherHtml * multiSelect
- [DataMember(Name = "sdkUiType", EmitDefaultValue = false)]
- public List SdkUiType { get; set; }
///
/// Initializes a new instance of the class.
///
@@ -123,6 +115,13 @@ public enum SdkUiTypeEnum
this.SdkUiType = sdkUiType;
}
+ ///
+ /// UI types supported for displaying specific challenges. Allowed values: * text * singleSelect * outOfBand * otherHtml * multiSelect
+ ///
+ /// UI types supported for displaying specific challenges. Allowed values: * text * singleSelect * outOfBand * otherHtml * multiSelect
+ [DataMember(Name = "sdkUiType", EmitDefaultValue = false)]
+ public List SdkUiType { get; set; }
+
///
/// Returns the string presentation of the object
///
@@ -145,6 +144,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the DeviceRenderOptions object from the json payload
+ ///
+ /// DeviceRenderOptions
+ public static DeviceRenderOptions FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
@@ -174,6 +182,8 @@ public bool Equals(DeviceRenderOptions input)
) &&
(
this.SdkUiType == input.SdkUiType ||
+ this.SdkUiType != null &&
+ input.SdkUiType != null &&
this.SdkUiType.SequenceEqual(input.SdkUiType)
);
}
@@ -188,7 +198,10 @@ public override int GetHashCode()
{
int hashCode = 41;
hashCode = (hashCode * 59) + this.SdkInterface.GetHashCode();
- hashCode = (hashCode * 59) + this.SdkUiType.GetHashCode();
+ if (this.SdkUiType != null)
+ {
+ hashCode = (hashCode * 59) + this.SdkUiType.GetHashCode();
+ }
return hashCode;
}
}
diff --git a/Adyen/Model/Payment/DonationRequest.cs b/Adyen/Model/Payment/DonationRequest.cs
index b782155da..ca602cbec 100644
--- a/Adyen/Model/Payment/DonationRequest.cs
+++ b/Adyen/Model/Payment/DonationRequest.cs
@@ -122,6 +122,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the DonationRequest object from the json payload
+ ///
+ /// DonationRequest
+ public static DonationRequest FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ExternalPlatform.cs b/Adyen/Model/Payment/ExternalPlatform.cs
index 7cfe312af..508dea874 100644
--- a/Adyen/Model/Payment/ExternalPlatform.cs
+++ b/Adyen/Model/Payment/ExternalPlatform.cs
@@ -89,6 +89,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ExternalPlatform object from the json payload
+ ///
+ /// ExternalPlatform
+ public static ExternalPlatform FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ForexQuote.cs b/Adyen/Model/Payment/ForexQuote.cs
index c204cfa12..ad7624aa0 100644
--- a/Adyen/Model/Payment/ForexQuote.cs
+++ b/Adyen/Model/Payment/ForexQuote.cs
@@ -180,6 +180,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ForexQuote object from the json payload
+ ///
+ /// ForexQuote
+ public static ForexQuote FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/FraudCheckResult.cs b/Adyen/Model/Payment/FraudCheckResult.cs
index 3546ff743..d9e5a6e89 100644
--- a/Adyen/Model/Payment/FraudCheckResult.cs
+++ b/Adyen/Model/Payment/FraudCheckResult.cs
@@ -94,6 +94,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the FraudCheckResult object from the json payload
+ ///
+ /// FraudCheckResult
+ public static FraudCheckResult FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/FraudCheckResultWrapper.cs b/Adyen/Model/Payment/FraudCheckResultWrapper.cs
index a6315f85d..18d0f6038 100644
--- a/Adyen/Model/Payment/FraudCheckResultWrapper.cs
+++ b/Adyen/Model/Payment/FraudCheckResultWrapper.cs
@@ -68,6 +68,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the FraudCheckResultWrapper object from the json payload
+ ///
+ /// FraudCheckResultWrapper
+ public static FraudCheckResultWrapper FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/FraudResult.cs b/Adyen/Model/Payment/FraudResult.cs
index 55f977c5b..74a094599 100644
--- a/Adyen/Model/Payment/FraudResult.cs
+++ b/Adyen/Model/Payment/FraudResult.cs
@@ -84,6 +84,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the FraudResult object from the json payload
+ ///
+ /// FraudResult
+ public static FraudResult FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/FundDestination.cs b/Adyen/Model/Payment/FundDestination.cs
index fc07e5d67..1beb51a14 100644
--- a/Adyen/Model/Payment/FundDestination.cs
+++ b/Adyen/Model/Payment/FundDestination.cs
@@ -155,6 +155,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the FundDestination object from the json payload
+ ///
+ /// FundDestination
+ public static FundDestination FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/FundSource.cs b/Adyen/Model/Payment/FundSource.cs
index 06b7e4f73..7802b379a 100644
--- a/Adyen/Model/Payment/FundSource.cs
+++ b/Adyen/Model/Payment/FundSource.cs
@@ -116,6 +116,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the FundSource object from the json payload
+ ///
+ /// FundSource
+ public static FundSource FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/Installments.cs b/Adyen/Model/Payment/Installments.cs
index 397df2a8d..01905dd72 100644
--- a/Adyen/Model/Payment/Installments.cs
+++ b/Adyen/Model/Payment/Installments.cs
@@ -157,6 +157,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the Installments object from the json payload
+ ///
+ /// Installments
+ public static Installments FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/Mandate.cs b/Adyen/Model/Payment/Mandate.cs
index 8f14276d1..67711d5dc 100644
--- a/Adyen/Model/Payment/Mandate.cs
+++ b/Adyen/Model/Payment/Mandate.cs
@@ -249,6 +249,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the Mandate object from the json payload
+ ///
+ /// Mandate
+ public static Mandate FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/MerchantDevice.cs b/Adyen/Model/Payment/MerchantDevice.cs
index c25437e57..a6ff64ab6 100644
--- a/Adyen/Model/Payment/MerchantDevice.cs
+++ b/Adyen/Model/Payment/MerchantDevice.cs
@@ -89,6 +89,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the MerchantDevice object from the json payload
+ ///
+ /// MerchantDevice
+ public static MerchantDevice FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/MerchantRiskIndicator.cs b/Adyen/Model/Payment/MerchantRiskIndicator.cs
index 64f3c3989..a9b71032a 100644
--- a/Adyen/Model/Payment/MerchantRiskIndicator.cs
+++ b/Adyen/Model/Payment/MerchantRiskIndicator.cs
@@ -283,6 +283,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the MerchantRiskIndicator object from the json payload
+ ///
+ /// MerchantRiskIndicator
+ public static MerchantRiskIndicator FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ModificationResult.cs b/Adyen/Model/Payment/ModificationResult.cs
index 269815ef0..483e7aee4 100644
--- a/Adyen/Model/Payment/ModificationResult.cs
+++ b/Adyen/Model/Payment/ModificationResult.cs
@@ -151,6 +151,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ModificationResult object from the json payload
+ ///
+ /// ModificationResult
+ public static ModificationResult FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/Name.cs b/Adyen/Model/Payment/Name.cs
index f525f422e..a99caece5 100644
--- a/Adyen/Model/Payment/Name.cs
+++ b/Adyen/Model/Payment/Name.cs
@@ -84,6 +84,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the Name object from the json payload
+ ///
+ /// Name
+ public static Name FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/PaymentRequest.cs b/Adyen/Model/Payment/PaymentRequest.cs
index 62c656439..7a5b06a09 100644
--- a/Adyen/Model/Payment/PaymentRequest.cs
+++ b/Adyen/Model/Payment/PaymentRequest.cs
@@ -205,6 +205,7 @@ protected PaymentRequest() { }
/// recurring.
/// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. .
/// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. (required).
+ /// secureRemoteCommerceCheckoutData.
/// Some payment methods require defining a value for this field to specify how to process the transaction. For the Bancontact payment method, it can be set to: * `maestro` (default), to be processed like a Maestro card, or * `bcmc`, to be processed like a Bancontact card..
/// The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail..
/// A session ID used to identify a payment session..
@@ -223,7 +224,7 @@ protected PaymentRequest() { }
/// If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. (default to false).
/// The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available)..
/// Set to true if the payment should be routed to a trusted MID..
- public PaymentRequest(AccountInfo accountInfo = default(AccountInfo), Amount additionalAmount = default(Amount), Dictionary additionalData = default(Dictionary), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), BankAccount bankAccount = default(BankAccount), Address billingAddress = default(Address), BrowserInfo browserInfo = default(BrowserInfo), int? captureDelayHours = default(int?), Card card = default(Card), DateTime dateOfBirth = default(DateTime), ForexQuote dccQuote = default(ForexQuote), Address deliveryAddress = default(Address), DateTime deliveryDate = default(DateTime), string deviceFingerprint = default(string), EntityTypeEnum? entityType = default(EntityTypeEnum?), int? fraudOffset = default(int?), FundDestination fundDestination = default(FundDestination), FundSource fundSource = default(FundSource), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), Installments installments = default(Installments), Dictionary localizedShopperStatement = default(Dictionary), Mandate mandate = default(Mandate), string mcc = default(string), string merchantAccount = default(string), string merchantOrderReference = default(string), MerchantRiskIndicator merchantRiskIndicator = default(MerchantRiskIndicator), Dictionary metadata = default(Dictionary), ThreeDSecureData mpiData = default(ThreeDSecureData), string nationality = default(string), string orderReference = default(string), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), Recurring recurring = default(Recurring), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string reference = default(string), string selectedBrand = default(string), string selectedRecurringDetailReference = default(string), string sessionId = default(string), string shopperEmail = default(string), string shopperIP = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string shopperLocale = default(string), Name shopperName = default(Name), string shopperReference = default(string), string shopperStatement = default(string), string socialSecurityNumber = default(string), List splits = default(List), string store = default(string), string telephoneNumber = default(string), ThreeDS2RequestData threeDS2RequestData = default(ThreeDS2RequestData), bool? threeDSAuthenticationOnly = false, string totalsGroup = default(string), bool? trustedShopper = default(bool?))
+ public PaymentRequest(AccountInfo accountInfo = default(AccountInfo), Amount additionalAmount = default(Amount), Dictionary additionalData = default(Dictionary), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), BankAccount bankAccount = default(BankAccount), Address billingAddress = default(Address), BrowserInfo browserInfo = default(BrowserInfo), int? captureDelayHours = default(int?), Card card = default(Card), DateTime dateOfBirth = default(DateTime), ForexQuote dccQuote = default(ForexQuote), Address deliveryAddress = default(Address), DateTime deliveryDate = default(DateTime), string deviceFingerprint = default(string), EntityTypeEnum? entityType = default(EntityTypeEnum?), int? fraudOffset = default(int?), FundDestination fundDestination = default(FundDestination), FundSource fundSource = default(FundSource), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), Installments installments = default(Installments), Dictionary localizedShopperStatement = default(Dictionary), Mandate mandate = default(Mandate), string mcc = default(string), string merchantAccount = default(string), string merchantOrderReference = default(string), MerchantRiskIndicator merchantRiskIndicator = default(MerchantRiskIndicator), Dictionary metadata = default(Dictionary), ThreeDSecureData mpiData = default(ThreeDSecureData), string nationality = default(string), string orderReference = default(string), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), Recurring recurring = default(Recurring), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string reference = default(string), SecureRemoteCommerceCheckoutData secureRemoteCommerceCheckoutData = default(SecureRemoteCommerceCheckoutData), string selectedBrand = default(string), string selectedRecurringDetailReference = default(string), string sessionId = default(string), string shopperEmail = default(string), string shopperIP = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string shopperLocale = default(string), Name shopperName = default(Name), string shopperReference = default(string), string shopperStatement = default(string), string socialSecurityNumber = default(string), List splits = default(List), string store = default(string), string telephoneNumber = default(string), ThreeDS2RequestData threeDS2RequestData = default(ThreeDS2RequestData), bool? threeDSAuthenticationOnly = false, string totalsGroup = default(string), bool? trustedShopper = default(bool?))
{
this.Amount = amount;
this.MerchantAccount = merchantAccount;
@@ -260,6 +261,7 @@ protected PaymentRequest() { }
this.PlatformChargebackLogic = platformChargebackLogic;
this.Recurring = recurring;
this.RecurringProcessingModel = recurringProcessingModel;
+ this.SecureRemoteCommerceCheckoutData = secureRemoteCommerceCheckoutData;
this.SelectedBrand = selectedBrand;
this.SelectedRecurringDetailReference = selectedRecurringDetailReference;
this.SessionId = sessionId;
@@ -487,6 +489,12 @@ protected PaymentRequest() { }
[DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)]
public string Reference { get; set; }
+ ///
+ /// Gets or Sets SecureRemoteCommerceCheckoutData
+ ///
+ [DataMember(Name = "secureRemoteCommerceCheckoutData", EmitDefaultValue = false)]
+ public SecureRemoteCommerceCheckoutData SecureRemoteCommerceCheckoutData { get; set; }
+
///
/// Some payment methods require defining a value for this field to specify how to process the transaction. For the Bancontact payment method, it can be set to: * `maestro` (default), to be processed like a Maestro card, or * `bcmc`, to be processed like a Bancontact card.
///
@@ -647,6 +655,7 @@ public override string ToString()
sb.Append(" Recurring: ").Append(Recurring).Append("\n");
sb.Append(" RecurringProcessingModel: ").Append(RecurringProcessingModel).Append("\n");
sb.Append(" Reference: ").Append(Reference).Append("\n");
+ sb.Append(" SecureRemoteCommerceCheckoutData: ").Append(SecureRemoteCommerceCheckoutData).Append("\n");
sb.Append(" SelectedBrand: ").Append(SelectedBrand).Append("\n");
sb.Append(" SelectedRecurringDetailReference: ").Append(SelectedRecurringDetailReference).Append("\n");
sb.Append(" SessionId: ").Append(SessionId).Append("\n");
@@ -677,6 +686,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the PaymentRequest object from the json payload
+ ///
+ /// PaymentRequest
+ public static PaymentRequest FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
@@ -873,6 +891,11 @@ public bool Equals(PaymentRequest input)
(this.Reference != null &&
this.Reference.Equals(input.Reference))
) &&
+ (
+ this.SecureRemoteCommerceCheckoutData == input.SecureRemoteCommerceCheckoutData ||
+ (this.SecureRemoteCommerceCheckoutData != null &&
+ this.SecureRemoteCommerceCheckoutData.Equals(input.SecureRemoteCommerceCheckoutData))
+ ) &&
(
this.SelectedBrand == input.SelectedBrand ||
(this.SelectedBrand != null &&
@@ -1097,6 +1120,10 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + this.Reference.GetHashCode();
}
+ if (this.SecureRemoteCommerceCheckoutData != null)
+ {
+ hashCode = (hashCode * 59) + this.SecureRemoteCommerceCheckoutData.GetHashCode();
+ }
if (this.SelectedBrand != null)
{
hashCode = (hashCode * 59) + this.SelectedBrand.GetHashCode();
diff --git a/Adyen/Model/Payment/PaymentRequest3d.cs b/Adyen/Model/Payment/PaymentRequest3d.cs
index 065cda4ca..66aeba479 100644
--- a/Adyen/Model/Payment/PaymentRequest3d.cs
+++ b/Adyen/Model/Payment/PaymentRequest3d.cs
@@ -562,6 +562,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the PaymentRequest3d object from the json payload
+ ///
+ /// PaymentRequest3d
+ public static PaymentRequest3d FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/PaymentRequest3ds2.cs b/Adyen/Model/Payment/PaymentRequest3ds2.cs
index 8f6584e15..4d30e322f 100644
--- a/Adyen/Model/Payment/PaymentRequest3ds2.cs
+++ b/Adyen/Model/Payment/PaymentRequest3ds2.cs
@@ -561,6 +561,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the PaymentRequest3ds2 object from the json payload
+ ///
+ /// PaymentRequest3ds2
+ public static PaymentRequest3ds2 FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/PaymentResult.cs b/Adyen/Model/Payment/PaymentResult.cs
index 4f336f8b8..985ee1fc3 100644
--- a/Adyen/Model/Payment/PaymentResult.cs
+++ b/Adyen/Model/Payment/PaymentResult.cs
@@ -260,6 +260,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the PaymentResult object from the json payload
+ ///
+ /// PaymentResult
+ public static PaymentResult FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/Phone.cs b/Adyen/Model/Payment/Phone.cs
index 9ac41eeba..cbbced683 100644
--- a/Adyen/Model/Payment/Phone.cs
+++ b/Adyen/Model/Payment/Phone.cs
@@ -79,6 +79,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the Phone object from the json payload
+ ///
+ /// Phone
+ public static Phone FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/PlatformChargebackLogic.cs b/Adyen/Model/Payment/PlatformChargebackLogic.cs
index e9b6031c5..3e9560ec2 100644
--- a/Adyen/Model/Payment/PlatformChargebackLogic.cs
+++ b/Adyen/Model/Payment/PlatformChargebackLogic.cs
@@ -116,6 +116,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the PlatformChargebackLogic object from the json payload
+ ///
+ /// PlatformChargebackLogic
+ public static PlatformChargebackLogic FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/Recurring.cs b/Adyen/Model/Payment/Recurring.cs
index ae0713568..ed0830102 100644
--- a/Adyen/Model/Payment/Recurring.cs
+++ b/Adyen/Model/Payment/Recurring.cs
@@ -169,6 +169,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the Recurring object from the json payload
+ ///
+ /// Recurring
+ public static Recurring FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/RefundRequest.cs b/Adyen/Model/Payment/RefundRequest.cs
index 98add129d..305e846b3 100644
--- a/Adyen/Model/Payment/RefundRequest.cs
+++ b/Adyen/Model/Payment/RefundRequest.cs
@@ -171,6 +171,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the RefundRequest object from the json payload
+ ///
+ /// RefundRequest
+ public static RefundRequest FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ResponseAdditionalData3DSecure.cs b/Adyen/Model/Payment/ResponseAdditionalData3DSecure.cs
index d5057f794..8f2e7534b 100644
--- a/Adyen/Model/Payment/ResponseAdditionalData3DSecure.cs
+++ b/Adyen/Model/Payment/ResponseAdditionalData3DSecure.cs
@@ -109,6 +109,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ResponseAdditionalData3DSecure object from the json payload
+ ///
+ /// ResponseAdditionalData3DSecure
+ public static ResponseAdditionalData3DSecure FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ResponseAdditionalDataBillingAddress.cs b/Adyen/Model/Payment/ResponseAdditionalDataBillingAddress.cs
index 494ee37c2..68292245e 100644
--- a/Adyen/Model/Payment/ResponseAdditionalDataBillingAddress.cs
+++ b/Adyen/Model/Payment/ResponseAdditionalDataBillingAddress.cs
@@ -119,6 +119,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ResponseAdditionalDataBillingAddress object from the json payload
+ ///
+ /// ResponseAdditionalDataBillingAddress
+ public static ResponseAdditionalDataBillingAddress FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ResponseAdditionalDataCard.cs b/Adyen/Model/Payment/ResponseAdditionalDataCard.cs
index 65730f2da..1d9f711a6 100644
--- a/Adyen/Model/Payment/ResponseAdditionalDataCard.cs
+++ b/Adyen/Model/Payment/ResponseAdditionalDataCard.cs
@@ -139,6 +139,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ResponseAdditionalDataCard object from the json payload
+ ///
+ /// ResponseAdditionalDataCard
+ public static ResponseAdditionalDataCard FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ResponseAdditionalDataCommon.cs b/Adyen/Model/Payment/ResponseAdditionalDataCommon.cs
index b6b9231d1..1570f9404 100644
--- a/Adyen/Model/Payment/ResponseAdditionalDataCommon.cs
+++ b/Adyen/Model/Payment/ResponseAdditionalDataCommon.cs
@@ -697,6 +697,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ResponseAdditionalDataCommon object from the json payload
+ ///
+ /// ResponseAdditionalDataCommon
+ public static ResponseAdditionalDataCommon FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ResponseAdditionalDataDomesticError.cs b/Adyen/Model/Payment/ResponseAdditionalDataDomesticError.cs
index 0c6f5ea6f..5c02a68ed 100644
--- a/Adyen/Model/Payment/ResponseAdditionalDataDomesticError.cs
+++ b/Adyen/Model/Payment/ResponseAdditionalDataDomesticError.cs
@@ -79,6 +79,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ResponseAdditionalDataDomesticError object from the json payload
+ ///
+ /// ResponseAdditionalDataDomesticError
+ public static ResponseAdditionalDataDomesticError FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ResponseAdditionalDataInstallments.cs b/Adyen/Model/Payment/ResponseAdditionalDataInstallments.cs
index 78534c2b6..1e6e60242 100644
--- a/Adyen/Model/Payment/ResponseAdditionalDataInstallments.cs
+++ b/Adyen/Model/Payment/ResponseAdditionalDataInstallments.cs
@@ -179,6 +179,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ResponseAdditionalDataInstallments object from the json payload
+ ///
+ /// ResponseAdditionalDataInstallments
+ public static ResponseAdditionalDataInstallments FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ResponseAdditionalDataNetworkTokens.cs b/Adyen/Model/Payment/ResponseAdditionalDataNetworkTokens.cs
index e9dc17d14..bc3ed30af 100644
--- a/Adyen/Model/Payment/ResponseAdditionalDataNetworkTokens.cs
+++ b/Adyen/Model/Payment/ResponseAdditionalDataNetworkTokens.cs
@@ -89,6 +89,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ResponseAdditionalDataNetworkTokens object from the json payload
+ ///
+ /// ResponseAdditionalDataNetworkTokens
+ public static ResponseAdditionalDataNetworkTokens FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ResponseAdditionalDataOpi.cs b/Adyen/Model/Payment/ResponseAdditionalDataOpi.cs
index 76fe97495..ed536f5a1 100644
--- a/Adyen/Model/Payment/ResponseAdditionalDataOpi.cs
+++ b/Adyen/Model/Payment/ResponseAdditionalDataOpi.cs
@@ -69,6 +69,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ResponseAdditionalDataOpi object from the json payload
+ ///
+ /// ResponseAdditionalDataOpi
+ public static ResponseAdditionalDataOpi FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ResponseAdditionalDataSepa.cs b/Adyen/Model/Payment/ResponseAdditionalDataSepa.cs
index 2b876ecd6..78ceaa31c 100644
--- a/Adyen/Model/Payment/ResponseAdditionalDataSepa.cs
+++ b/Adyen/Model/Payment/ResponseAdditionalDataSepa.cs
@@ -89,6 +89,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ResponseAdditionalDataSepa object from the json payload
+ ///
+ /// ResponseAdditionalDataSepa
+ public static ResponseAdditionalDataSepa FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/SDKEphemPubKey.cs b/Adyen/Model/Payment/SDKEphemPubKey.cs
index f549f47d0..06d619ebe 100644
--- a/Adyen/Model/Payment/SDKEphemPubKey.cs
+++ b/Adyen/Model/Payment/SDKEphemPubKey.cs
@@ -99,6 +99,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the SDKEphemPubKey object from the json payload
+ ///
+ /// SDKEphemPubKey
+ public static SDKEphemPubKey FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/SecureRemoteCommerceCheckoutData.cs b/Adyen/Model/Payment/SecureRemoteCommerceCheckoutData.cs
new file mode 100644
index 000000000..be9649da5
--- /dev/null
+++ b/Adyen/Model/Payment/SecureRemoteCommerceCheckoutData.cs
@@ -0,0 +1,292 @@
+/*
+* Adyen Payment API
+*
+*
+* The version of the OpenAPI document: 68
+*
+* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+* https://openapi-generator.tech
+* Do not edit the class manually.
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.IO;
+using System.Runtime.Serialization;
+using System.Text;
+using System.Text.RegularExpressions;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using Newtonsoft.Json.Linq;
+using System.ComponentModel.DataAnnotations;
+using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter;
+
+namespace Adyen.Model.Payment
+{
+ ///
+ /// SecureRemoteCommerceCheckoutData
+ ///
+ [DataContract(Name = "SecureRemoteCommerceCheckoutData")]
+ public partial class SecureRemoteCommerceCheckoutData : IEquatable, IValidatableObject
+ {
+ ///
+ /// The Secure Remote Commerce scheme.
+ ///
+ /// The Secure Remote Commerce scheme.
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum SchemeEnum
+ {
+ ///
+ /// Enum Mc for value: mc
+ ///
+ [EnumMember(Value = "mc")]
+ Mc = 1,
+
+ ///
+ /// Enum Visa for value: visa
+ ///
+ [EnumMember(Value = "visa")]
+ Visa = 2
+
+ }
+
+
+ ///
+ /// The Secure Remote Commerce scheme.
+ ///
+ /// The Secure Remote Commerce scheme.
+ [DataMember(Name = "scheme", EmitDefaultValue = false)]
+ public SchemeEnum? Scheme { get; set; }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The Secure Remote Commerce checkout payload to process the payment with..
+ /// This is the unique identifier generated by SRC system to track and link SRC messages. Available within the present checkout session (e.g. received in an earlier API response during the present session)..
+ /// The [card verification code](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#card-security-code-cvc-cvv-cid)..
+ /// A unique identifier that represents the token associated with a card enrolled. Required for scheme 'mc'..
+ /// The Secure Remote Commerce scheme..
+ /// A unique identifier that represents the token associated with a card enrolled. Required for scheme 'visa'..
+ public SecureRemoteCommerceCheckoutData(string checkoutPayload = default(string), string correlationId = default(string), string cvc = default(string), string digitalCardId = default(string), SchemeEnum? scheme = default(SchemeEnum?), string tokenReference = default(string))
+ {
+ this.CheckoutPayload = checkoutPayload;
+ this.CorrelationId = correlationId;
+ this.Cvc = cvc;
+ this.DigitalCardId = digitalCardId;
+ this.Scheme = scheme;
+ this.TokenReference = tokenReference;
+ }
+
+ ///
+ /// The Secure Remote Commerce checkout payload to process the payment with.
+ ///
+ /// The Secure Remote Commerce checkout payload to process the payment with.
+ [DataMember(Name = "checkoutPayload", EmitDefaultValue = false)]
+ public string CheckoutPayload { get; set; }
+
+ ///
+ /// This is the unique identifier generated by SRC system to track and link SRC messages. Available within the present checkout session (e.g. received in an earlier API response during the present session).
+ ///
+ /// This is the unique identifier generated by SRC system to track and link SRC messages. Available within the present checkout session (e.g. received in an earlier API response during the present session).
+ [DataMember(Name = "correlationId", EmitDefaultValue = false)]
+ public string CorrelationId { get; set; }
+
+ ///
+ /// The [card verification code](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#card-security-code-cvc-cvv-cid).
+ ///
+ /// The [card verification code](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#card-security-code-cvc-cvv-cid).
+ [DataMember(Name = "cvc", EmitDefaultValue = false)]
+ public string Cvc { get; set; }
+
+ ///
+ /// A unique identifier that represents the token associated with a card enrolled. Required for scheme 'mc'.
+ ///
+ /// A unique identifier that represents the token associated with a card enrolled. Required for scheme 'mc'.
+ [DataMember(Name = "digitalCardId", EmitDefaultValue = false)]
+ public string DigitalCardId { get; set; }
+
+ ///
+ /// A unique identifier that represents the token associated with a card enrolled. Required for scheme 'visa'.
+ ///
+ /// A unique identifier that represents the token associated with a card enrolled. Required for scheme 'visa'.
+ [DataMember(Name = "tokenReference", EmitDefaultValue = false)]
+ public string TokenReference { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class SecureRemoteCommerceCheckoutData {\n");
+ sb.Append(" CheckoutPayload: ").Append(CheckoutPayload).Append("\n");
+ sb.Append(" CorrelationId: ").Append(CorrelationId).Append("\n");
+ sb.Append(" Cvc: ").Append(Cvc).Append("\n");
+ sb.Append(" DigitalCardId: ").Append(DigitalCardId).Append("\n");
+ sb.Append(" Scheme: ").Append(Scheme).Append("\n");
+ sb.Append(" TokenReference: ").Append(TokenReference).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
+ }
+
+ ///
+ /// Returns the SecureRemoteCommerceCheckoutData object from the json payload
+ ///
+ /// SecureRemoteCommerceCheckoutData
+ public static SecureRemoteCommerceCheckoutData FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object input)
+ {
+ return this.Equals(input as SecureRemoteCommerceCheckoutData);
+ }
+
+ ///
+ /// Returns true if SecureRemoteCommerceCheckoutData instances are equal
+ ///
+ /// Instance of SecureRemoteCommerceCheckoutData to be compared
+ /// Boolean
+ public bool Equals(SecureRemoteCommerceCheckoutData input)
+ {
+ if (input == null)
+ {
+ return false;
+ }
+ return
+ (
+ this.CheckoutPayload == input.CheckoutPayload ||
+ (this.CheckoutPayload != null &&
+ this.CheckoutPayload.Equals(input.CheckoutPayload))
+ ) &&
+ (
+ this.CorrelationId == input.CorrelationId ||
+ (this.CorrelationId != null &&
+ this.CorrelationId.Equals(input.CorrelationId))
+ ) &&
+ (
+ this.Cvc == input.Cvc ||
+ (this.Cvc != null &&
+ this.Cvc.Equals(input.Cvc))
+ ) &&
+ (
+ this.DigitalCardId == input.DigitalCardId ||
+ (this.DigitalCardId != null &&
+ this.DigitalCardId.Equals(input.DigitalCardId))
+ ) &&
+ (
+ this.Scheme == input.Scheme ||
+ this.Scheme.Equals(input.Scheme)
+ ) &&
+ (
+ this.TokenReference == input.TokenReference ||
+ (this.TokenReference != null &&
+ this.TokenReference.Equals(input.TokenReference))
+ );
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (this.CheckoutPayload != null)
+ {
+ hashCode = (hashCode * 59) + this.CheckoutPayload.GetHashCode();
+ }
+ if (this.CorrelationId != null)
+ {
+ hashCode = (hashCode * 59) + this.CorrelationId.GetHashCode();
+ }
+ if (this.Cvc != null)
+ {
+ hashCode = (hashCode * 59) + this.Cvc.GetHashCode();
+ }
+ if (this.DigitalCardId != null)
+ {
+ hashCode = (hashCode * 59) + this.DigitalCardId.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + this.Scheme.GetHashCode();
+ if (this.TokenReference != null)
+ {
+ hashCode = (hashCode * 59) + this.TokenReference.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+ ///
+ /// To validate all properties of the instance
+ ///
+ /// Validation context
+ /// Validation Result
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ // CheckoutPayload (string) maxLength
+ if (this.CheckoutPayload != null && this.CheckoutPayload.Length > 10000)
+ {
+ yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CheckoutPayload, length must be less than 10000.", new [] { "CheckoutPayload" });
+ }
+
+ // CorrelationId (string) maxLength
+ if (this.CorrelationId != null && this.CorrelationId.Length > 40)
+ {
+ yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CorrelationId, length must be less than 40.", new [] { "CorrelationId" });
+ }
+
+ // CorrelationId (string) minLength
+ if (this.CorrelationId != null && this.CorrelationId.Length < 1)
+ {
+ yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CorrelationId, length must be greater than 1.", new [] { "CorrelationId" });
+ }
+
+ // Cvc (string) maxLength
+ if (this.Cvc != null && this.Cvc.Length > 20)
+ {
+ yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cvc, length must be less than 20.", new [] { "Cvc" });
+ }
+
+ // Cvc (string) minLength
+ if (this.Cvc != null && this.Cvc.Length < 1)
+ {
+ yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cvc, length must be greater than 1.", new [] { "Cvc" });
+ }
+
+ // DigitalCardId (string) maxLength
+ if (this.DigitalCardId != null && this.DigitalCardId.Length > 80)
+ {
+ yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DigitalCardId, length must be less than 80.", new [] { "DigitalCardId" });
+ }
+
+ // TokenReference (string) maxLength
+ if (this.TokenReference != null && this.TokenReference.Length > 80)
+ {
+ yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TokenReference, length must be less than 80.", new [] { "TokenReference" });
+ }
+
+ yield break;
+ }
+ }
+
+}
diff --git a/Adyen/Model/Payment/ServiceError.cs b/Adyen/Model/Payment/ServiceError.cs
index de3df358b..d62c515d4 100644
--- a/Adyen/Model/Payment/ServiceError.cs
+++ b/Adyen/Model/Payment/ServiceError.cs
@@ -119,6 +119,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ServiceError object from the json payload
+ ///
+ /// ServiceError
+ public static ServiceError FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ShopperInteractionDevice.cs b/Adyen/Model/Payment/ShopperInteractionDevice.cs
index 3a3aa5ac0..dc03b901c 100644
--- a/Adyen/Model/Payment/ShopperInteractionDevice.cs
+++ b/Adyen/Model/Payment/ShopperInteractionDevice.cs
@@ -89,6 +89,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ShopperInteractionDevice object from the json payload
+ ///
+ /// ShopperInteractionDevice
+ public static ShopperInteractionDevice FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/Split.cs b/Adyen/Model/Payment/Split.cs
index 80a8cd41b..0fd15656f 100644
--- a/Adyen/Model/Payment/Split.cs
+++ b/Adyen/Model/Payment/Split.cs
@@ -212,6 +212,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the Split object from the json payload
+ ///
+ /// Split
+ public static Split FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/SplitAmount.cs b/Adyen/Model/Payment/SplitAmount.cs
index abade1268..8234658de 100644
--- a/Adyen/Model/Payment/SplitAmount.cs
+++ b/Adyen/Model/Payment/SplitAmount.cs
@@ -84,6 +84,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the SplitAmount object from the json payload
+ ///
+ /// SplitAmount
+ public static SplitAmount FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/SubMerchant.cs b/Adyen/Model/Payment/SubMerchant.cs
index f5a0c4e8f..82108e61f 100644
--- a/Adyen/Model/Payment/SubMerchant.cs
+++ b/Adyen/Model/Payment/SubMerchant.cs
@@ -109,6 +109,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the SubMerchant object from the json payload
+ ///
+ /// SubMerchant
+ public static SubMerchant FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/TechnicalCancelRequest.cs b/Adyen/Model/Payment/TechnicalCancelRequest.cs
index 378dd81f3..5e049ccd3 100644
--- a/Adyen/Model/Payment/TechnicalCancelRequest.cs
+++ b/Adyen/Model/Payment/TechnicalCancelRequest.cs
@@ -161,6 +161,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the TechnicalCancelRequest object from the json payload
+ ///
+ /// TechnicalCancelRequest
+ public static TechnicalCancelRequest FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ThreeDS1Result.cs b/Adyen/Model/Payment/ThreeDS1Result.cs
index 84506b64d..feeba9b3e 100644
--- a/Adyen/Model/Payment/ThreeDS1Result.cs
+++ b/Adyen/Model/Payment/ThreeDS1Result.cs
@@ -119,6 +119,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ThreeDS1Result object from the json payload
+ ///
+ /// ThreeDS1Result
+ public static ThreeDS1Result FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ThreeDS2RequestData.cs b/Adyen/Model/Payment/ThreeDS2RequestData.cs
index 08b877930..bdf626e1f 100644
--- a/Adyen/Model/Payment/ThreeDS2RequestData.cs
+++ b/Adyen/Model/Payment/ThreeDS2RequestData.cs
@@ -652,6 +652,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ThreeDS2RequestData object from the json payload
+ ///
+ /// ThreeDS2RequestData
+ public static ThreeDS2RequestData FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ThreeDS2Result.cs b/Adyen/Model/Payment/ThreeDS2Result.cs
index bdf7c106c..625f00e4a 100644
--- a/Adyen/Model/Payment/ThreeDS2Result.cs
+++ b/Adyen/Model/Payment/ThreeDS2Result.cs
@@ -328,6 +328,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ThreeDS2Result object from the json payload
+ ///
+ /// ThreeDS2Result
+ public static ThreeDS2Result FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ThreeDS2ResultRequest.cs b/Adyen/Model/Payment/ThreeDS2ResultRequest.cs
index 74878d0f6..0cf761c1c 100644
--- a/Adyen/Model/Payment/ThreeDS2ResultRequest.cs
+++ b/Adyen/Model/Payment/ThreeDS2ResultRequest.cs
@@ -84,6 +84,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ThreeDS2ResultRequest object from the json payload
+ ///
+ /// ThreeDS2ResultRequest
+ public static ThreeDS2ResultRequest FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ThreeDS2ResultResponse.cs b/Adyen/Model/Payment/ThreeDS2ResultResponse.cs
index e12599e9f..90cb738ab 100644
--- a/Adyen/Model/Payment/ThreeDS2ResultResponse.cs
+++ b/Adyen/Model/Payment/ThreeDS2ResultResponse.cs
@@ -68,6 +68,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ThreeDS2ResultResponse object from the json payload
+ ///
+ /// ThreeDS2ResultResponse
+ public static ThreeDS2ResultResponse FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ThreeDSRequestorAuthenticationInfo.cs b/Adyen/Model/Payment/ThreeDSRequestorAuthenticationInfo.cs
index 0e9ba70f7..29d7fa729 100644
--- a/Adyen/Model/Payment/ThreeDSRequestorAuthenticationInfo.cs
+++ b/Adyen/Model/Payment/ThreeDSRequestorAuthenticationInfo.cs
@@ -134,6 +134,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ThreeDSRequestorAuthenticationInfo object from the json payload
+ ///
+ /// ThreeDSRequestorAuthenticationInfo
+ public static ThreeDSRequestorAuthenticationInfo FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ThreeDSRequestorPriorAuthenticationInfo.cs b/Adyen/Model/Payment/ThreeDSRequestorPriorAuthenticationInfo.cs
index 0a0ebdcde..ed2978c3e 100644
--- a/Adyen/Model/Payment/ThreeDSRequestorPriorAuthenticationInfo.cs
+++ b/Adyen/Model/Payment/ThreeDSRequestorPriorAuthenticationInfo.cs
@@ -132,6 +132,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ThreeDSRequestorPriorAuthenticationInfo object from the json payload
+ ///
+ /// ThreeDSRequestorPriorAuthenticationInfo
+ public static ThreeDSRequestorPriorAuthenticationInfo FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/ThreeDSecureData.cs b/Adyen/Model/Payment/ThreeDSecureData.cs
index a1a0a0ffc..46ec02e9a 100644
--- a/Adyen/Model/Payment/ThreeDSecureData.cs
+++ b/Adyen/Model/Payment/ThreeDSecureData.cs
@@ -320,6 +320,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the ThreeDSecureData object from the json payload
+ ///
+ /// ThreeDSecureData
+ public static ThreeDSecureData FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Model/Payment/VoidPendingRefundRequest.cs b/Adyen/Model/Payment/VoidPendingRefundRequest.cs
index fc912dc49..da25b154b 100644
--- a/Adyen/Model/Payment/VoidPendingRefundRequest.cs
+++ b/Adyen/Model/Payment/VoidPendingRefundRequest.cs
@@ -171,6 +171,15 @@ public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the VoidPendingRefundRequest object from the json payload
+ ///
+ /// VoidPendingRefundRequest
+ public static VoidPendingRefundRequest FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json);
+ }
///
/// Returns true if objects are equal
diff --git a/Adyen/Service/PaymentService.cs b/Adyen/Service/PaymentService.cs
index cd0beb00d..adf02d9f9 100644
--- a/Adyen/Service/PaymentService.cs
+++ b/Adyen/Service/PaymentService.cs
@@ -14,13 +14,14 @@
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
+using Adyen.Constants;
using Adyen.Model;
using Adyen.Model.Payment;
namespace Adyen.Service
{
///
- /// PaymentService Interface
+ /// DefaultService Interface
///
public interface IPaymentService
{
diff --git a/templates/csharp/modelGeneric.mustache b/templates/csharp/modelGeneric.mustache
index ff11fd1d5..c68368537 100644
--- a/templates/csharp/modelGeneric.mustache
+++ b/templates/csharp/modelGeneric.mustache
@@ -290,6 +290,15 @@
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
+
+ ///
+ /// Returns the {{classname}} object from the json payload
+ ///
+ /// {{classname}}
+ public static {{classname}} FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject<{{classname}}>(json);
+ }
///
/// Returns true if objects are equal