diff --git a/Adyen/Model/BinLookup/DSPublicKeyDetail.cs b/Adyen/Model/BinLookup/DSPublicKeyDetail.cs index 7efa554d4..d2a3220df 100644 --- a/Adyen/Model/BinLookup/DSPublicKeyDetail.cs +++ b/Adyen/Model/BinLookup/DSPublicKeyDetail.cs @@ -39,12 +39,14 @@ public partial class DSPublicKeyDetail : IEquatable, IValidat /// Directory Server (DS) identifier.. /// The version of the mobile 3D Secure 2 SDK. For the possible values, refer to the versions in [Adyen 3DS2 Android](https://github.com/Adyen/adyen-3ds2-android/releases) and [Adyen 3DS2 iOS](https://github.com/Adyen/adyen-3ds2-ios/releases).. /// Public key. The 3D Secure 2 SDK encrypts the device information by using the DS public key.. - public DSPublicKeyDetail(string brand = default(string), string directoryServerId = default(string), string fromSDKVersion = default(string), byte[] publicKey = default(byte[])) + /// Directory Server root certificates. The 3D Secure 2 SDK verifies the ACS signed content using the rootCertificates.. + public DSPublicKeyDetail(string brand = default(string), string directoryServerId = default(string), string fromSDKVersion = default(string), byte[] publicKey = default(byte[]), string rootCertificates = default(string)) { this.Brand = brand; this.DirectoryServerId = directoryServerId; this.FromSDKVersion = fromSDKVersion; this.PublicKey = publicKey; + this.RootCertificates = rootCertificates; } /// @@ -75,6 +77,13 @@ public partial class DSPublicKeyDetail : IEquatable, IValidat [DataMember(Name = "publicKey", EmitDefaultValue = false)] public byte[] PublicKey { get; set; } + /// + /// Directory Server root certificates. The 3D Secure 2 SDK verifies the ACS signed content using the rootCertificates. + /// + /// Directory Server root certificates. The 3D Secure 2 SDK verifies the ACS signed content using the rootCertificates. + [DataMember(Name = "rootCertificates", EmitDefaultValue = false)] + public string RootCertificates { get; set; } + /// /// Returns the string presentation of the object /// @@ -87,6 +96,7 @@ public override string ToString() sb.Append(" DirectoryServerId: ").Append(DirectoryServerId).Append("\n"); sb.Append(" FromSDKVersion: ").Append(FromSDKVersion).Append("\n"); sb.Append(" PublicKey: ").Append(PublicKey).Append("\n"); + sb.Append(" RootCertificates: ").Append(RootCertificates).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -141,6 +151,11 @@ public bool Equals(DSPublicKeyDetail input) this.PublicKey == input.PublicKey || (this.PublicKey != null && this.PublicKey.Equals(input.PublicKey)) + ) && + ( + this.RootCertificates == input.RootCertificates || + (this.RootCertificates != null && + this.RootCertificates.Equals(input.RootCertificates)) ); } @@ -169,6 +184,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.PublicKey.GetHashCode(); } + if (this.RootCertificates != null) + { + hashCode = (hashCode * 59) + this.RootCertificates.GetHashCode(); + } return hashCode; } } diff --git a/Adyen/Model/Checkout/BillingAddress.cs b/Adyen/Model/Checkout/BillingAddress.cs new file mode 100644 index 000000000..f8cae86cd --- /dev/null +++ b/Adyen/Model/Checkout/BillingAddress.cs @@ -0,0 +1,247 @@ +/* +* Adyen Checkout API +* +* +* The version of the OpenAPI document: 70 +* +* 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.Checkout +{ + /// + /// BillingAddress + /// + [DataContract(Name = "BillingAddress")] + public partial class BillingAddress : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BillingAddress() { } + /// + /// Initializes a new instance of the class. + /// + /// The name of the city. Maximum length: 3000 characters. (required). + /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. (required). + /// The number or name of the house. Maximum length: 3000 characters. (required). + /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. (required). + /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.. + /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. (required). + public BillingAddress(string city = default(string), string country = default(string), string houseNumberOrName = default(string), string postalCode = default(string), string stateOrProvince = default(string), string street = default(string)) + { + this.City = city; + this.Country = country; + this.HouseNumberOrName = houseNumberOrName; + this.PostalCode = postalCode; + this.Street = street; + this.StateOrProvince = stateOrProvince; + } + + /// + /// The name of the city. Maximum length: 3000 characters. + /// + /// The name of the city. Maximum length: 3000 characters. + [DataMember(Name = "city", IsRequired = false, EmitDefaultValue = false)] + public string City { get; set; } + + /// + /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + /// + /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] + public string Country { get; set; } + + /// + /// The number or name of the house. Maximum length: 3000 characters. + /// + /// The number or name of the house. Maximum length: 3000 characters. + [DataMember(Name = "houseNumberOrName", IsRequired = false, EmitDefaultValue = false)] + public string HouseNumberOrName { get; set; } + + /// + /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + /// + /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + [DataMember(Name = "postalCode", IsRequired = false, EmitDefaultValue = false)] + public string PostalCode { get; set; } + + /// + /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + /// + /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] + public string StateOrProvince { get; set; } + + /// + /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + /// + /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + [DataMember(Name = "street", IsRequired = false, EmitDefaultValue = false)] + public string Street { 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 BillingAddress {\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" Country: ").Append(Country).Append("\n"); + sb.Append(" HouseNumberOrName: ").Append(HouseNumberOrName).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); + sb.Append(" Street: ").Append(Street).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 true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BillingAddress); + } + + /// + /// Returns true if BillingAddress instances are equal + /// + /// Instance of BillingAddress to be compared + /// Boolean + public bool Equals(BillingAddress input) + { + if (input == null) + { + return false; + } + return + ( + this.City == input.City || + (this.City != null && + this.City.Equals(input.City)) + ) && + ( + this.Country == input.Country || + (this.Country != null && + this.Country.Equals(input.Country)) + ) && + ( + this.HouseNumberOrName == input.HouseNumberOrName || + (this.HouseNumberOrName != null && + this.HouseNumberOrName.Equals(input.HouseNumberOrName)) + ) && + ( + this.PostalCode == input.PostalCode || + (this.PostalCode != null && + this.PostalCode.Equals(input.PostalCode)) + ) && + ( + this.StateOrProvince == input.StateOrProvince || + (this.StateOrProvince != null && + this.StateOrProvince.Equals(input.StateOrProvince)) + ) && + ( + this.Street == input.Street || + (this.Street != null && + this.Street.Equals(input.Street)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.City != null) + { + hashCode = (hashCode * 59) + this.City.GetHashCode(); + } + if (this.Country != null) + { + hashCode = (hashCode * 59) + this.Country.GetHashCode(); + } + if (this.HouseNumberOrName != null) + { + hashCode = (hashCode * 59) + this.HouseNumberOrName.GetHashCode(); + } + if (this.PostalCode != null) + { + hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); + } + if (this.StateOrProvince != null) + { + hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); + } + if (this.Street != null) + { + hashCode = (hashCode * 59) + this.Street.GetHashCode(); + } + return hashCode; + } + } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // City (string) maxLength + if (this.City != null && this.City.Length > 3000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for City, length must be less than 3000.", new [] { "City" }); + } + + // HouseNumberOrName (string) maxLength + if (this.HouseNumberOrName != null && this.HouseNumberOrName.Length > 3000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HouseNumberOrName, length must be less than 3000.", new [] { "HouseNumberOrName" }); + } + + // Street (string) maxLength + if (this.Street != null && this.Street.Length > 3000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Street, length must be less than 3000.", new [] { "Street" }); + } + + yield break; + } + } + +} diff --git a/Adyen/Model/Checkout/CardDetails.cs b/Adyen/Model/Checkout/CardDetails.cs index 42993530f..c047d9378 100644 --- a/Adyen/Model/Checkout/CardDetails.cs +++ b/Adyen/Model/Checkout/CardDetails.cs @@ -61,41 +61,23 @@ public enum FundingSourceEnum [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { - /// - /// Enum Bcmc for value: bcmc - /// - [EnumMember(Value = "bcmc")] - Bcmc = 1, - /// /// Enum Scheme for value: scheme /// [EnumMember(Value = "scheme")] - Scheme = 2, + Scheme = 1, /// /// Enum NetworkToken for value: networkToken /// [EnumMember(Value = "networkToken")] - NetworkToken = 3, - - /// - /// Enum Giftcard for value: giftcard - /// - [EnumMember(Value = "giftcard")] - Giftcard = 4, - - /// - /// Enum Alliancedata for value: alliancedata - /// - [EnumMember(Value = "alliancedata")] - Alliancedata = 5, + NetworkToken = 2, /// /// Enum Card for value: card /// [EnumMember(Value = "card")] - Card = 6 + Card = 3 } diff --git a/Adyen/Model/Checkout/CheckoutPaymentMethod.cs b/Adyen/Model/Checkout/CheckoutPaymentMethod.cs index f1be2daf6..a12df6750 100644 --- a/Adyen/Model/Checkout/CheckoutPaymentMethod.cs +++ b/Adyen/Model/Checkout/CheckoutPaymentMethod.cs @@ -36,1037 +36,153 @@ public partial class CheckoutPaymentMethod : AbstractOpenAPISchema, IEquatable /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AchDetails. - public CheckoutPaymentMethod(AchDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AfterpayDetails. - public CheckoutPaymentMethod(AfterpayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AmazonPayDetails. - public CheckoutPaymentMethod(AmazonPayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AndroidPayDetails. - public CheckoutPaymentMethod(AndroidPayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of ApplePayDetails. - public CheckoutPaymentMethod(ApplePayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of BacsDirectDebitDetails. - public CheckoutPaymentMethod(BacsDirectDebitDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of BillDeskDetails. - public CheckoutPaymentMethod(BillDeskDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of BlikDetails. - public CheckoutPaymentMethod(BlikDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CardDetails. - public CheckoutPaymentMethod(CardDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CellulantDetails. - public CheckoutPaymentMethod(CellulantDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of DokuDetails. - public CheckoutPaymentMethod(DokuDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of DotpayDetails. - public CheckoutPaymentMethod(DotpayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of DragonpayDetails. - public CheckoutPaymentMethod(DragonpayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of EcontextVoucherDetails. - public CheckoutPaymentMethod(EcontextVoucherDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of GenericIssuerPaymentMethodDetails. - public CheckoutPaymentMethod(GenericIssuerPaymentMethodDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of GiropayDetails. - public CheckoutPaymentMethod(GiropayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of GooglePayDetails. - public CheckoutPaymentMethod(GooglePayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IdealDetails. - public CheckoutPaymentMethod(IdealDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of KlarnaDetails. - public CheckoutPaymentMethod(KlarnaDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of MasterpassDetails. - public CheckoutPaymentMethod(MasterpassDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of MbwayDetails. - public CheckoutPaymentMethod(MbwayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of MobilePayDetails. - public CheckoutPaymentMethod(MobilePayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of MolPayDetails. - public CheckoutPaymentMethod(MolPayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of OpenInvoiceDetails. - public CheckoutPaymentMethod(OpenInvoiceDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PayPalDetails. - public CheckoutPaymentMethod(PayPalDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PayUUpiDetails. - public CheckoutPaymentMethod(PayUUpiDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PayWithGoogleDetails. - public CheckoutPaymentMethod(PayWithGoogleDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PaymentDetails. - public CheckoutPaymentMethod(PaymentDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of RatepayDetails. - public CheckoutPaymentMethod(RatepayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of SamsungPayDetails. - public CheckoutPaymentMethod(SamsungPayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of SepaDirectDebitDetails. - public CheckoutPaymentMethod(SepaDirectDebitDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of StoredPaymentMethodDetails. - public CheckoutPaymentMethod(StoredPaymentMethodDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of UpiCollectDetails. - public CheckoutPaymentMethod(UpiCollectDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of UpiIntentDetails. - public CheckoutPaymentMethod(UpiIntentDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of VippsDetails. - public CheckoutPaymentMethod(VippsDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of VisaCheckoutDetails. - public CheckoutPaymentMethod(VisaCheckoutDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of WeChatPayDetails. - public CheckoutPaymentMethod(WeChatPayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of WeChatPayMiniProgramDetails. - public CheckoutPaymentMethod(WeChatPayMiniProgramDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of ZipDetails. - public CheckoutPaymentMethod(ZipDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(AchDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(AfterpayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(AmazonPayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(AndroidPayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(ApplePayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(BacsDirectDebitDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(BillDeskDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(BlikDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CardDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CellulantDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(DokuDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(DotpayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(DragonpayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(EcontextVoucherDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(GenericIssuerPaymentMethodDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(GiropayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(GooglePayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(IdealDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(KlarnaDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(MasterpassDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(MbwayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(MobilePayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(MolPayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(OpenInvoiceDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PayPalDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PayUUpiDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PayWithGoogleDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PaymentDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(RatepayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SamsungPayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SepaDirectDebitDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(StoredPaymentMethodDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(UpiCollectDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(UpiIntentDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(VippsDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(VisaCheckoutDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(WeChatPayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(WeChatPayMiniProgramDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(ZipDetails)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: AchDetails, AfterpayDetails, AmazonPayDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails"); - } - } - } - - /// - /// Get the actual instance of `AchDetails`. If the actual instance is not `AchDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of AchDetails - public AchDetails GetAchDetails() - { - return (AchDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `AfterpayDetails`. If the actual instance is not `AfterpayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of AfterpayDetails - public AfterpayDetails GetAfterpayDetails() - { - return (AfterpayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `AmazonPayDetails`. If the actual instance is not `AmazonPayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of AmazonPayDetails - public AmazonPayDetails GetAmazonPayDetails() - { - return (AmazonPayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `AndroidPayDetails`. If the actual instance is not `AndroidPayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of AndroidPayDetails - public AndroidPayDetails GetAndroidPayDetails() - { - return (AndroidPayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `ApplePayDetails`. If the actual instance is not `ApplePayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of ApplePayDetails - public ApplePayDetails GetApplePayDetails() - { - return (ApplePayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `BacsDirectDebitDetails`. If the actual instance is not `BacsDirectDebitDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of BacsDirectDebitDetails - public BacsDirectDebitDetails GetBacsDirectDebitDetails() - { - return (BacsDirectDebitDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `BillDeskDetails`. If the actual instance is not `BillDeskDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of BillDeskDetails - public BillDeskDetails GetBillDeskDetails() - { - return (BillDeskDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `BlikDetails`. If the actual instance is not `BlikDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of BlikDetails - public BlikDetails GetBlikDetails() - { - return (BlikDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `CardDetails`. If the actual instance is not `CardDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of CardDetails - public CardDetails GetCardDetails() - { - return (CardDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `CellulantDetails`. If the actual instance is not `CellulantDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of CellulantDetails - public CellulantDetails GetCellulantDetails() - { - return (CellulantDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `DokuDetails`. If the actual instance is not `DokuDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of DokuDetails - public DokuDetails GetDokuDetails() - { - return (DokuDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `DotpayDetails`. If the actual instance is not `DotpayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of DotpayDetails - public DotpayDetails GetDotpayDetails() - { - return (DotpayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `DragonpayDetails`. If the actual instance is not `DragonpayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of DragonpayDetails - public DragonpayDetails GetDragonpayDetails() - { - return (DragonpayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `EcontextVoucherDetails`. If the actual instance is not `EcontextVoucherDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of EcontextVoucherDetails - public EcontextVoucherDetails GetEcontextVoucherDetails() - { - return (EcontextVoucherDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `GenericIssuerPaymentMethodDetails`. If the actual instance is not `GenericIssuerPaymentMethodDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of GenericIssuerPaymentMethodDetails - public GenericIssuerPaymentMethodDetails GetGenericIssuerPaymentMethodDetails() - { - return (GenericIssuerPaymentMethodDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `GiropayDetails`. If the actual instance is not `GiropayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of GiropayDetails - public GiropayDetails GetGiropayDetails() - { - return (GiropayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `GooglePayDetails`. If the actual instance is not `GooglePayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of GooglePayDetails - public GooglePayDetails GetGooglePayDetails() - { - return (GooglePayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `IdealDetails`. If the actual instance is not `IdealDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of IdealDetails - public IdealDetails GetIdealDetails() - { - return (IdealDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `KlarnaDetails`. If the actual instance is not `KlarnaDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of KlarnaDetails - public KlarnaDetails GetKlarnaDetails() - { - return (KlarnaDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `MasterpassDetails`. If the actual instance is not `MasterpassDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of MasterpassDetails - public MasterpassDetails GetMasterpassDetails() - { - return (MasterpassDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `MbwayDetails`. If the actual instance is not `MbwayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of MbwayDetails - public MbwayDetails GetMbwayDetails() - { - return (MbwayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `MobilePayDetails`. If the actual instance is not `MobilePayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of MobilePayDetails - public MobilePayDetails GetMobilePayDetails() - { - return (MobilePayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `MolPayDetails`. If the actual instance is not `MolPayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of MolPayDetails - public MolPayDetails GetMolPayDetails() - { - return (MolPayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `OpenInvoiceDetails`. If the actual instance is not `OpenInvoiceDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of OpenInvoiceDetails - public OpenInvoiceDetails GetOpenInvoiceDetails() - { - return (OpenInvoiceDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `PayPalDetails`. If the actual instance is not `PayPalDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of PayPalDetails - public PayPalDetails GetPayPalDetails() - { - return (PayPalDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `PayUUpiDetails`. If the actual instance is not `PayUUpiDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of PayUUpiDetails - public PayUUpiDetails GetPayUUpiDetails() - { - return (PayUUpiDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `PayWithGoogleDetails`. If the actual instance is not `PayWithGoogleDetails`, - /// the InvalidClassException will be thrown + /// with the class /// - /// An instance of PayWithGoogleDetails - public PayWithGoogleDetails GetPayWithGoogleDetails() + /// An instance of ApplePayDetails. + public CheckoutPaymentMethod(ApplePayDetails actualInstance) { - return (PayWithGoogleDetails)this.ActualInstance; + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Get the actual instance of `PaymentDetails`. If the actual instance is not `PaymentDetails`, - /// the InvalidClassException will be thrown + /// Initializes a new instance of the class + /// with the class /// - /// An instance of PaymentDetails - public PaymentDetails GetPaymentDetails() + /// An instance of CardDetails. + public CheckoutPaymentMethod(CardDetails actualInstance) { - return (PaymentDetails)this.ActualInstance; + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Get the actual instance of `RatepayDetails`. If the actual instance is not `RatepayDetails`, - /// the InvalidClassException will be thrown + /// Initializes a new instance of the class + /// with the class /// - /// An instance of RatepayDetails - public RatepayDetails GetRatepayDetails() + /// An instance of GooglePayDetails. + public CheckoutPaymentMethod(GooglePayDetails actualInstance) { - return (RatepayDetails)this.ActualInstance; + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Get the actual instance of `SamsungPayDetails`. If the actual instance is not `SamsungPayDetails`, - /// the InvalidClassException will be thrown + /// Initializes a new instance of the class + /// with the class /// - /// An instance of SamsungPayDetails - public SamsungPayDetails GetSamsungPayDetails() + /// An instance of IdealDetails. + public CheckoutPaymentMethod(IdealDetails actualInstance) { - return (SamsungPayDetails)this.ActualInstance; + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Get the actual instance of `SepaDirectDebitDetails`. If the actual instance is not `SepaDirectDebitDetails`, - /// the InvalidClassException will be thrown + /// Initializes a new instance of the class + /// with the class /// - /// An instance of SepaDirectDebitDetails - public SepaDirectDebitDetails GetSepaDirectDebitDetails() + /// An instance of PayWithGoogleDetails. + public CheckoutPaymentMethod(PayWithGoogleDetails actualInstance) { - return (SepaDirectDebitDetails)this.ActualInstance; + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } - /// - /// Get the actual instance of `StoredPaymentMethodDetails`. If the actual instance is not `StoredPaymentMethodDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of StoredPaymentMethodDetails - public StoredPaymentMethodDetails GetStoredPaymentMethodDetails() - { - return (StoredPaymentMethodDetails)this.ActualInstance; - } - /// - /// Get the actual instance of `UpiCollectDetails`. If the actual instance is not `UpiCollectDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of UpiCollectDetails - public UpiCollectDetails GetUpiCollectDetails() - { - return (UpiCollectDetails)this.ActualInstance; - } + private Object _actualInstance; /// - /// Get the actual instance of `UpiIntentDetails`. If the actual instance is not `UpiIntentDetails`, - /// the InvalidClassException will be thrown + /// Gets or Sets ActualInstance /// - /// An instance of UpiIntentDetails - public UpiIntentDetails GetUpiIntentDetails() + public override Object ActualInstance { - return (UpiIntentDetails)this.ActualInstance; + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(ApplePayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(CardDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(GooglePayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(IdealDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(PayWithGoogleDetails)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: ApplePayDetails, CardDetails, GooglePayDetails, IdealDetails, PayWithGoogleDetails"); + } + } } /// - /// Get the actual instance of `VippsDetails`. If the actual instance is not `VippsDetails`, + /// Get the actual instance of `ApplePayDetails`. If the actual instance is not `ApplePayDetails`, /// the InvalidClassException will be thrown /// - /// An instance of VippsDetails - public VippsDetails GetVippsDetails() + /// An instance of ApplePayDetails + public ApplePayDetails GetApplePayDetails() { - return (VippsDetails)this.ActualInstance; + return (ApplePayDetails)this.ActualInstance; } /// - /// Get the actual instance of `VisaCheckoutDetails`. If the actual instance is not `VisaCheckoutDetails`, + /// Get the actual instance of `CardDetails`. If the actual instance is not `CardDetails`, /// the InvalidClassException will be thrown /// - /// An instance of VisaCheckoutDetails - public VisaCheckoutDetails GetVisaCheckoutDetails() + /// An instance of CardDetails + public CardDetails GetCardDetails() { - return (VisaCheckoutDetails)this.ActualInstance; + return (CardDetails)this.ActualInstance; } /// - /// Get the actual instance of `WeChatPayDetails`. If the actual instance is not `WeChatPayDetails`, + /// Get the actual instance of `GooglePayDetails`. If the actual instance is not `GooglePayDetails`, /// the InvalidClassException will be thrown /// - /// An instance of WeChatPayDetails - public WeChatPayDetails GetWeChatPayDetails() + /// An instance of GooglePayDetails + public GooglePayDetails GetGooglePayDetails() { - return (WeChatPayDetails)this.ActualInstance; + return (GooglePayDetails)this.ActualInstance; } /// - /// Get the actual instance of `WeChatPayMiniProgramDetails`. If the actual instance is not `WeChatPayMiniProgramDetails`, + /// Get the actual instance of `IdealDetails`. If the actual instance is not `IdealDetails`, /// the InvalidClassException will be thrown /// - /// An instance of WeChatPayMiniProgramDetails - public WeChatPayMiniProgramDetails GetWeChatPayMiniProgramDetails() + /// An instance of IdealDetails + public IdealDetails GetIdealDetails() { - return (WeChatPayMiniProgramDetails)this.ActualInstance; + return (IdealDetails)this.ActualInstance; } /// - /// Get the actual instance of `ZipDetails`. If the actual instance is not `ZipDetails`, + /// Get the actual instance of `PayWithGoogleDetails`. If the actual instance is not `PayWithGoogleDetails`, /// the InvalidClassException will be thrown /// - /// An instance of ZipDetails - public ZipDetails GetZipDetails() + /// An instance of PayWithGoogleDetails + public PayWithGoogleDetails GetPayWithGoogleDetails() { - return (ZipDetails)this.ActualInstance; + return (PayWithGoogleDetails)this.ActualInstance; } /// @@ -1115,34 +231,6 @@ public static CheckoutPaymentMethod FromJson(string jsonString) } try { - // Check if the jsonString type enum matches the AchDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("AchDetails"); - match++; - } - // Check if the jsonString type enum matches the AfterpayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("AfterpayDetails"); - match++; - } - // Check if the jsonString type enum matches the AmazonPayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("AmazonPayDetails"); - match++; - } - // Check if the jsonString type enum matches the AndroidPayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("AndroidPayDetails"); - match++; - } // Check if the jsonString type enum matches the ApplePayDetails type enums if (ContainsValue(type)) { @@ -1150,27 +238,6 @@ public static CheckoutPaymentMethod FromJson(string jsonString) matchedTypes.Add("ApplePayDetails"); match++; } - // Check if the jsonString type enum matches the BacsDirectDebitDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("BacsDirectDebitDetails"); - match++; - } - // Check if the jsonString type enum matches the BillDeskDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("BillDeskDetails"); - match++; - } - // Check if the jsonString type enum matches the BlikDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("BlikDetails"); - match++; - } // Check if the jsonString type enum matches the CardDetails type enums if (ContainsValue(type)) { @@ -1178,55 +245,6 @@ public static CheckoutPaymentMethod FromJson(string jsonString) matchedTypes.Add("CardDetails"); match++; } - // Check if the jsonString type enum matches the CellulantDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("CellulantDetails"); - match++; - } - // Check if the jsonString type enum matches the DokuDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("DokuDetails"); - match++; - } - // Check if the jsonString type enum matches the DotpayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("DotpayDetails"); - match++; - } - // Check if the jsonString type enum matches the DragonpayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("DragonpayDetails"); - match++; - } - // Check if the jsonString type enum matches the EcontextVoucherDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("EcontextVoucherDetails"); - match++; - } - // Check if the jsonString type enum matches the GenericIssuerPaymentMethodDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("GenericIssuerPaymentMethodDetails"); - match++; - } - // Check if the jsonString type enum matches the GiropayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("GiropayDetails"); - match++; - } // Check if the jsonString type enum matches the GooglePayDetails type enums if (ContainsValue(type)) { @@ -1241,62 +259,6 @@ public static CheckoutPaymentMethod FromJson(string jsonString) matchedTypes.Add("IdealDetails"); match++; } - // Check if the jsonString type enum matches the KlarnaDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("KlarnaDetails"); - match++; - } - // Check if the jsonString type enum matches the MasterpassDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("MasterpassDetails"); - match++; - } - // Check if the jsonString type enum matches the MbwayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("MbwayDetails"); - match++; - } - // Check if the jsonString type enum matches the MobilePayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("MobilePayDetails"); - match++; - } - // Check if the jsonString type enum matches the MolPayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("MolPayDetails"); - match++; - } - // Check if the jsonString type enum matches the OpenInvoiceDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("OpenInvoiceDetails"); - match++; - } - // Check if the jsonString type enum matches the PayPalDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("PayPalDetails"); - match++; - } - // Check if the jsonString type enum matches the PayUUpiDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("PayUUpiDetails"); - match++; - } // Check if the jsonString type enum matches the PayWithGoogleDetails type enums if (ContainsValue(type)) { @@ -1304,90 +266,6 @@ public static CheckoutPaymentMethod FromJson(string jsonString) matchedTypes.Add("PayWithGoogleDetails"); match++; } - // Check if the jsonString type enum matches the PaymentDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("PaymentDetails"); - match++; - } - // Check if the jsonString type enum matches the RatepayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("RatepayDetails"); - match++; - } - // Check if the jsonString type enum matches the SamsungPayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("SamsungPayDetails"); - match++; - } - // Check if the jsonString type enum matches the SepaDirectDebitDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("SepaDirectDebitDetails"); - match++; - } - // Check if the jsonString type enum matches the StoredPaymentMethodDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("StoredPaymentMethodDetails"); - match++; - } - // Check if the jsonString type enum matches the UpiCollectDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("UpiCollectDetails"); - match++; - } - // Check if the jsonString type enum matches the UpiIntentDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("UpiIntentDetails"); - match++; - } - // Check if the jsonString type enum matches the VippsDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("VippsDetails"); - match++; - } - // Check if the jsonString type enum matches the VisaCheckoutDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("VisaCheckoutDetails"); - match++; - } - // Check if the jsonString type enum matches the WeChatPayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("WeChatPayDetails"); - match++; - } - // Check if the jsonString type enum matches the WeChatPayMiniProgramDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("WeChatPayMiniProgramDetails"); - match++; - } - // Check if the jsonString type enum matches the ZipDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("ZipDetails"); - match++; - } } catch (Exception ex) { diff --git a/Adyen/Model/Checkout/CreateCheckoutSessionRequest.cs b/Adyen/Model/Checkout/CreateCheckoutSessionRequest.cs index d3f5274b4..f41a8a588 100644 --- a/Adyen/Model/Checkout/CreateCheckoutSessionRequest.cs +++ b/Adyen/Model/Checkout/CreateCheckoutSessionRequest.cs @@ -237,7 +237,7 @@ protected CreateCheckoutSessionRequest() { } /// The shopper's telephone number.. /// 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). /// Set to true if the payment should be routed to a trusted MID.. - public CreateCheckoutSessionRequest(AccountInfo accountInfo = default(AccountInfo), Amount additionalAmount = default(Amount), Dictionary additionalData = default(Dictionary), List allowedPaymentMethods = default(List), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), AuthenticationData authenticationData = default(AuthenticationData), Address billingAddress = default(Address), List blockedPaymentMethods = default(List), int? captureDelayHours = default(int?), ChannelEnum? channel = default(ChannelEnum?), Company company = default(Company), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), DateTime deliverAt = default(DateTime), Address deliveryAddress = default(Address), bool? enableOneClick = default(bool?), bool? enablePayOut = default(bool?), bool? enableRecurring = default(bool?), DateTime expiresAt = default(DateTime), FundOrigin fundOrigin = default(FundOrigin), FundRecipient fundRecipient = default(FundRecipient), Dictionary installmentOptions = default(Dictionary), List lineItems = default(List), Mandate mandate = default(Mandate), string mcc = default(string), string merchantAccount = default(string), string merchantOrderReference = default(string), Dictionary metadata = default(Dictionary), ThreeDSecureData mpiData = default(ThreeDSecureData), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), string recurringExpiry = default(string), string recurringFrequency = default(string), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string redirectFromIssuerMethod = default(string), string redirectToIssuerMethod = default(string), string reference = default(string), string returnUrl = default(string), RiskData riskData = default(RiskData), 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), bool? splitCardFundingSources = false, List splits = default(List), string store = default(string), bool? storePaymentMethod = default(bool?), StorePaymentMethodModeEnum? storePaymentMethodMode = default(StorePaymentMethodModeEnum?), string telephoneNumber = default(string), bool? threeDSAuthenticationOnly = false, bool? trustedShopper = default(bool?)) + public CreateCheckoutSessionRequest(AccountInfo accountInfo = default(AccountInfo), Amount additionalAmount = default(Amount), Dictionary additionalData = default(Dictionary), List allowedPaymentMethods = default(List), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), AuthenticationData authenticationData = default(AuthenticationData), BillingAddress billingAddress = default(BillingAddress), List blockedPaymentMethods = default(List), int? captureDelayHours = default(int?), ChannelEnum? channel = default(ChannelEnum?), Company company = default(Company), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), DateTime deliverAt = default(DateTime), DeliveryAddress deliveryAddress = default(DeliveryAddress), bool? enableOneClick = default(bool?), bool? enablePayOut = default(bool?), bool? enableRecurring = default(bool?), DateTime expiresAt = default(DateTime), FundOrigin fundOrigin = default(FundOrigin), FundRecipient fundRecipient = default(FundRecipient), Dictionary installmentOptions = default(Dictionary), List lineItems = default(List), Mandate mandate = default(Mandate), string mcc = default(string), string merchantAccount = default(string), string merchantOrderReference = default(string), Dictionary metadata = default(Dictionary), ThreeDSecureData mpiData = default(ThreeDSecureData), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), string recurringExpiry = default(string), string recurringFrequency = default(string), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string redirectFromIssuerMethod = default(string), string redirectToIssuerMethod = default(string), string reference = default(string), string returnUrl = default(string), RiskData riskData = default(RiskData), 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), bool? splitCardFundingSources = false, List splits = default(List), string store = default(string), bool? storePaymentMethod = default(bool?), StorePaymentMethodModeEnum? storePaymentMethodMode = default(StorePaymentMethodModeEnum?), string telephoneNumber = default(string), bool? threeDSAuthenticationOnly = false, bool? trustedShopper = default(bool?)) { this.Amount = amount; this.MerchantAccount = merchantAccount; @@ -344,7 +344,7 @@ protected CreateCheckoutSessionRequest() { } /// Gets or Sets BillingAddress /// [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public Address BillingAddress { get; set; } + public BillingAddress BillingAddress { get; set; } /// /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` @@ -392,7 +392,7 @@ protected CreateCheckoutSessionRequest() { } /// Gets or Sets DeliveryAddress /// [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public Address DeliveryAddress { get; set; } + public DeliveryAddress DeliveryAddress { get; set; } /// /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments. diff --git a/Adyen/Model/Checkout/CreateCheckoutSessionResponse.cs b/Adyen/Model/Checkout/CreateCheckoutSessionResponse.cs index 57fe8ed50..7bc714353 100644 --- a/Adyen/Model/Checkout/CreateCheckoutSessionResponse.cs +++ b/Adyen/Model/Checkout/CreateCheckoutSessionResponse.cs @@ -267,7 +267,7 @@ protected CreateCheckoutSessionResponse() { } /// The shopper's telephone number.. /// 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). /// Set to true if the payment should be routed to a trusted MID.. - public CreateCheckoutSessionResponse(AccountInfo accountInfo = default(AccountInfo), Amount additionalAmount = default(Amount), Dictionary additionalData = default(Dictionary), List allowedPaymentMethods = default(List), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), AuthenticationData authenticationData = default(AuthenticationData), Address billingAddress = default(Address), List blockedPaymentMethods = default(List), int? captureDelayHours = default(int?), ChannelEnum? channel = default(ChannelEnum?), Company company = default(Company), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), DateTime deliverAt = default(DateTime), Address deliveryAddress = default(Address), bool? enableOneClick = default(bool?), bool? enablePayOut = default(bool?), bool? enableRecurring = default(bool?), DateTime expiresAt = default(DateTime), FundOrigin fundOrigin = default(FundOrigin), FundRecipient fundRecipient = default(FundRecipient), Dictionary installmentOptions = default(Dictionary), List lineItems = default(List), Mandate mandate = default(Mandate), string mcc = default(string), string merchantAccount = default(string), string merchantOrderReference = default(string), Dictionary metadata = default(Dictionary), ModeEnum? mode = ModeEnum.Embedded, ThreeDSecureData mpiData = default(ThreeDSecureData), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), string recurringExpiry = default(string), string recurringFrequency = default(string), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string redirectFromIssuerMethod = default(string), string redirectToIssuerMethod = default(string), string reference = default(string), string returnUrl = default(string), RiskData riskData = default(RiskData), string sessionData = 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), bool? splitCardFundingSources = false, List splits = default(List), string store = default(string), bool? storePaymentMethod = default(bool?), StorePaymentMethodModeEnum? storePaymentMethodMode = default(StorePaymentMethodModeEnum?), string telephoneNumber = default(string), bool? threeDSAuthenticationOnly = false, bool? trustedShopper = default(bool?)) + public CreateCheckoutSessionResponse(AccountInfo accountInfo = default(AccountInfo), Amount additionalAmount = default(Amount), Dictionary additionalData = default(Dictionary), List allowedPaymentMethods = default(List), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), AuthenticationData authenticationData = default(AuthenticationData), BillingAddress billingAddress = default(BillingAddress), List blockedPaymentMethods = default(List), int? captureDelayHours = default(int?), ChannelEnum? channel = default(ChannelEnum?), Company company = default(Company), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), DateTime deliverAt = default(DateTime), DeliveryAddress deliveryAddress = default(DeliveryAddress), bool? enableOneClick = default(bool?), bool? enablePayOut = default(bool?), bool? enableRecurring = default(bool?), DateTime expiresAt = default(DateTime), FundOrigin fundOrigin = default(FundOrigin), FundRecipient fundRecipient = default(FundRecipient), Dictionary installmentOptions = default(Dictionary), List lineItems = default(List), Mandate mandate = default(Mandate), string mcc = default(string), string merchantAccount = default(string), string merchantOrderReference = default(string), Dictionary metadata = default(Dictionary), ModeEnum? mode = ModeEnum.Embedded, ThreeDSecureData mpiData = default(ThreeDSecureData), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), string recurringExpiry = default(string), string recurringFrequency = default(string), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string redirectFromIssuerMethod = default(string), string redirectToIssuerMethod = default(string), string reference = default(string), string returnUrl = default(string), RiskData riskData = default(RiskData), string sessionData = 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), bool? splitCardFundingSources = false, List splits = default(List), string store = default(string), bool? storePaymentMethod = default(bool?), StorePaymentMethodModeEnum? storePaymentMethodMode = default(StorePaymentMethodModeEnum?), string telephoneNumber = default(string), bool? threeDSAuthenticationOnly = false, bool? trustedShopper = default(bool?)) { this.Amount = amount; this.ExpiresAt = expiresAt; @@ -376,7 +376,7 @@ protected CreateCheckoutSessionResponse() { } /// Gets or Sets BillingAddress /// [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public Address BillingAddress { get; set; } + public BillingAddress BillingAddress { get; set; } /// /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` @@ -423,7 +423,7 @@ protected CreateCheckoutSessionResponse() { } /// Gets or Sets DeliveryAddress /// [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public Address DeliveryAddress { get; set; } + public DeliveryAddress DeliveryAddress { get; set; } /// /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments. diff --git a/Adyen/Model/Checkout/DeliveryAddress.cs b/Adyen/Model/Checkout/DeliveryAddress.cs new file mode 100644 index 000000000..65c2629dc --- /dev/null +++ b/Adyen/Model/Checkout/DeliveryAddress.cs @@ -0,0 +1,283 @@ +/* +* Adyen Checkout API +* +* +* The version of the OpenAPI document: 70 +* +* 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.Checkout +{ + /// + /// DeliveryAddress + /// + [DataContract(Name = "DeliveryAddress")] + public partial class DeliveryAddress : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DeliveryAddress() { } + /// + /// Initializes a new instance of the class. + /// + /// The name of the city. Maximum length: 3000 characters. (required). + /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. (required). + /// firstName. + /// The number or name of the house. Maximum length: 3000 characters. (required). + /// lastName. + /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. (required). + /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.. + /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. (required). + public DeliveryAddress(string city = default(string), string country = default(string), string firstName = default(string), string houseNumberOrName = default(string), string lastName = default(string), string postalCode = default(string), string stateOrProvince = default(string), string street = default(string)) + { + this.City = city; + this.Country = country; + this.HouseNumberOrName = houseNumberOrName; + this.PostalCode = postalCode; + this.Street = street; + this.FirstName = firstName; + this.LastName = lastName; + this.StateOrProvince = stateOrProvince; + } + + /// + /// The name of the city. Maximum length: 3000 characters. + /// + /// The name of the city. Maximum length: 3000 characters. + [DataMember(Name = "city", IsRequired = false, EmitDefaultValue = false)] + public string City { get; set; } + + /// + /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + /// + /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] + public string Country { get; set; } + + /// + /// Gets or Sets FirstName + /// + [DataMember(Name = "firstName", EmitDefaultValue = false)] + public string FirstName { get; set; } + + /// + /// The number or name of the house. Maximum length: 3000 characters. + /// + /// The number or name of the house. Maximum length: 3000 characters. + [DataMember(Name = "houseNumberOrName", IsRequired = false, EmitDefaultValue = false)] + public string HouseNumberOrName { get; set; } + + /// + /// Gets or Sets LastName + /// + [DataMember(Name = "lastName", EmitDefaultValue = false)] + public string LastName { get; set; } + + /// + /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + /// + /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + [DataMember(Name = "postalCode", IsRequired = false, EmitDefaultValue = false)] + public string PostalCode { get; set; } + + /// + /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + /// + /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] + public string StateOrProvince { get; set; } + + /// + /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + /// + /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + [DataMember(Name = "street", IsRequired = false, EmitDefaultValue = false)] + public string Street { 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 DeliveryAddress {\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" Country: ").Append(Country).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" HouseNumberOrName: ").Append(HouseNumberOrName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); + sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); + sb.Append(" Street: ").Append(Street).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 true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DeliveryAddress); + } + + /// + /// Returns true if DeliveryAddress instances are equal + /// + /// Instance of DeliveryAddress to be compared + /// Boolean + public bool Equals(DeliveryAddress input) + { + if (input == null) + { + return false; + } + return + ( + this.City == input.City || + (this.City != null && + this.City.Equals(input.City)) + ) && + ( + this.Country == input.Country || + (this.Country != null && + this.Country.Equals(input.Country)) + ) && + ( + this.FirstName == input.FirstName || + (this.FirstName != null && + this.FirstName.Equals(input.FirstName)) + ) && + ( + this.HouseNumberOrName == input.HouseNumberOrName || + (this.HouseNumberOrName != null && + this.HouseNumberOrName.Equals(input.HouseNumberOrName)) + ) && + ( + this.LastName == input.LastName || + (this.LastName != null && + this.LastName.Equals(input.LastName)) + ) && + ( + this.PostalCode == input.PostalCode || + (this.PostalCode != null && + this.PostalCode.Equals(input.PostalCode)) + ) && + ( + this.StateOrProvince == input.StateOrProvince || + (this.StateOrProvince != null && + this.StateOrProvince.Equals(input.StateOrProvince)) + ) && + ( + this.Street == input.Street || + (this.Street != null && + this.Street.Equals(input.Street)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.City != null) + { + hashCode = (hashCode * 59) + this.City.GetHashCode(); + } + if (this.Country != null) + { + hashCode = (hashCode * 59) + this.Country.GetHashCode(); + } + if (this.FirstName != null) + { + hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); + } + if (this.HouseNumberOrName != null) + { + hashCode = (hashCode * 59) + this.HouseNumberOrName.GetHashCode(); + } + if (this.LastName != null) + { + hashCode = (hashCode * 59) + this.LastName.GetHashCode(); + } + if (this.PostalCode != null) + { + hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); + } + if (this.StateOrProvince != null) + { + hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); + } + if (this.Street != null) + { + hashCode = (hashCode * 59) + this.Street.GetHashCode(); + } + return hashCode; + } + } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // City (string) maxLength + if (this.City != null && this.City.Length > 3000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for City, length must be less than 3000.", new [] { "City" }); + } + + // HouseNumberOrName (string) maxLength + if (this.HouseNumberOrName != null && this.HouseNumberOrName.Length > 3000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HouseNumberOrName, length must be less than 3000.", new [] { "HouseNumberOrName" }); + } + + // Street (string) maxLength + if (this.Street != null && this.Street.Length > 3000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Street, length must be less than 3000.", new [] { "Street" }); + } + + yield break; + } + } + +} diff --git a/Adyen/Model/Checkout/DokuDetails.cs b/Adyen/Model/Checkout/DokuDetails.cs index bff45992a..584ad2ee1 100644 --- a/Adyen/Model/Checkout/DokuDetails.cs +++ b/Adyen/Model/Checkout/DokuDetails.cs @@ -91,7 +91,19 @@ public enum TypeEnum /// Enum Indomaret for value: doku_indomaret /// [EnumMember(Value = "doku_indomaret")] - Indomaret = 9 + Indomaret = 9, + + /// + /// Enum Wallet for value: doku_wallet + /// + [EnumMember(Value = "doku_wallet")] + Wallet = 10, + + /// + /// Enum Ovo for value: doku_ovo + /// + [EnumMember(Value = "doku_ovo")] + Ovo = 11 } diff --git a/Adyen/Model/Checkout/DonationPaymentRequest.cs b/Adyen/Model/Checkout/DonationPaymentRequest.cs index a042fdafe..21586b786 100644 --- a/Adyen/Model/Checkout/DonationPaymentRequest.cs +++ b/Adyen/Model/Checkout/DonationPaymentRequest.cs @@ -95,6 +95,28 @@ public enum EntityTypeEnum [DataMember(Name = "entityType", EmitDefaultValue = false)] public EntityTypeEnum? EntityType { get; set; } /// + /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + /// + /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + [JsonConverter(typeof(StringEnumConverter))] + public enum FundingSourceEnum + { + /// + /// Enum Debit for value: debit + /// + [EnumMember(Value = "debit")] + Debit = 1 + + } + + + /// + /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + /// + /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + [DataMember(Name = "fundingSource", EmitDefaultValue = false)] + public FundingSourceEnum? FundingSource { get; set; } + /// /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** /// /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** @@ -213,10 +235,12 @@ protected DonationPaymentRequest() { } /// accountInfo. /// additionalAmount. /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value.. + /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]`. /// amount (required). /// applicationInfo. /// authenticationData. /// billingAddress. + /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]`. /// browserInfo. /// The delay between the authorisation and scheduled auto-capture, specified in hours.. /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web. @@ -240,6 +264,7 @@ protected DonationPaymentRequest() { } /// An integer value that is added to the normal fraud score. The value can be either positive or negative.. /// fundOrigin. /// fundRecipient. + /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.. /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment**. /// installments. /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Zip.. @@ -264,6 +289,7 @@ protected DonationPaymentRequest() { } /// 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). /// The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` (required). /// riskData. + /// The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail.. /// The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00. /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations.. /// The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).. @@ -280,7 +306,7 @@ protected DonationPaymentRequest() { } /// threeDS2RequestData. /// 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). /// Set to true if the payment should be routed to a trusted MID.. - public DonationPaymentRequest(AccountInfo accountInfo = default(AccountInfo), Amount additionalAmount = default(Amount), Dictionary additionalData = default(Dictionary), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), AuthenticationData authenticationData = default(AuthenticationData), Address billingAddress = default(Address), BrowserInfo browserInfo = default(BrowserInfo), int? captureDelayHours = default(int?), ChannelEnum? channel = default(ChannelEnum?), string checkoutAttemptId = default(string), Company company = default(Company), string conversionId = default(string), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), ForexQuote dccQuote = default(ForexQuote), DateTime deliverAt = default(DateTime), Address deliveryAddress = default(Address), DateTime deliveryDate = default(DateTime), string deviceFingerprint = default(string), string donationAccount = default(string), string donationOriginalPspReference = default(string), string donationToken = default(string), bool? enableOneClick = default(bool?), bool? enablePayOut = default(bool?), bool? enableRecurring = default(bool?), EntityTypeEnum? entityType = default(EntityTypeEnum?), int? fraudOffset = default(int?), FundOrigin fundOrigin = default(FundOrigin), FundRecipient fundRecipient = default(FundRecipient), IndustryUsageEnum? industryUsage = default(IndustryUsageEnum?), Installments installments = default(Installments), List lineItems = default(List), 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), EncryptedOrderData order = default(EncryptedOrderData), string orderReference = default(string), string origin = default(string), CheckoutPaymentMethod paymentMethod = default(CheckoutPaymentMethod), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), string recurringExpiry = default(string), string recurringFrequency = default(string), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string redirectFromIssuerMethod = default(string), string redirectToIssuerMethod = default(string), string reference = default(string), string returnUrl = default(string), RiskData riskData = default(RiskData), string sessionValidity = 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), bool? storePaymentMethod = default(bool?), string telephoneNumber = default(string), ThreeDS2RequestData2 threeDS2RequestData = default(ThreeDS2RequestData2), bool? threeDSAuthenticationOnly = false, bool? trustedShopper = default(bool?)) + public DonationPaymentRequest(AccountInfo accountInfo = default(AccountInfo), Amount additionalAmount = default(Amount), Dictionary additionalData = default(Dictionary), List allowedPaymentMethods = default(List), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), AuthenticationData authenticationData = default(AuthenticationData), BillingAddress billingAddress = default(BillingAddress), List blockedPaymentMethods = default(List), BrowserInfo browserInfo = default(BrowserInfo), int? captureDelayHours = default(int?), ChannelEnum? channel = default(ChannelEnum?), string checkoutAttemptId = default(string), Company company = default(Company), string conversionId = default(string), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), ForexQuote dccQuote = default(ForexQuote), DateTime deliverAt = default(DateTime), DeliveryAddress deliveryAddress = default(DeliveryAddress), DateTime deliveryDate = default(DateTime), string deviceFingerprint = default(string), string donationAccount = default(string), string donationOriginalPspReference = default(string), string donationToken = default(string), bool? enableOneClick = default(bool?), bool? enablePayOut = default(bool?), bool? enableRecurring = default(bool?), EntityTypeEnum? entityType = default(EntityTypeEnum?), int? fraudOffset = default(int?), FundOrigin fundOrigin = default(FundOrigin), FundRecipient fundRecipient = default(FundRecipient), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), IndustryUsageEnum? industryUsage = default(IndustryUsageEnum?), Installments installments = default(Installments), List lineItems = default(List), 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), EncryptedOrderData order = default(EncryptedOrderData), string orderReference = default(string), string origin = default(string), CheckoutPaymentMethod paymentMethod = default(CheckoutPaymentMethod), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), string recurringExpiry = default(string), string recurringFrequency = default(string), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string redirectFromIssuerMethod = default(string), string redirectToIssuerMethod = default(string), string reference = default(string), string returnUrl = default(string), RiskData riskData = default(RiskData), string selectedRecurringDetailReference = default(string), string sessionValidity = 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), bool? storePaymentMethod = default(bool?), string telephoneNumber = default(string), ThreeDS2RequestData2 threeDS2RequestData = default(ThreeDS2RequestData2), bool? threeDSAuthenticationOnly = false, bool? trustedShopper = default(bool?)) { this.Amount = amount; this.DonationAccount = donationAccount; @@ -291,9 +317,11 @@ protected DonationPaymentRequest() { } this.AccountInfo = accountInfo; this.AdditionalAmount = additionalAmount; this.AdditionalData = additionalData; + this.AllowedPaymentMethods = allowedPaymentMethods; this.ApplicationInfo = applicationInfo; this.AuthenticationData = authenticationData; this.BillingAddress = billingAddress; + this.BlockedPaymentMethods = blockedPaymentMethods; this.BrowserInfo = browserInfo; this.CaptureDelayHours = captureDelayHours; this.Channel = channel; @@ -316,6 +344,7 @@ protected DonationPaymentRequest() { } this.FraudOffset = fraudOffset; this.FundOrigin = fundOrigin; this.FundRecipient = fundRecipient; + this.FundingSource = fundingSource; this.IndustryUsage = industryUsage; this.Installments = installments; this.LineItems = lineItems; @@ -336,6 +365,7 @@ protected DonationPaymentRequest() { } this.RedirectFromIssuerMethod = redirectFromIssuerMethod; this.RedirectToIssuerMethod = redirectToIssuerMethod; this.RiskData = riskData; + this.SelectedRecurringDetailReference = selectedRecurringDetailReference; this.SessionValidity = sessionValidity; this.ShopperEmail = shopperEmail; this.ShopperIP = shopperIP; @@ -373,6 +403,13 @@ protected DonationPaymentRequest() { } [DataMember(Name = "additionalData", EmitDefaultValue = false)] public Dictionary AdditionalData { get; set; } + /// + /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]` + /// + /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]` + [DataMember(Name = "allowedPaymentMethods", EmitDefaultValue = false)] + public List AllowedPaymentMethods { get; set; } + /// /// Gets or Sets Amount /// @@ -395,7 +432,14 @@ protected DonationPaymentRequest() { } /// Gets or Sets BillingAddress /// [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public Address BillingAddress { get; set; } + public BillingAddress BillingAddress { get; set; } + + /// + /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` + /// + /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` + [DataMember(Name = "blockedPaymentMethods", EmitDefaultValue = false)] + public List BlockedPaymentMethods { get; set; } /// /// Gets or Sets BrowserInfo @@ -462,14 +506,13 @@ protected DonationPaymentRequest() { } /// Gets or Sets DeliveryAddress /// [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public Address DeliveryAddress { get; set; } + public DeliveryAddress DeliveryAddress { get; set; } /// /// The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 /// /// The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 [DataMember(Name = "deliveryDate", EmitDefaultValue = false)] - [Obsolete] public DateTime DeliveryDate { get; set; } /// @@ -686,6 +729,13 @@ protected DonationPaymentRequest() { } [DataMember(Name = "riskData", EmitDefaultValue = false)] public RiskData RiskData { get; set; } + /// + /// The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. + /// + /// The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. + [DataMember(Name = "selectedRecurringDetailReference", EmitDefaultValue = false)] + public string SelectedRecurringDetailReference { get; set; } + /// /// The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00 /// @@ -801,10 +851,12 @@ public override string ToString() sb.Append(" AccountInfo: ").Append(AccountInfo).Append("\n"); sb.Append(" AdditionalAmount: ").Append(AdditionalAmount).Append("\n"); sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); + sb.Append(" AllowedPaymentMethods: ").Append(AllowedPaymentMethods).Append("\n"); sb.Append(" Amount: ").Append(Amount).Append("\n"); sb.Append(" ApplicationInfo: ").Append(ApplicationInfo).Append("\n"); sb.Append(" AuthenticationData: ").Append(AuthenticationData).Append("\n"); sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); + sb.Append(" BlockedPaymentMethods: ").Append(BlockedPaymentMethods).Append("\n"); sb.Append(" BrowserInfo: ").Append(BrowserInfo).Append("\n"); sb.Append(" CaptureDelayHours: ").Append(CaptureDelayHours).Append("\n"); sb.Append(" Channel: ").Append(Channel).Append("\n"); @@ -828,6 +880,7 @@ public override string ToString() sb.Append(" FraudOffset: ").Append(FraudOffset).Append("\n"); sb.Append(" FundOrigin: ").Append(FundOrigin).Append("\n"); sb.Append(" FundRecipient: ").Append(FundRecipient).Append("\n"); + sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); sb.Append(" IndustryUsage: ").Append(IndustryUsage).Append("\n"); sb.Append(" Installments: ").Append(Installments).Append("\n"); sb.Append(" LineItems: ").Append(LineItems).Append("\n"); @@ -852,6 +905,7 @@ public override string ToString() sb.Append(" Reference: ").Append(Reference).Append("\n"); sb.Append(" ReturnUrl: ").Append(ReturnUrl).Append("\n"); sb.Append(" RiskData: ").Append(RiskData).Append("\n"); + sb.Append(" SelectedRecurringDetailReference: ").Append(SelectedRecurringDetailReference).Append("\n"); sb.Append(" SessionValidity: ").Append(SessionValidity).Append("\n"); sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); sb.Append(" ShopperIP: ").Append(ShopperIP).Append("\n"); @@ -919,6 +973,12 @@ public bool Equals(DonationPaymentRequest input) input.AdditionalData != null && this.AdditionalData.SequenceEqual(input.AdditionalData) ) && + ( + this.AllowedPaymentMethods == input.AllowedPaymentMethods || + this.AllowedPaymentMethods != null && + input.AllowedPaymentMethods != null && + this.AllowedPaymentMethods.SequenceEqual(input.AllowedPaymentMethods) + ) && ( this.Amount == input.Amount || (this.Amount != null && @@ -939,6 +999,12 @@ public bool Equals(DonationPaymentRequest input) (this.BillingAddress != null && this.BillingAddress.Equals(input.BillingAddress)) ) && + ( + this.BlockedPaymentMethods == input.BlockedPaymentMethods || + this.BlockedPaymentMethods != null && + input.BlockedPaymentMethods != null && + this.BlockedPaymentMethods.SequenceEqual(input.BlockedPaymentMethods) + ) && ( this.BrowserInfo == input.BrowserInfo || (this.BrowserInfo != null && @@ -1047,6 +1113,10 @@ public bool Equals(DonationPaymentRequest input) (this.FundRecipient != null && this.FundRecipient.Equals(input.FundRecipient)) ) && + ( + this.FundingSource == input.FundingSource || + this.FundingSource.Equals(input.FundingSource) + ) && ( this.IndustryUsage == input.IndustryUsage || this.IndustryUsage.Equals(input.IndustryUsage) @@ -1168,6 +1238,11 @@ public bool Equals(DonationPaymentRequest input) (this.RiskData != null && this.RiskData.Equals(input.RiskData)) ) && + ( + this.SelectedRecurringDetailReference == input.SelectedRecurringDetailReference || + (this.SelectedRecurringDetailReference != null && + this.SelectedRecurringDetailReference.Equals(input.SelectedRecurringDetailReference)) + ) && ( this.SessionValidity == input.SessionValidity || (this.SessionValidity != null && @@ -1268,6 +1343,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); } + if (this.AllowedPaymentMethods != null) + { + hashCode = (hashCode * 59) + this.AllowedPaymentMethods.GetHashCode(); + } if (this.Amount != null) { hashCode = (hashCode * 59) + this.Amount.GetHashCode(); @@ -1284,6 +1363,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); } + if (this.BlockedPaymentMethods != null) + { + hashCode = (hashCode * 59) + this.BlockedPaymentMethods.GetHashCode(); + } if (this.BrowserInfo != null) { hashCode = (hashCode * 59) + this.BrowserInfo.GetHashCode(); @@ -1355,6 +1438,7 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.FundRecipient.GetHashCode(); } + hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); hashCode = (hashCode * 59) + this.IndustryUsage.GetHashCode(); if (this.Installments != null) { @@ -1445,6 +1529,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.RiskData.GetHashCode(); } + if (this.SelectedRecurringDetailReference != null) + { + hashCode = (hashCode * 59) + this.SelectedRecurringDetailReference.GetHashCode(); + } if (this.SessionValidity != null) { hashCode = (hashCode * 59) + this.SessionValidity.GetHashCode(); diff --git a/Adyen/Model/Checkout/PaymentDetails.cs b/Adyen/Model/Checkout/PaymentDetails.cs index 9804ae54a..c88c86715 100644 --- a/Adyen/Model/Checkout/PaymentDetails.cs +++ b/Adyen/Model/Checkout/PaymentDetails.cs @@ -375,197 +375,191 @@ public enum TypeEnum [EnumMember(Value = "gopay_wallet")] GopayWallet = 56, - /// - /// Enum Poli for value: poli - /// - [EnumMember(Value = "poli")] - Poli = 57, - /// /// Enum KcpNaverpay for value: kcp_naverpay /// [EnumMember(Value = "kcp_naverpay")] - KcpNaverpay = 58, + KcpNaverpay = 57, /// /// Enum OnlinebankingIN for value: onlinebanking_IN /// [EnumMember(Value = "onlinebanking_IN")] - OnlinebankingIN = 59, + OnlinebankingIN = 58, /// /// Enum Fawry for value: fawry /// [EnumMember(Value = "fawry")] - Fawry = 60, + Fawry = 59, /// /// Enum Atome for value: atome /// [EnumMember(Value = "atome")] - Atome = 61, + Atome = 60, /// /// Enum Moneybookers for value: moneybookers /// [EnumMember(Value = "moneybookers")] - Moneybookers = 62, + Moneybookers = 61, /// /// Enum Naps for value: naps /// [EnumMember(Value = "naps")] - Naps = 63, + Naps = 62, /// /// Enum Nordea for value: nordea /// [EnumMember(Value = "nordea")] - Nordea = 64, + Nordea = 63, /// /// Enum BoletobancarioBradesco for value: boletobancario_bradesco /// [EnumMember(Value = "boletobancario_bradesco")] - BoletobancarioBradesco = 65, + BoletobancarioBradesco = 64, /// /// Enum BoletobancarioItau for value: boletobancario_itau /// [EnumMember(Value = "boletobancario_itau")] - BoletobancarioItau = 66, + BoletobancarioItau = 65, /// /// Enum BoletobancarioSantander for value: boletobancario_santander /// [EnumMember(Value = "boletobancario_santander")] - BoletobancarioSantander = 67, + BoletobancarioSantander = 66, /// /// Enum BoletobancarioBancodobrasil for value: boletobancario_bancodobrasil /// [EnumMember(Value = "boletobancario_bancodobrasil")] - BoletobancarioBancodobrasil = 68, + BoletobancarioBancodobrasil = 67, /// /// Enum BoletobancarioHsbc for value: boletobancario_hsbc /// [EnumMember(Value = "boletobancario_hsbc")] - BoletobancarioHsbc = 69, + BoletobancarioHsbc = 68, /// /// Enum MolpayMaybank2u for value: molpay_maybank2u /// [EnumMember(Value = "molpay_maybank2u")] - MolpayMaybank2u = 70, + MolpayMaybank2u = 69, /// /// Enum MolpayCimb for value: molpay_cimb /// [EnumMember(Value = "molpay_cimb")] - MolpayCimb = 71, + MolpayCimb = 70, /// /// Enum MolpayRhb for value: molpay_rhb /// [EnumMember(Value = "molpay_rhb")] - MolpayRhb = 72, + MolpayRhb = 71, /// /// Enum MolpayAmb for value: molpay_amb /// [EnumMember(Value = "molpay_amb")] - MolpayAmb = 73, + MolpayAmb = 72, /// /// Enum MolpayHlb for value: molpay_hlb /// [EnumMember(Value = "molpay_hlb")] - MolpayHlb = 74, + MolpayHlb = 73, /// /// Enum MolpayAffinEpg for value: molpay_affin_epg /// [EnumMember(Value = "molpay_affin_epg")] - MolpayAffinEpg = 75, + MolpayAffinEpg = 74, /// /// Enum MolpayBankislam for value: molpay_bankislam /// [EnumMember(Value = "molpay_bankislam")] - MolpayBankislam = 76, + MolpayBankislam = 75, /// /// Enum MolpayPublicbank for value: molpay_publicbank /// [EnumMember(Value = "molpay_publicbank")] - MolpayPublicbank = 77, + MolpayPublicbank = 76, /// /// Enum FpxAgrobank for value: fpx_agrobank /// [EnumMember(Value = "fpx_agrobank")] - FpxAgrobank = 78, + FpxAgrobank = 77, /// /// Enum Touchngo for value: touchngo /// [EnumMember(Value = "touchngo")] - Touchngo = 79, + Touchngo = 78, /// /// Enum Maybank2uMae for value: maybank2u_mae /// [EnumMember(Value = "maybank2u_mae")] - Maybank2uMae = 80, + Maybank2uMae = 79, /// /// Enum Duitnow for value: duitnow /// [EnumMember(Value = "duitnow")] - Duitnow = 81, + Duitnow = 80, /// /// Enum Promptpay for value: promptpay /// [EnumMember(Value = "promptpay")] - Promptpay = 82, + Promptpay = 81, /// /// Enum TwintPos for value: twint_pos /// [EnumMember(Value = "twint_pos")] - TwintPos = 83, + TwintPos = 82, /// /// Enum AlipayHk for value: alipay_hk /// [EnumMember(Value = "alipay_hk")] - AlipayHk = 84, + AlipayHk = 83, /// /// Enum AlipayHkWeb for value: alipay_hk_web /// [EnumMember(Value = "alipay_hk_web")] - AlipayHkWeb = 85, + AlipayHkWeb = 84, /// /// Enum AlipayHkWap for value: alipay_hk_wap /// [EnumMember(Value = "alipay_hk_wap")] - AlipayHkWap = 86, + AlipayHkWap = 85, /// /// Enum AlipayWap for value: alipay_wap /// [EnumMember(Value = "alipay_wap")] - AlipayWap = 87, + AlipayWap = 86, /// /// Enum Balanceplatform for value: balanceplatform /// [EnumMember(Value = "balanceplatform")] - Balanceplatform = 88 + Balanceplatform = 87 } diff --git a/Adyen/Model/Checkout/PaymentRequest.cs b/Adyen/Model/Checkout/PaymentRequest.cs index 221364e22..a1d7d8888 100644 --- a/Adyen/Model/Checkout/PaymentRequest.cs +++ b/Adyen/Model/Checkout/PaymentRequest.cs @@ -277,7 +277,7 @@ protected PaymentRequest() { } /// threeDS2RequestData. /// 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). /// 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), AuthenticationData authenticationData = default(AuthenticationData), Address billingAddress = default(Address), BrowserInfo browserInfo = default(BrowserInfo), int? captureDelayHours = default(int?), ChannelEnum? channel = default(ChannelEnum?), string checkoutAttemptId = default(string), Company company = default(Company), string conversionId = default(string), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), ForexQuote dccQuote = default(ForexQuote), DateTime deliverAt = default(DateTime), Address deliveryAddress = default(Address), DateTime deliveryDate = default(DateTime), string deviceFingerprint = default(string), bool? enableOneClick = default(bool?), bool? enablePayOut = default(bool?), bool? enableRecurring = default(bool?), EntityTypeEnum? entityType = default(EntityTypeEnum?), int? fraudOffset = default(int?), FundOrigin fundOrigin = default(FundOrigin), FundRecipient fundRecipient = default(FundRecipient), IndustryUsageEnum? industryUsage = default(IndustryUsageEnum?), Installments installments = default(Installments), List lineItems = default(List), 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), EncryptedOrderData order = default(EncryptedOrderData), string orderReference = default(string), string origin = default(string), CheckoutPaymentMethod paymentMethod = default(CheckoutPaymentMethod), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), string recurringExpiry = default(string), string recurringFrequency = default(string), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string redirectFromIssuerMethod = default(string), string redirectToIssuerMethod = default(string), string reference = default(string), string returnUrl = default(string), RiskData riskData = default(RiskData), string sessionValidity = 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), bool? storePaymentMethod = default(bool?), string telephoneNumber = default(string), ThreeDS2RequestData2 threeDS2RequestData = default(ThreeDS2RequestData2), bool? threeDSAuthenticationOnly = false, 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), AuthenticationData authenticationData = default(AuthenticationData), BillingAddress billingAddress = default(BillingAddress), BrowserInfo browserInfo = default(BrowserInfo), int? captureDelayHours = default(int?), ChannelEnum? channel = default(ChannelEnum?), string checkoutAttemptId = default(string), Company company = default(Company), string conversionId = default(string), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), ForexQuote dccQuote = default(ForexQuote), DateTime deliverAt = default(DateTime), DeliveryAddress deliveryAddress = default(DeliveryAddress), DateTime deliveryDate = default(DateTime), string deviceFingerprint = default(string), bool? enableOneClick = default(bool?), bool? enablePayOut = default(bool?), bool? enableRecurring = default(bool?), EntityTypeEnum? entityType = default(EntityTypeEnum?), int? fraudOffset = default(int?), FundOrigin fundOrigin = default(FundOrigin), FundRecipient fundRecipient = default(FundRecipient), IndustryUsageEnum? industryUsage = default(IndustryUsageEnum?), Installments installments = default(Installments), List lineItems = default(List), 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), EncryptedOrderData order = default(EncryptedOrderData), string orderReference = default(string), string origin = default(string), PaymentRequestPaymentMethod paymentMethod = default(PaymentRequestPaymentMethod), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), string recurringExpiry = default(string), string recurringFrequency = default(string), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string redirectFromIssuerMethod = default(string), string redirectToIssuerMethod = default(string), string reference = default(string), string returnUrl = default(string), RiskData riskData = default(RiskData), string sessionValidity = 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), bool? storePaymentMethod = default(bool?), string telephoneNumber = default(string), ThreeDS2RequestData2 threeDS2RequestData = default(ThreeDS2RequestData2), bool? threeDSAuthenticationOnly = false, bool? trustedShopper = default(bool?)) { this.Amount = amount; this.MerchantAccount = merchantAccount; @@ -389,7 +389,7 @@ protected PaymentRequest() { } /// Gets or Sets BillingAddress /// [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public Address BillingAddress { get; set; } + public BillingAddress BillingAddress { get; set; } /// /// Gets or Sets BrowserInfo @@ -456,7 +456,7 @@ protected PaymentRequest() { } /// Gets or Sets DeliveryAddress /// [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public Address DeliveryAddress { get; set; } + public DeliveryAddress DeliveryAddress { get; set; } /// /// The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 @@ -603,7 +603,7 @@ protected PaymentRequest() { } /// Gets or Sets PaymentMethod /// [DataMember(Name = "paymentMethod", IsRequired = false, EmitDefaultValue = false)] - public CheckoutPaymentMethod PaymentMethod { get; set; } + public PaymentRequestPaymentMethod PaymentMethod { get; set; } /// /// Gets or Sets PlatformChargebackLogic diff --git a/Adyen/Model/Checkout/PaymentRequestPaymentMethod.cs b/Adyen/Model/Checkout/PaymentRequestPaymentMethod.cs new file mode 100644 index 000000000..f0ec62772 --- /dev/null +++ b/Adyen/Model/Checkout/PaymentRequestPaymentMethod.cs @@ -0,0 +1,1502 @@ +/* +* Adyen Checkout API +* +* +* The version of the OpenAPI document: 70 +* +* 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; +using System.Reflection; + +namespace Adyen.Model.Checkout +{ + /// + /// The type and required details of a payment method to use. + /// + [JsonConverter(typeof(PaymentRequestPaymentMethodJsonConverter))] + [DataContract(Name = "PaymentRequest_paymentMethod")] + public partial class PaymentRequestPaymentMethod : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of AchDetails. + public PaymentRequestPaymentMethod(AchDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of AfterpayDetails. + public PaymentRequestPaymentMethod(AfterpayDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of AmazonPayDetails. + public PaymentRequestPaymentMethod(AmazonPayDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of AndroidPayDetails. + public PaymentRequestPaymentMethod(AndroidPayDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ApplePayDetails. + public PaymentRequestPaymentMethod(ApplePayDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of BacsDirectDebitDetails. + public PaymentRequestPaymentMethod(BacsDirectDebitDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of BillDeskDetails. + public PaymentRequestPaymentMethod(BillDeskDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of BlikDetails. + public PaymentRequestPaymentMethod(BlikDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of CardDetails. + public PaymentRequestPaymentMethod(CardDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of CellulantDetails. + public PaymentRequestPaymentMethod(CellulantDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of DokuDetails. + public PaymentRequestPaymentMethod(DokuDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of DotpayDetails. + public PaymentRequestPaymentMethod(DotpayDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of DragonpayDetails. + public PaymentRequestPaymentMethod(DragonpayDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of EcontextVoucherDetails. + public PaymentRequestPaymentMethod(EcontextVoucherDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of GenericIssuerPaymentMethodDetails. + public PaymentRequestPaymentMethod(GenericIssuerPaymentMethodDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of GiropayDetails. + public PaymentRequestPaymentMethod(GiropayDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of GooglePayDetails. + public PaymentRequestPaymentMethod(GooglePayDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of IdealDetails. + public PaymentRequestPaymentMethod(IdealDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of KlarnaDetails. + public PaymentRequestPaymentMethod(KlarnaDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of MasterpassDetails. + public PaymentRequestPaymentMethod(MasterpassDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of MbwayDetails. + public PaymentRequestPaymentMethod(MbwayDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of MobilePayDetails. + public PaymentRequestPaymentMethod(MobilePayDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of MolPayDetails. + public PaymentRequestPaymentMethod(MolPayDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of OpenInvoiceDetails. + public PaymentRequestPaymentMethod(OpenInvoiceDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of PayPalDetails. + public PaymentRequestPaymentMethod(PayPalDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of PayUUpiDetails. + public PaymentRequestPaymentMethod(PayUUpiDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of PayWithGoogleDetails. + public PaymentRequestPaymentMethod(PayWithGoogleDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of PaymentDetails. + public PaymentRequestPaymentMethod(PaymentDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of RatepayDetails. + public PaymentRequestPaymentMethod(RatepayDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of SamsungPayDetails. + public PaymentRequestPaymentMethod(SamsungPayDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of SepaDirectDebitDetails. + public PaymentRequestPaymentMethod(SepaDirectDebitDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of StoredPaymentMethodDetails. + public PaymentRequestPaymentMethod(StoredPaymentMethodDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of UpiCollectDetails. + public PaymentRequestPaymentMethod(UpiCollectDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of UpiIntentDetails. + public PaymentRequestPaymentMethod(UpiIntentDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of VippsDetails. + public PaymentRequestPaymentMethod(VippsDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of VisaCheckoutDetails. + public PaymentRequestPaymentMethod(VisaCheckoutDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of WeChatPayDetails. + public PaymentRequestPaymentMethod(WeChatPayDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of WeChatPayMiniProgramDetails. + public PaymentRequestPaymentMethod(WeChatPayMiniProgramDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of ZipDetails. + public PaymentRequestPaymentMethod(ZipDetails actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(AchDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(AfterpayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(AmazonPayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(AndroidPayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ApplePayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(BacsDirectDebitDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(BillDeskDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(BlikDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(CardDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(CellulantDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(DokuDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(DotpayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(DragonpayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(EcontextVoucherDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(GenericIssuerPaymentMethodDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(GiropayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(GooglePayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(IdealDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(KlarnaDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(MasterpassDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(MbwayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(MobilePayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(MolPayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(OpenInvoiceDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(PayPalDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(PayUUpiDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(PayWithGoogleDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(PaymentDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(RatepayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(SamsungPayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(SepaDirectDebitDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(StoredPaymentMethodDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(UpiCollectDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(UpiIntentDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(VippsDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(VisaCheckoutDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(WeChatPayDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(WeChatPayMiniProgramDetails)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ZipDetails)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: AchDetails, AfterpayDetails, AmazonPayDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayPalDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails"); + } + } + } + + /// + /// Get the actual instance of `AchDetails`. If the actual instance is not `AchDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of AchDetails + public AchDetails GetAchDetails() + { + return (AchDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `AfterpayDetails`. If the actual instance is not `AfterpayDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of AfterpayDetails + public AfterpayDetails GetAfterpayDetails() + { + return (AfterpayDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `AmazonPayDetails`. If the actual instance is not `AmazonPayDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of AmazonPayDetails + public AmazonPayDetails GetAmazonPayDetails() + { + return (AmazonPayDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `AndroidPayDetails`. If the actual instance is not `AndroidPayDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of AndroidPayDetails + public AndroidPayDetails GetAndroidPayDetails() + { + return (AndroidPayDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `ApplePayDetails`. If the actual instance is not `ApplePayDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of ApplePayDetails + public ApplePayDetails GetApplePayDetails() + { + return (ApplePayDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `BacsDirectDebitDetails`. If the actual instance is not `BacsDirectDebitDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of BacsDirectDebitDetails + public BacsDirectDebitDetails GetBacsDirectDebitDetails() + { + return (BacsDirectDebitDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `BillDeskDetails`. If the actual instance is not `BillDeskDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of BillDeskDetails + public BillDeskDetails GetBillDeskDetails() + { + return (BillDeskDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `BlikDetails`. If the actual instance is not `BlikDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of BlikDetails + public BlikDetails GetBlikDetails() + { + return (BlikDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `CardDetails`. If the actual instance is not `CardDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of CardDetails + public CardDetails GetCardDetails() + { + return (CardDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `CellulantDetails`. If the actual instance is not `CellulantDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of CellulantDetails + public CellulantDetails GetCellulantDetails() + { + return (CellulantDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `DokuDetails`. If the actual instance is not `DokuDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of DokuDetails + public DokuDetails GetDokuDetails() + { + return (DokuDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `DotpayDetails`. If the actual instance is not `DotpayDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of DotpayDetails + public DotpayDetails GetDotpayDetails() + { + return (DotpayDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `DragonpayDetails`. If the actual instance is not `DragonpayDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of DragonpayDetails + public DragonpayDetails GetDragonpayDetails() + { + return (DragonpayDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `EcontextVoucherDetails`. If the actual instance is not `EcontextVoucherDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of EcontextVoucherDetails + public EcontextVoucherDetails GetEcontextVoucherDetails() + { + return (EcontextVoucherDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `GenericIssuerPaymentMethodDetails`. If the actual instance is not `GenericIssuerPaymentMethodDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of GenericIssuerPaymentMethodDetails + public GenericIssuerPaymentMethodDetails GetGenericIssuerPaymentMethodDetails() + { + return (GenericIssuerPaymentMethodDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `GiropayDetails`. If the actual instance is not `GiropayDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of GiropayDetails + public GiropayDetails GetGiropayDetails() + { + return (GiropayDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `GooglePayDetails`. If the actual instance is not `GooglePayDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of GooglePayDetails + public GooglePayDetails GetGooglePayDetails() + { + return (GooglePayDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `IdealDetails`. If the actual instance is not `IdealDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of IdealDetails + public IdealDetails GetIdealDetails() + { + return (IdealDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `KlarnaDetails`. If the actual instance is not `KlarnaDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of KlarnaDetails + public KlarnaDetails GetKlarnaDetails() + { + return (KlarnaDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `MasterpassDetails`. If the actual instance is not `MasterpassDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of MasterpassDetails + public MasterpassDetails GetMasterpassDetails() + { + return (MasterpassDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `MbwayDetails`. If the actual instance is not `MbwayDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of MbwayDetails + public MbwayDetails GetMbwayDetails() + { + return (MbwayDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `MobilePayDetails`. If the actual instance is not `MobilePayDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of MobilePayDetails + public MobilePayDetails GetMobilePayDetails() + { + return (MobilePayDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `MolPayDetails`. If the actual instance is not `MolPayDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of MolPayDetails + public MolPayDetails GetMolPayDetails() + { + return (MolPayDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `OpenInvoiceDetails`. If the actual instance is not `OpenInvoiceDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of OpenInvoiceDetails + public OpenInvoiceDetails GetOpenInvoiceDetails() + { + return (OpenInvoiceDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `PayPalDetails`. If the actual instance is not `PayPalDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of PayPalDetails + public PayPalDetails GetPayPalDetails() + { + return (PayPalDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `PayUUpiDetails`. If the actual instance is not `PayUUpiDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of PayUUpiDetails + public PayUUpiDetails GetPayUUpiDetails() + { + return (PayUUpiDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `PayWithGoogleDetails`. If the actual instance is not `PayWithGoogleDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of PayWithGoogleDetails + public PayWithGoogleDetails GetPayWithGoogleDetails() + { + return (PayWithGoogleDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `PaymentDetails`. If the actual instance is not `PaymentDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of PaymentDetails + public PaymentDetails GetPaymentDetails() + { + return (PaymentDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `RatepayDetails`. If the actual instance is not `RatepayDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of RatepayDetails + public RatepayDetails GetRatepayDetails() + { + return (RatepayDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `SamsungPayDetails`. If the actual instance is not `SamsungPayDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of SamsungPayDetails + public SamsungPayDetails GetSamsungPayDetails() + { + return (SamsungPayDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `SepaDirectDebitDetails`. If the actual instance is not `SepaDirectDebitDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of SepaDirectDebitDetails + public SepaDirectDebitDetails GetSepaDirectDebitDetails() + { + return (SepaDirectDebitDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `StoredPaymentMethodDetails`. If the actual instance is not `StoredPaymentMethodDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of StoredPaymentMethodDetails + public StoredPaymentMethodDetails GetStoredPaymentMethodDetails() + { + return (StoredPaymentMethodDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `UpiCollectDetails`. If the actual instance is not `UpiCollectDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of UpiCollectDetails + public UpiCollectDetails GetUpiCollectDetails() + { + return (UpiCollectDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `UpiIntentDetails`. If the actual instance is not `UpiIntentDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of UpiIntentDetails + public UpiIntentDetails GetUpiIntentDetails() + { + return (UpiIntentDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `VippsDetails`. If the actual instance is not `VippsDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of VippsDetails + public VippsDetails GetVippsDetails() + { + return (VippsDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `VisaCheckoutDetails`. If the actual instance is not `VisaCheckoutDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of VisaCheckoutDetails + public VisaCheckoutDetails GetVisaCheckoutDetails() + { + return (VisaCheckoutDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `WeChatPayDetails`. If the actual instance is not `WeChatPayDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of WeChatPayDetails + public WeChatPayDetails GetWeChatPayDetails() + { + return (WeChatPayDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `WeChatPayMiniProgramDetails`. If the actual instance is not `WeChatPayMiniProgramDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of WeChatPayMiniProgramDetails + public WeChatPayMiniProgramDetails GetWeChatPayMiniProgramDetails() + { + return (WeChatPayMiniProgramDetails)this.ActualInstance; + } + + /// + /// Get the actual instance of `ZipDetails`. If the actual instance is not `ZipDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of ZipDetails + public ZipDetails GetZipDetails() + { + return (ZipDetails)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PaymentRequestPaymentMethod {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, PaymentRequestPaymentMethod.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of PaymentRequestPaymentMethod + /// + /// JSON string + /// An instance of PaymentRequestPaymentMethod + public static PaymentRequestPaymentMethod FromJson(string jsonString) + { + PaymentRequestPaymentMethod newPaymentRequestPaymentMethod = null; + + if (string.IsNullOrEmpty(jsonString)) + { + return newPaymentRequestPaymentMethod; + } + int match = 0; + List matchedTypes = new List(); + JToken typeToken = JObject.Parse(jsonString).GetValue("type"); + string type = typeToken?.Value(); + // Throw exception if jsonString does not contain type param + if (type == null) + { + throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); + } + try + { + // Check if the jsonString type enum matches the AchDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("AchDetails"); + match++; + } + // Check if the jsonString type enum matches the AfterpayDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("AfterpayDetails"); + match++; + } + // Check if the jsonString type enum matches the AmazonPayDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("AmazonPayDetails"); + match++; + } + // Check if the jsonString type enum matches the AndroidPayDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("AndroidPayDetails"); + match++; + } + // Check if the jsonString type enum matches the ApplePayDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("ApplePayDetails"); + match++; + } + // Check if the jsonString type enum matches the BacsDirectDebitDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("BacsDirectDebitDetails"); + match++; + } + // Check if the jsonString type enum matches the BillDeskDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("BillDeskDetails"); + match++; + } + // Check if the jsonString type enum matches the BlikDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("BlikDetails"); + match++; + } + // Check if the jsonString type enum matches the CardDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("CardDetails"); + match++; + } + // Check if the jsonString type enum matches the CellulantDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("CellulantDetails"); + match++; + } + // Check if the jsonString type enum matches the DokuDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("DokuDetails"); + match++; + } + // Check if the jsonString type enum matches the DotpayDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("DotpayDetails"); + match++; + } + // Check if the jsonString type enum matches the DragonpayDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("DragonpayDetails"); + match++; + } + // Check if the jsonString type enum matches the EcontextVoucherDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("EcontextVoucherDetails"); + match++; + } + // Check if the jsonString type enum matches the GenericIssuerPaymentMethodDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("GenericIssuerPaymentMethodDetails"); + match++; + } + // Check if the jsonString type enum matches the GiropayDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("GiropayDetails"); + match++; + } + // Check if the jsonString type enum matches the GooglePayDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("GooglePayDetails"); + match++; + } + // Check if the jsonString type enum matches the IdealDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("IdealDetails"); + match++; + } + // Check if the jsonString type enum matches the KlarnaDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("KlarnaDetails"); + match++; + } + // Check if the jsonString type enum matches the MasterpassDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("MasterpassDetails"); + match++; + } + // Check if the jsonString type enum matches the MbwayDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("MbwayDetails"); + match++; + } + // Check if the jsonString type enum matches the MobilePayDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("MobilePayDetails"); + match++; + } + // Check if the jsonString type enum matches the MolPayDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("MolPayDetails"); + match++; + } + // Check if the jsonString type enum matches the OpenInvoiceDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("OpenInvoiceDetails"); + match++; + } + // Check if the jsonString type enum matches the PayPalDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("PayPalDetails"); + match++; + } + // Check if the jsonString type enum matches the PayUUpiDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("PayUUpiDetails"); + match++; + } + // Check if the jsonString type enum matches the PayWithGoogleDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("PayWithGoogleDetails"); + match++; + } + // Check if the jsonString type enum matches the PaymentDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("PaymentDetails"); + match++; + } + // Check if the jsonString type enum matches the RatepayDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("RatepayDetails"); + match++; + } + // Check if the jsonString type enum matches the SamsungPayDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("SamsungPayDetails"); + match++; + } + // Check if the jsonString type enum matches the SepaDirectDebitDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("SepaDirectDebitDetails"); + match++; + } + // Check if the jsonString type enum matches the StoredPaymentMethodDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("StoredPaymentMethodDetails"); + match++; + } + // Check if the jsonString type enum matches the UpiCollectDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("UpiCollectDetails"); + match++; + } + // Check if the jsonString type enum matches the UpiIntentDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("UpiIntentDetails"); + match++; + } + // Check if the jsonString type enum matches the VippsDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("VippsDetails"); + match++; + } + // Check if the jsonString type enum matches the VisaCheckoutDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("VisaCheckoutDetails"); + match++; + } + // Check if the jsonString type enum matches the WeChatPayDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("WeChatPayDetails"); + match++; + } + // Check if the jsonString type enum matches the WeChatPayMiniProgramDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("WeChatPayMiniProgramDetails"); + match++; + } + // Check if the jsonString type enum matches the ZipDetails type enums + if (ContainsValue(type)) + { + newPaymentRequestPaymentMethod = new PaymentRequestPaymentMethod(JsonConvert.DeserializeObject(jsonString, PaymentRequestPaymentMethod.SerializerSettings)); + matchedTypes.Add("ZipDetails"); + match++; + } + } + catch (Exception ex) + { + if (!(ex is JsonSerializationException)) + { + throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); + } + } + + if (match != 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newPaymentRequestPaymentMethod; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PaymentRequestPaymentMethod); + } + + /// + /// Returns true if PaymentRequestPaymentMethod instances are equal + /// + /// Instance of PaymentRequestPaymentMethod to be compared + /// Boolean + public bool Equals(PaymentRequestPaymentMethod input) + { + if (input == null) + return false; + + return this.ActualInstance.Equals(input.ActualInstance); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for PaymentRequestPaymentMethod + /// + public class PaymentRequestPaymentMethodJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((string)(typeof(PaymentRequestPaymentMethod).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return PaymentRequestPaymentMethod.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/Adyen/Model/Checkout/SubMerchantInfo.cs b/Adyen/Model/Checkout/SubMerchantInfo.cs index d11d24df9..b75e09f7c 100644 --- a/Adyen/Model/Checkout/SubMerchantInfo.cs +++ b/Adyen/Model/Checkout/SubMerchantInfo.cs @@ -40,7 +40,7 @@ public partial class SubMerchantInfo : IEquatable, IValidatable /// mcc. /// name. /// taxId. - public SubMerchantInfo(Address address = default(Address), string id = default(string), string mcc = default(string), string name = default(string), string taxId = default(string)) + public SubMerchantInfo(BillingAddress address = default(BillingAddress), string id = default(string), string mcc = default(string), string name = default(string), string taxId = default(string)) { this.Address = address; this.Id = id; @@ -53,7 +53,7 @@ public partial class SubMerchantInfo : IEquatable, IValidatable /// Gets or Sets Address /// [DataMember(Name = "address", EmitDefaultValue = false)] - public Address Address { get; set; } + public BillingAddress Address { get; set; } /// /// Gets or Sets Id diff --git a/Adyen/Model/Checkout/ThreeDSRequestData.cs b/Adyen/Model/Checkout/ThreeDSRequestData.cs index 229e1817a..b31ef4c1e 100644 --- a/Adyen/Model/Checkout/ThreeDSRequestData.cs +++ b/Adyen/Model/Checkout/ThreeDSRequestData.cs @@ -136,15 +136,15 @@ public enum NativeThreeDSEnum public enum ThreeDSVersionEnum { /// - /// Enum _10 for value: V_2_1_0 + /// Enum _10 for value: 2.1.0 /// - [EnumMember(Value = "V_2_1_0")] + [EnumMember(Value = "2.1.0")] _10 = 1, /// - /// Enum _20 for value: V_2_2_0 + /// Enum _20 for value: 2.2.0 /// - [EnumMember(Value = "V_2_2_0")] + [EnumMember(Value = "2.2.0")] _20 = 2 } diff --git a/Adyen/Model/PlatformsFund/AccountHolderTransactionListResponse.cs b/Adyen/Model/PlatformsFund/AccountHolderTransactionListResponse.cs index 4aa03ef98..6720a3f02 100644 --- a/Adyen/Model/PlatformsFund/AccountHolderTransactionListResponse.cs +++ b/Adyen/Model/PlatformsFund/AccountHolderTransactionListResponse.cs @@ -39,7 +39,7 @@ public partial class AccountHolderTransactionListResponse : IEquatableContains field validation errors that would prevent requests from being processed.. /// The reference of a request. Can be used to uniquely identify the request.. /// The result code.. - public AccountHolderTransactionListResponse(List accountTransactionLists = default(List), List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string)) + public AccountHolderTransactionListResponse(List accountTransactionLists = default(List), List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string)) { this.AccountTransactionLists = accountTransactionLists; this.InvalidFields = invalidFields; @@ -52,7 +52,7 @@ public partial class AccountHolderTransactionListResponse : IEquatable /// A list of the transactions. [DataMember(Name = "accountTransactionLists", EmitDefaultValue = false)] - public List AccountTransactionLists { get; set; } + public List AccountTransactionLists { get; set; } /// /// Contains field validation errors that would prevent requests from being processed. diff --git a/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.cs index c6bad7e63..4ce0d44f3 100644 --- a/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.cs @@ -62,29 +62,29 @@ protected HKLocalAccountIdentification() { } /// /// Initializes a new instance of the class. /// - /// The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. (required). - /// The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. (required). + /// The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. (required). + /// The 3-digit clearing code, without separators or whitespace. (required). /// **hkLocal** (required) (default to TypeEnum.HkLocal). - public HKLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.HkLocal) + public HKLocalAccountIdentification(string accountNumber = default(string), string clearingCode = default(string), TypeEnum type = TypeEnum.HkLocal) { this.AccountNumber = accountNumber; - this.BankCode = bankCode; + this.ClearingCode = clearingCode; this.Type = type; } /// - /// The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. + /// The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. /// - /// The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. + /// The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } /// - /// The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. + /// The 3-digit clearing code, without separators or whitespace. /// - /// The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. - [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] - public string BankCode { get; set; } + /// The 3-digit clearing code, without separators or whitespace. + [DataMember(Name = "clearingCode", IsRequired = false, EmitDefaultValue = false)] + public string ClearingCode { get; set; } /// /// Returns the string presentation of the object @@ -95,7 +95,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class HKLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); + sb.Append(" ClearingCode: ").Append(ClearingCode).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -138,9 +138,9 @@ public bool Equals(HKLocalAccountIdentification input) this.AccountNumber.Equals(input.AccountNumber)) ) && ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) + this.ClearingCode == input.ClearingCode || + (this.ClearingCode != null && + this.ClearingCode.Equals(input.ClearingCode)) ) && ( this.Type == input.Type || @@ -161,9 +161,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } - if (this.BankCode != null) + if (this.ClearingCode != null) { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ClearingCode.GetHashCode(); } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; @@ -177,27 +177,27 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 19) + if (this.AccountNumber != null && this.AccountNumber.Length > 12) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 19.", new [] { "AccountNumber" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 12.", new [] { "AccountNumber" }); } // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 6) + if (this.AccountNumber != null && this.AccountNumber.Length < 9) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 6.", new [] { "AccountNumber" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 9.", new [] { "AccountNumber" }); } - // BankCode (string) maxLength - if (this.BankCode != null && this.BankCode.Length > 6) + // ClearingCode (string) maxLength + if (this.ClearingCode != null && this.ClearingCode.Length > 3) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be less than 6.", new [] { "BankCode" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingCode, length must be less than 3.", new [] { "ClearingCode" }); } - // BankCode (string) minLength - if (this.BankCode != null && this.BankCode.Length < 6) + // ClearingCode (string) minLength + if (this.ClearingCode != null && this.ClearingCode.Length < 3) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be greater than 6.", new [] { "BankCode" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingCode, length must be greater than 3.", new [] { "ClearingCode" }); } yield break; diff --git a/Adyen/Model/TransferWebhooks/MerchantData.cs b/Adyen/Model/TransferWebhooks/MerchantData.cs index 412ee4781..18981a27e 100644 --- a/Adyen/Model/TransferWebhooks/MerchantData.cs +++ b/Adyen/Model/TransferWebhooks/MerchantData.cs @@ -35,18 +35,27 @@ public partial class MerchantData : IEquatable, IValidatableObject /// /// Initializes a new instance of the class. /// + /// The unique identifier of the merchant's acquirer.. /// The merchant category code.. /// The merchant identifier.. /// nameLocation. /// The merchant postal code.. - public MerchantData(string mcc = default(string), string merchantId = default(string), NameLocation nameLocation = default(NameLocation), string postalCode = default(string)) + public MerchantData(string acquirerId = default(string), string mcc = default(string), string merchantId = default(string), NameLocation nameLocation = default(NameLocation), string postalCode = default(string)) { + this.AcquirerId = acquirerId; this.Mcc = mcc; this.MerchantId = merchantId; this.NameLocation = nameLocation; this.PostalCode = postalCode; } + /// + /// The unique identifier of the merchant's acquirer. + /// + /// The unique identifier of the merchant's acquirer. + [DataMember(Name = "acquirerId", EmitDefaultValue = false)] + public string AcquirerId { get; set; } + /// /// The merchant category code. /// @@ -82,6 +91,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MerchantData {\n"); + sb.Append(" AcquirerId: ").Append(AcquirerId).Append("\n"); sb.Append(" Mcc: ").Append(Mcc).Append("\n"); sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); sb.Append(" NameLocation: ").Append(NameLocation).Append("\n"); @@ -121,6 +131,11 @@ public bool Equals(MerchantData input) return false; } return + ( + this.AcquirerId == input.AcquirerId || + (this.AcquirerId != null && + this.AcquirerId.Equals(input.AcquirerId)) + ) && ( this.Mcc == input.Mcc || (this.Mcc != null && @@ -152,6 +167,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (this.AcquirerId != null) + { + hashCode = (hashCode * 59) + this.AcquirerId.GetHashCode(); + } if (this.Mcc != null) { hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); diff --git a/Adyen/Model/TransferWebhooks/Modification.cs b/Adyen/Model/TransferWebhooks/Modification.cs new file mode 100644 index 000000000..6513d5f35 --- /dev/null +++ b/Adyen/Model/TransferWebhooks/Modification.cs @@ -0,0 +1,594 @@ +/* +* Transfer webhooks +* +* +* The version of the OpenAPI document: 3 +* +* 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.TransferWebhooks +{ + /// + /// Modification + /// + [DataContract(Name = "Modification")] + public partial class Modification : IEquatable, IValidatableObject + { + /// + /// The status of the transfer event. + /// + /// The status of the transfer event. + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + /// + /// Enum ApprovalPending for value: approvalPending + /// + [EnumMember(Value = "approvalPending")] + ApprovalPending = 1, + + /// + /// Enum AtmWithdrawal for value: atmWithdrawal + /// + [EnumMember(Value = "atmWithdrawal")] + AtmWithdrawal = 2, + + /// + /// Enum AtmWithdrawalReversalPending for value: atmWithdrawalReversalPending + /// + [EnumMember(Value = "atmWithdrawalReversalPending")] + AtmWithdrawalReversalPending = 3, + + /// + /// Enum AtmWithdrawalReversed for value: atmWithdrawalReversed + /// + [EnumMember(Value = "atmWithdrawalReversed")] + AtmWithdrawalReversed = 4, + + /// + /// Enum AuthAdjustmentAuthorised for value: authAdjustmentAuthorised + /// + [EnumMember(Value = "authAdjustmentAuthorised")] + AuthAdjustmentAuthorised = 5, + + /// + /// Enum AuthAdjustmentError for value: authAdjustmentError + /// + [EnumMember(Value = "authAdjustmentError")] + AuthAdjustmentError = 6, + + /// + /// Enum AuthAdjustmentRefused for value: authAdjustmentRefused + /// + [EnumMember(Value = "authAdjustmentRefused")] + AuthAdjustmentRefused = 7, + + /// + /// Enum Authorised for value: authorised + /// + [EnumMember(Value = "authorised")] + Authorised = 8, + + /// + /// Enum BankTransfer for value: bankTransfer + /// + [EnumMember(Value = "bankTransfer")] + BankTransfer = 9, + + /// + /// Enum BankTransferPending for value: bankTransferPending + /// + [EnumMember(Value = "bankTransferPending")] + BankTransferPending = 10, + + /// + /// Enum Booked for value: booked + /// + [EnumMember(Value = "booked")] + Booked = 11, + + /// + /// Enum BookingPending for value: bookingPending + /// + [EnumMember(Value = "bookingPending")] + BookingPending = 12, + + /// + /// Enum Cancelled for value: cancelled + /// + [EnumMember(Value = "cancelled")] + Cancelled = 13, + + /// + /// Enum CapturePending for value: capturePending + /// + [EnumMember(Value = "capturePending")] + CapturePending = 14, + + /// + /// Enum CaptureReversalPending for value: captureReversalPending + /// + [EnumMember(Value = "captureReversalPending")] + CaptureReversalPending = 15, + + /// + /// Enum CaptureReversed for value: captureReversed + /// + [EnumMember(Value = "captureReversed")] + CaptureReversed = 16, + + /// + /// Enum Captured for value: captured + /// + [EnumMember(Value = "captured")] + Captured = 17, + + /// + /// Enum CapturedExternally for value: capturedExternally + /// + [EnumMember(Value = "capturedExternally")] + CapturedExternally = 18, + + /// + /// Enum Chargeback for value: chargeback + /// + [EnumMember(Value = "chargeback")] + Chargeback = 19, + + /// + /// Enum ChargebackExternally for value: chargebackExternally + /// + [EnumMember(Value = "chargebackExternally")] + ChargebackExternally = 20, + + /// + /// Enum ChargebackPending for value: chargebackPending + /// + [EnumMember(Value = "chargebackPending")] + ChargebackPending = 21, + + /// + /// Enum ChargebackReversalPending for value: chargebackReversalPending + /// + [EnumMember(Value = "chargebackReversalPending")] + ChargebackReversalPending = 22, + + /// + /// Enum ChargebackReversed for value: chargebackReversed + /// + [EnumMember(Value = "chargebackReversed")] + ChargebackReversed = 23, + + /// + /// Enum Credited for value: credited + /// + [EnumMember(Value = "credited")] + Credited = 24, + + /// + /// Enum DepositCorrection for value: depositCorrection + /// + [EnumMember(Value = "depositCorrection")] + DepositCorrection = 25, + + /// + /// Enum DepositCorrectionPending for value: depositCorrectionPending + /// + [EnumMember(Value = "depositCorrectionPending")] + DepositCorrectionPending = 26, + + /// + /// Enum Dispute for value: dispute + /// + [EnumMember(Value = "dispute")] + Dispute = 27, + + /// + /// Enum DisputeClosed for value: disputeClosed + /// + [EnumMember(Value = "disputeClosed")] + DisputeClosed = 28, + + /// + /// Enum DisputeExpired for value: disputeExpired + /// + [EnumMember(Value = "disputeExpired")] + DisputeExpired = 29, + + /// + /// Enum DisputeNeedsReview for value: disputeNeedsReview + /// + [EnumMember(Value = "disputeNeedsReview")] + DisputeNeedsReview = 30, + + /// + /// Enum Error for value: error + /// + [EnumMember(Value = "error")] + Error = 31, + + /// + /// Enum Expired for value: expired + /// + [EnumMember(Value = "expired")] + Expired = 32, + + /// + /// Enum Failed for value: failed + /// + [EnumMember(Value = "failed")] + Failed = 33, + + /// + /// Enum Fee for value: fee + /// + [EnumMember(Value = "fee")] + Fee = 34, + + /// + /// Enum FeePending for value: feePending + /// + [EnumMember(Value = "feePending")] + FeePending = 35, + + /// + /// Enum InternalTransfer for value: internalTransfer + /// + [EnumMember(Value = "internalTransfer")] + InternalTransfer = 36, + + /// + /// Enum InternalTransferPending for value: internalTransferPending + /// + [EnumMember(Value = "internalTransferPending")] + InternalTransferPending = 37, + + /// + /// Enum InvoiceDeduction for value: invoiceDeduction + /// + [EnumMember(Value = "invoiceDeduction")] + InvoiceDeduction = 38, + + /// + /// Enum InvoiceDeductionPending for value: invoiceDeductionPending + /// + [EnumMember(Value = "invoiceDeductionPending")] + InvoiceDeductionPending = 39, + + /// + /// Enum ManualCorrectionPending for value: manualCorrectionPending + /// + [EnumMember(Value = "manualCorrectionPending")] + ManualCorrectionPending = 40, + + /// + /// Enum ManuallyCorrected for value: manuallyCorrected + /// + [EnumMember(Value = "manuallyCorrected")] + ManuallyCorrected = 41, + + /// + /// Enum MatchedStatement for value: matchedStatement + /// + [EnumMember(Value = "matchedStatement")] + MatchedStatement = 42, + + /// + /// Enum MatchedStatementPending for value: matchedStatementPending + /// + [EnumMember(Value = "matchedStatementPending")] + MatchedStatementPending = 43, + + /// + /// Enum MerchantPayin for value: merchantPayin + /// + [EnumMember(Value = "merchantPayin")] + MerchantPayin = 44, + + /// + /// Enum MerchantPayinPending for value: merchantPayinPending + /// + [EnumMember(Value = "merchantPayinPending")] + MerchantPayinPending = 45, + + /// + /// Enum MerchantPayinReversed for value: merchantPayinReversed + /// + [EnumMember(Value = "merchantPayinReversed")] + MerchantPayinReversed = 46, + + /// + /// Enum MerchantPayinReversedPending for value: merchantPayinReversedPending + /// + [EnumMember(Value = "merchantPayinReversedPending")] + MerchantPayinReversedPending = 47, + + /// + /// Enum MiscCost for value: miscCost + /// + [EnumMember(Value = "miscCost")] + MiscCost = 48, + + /// + /// Enum MiscCostPending for value: miscCostPending + /// + [EnumMember(Value = "miscCostPending")] + MiscCostPending = 49, + + /// + /// Enum PaymentCost for value: paymentCost + /// + [EnumMember(Value = "paymentCost")] + PaymentCost = 50, + + /// + /// Enum PaymentCostPending for value: paymentCostPending + /// + [EnumMember(Value = "paymentCostPending")] + PaymentCostPending = 51, + + /// + /// Enum Received for value: received + /// + [EnumMember(Value = "received")] + Received = 52, + + /// + /// Enum RefundPending for value: refundPending + /// + [EnumMember(Value = "refundPending")] + RefundPending = 53, + + /// + /// Enum RefundReversalPending for value: refundReversalPending + /// + [EnumMember(Value = "refundReversalPending")] + RefundReversalPending = 54, + + /// + /// Enum RefundReversed for value: refundReversed + /// + [EnumMember(Value = "refundReversed")] + RefundReversed = 55, + + /// + /// Enum Refunded for value: refunded + /// + [EnumMember(Value = "refunded")] + Refunded = 56, + + /// + /// Enum RefundedExternally for value: refundedExternally + /// + [EnumMember(Value = "refundedExternally")] + RefundedExternally = 57, + + /// + /// Enum Refused for value: refused + /// + [EnumMember(Value = "refused")] + Refused = 58, + + /// + /// Enum ReserveAdjustment for value: reserveAdjustment + /// + [EnumMember(Value = "reserveAdjustment")] + ReserveAdjustment = 59, + + /// + /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending + /// + [EnumMember(Value = "reserveAdjustmentPending")] + ReserveAdjustmentPending = 60, + + /// + /// Enum Returned for value: returned + /// + [EnumMember(Value = "returned")] + Returned = 61, + + /// + /// Enum SecondChargeback for value: secondChargeback + /// + [EnumMember(Value = "secondChargeback")] + SecondChargeback = 62, + + /// + /// Enum SecondChargebackPending for value: secondChargebackPending + /// + [EnumMember(Value = "secondChargebackPending")] + SecondChargebackPending = 63, + + /// + /// Enum Undefined for value: undefined + /// + [EnumMember(Value = "undefined")] + Undefined = 64 + + } + + + /// + /// The status of the transfer event. + /// + /// The status of the transfer event. + [DataMember(Name = "status", EmitDefaultValue = false)] + public StatusEnum? Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// The direction of the money movement.. + /// Our reference for the modification.. + /// Your reference for the modification, used internally within your platform.. + /// The status of the transfer event.. + /// The type of transfer modification.. + public Modification(string direction = default(string), string id = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), string type = default(string)) + { + this.Direction = direction; + this.Id = id; + this.Reference = reference; + this.Status = status; + this.Type = type; + } + + /// + /// The direction of the money movement. + /// + /// The direction of the money movement. + [DataMember(Name = "direction", EmitDefaultValue = false)] + public string Direction { get; set; } + + /// + /// Our reference for the modification. + /// + /// Our reference for the modification. + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Your reference for the modification, used internally within your platform. + /// + /// Your reference for the modification, used internally within your platform. + [DataMember(Name = "reference", EmitDefaultValue = false)] + public string Reference { get; set; } + + /// + /// The type of transfer modification. + /// + /// The type of transfer modification. + [DataMember(Name = "type", EmitDefaultValue = false)] + public string Type { 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 Modification {\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Reference: ").Append(Reference).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Type: ").Append(Type).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 true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Modification); + } + + /// + /// Returns true if Modification instances are equal + /// + /// Instance of Modification to be compared + /// Boolean + public bool Equals(Modification input) + { + if (input == null) + { + return false; + } + return + ( + this.Direction == input.Direction || + (this.Direction != null && + this.Direction.Equals(input.Direction)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Reference == input.Reference || + (this.Reference != null && + this.Reference.Equals(input.Reference)) + ) && + ( + this.Status == input.Status || + this.Status.Equals(input.Status) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Direction != null) + { + hashCode = (hashCode * 59) + this.Direction.GetHashCode(); + } + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Reference != null) + { + hashCode = (hashCode * 59) + this.Reference.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + if (this.Type != null) + { + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + } + return hashCode; + } + } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.cs index a40c1c57c..2b9c32c4d 100644 --- a/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.cs @@ -62,39 +62,21 @@ protected NZLocalAccountIdentification() { } /// /// Initializes a new instance of the class. /// - /// The 7-digit bank account number, without separators or whitespace. (required). - /// The 2- to 3-digit account suffix, without separators or whitespace. (required). - /// The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. (required). + /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. (required). /// **nzLocal** (required) (default to TypeEnum.NzLocal). - public NZLocalAccountIdentification(string accountNumber = default(string), string accountSuffix = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.NzLocal) + public NZLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NzLocal) { this.AccountNumber = accountNumber; - this.AccountSuffix = accountSuffix; - this.BankCode = bankCode; this.Type = type; } /// - /// The 7-digit bank account number, without separators or whitespace. + /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. /// - /// The 7-digit bank account number, without separators or whitespace. + /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } - /// - /// The 2- to 3-digit account suffix, without separators or whitespace. - /// - /// The 2- to 3-digit account suffix, without separators or whitespace. - [DataMember(Name = "accountSuffix", IsRequired = false, EmitDefaultValue = false)] - public string AccountSuffix { get; set; } - - /// - /// The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. - /// - /// The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. - [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] - public string BankCode { get; set; } - /// /// Returns the string presentation of the object /// @@ -104,8 +86,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class NZLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AccountSuffix: ").Append(AccountSuffix).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -147,16 +127,6 @@ public bool Equals(NZLocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && - ( - this.AccountSuffix == input.AccountSuffix || - (this.AccountSuffix != null && - this.AccountSuffix.Equals(input.AccountSuffix)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -176,14 +146,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } - if (this.AccountSuffix != null) - { - hashCode = (hashCode * 59) + this.AccountSuffix.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } @@ -196,39 +158,15 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 7) + if (this.AccountNumber != null && this.AccountNumber.Length > 16) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 7.", new [] { "AccountNumber" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 16.", new [] { "AccountNumber" }); } // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 7) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 7.", new [] { "AccountNumber" }); - } - - // AccountSuffix (string) maxLength - if (this.AccountSuffix != null && this.AccountSuffix.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountSuffix, length must be less than 3.", new [] { "AccountSuffix" }); - } - - // AccountSuffix (string) minLength - if (this.AccountSuffix != null && this.AccountSuffix.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountSuffix, length must be greater than 2.", new [] { "AccountSuffix" }); - } - - // BankCode (string) maxLength - if (this.BankCode != null && this.BankCode.Length > 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be less than 6.", new [] { "BankCode" }); - } - - // BankCode (string) minLength - if (this.BankCode != null && this.BankCode.Length < 6) + if (this.AccountNumber != null && this.AccountNumber.Length < 15) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be greater than 6.", new [] { "BankCode" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 15.", new [] { "AccountNumber" }); } yield break; diff --git a/Adyen/Model/TransferWebhooks/TransferData.cs b/Adyen/Model/TransferWebhooks/TransferData.cs index 307dc20e6..322429383 100644 --- a/Adyen/Model/TransferWebhooks/TransferData.cs +++ b/Adyen/Model/TransferWebhooks/TransferData.cs @@ -33,9 +33,9 @@ namespace Adyen.Model.TransferWebhooks public partial class TransferData : IEquatable, IValidatableObject { /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + /// The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + /// The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. [JsonConverter(typeof(StringEnumConverter))] public enum CategoryEnum { @@ -67,9 +67,9 @@ public enum CategoryEnum /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + /// The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + /// The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. [DataMember(Name = "category", IsRequired = false, EmitDefaultValue = false)] public CategoryEnum Category { get; set; } /// @@ -160,56 +160,104 @@ public enum PanEntryModeEnum [Obsolete] public PanEntryModeEnum? PanEntryMode { get; set; } /// - /// The type of the related split. + /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the [Balance Platform Accounting Report](https://docs.adyen.com/marketplaces-and-platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **BalanceAccount**: for the sale amount of the transaction. * **Commission**: for your platform's commission on the transaction. * **PaymentFee**: for the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **VAT**: for the Value Added Tax. /// - /// The type of the related split. + /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the [Balance Platform Accounting Report](https://docs.adyen.com/marketplaces-and-platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **BalanceAccount**: for the sale amount of the transaction. * **Commission**: for your platform's commission on the transaction. * **PaymentFee**: for the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **VAT**: for the Value Added Tax. [JsonConverter(typeof(StringEnumConverter))] public enum PlatformPaymentTypeEnum { + /// + /// Enum AcquiringFees for value: AcquiringFees + /// + [EnumMember(Value = "AcquiringFees")] + AcquiringFees = 1, + + /// + /// Enum AdyenCommission for value: AdyenCommission + /// + [EnumMember(Value = "AdyenCommission")] + AdyenCommission = 2, + + /// + /// Enum AdyenFees for value: AdyenFees + /// + [EnumMember(Value = "AdyenFees")] + AdyenFees = 3, + + /// + /// Enum AdyenMarkup for value: AdyenMarkup + /// + [EnumMember(Value = "AdyenMarkup")] + AdyenMarkup = 4, + /// /// Enum BalanceAccount for value: BalanceAccount /// [EnumMember(Value = "BalanceAccount")] - BalanceAccount = 1, + BalanceAccount = 5, /// /// Enum Commission for value: Commission /// [EnumMember(Value = "Commission")] - Commission = 2, + Commission = 6, /// /// Enum Default for value: Default /// [EnumMember(Value = "Default")] - Default = 3, + Default = 7, + + /// + /// Enum Interchange for value: Interchange + /// + [EnumMember(Value = "Interchange")] + Interchange = 8, /// /// Enum PaymentFee for value: PaymentFee /// [EnumMember(Value = "PaymentFee")] - PaymentFee = 4, + PaymentFee = 9, + + /// + /// Enum Remainder for value: Remainder + /// + [EnumMember(Value = "Remainder")] + Remainder = 10, + + /// + /// Enum SchemeFee for value: SchemeFee + /// + [EnumMember(Value = "SchemeFee")] + SchemeFee = 11, + + /// + /// Enum TopUp for value: TopUp + /// + [EnumMember(Value = "TopUp")] + TopUp = 12, /// /// Enum VAT for value: VAT /// [EnumMember(Value = "VAT")] - VAT = 5 + VAT = 13 } /// - /// The type of the related split. + /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the [Balance Platform Accounting Report](https://docs.adyen.com/marketplaces-and-platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **BalanceAccount**: for the sale amount of the transaction. * **Commission**: for your platform's commission on the transaction. * **PaymentFee**: for the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **VAT**: for the Value Added Tax. /// - /// The type of the related split. + /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the [Balance Platform Accounting Report](https://docs.adyen.com/marketplaces-and-platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **BalanceAccount**: for the sale amount of the transaction. * **Commission**: for your platform's commission on the transaction. * **PaymentFee**: for the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **VAT**: for the Value Added Tax. [DataMember(Name = "platformPaymentType", EmitDefaultValue = false)] [Obsolete] public PlatformPaymentTypeEnum? PlatformPaymentType { get; set; } /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field. /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field. [JsonConverter(typeof(StringEnumConverter))] public enum PriorityEnum { @@ -259,9 +307,9 @@ public enum PriorityEnum /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field. /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field. [DataMember(Name = "priority", EmitDefaultValue = false)] public PriorityEnum? Priority { get; set; } /// @@ -348,71 +396,89 @@ public enum ReasonEnum [EnumMember(Value = "approved")] Approved = 2, + /// + /// Enum BalanceAccountTemporarilyBlockedByTransactionRule for value: balanceAccountTemporarilyBlockedByTransactionRule + /// + [EnumMember(Value = "balanceAccountTemporarilyBlockedByTransactionRule")] + BalanceAccountTemporarilyBlockedByTransactionRule = 3, + /// /// Enum CounterpartyAccountBlocked for value: counterpartyAccountBlocked /// [EnumMember(Value = "counterpartyAccountBlocked")] - CounterpartyAccountBlocked = 3, + CounterpartyAccountBlocked = 4, /// /// Enum CounterpartyAccountClosed for value: counterpartyAccountClosed /// [EnumMember(Value = "counterpartyAccountClosed")] - CounterpartyAccountClosed = 4, + CounterpartyAccountClosed = 5, /// /// Enum CounterpartyAccountNotFound for value: counterpartyAccountNotFound /// [EnumMember(Value = "counterpartyAccountNotFound")] - CounterpartyAccountNotFound = 5, + CounterpartyAccountNotFound = 6, /// /// Enum CounterpartyAddressRequired for value: counterpartyAddressRequired /// [EnumMember(Value = "counterpartyAddressRequired")] - CounterpartyAddressRequired = 6, + CounterpartyAddressRequired = 7, /// /// Enum CounterpartyBankTimedOut for value: counterpartyBankTimedOut /// [EnumMember(Value = "counterpartyBankTimedOut")] - CounterpartyBankTimedOut = 7, + CounterpartyBankTimedOut = 8, /// /// Enum CounterpartyBankUnavailable for value: counterpartyBankUnavailable /// [EnumMember(Value = "counterpartyBankUnavailable")] - CounterpartyBankUnavailable = 8, + CounterpartyBankUnavailable = 9, + + /// + /// Enum DeclinedByTransactionRule for value: declinedByTransactionRule + /// + [EnumMember(Value = "declinedByTransactionRule")] + DeclinedByTransactionRule = 10, /// /// Enum Error for value: error /// [EnumMember(Value = "error")] - Error = 9, + Error = 11, /// /// Enum NotEnoughBalance for value: notEnoughBalance /// [EnumMember(Value = "notEnoughBalance")] - NotEnoughBalance = 10, + NotEnoughBalance = 12, /// /// Enum RefusedByCounterpartyBank for value: refusedByCounterpartyBank /// [EnumMember(Value = "refusedByCounterpartyBank")] - RefusedByCounterpartyBank = 11, + RefusedByCounterpartyBank = 13, /// /// Enum RouteNotFound for value: routeNotFound /// [EnumMember(Value = "routeNotFound")] - RouteNotFound = 12, + RouteNotFound = 14, + + /// + /// Enum ScaFailed for value: scaFailed + /// + [EnumMember(Value = "scaFailed")] + ScaFailed = 15, /// /// Enum Unknown for value: unknown /// [EnumMember(Value = "unknown")] - Unknown = 13 + Unknown = 16 } @@ -724,119 +790,95 @@ public enum StatusEnum [EnumMember(Value = "miscCostPending")] MiscCostPending = 49, - /// - /// Enum OperationAuthorized for value: operationAuthorized - /// - [EnumMember(Value = "operationAuthorized")] - OperationAuthorized = 50, - - /// - /// Enum OperationBooked for value: operationBooked - /// - [EnumMember(Value = "operationBooked")] - OperationBooked = 51, - - /// - /// Enum OperationPending for value: operationPending - /// - [EnumMember(Value = "operationPending")] - OperationPending = 52, - - /// - /// Enum OperationReceived for value: operationReceived - /// - [EnumMember(Value = "operationReceived")] - OperationReceived = 53, - /// /// Enum PaymentCost for value: paymentCost /// [EnumMember(Value = "paymentCost")] - PaymentCost = 54, + PaymentCost = 50, /// /// Enum PaymentCostPending for value: paymentCostPending /// [EnumMember(Value = "paymentCostPending")] - PaymentCostPending = 55, + PaymentCostPending = 51, /// /// Enum Received for value: received /// [EnumMember(Value = "received")] - Received = 56, + Received = 52, /// /// Enum RefundPending for value: refundPending /// [EnumMember(Value = "refundPending")] - RefundPending = 57, + RefundPending = 53, /// /// Enum RefundReversalPending for value: refundReversalPending /// [EnumMember(Value = "refundReversalPending")] - RefundReversalPending = 58, + RefundReversalPending = 54, /// /// Enum RefundReversed for value: refundReversed /// [EnumMember(Value = "refundReversed")] - RefundReversed = 59, + RefundReversed = 55, /// /// Enum Refunded for value: refunded /// [EnumMember(Value = "refunded")] - Refunded = 60, + Refunded = 56, /// /// Enum RefundedExternally for value: refundedExternally /// [EnumMember(Value = "refundedExternally")] - RefundedExternally = 61, + RefundedExternally = 57, /// /// Enum Refused for value: refused /// [EnumMember(Value = "refused")] - Refused = 62, + Refused = 58, /// /// Enum ReserveAdjustment for value: reserveAdjustment /// [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 63, + ReserveAdjustment = 59, /// /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending /// [EnumMember(Value = "reserveAdjustmentPending")] - ReserveAdjustmentPending = 64, + ReserveAdjustmentPending = 60, /// /// Enum Returned for value: returned /// [EnumMember(Value = "returned")] - Returned = 65, + Returned = 61, /// /// Enum SecondChargeback for value: secondChargeback /// [EnumMember(Value = "secondChargeback")] - SecondChargeback = 66, + SecondChargeback = 62, /// /// Enum SecondChargebackPending for value: secondChargebackPending /// [EnumMember(Value = "secondChargebackPending")] - SecondChargebackPending = 67, + SecondChargebackPending = 63, /// /// Enum Undefined for value: undefined /// [EnumMember(Value = "undefined")] - Undefined = 68 + Undefined = 64 } @@ -872,149 +914,191 @@ public enum TypeEnum [EnumMember(Value = "balanceAdjustment")] BalanceAdjustment = 3, + /// + /// Enum BalanceMigration for value: balanceMigration + /// + [EnumMember(Value = "balanceMigration")] + BalanceMigration = 4, + /// /// Enum BalanceRollover for value: balanceRollover /// [EnumMember(Value = "balanceRollover")] - BalanceRollover = 4, + BalanceRollover = 5, /// /// Enum BankTransfer for value: bankTransfer /// [EnumMember(Value = "bankTransfer")] - BankTransfer = 5, + BankTransfer = 6, /// /// Enum Capture for value: capture /// [EnumMember(Value = "capture")] - Capture = 6, + Capture = 7, /// /// Enum CaptureReversal for value: captureReversal /// [EnumMember(Value = "captureReversal")] - CaptureReversal = 7, + CaptureReversal = 8, /// /// Enum CardTransfer for value: cardTransfer /// [EnumMember(Value = "cardTransfer")] - CardTransfer = 8, + CardTransfer = 9, + + /// + /// Enum CashOutFee for value: cashOutFee + /// + [EnumMember(Value = "cashOutFee")] + CashOutFee = 10, + + /// + /// Enum CashOutFunding for value: cashOutFunding + /// + [EnumMember(Value = "cashOutFunding")] + CashOutFunding = 11, + + /// + /// Enum CashOutInstruction for value: cashOutInstruction + /// + [EnumMember(Value = "cashOutInstruction")] + CashOutInstruction = 12, /// /// Enum Chargeback for value: chargeback /// [EnumMember(Value = "chargeback")] - Chargeback = 9, + Chargeback = 13, + + /// + /// Enum ChargebackCorrection for value: chargebackCorrection + /// + [EnumMember(Value = "chargebackCorrection")] + ChargebackCorrection = 14, /// /// Enum ChargebackReversal for value: chargebackReversal /// [EnumMember(Value = "chargebackReversal")] - ChargebackReversal = 10, + ChargebackReversal = 15, + + /// + /// Enum ChargebackReversalCorrection for value: chargebackReversalCorrection + /// + [EnumMember(Value = "chargebackReversalCorrection")] + ChargebackReversalCorrection = 16, /// /// Enum DepositCorrection for value: depositCorrection /// [EnumMember(Value = "depositCorrection")] - DepositCorrection = 11, + DepositCorrection = 17, /// /// Enum Fee for value: fee /// [EnumMember(Value = "fee")] - Fee = 12, + Fee = 18, /// /// Enum Grant for value: grant /// [EnumMember(Value = "grant")] - Grant = 13, + Grant = 19, /// /// Enum Installment for value: installment /// [EnumMember(Value = "installment")] - Installment = 14, + Installment = 20, /// /// Enum InstallmentReversal for value: installmentReversal /// [EnumMember(Value = "installmentReversal")] - InstallmentReversal = 15, + InstallmentReversal = 21, /// /// Enum InternalTransfer for value: internalTransfer /// [EnumMember(Value = "internalTransfer")] - InternalTransfer = 16, + InternalTransfer = 22, /// /// Enum InvoiceDeduction for value: invoiceDeduction /// [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 17, + InvoiceDeduction = 23, /// /// Enum Leftover for value: leftover /// [EnumMember(Value = "leftover")] - Leftover = 18, + Leftover = 24, /// /// Enum ManualCorrection for value: manualCorrection /// [EnumMember(Value = "manualCorrection")] - ManualCorrection = 19, + ManualCorrection = 25, /// /// Enum MiscCost for value: miscCost /// [EnumMember(Value = "miscCost")] - MiscCost = 20, + MiscCost = 26, /// /// Enum Payment for value: payment /// [EnumMember(Value = "payment")] - Payment = 21, + Payment = 27, /// /// Enum PaymentCost for value: paymentCost /// [EnumMember(Value = "paymentCost")] - PaymentCost = 22, + PaymentCost = 28, /// /// Enum Refund for value: refund /// [EnumMember(Value = "refund")] - Refund = 23, + Refund = 29, /// /// Enum RefundReversal for value: refundReversal /// [EnumMember(Value = "refundReversal")] - RefundReversal = 24, + RefundReversal = 30, /// /// Enum Repayment for value: repayment /// [EnumMember(Value = "repayment")] - Repayment = 25, + Repayment = 31, /// /// Enum ReserveAdjustment for value: reserveAdjustment /// [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 26, + ReserveAdjustment = 32, /// /// Enum SecondChargeback for value: secondChargeback /// [EnumMember(Value = "secondChargeback")] - SecondChargeback = 27 + SecondChargeback = 33, + + /// + /// Enum SecondChargebackCorrection for value: secondChargebackCorrection + /// + [EnumMember(Value = "secondChargebackCorrection")] + SecondChargebackCorrection = 34 } @@ -1039,7 +1123,7 @@ protected TransferData() { } /// The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id).. /// The unique identifier of the balance platform.. /// The list of the latest balance statuses in the transfer.. - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. (required). + /// The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. (required). /// counterparty. /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. /// Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?**. @@ -1052,8 +1136,8 @@ protected TransferData() { } /// paymentInstrument. /// The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) used in the transfer.. /// The payment's merchant reference included in the transfer.. - /// The type of the related split.. - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN).. + /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the [Balance Platform Accounting Report](https://docs.adyen.com/marketplaces-and-platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **BalanceAccount**: for the sale amount of the transaction. * **Commission**: for your platform's commission on the transaction. * **PaymentFee**: for the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **VAT**: for the Value Added Tax.. + /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field.. /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments.. /// The payment reference included in the transfer.. /// Additional information about the status of the transfer.. diff --git a/Adyen/Model/TransferWebhooks/TransferEvent.cs b/Adyen/Model/TransferWebhooks/TransferEvent.cs index 60a415ae8..60231aa72 100644 --- a/Adyen/Model/TransferWebhooks/TransferEvent.cs +++ b/Adyen/Model/TransferWebhooks/TransferEvent.cs @@ -51,71 +51,89 @@ public enum ReasonEnum [EnumMember(Value = "approved")] Approved = 2, + /// + /// Enum BalanceAccountTemporarilyBlockedByTransactionRule for value: balanceAccountTemporarilyBlockedByTransactionRule + /// + [EnumMember(Value = "balanceAccountTemporarilyBlockedByTransactionRule")] + BalanceAccountTemporarilyBlockedByTransactionRule = 3, + /// /// Enum CounterpartyAccountBlocked for value: counterpartyAccountBlocked /// [EnumMember(Value = "counterpartyAccountBlocked")] - CounterpartyAccountBlocked = 3, + CounterpartyAccountBlocked = 4, /// /// Enum CounterpartyAccountClosed for value: counterpartyAccountClosed /// [EnumMember(Value = "counterpartyAccountClosed")] - CounterpartyAccountClosed = 4, + CounterpartyAccountClosed = 5, /// /// Enum CounterpartyAccountNotFound for value: counterpartyAccountNotFound /// [EnumMember(Value = "counterpartyAccountNotFound")] - CounterpartyAccountNotFound = 5, + CounterpartyAccountNotFound = 6, /// /// Enum CounterpartyAddressRequired for value: counterpartyAddressRequired /// [EnumMember(Value = "counterpartyAddressRequired")] - CounterpartyAddressRequired = 6, + CounterpartyAddressRequired = 7, /// /// Enum CounterpartyBankTimedOut for value: counterpartyBankTimedOut /// [EnumMember(Value = "counterpartyBankTimedOut")] - CounterpartyBankTimedOut = 7, + CounterpartyBankTimedOut = 8, /// /// Enum CounterpartyBankUnavailable for value: counterpartyBankUnavailable /// [EnumMember(Value = "counterpartyBankUnavailable")] - CounterpartyBankUnavailable = 8, + CounterpartyBankUnavailable = 9, + + /// + /// Enum DeclinedByTransactionRule for value: declinedByTransactionRule + /// + [EnumMember(Value = "declinedByTransactionRule")] + DeclinedByTransactionRule = 10, /// /// Enum Error for value: error /// [EnumMember(Value = "error")] - Error = 9, + Error = 11, /// /// Enum NotEnoughBalance for value: notEnoughBalance /// [EnumMember(Value = "notEnoughBalance")] - NotEnoughBalance = 10, + NotEnoughBalance = 12, /// /// Enum RefusedByCounterpartyBank for value: refusedByCounterpartyBank /// [EnumMember(Value = "refusedByCounterpartyBank")] - RefusedByCounterpartyBank = 11, + RefusedByCounterpartyBank = 13, /// /// Enum RouteNotFound for value: routeNotFound /// [EnumMember(Value = "routeNotFound")] - RouteNotFound = 12, + RouteNotFound = 14, + + /// + /// Enum ScaFailed for value: scaFailed + /// + [EnumMember(Value = "scaFailed")] + ScaFailed = 15, /// /// Enum Unknown for value: unknown /// [EnumMember(Value = "unknown")] - Unknown = 13 + Unknown = 16 } @@ -427,119 +445,95 @@ public enum StatusEnum [EnumMember(Value = "miscCostPending")] MiscCostPending = 49, - /// - /// Enum OperationAuthorized for value: operationAuthorized - /// - [EnumMember(Value = "operationAuthorized")] - OperationAuthorized = 50, - - /// - /// Enum OperationBooked for value: operationBooked - /// - [EnumMember(Value = "operationBooked")] - OperationBooked = 51, - - /// - /// Enum OperationPending for value: operationPending - /// - [EnumMember(Value = "operationPending")] - OperationPending = 52, - - /// - /// Enum OperationReceived for value: operationReceived - /// - [EnumMember(Value = "operationReceived")] - OperationReceived = 53, - /// /// Enum PaymentCost for value: paymentCost /// [EnumMember(Value = "paymentCost")] - PaymentCost = 54, + PaymentCost = 50, /// /// Enum PaymentCostPending for value: paymentCostPending /// [EnumMember(Value = "paymentCostPending")] - PaymentCostPending = 55, + PaymentCostPending = 51, /// /// Enum Received for value: received /// [EnumMember(Value = "received")] - Received = 56, + Received = 52, /// /// Enum RefundPending for value: refundPending /// [EnumMember(Value = "refundPending")] - RefundPending = 57, + RefundPending = 53, /// /// Enum RefundReversalPending for value: refundReversalPending /// [EnumMember(Value = "refundReversalPending")] - RefundReversalPending = 58, + RefundReversalPending = 54, /// /// Enum RefundReversed for value: refundReversed /// [EnumMember(Value = "refundReversed")] - RefundReversed = 59, + RefundReversed = 55, /// /// Enum Refunded for value: refunded /// [EnumMember(Value = "refunded")] - Refunded = 60, + Refunded = 56, /// /// Enum RefundedExternally for value: refundedExternally /// [EnumMember(Value = "refundedExternally")] - RefundedExternally = 61, + RefundedExternally = 57, /// /// Enum Refused for value: refused /// [EnumMember(Value = "refused")] - Refused = 62, + Refused = 58, /// /// Enum ReserveAdjustment for value: reserveAdjustment /// [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 63, + ReserveAdjustment = 59, /// /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending /// [EnumMember(Value = "reserveAdjustmentPending")] - ReserveAdjustmentPending = 64, + ReserveAdjustmentPending = 60, /// /// Enum Returned for value: returned /// [EnumMember(Value = "returned")] - Returned = 65, + Returned = 61, /// /// Enum SecondChargeback for value: secondChargeback /// [EnumMember(Value = "secondChargeback")] - SecondChargeback = 66, + SecondChargeback = 62, /// /// Enum SecondChargebackPending for value: secondChargebackPending /// [EnumMember(Value = "secondChargebackPending")] - SecondChargebackPending = 67, + SecondChargebackPending = 63, /// /// Enum Undefined for value: undefined /// [EnumMember(Value = "undefined")] - Undefined = 68 + Undefined = 64 } @@ -586,28 +580,32 @@ public enum TypeEnum /// The date when the transfer request was sent.. /// The estimated time the beneficiary should have access to the funds.. /// The unique identifier of the transfer event.. + /// modification. /// The list of the balance mutation per event.. /// originalAmount. /// The reason for the transfer status.. + /// SchemeTraceID retrieved from scheme.. + /// SchemeUniqueTransactionID retrieved from scheme.. /// The status of the transfer event.. /// The id of the transaction that is related to this accounting event. Only sent for events of type **accounting** where the balance changes.. - /// transferOperation. /// The type of the transfer event. Possible values: **accounting**, **tracking**.. /// The date when the tracking status was updated.. /// A future date, when the funds are expected to be deducted from or credited to the balance account.. - public TransferEvent(Amount amount = default(Amount), List amountAdjustments = default(List), DateTime bookingDate = default(DateTime), DateTime estimatedArrivalTime = default(DateTime), string id = default(string), List mutations = default(List), Amount originalAmount = default(Amount), ReasonEnum? reason = default(ReasonEnum?), StatusEnum? status = default(StatusEnum?), string transactionId = default(string), TransferOperation transferOperation = default(TransferOperation), TypeEnum? type = default(TypeEnum?), DateTime updateDate = default(DateTime), DateTime valueDate = default(DateTime)) + public TransferEvent(Amount amount = default(Amount), List amountAdjustments = default(List), DateTime bookingDate = default(DateTime), DateTime estimatedArrivalTime = default(DateTime), string id = default(string), Modification modification = default(Modification), List mutations = default(List), Amount originalAmount = default(Amount), ReasonEnum? reason = default(ReasonEnum?), string schemeTraceID = default(string), string schemeUniqueTransactionID = default(string), StatusEnum? status = default(StatusEnum?), string transactionId = default(string), TypeEnum? type = default(TypeEnum?), DateTime updateDate = default(DateTime), DateTime valueDate = default(DateTime)) { this.Amount = amount; this.AmountAdjustments = amountAdjustments; this.BookingDate = bookingDate; this.EstimatedArrivalTime = estimatedArrivalTime; this.Id = id; + this.Modification = modification; this.Mutations = mutations; this.OriginalAmount = originalAmount; this.Reason = reason; + this.SchemeTraceID = schemeTraceID; + this.SchemeUniqueTransactionID = schemeUniqueTransactionID; this.Status = status; this.TransactionId = transactionId; - this.TransferOperation = transferOperation; this.Type = type; this.UpdateDate = updateDate; this.ValueDate = valueDate; @@ -647,6 +645,12 @@ public enum TypeEnum [DataMember(Name = "id", EmitDefaultValue = false)] public string Id { get; set; } + /// + /// Gets or Sets Modification + /// + [DataMember(Name = "modification", EmitDefaultValue = false)] + public Modification Modification { get; set; } + /// /// The list of the balance mutation per event. /// @@ -660,6 +664,20 @@ public enum TypeEnum [DataMember(Name = "originalAmount", EmitDefaultValue = false)] public Amount OriginalAmount { get; set; } + /// + /// SchemeTraceID retrieved from scheme. + /// + /// SchemeTraceID retrieved from scheme. + [DataMember(Name = "schemeTraceID", EmitDefaultValue = false)] + public string SchemeTraceID { get; set; } + + /// + /// SchemeUniqueTransactionID retrieved from scheme. + /// + /// SchemeUniqueTransactionID retrieved from scheme. + [DataMember(Name = "schemeUniqueTransactionID", EmitDefaultValue = false)] + public string SchemeUniqueTransactionID { get; set; } + /// /// The id of the transaction that is related to this accounting event. Only sent for events of type **accounting** where the balance changes. /// @@ -667,12 +685,6 @@ public enum TypeEnum [DataMember(Name = "transactionId", EmitDefaultValue = false)] public string TransactionId { get; set; } - /// - /// Gets or Sets TransferOperation - /// - [DataMember(Name = "transferOperation", EmitDefaultValue = false)] - public TransferOperation TransferOperation { get; set; } - /// /// The date when the tracking status was updated. /// @@ -700,12 +712,14 @@ public override string ToString() sb.Append(" BookingDate: ").Append(BookingDate).Append("\n"); sb.Append(" EstimatedArrivalTime: ").Append(EstimatedArrivalTime).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Modification: ").Append(Modification).Append("\n"); sb.Append(" Mutations: ").Append(Mutations).Append("\n"); sb.Append(" OriginalAmount: ").Append(OriginalAmount).Append("\n"); sb.Append(" Reason: ").Append(Reason).Append("\n"); + sb.Append(" SchemeTraceID: ").Append(SchemeTraceID).Append("\n"); + sb.Append(" SchemeUniqueTransactionID: ").Append(SchemeUniqueTransactionID).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append(" TransactionId: ").Append(TransactionId).Append("\n"); - sb.Append(" TransferOperation: ").Append(TransferOperation).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" UpdateDate: ").Append(UpdateDate).Append("\n"); sb.Append(" ValueDate: ").Append(ValueDate).Append("\n"); @@ -770,6 +784,11 @@ public bool Equals(TransferEvent input) (this.Id != null && this.Id.Equals(input.Id)) ) && + ( + this.Modification == input.Modification || + (this.Modification != null && + this.Modification.Equals(input.Modification)) + ) && ( this.Mutations == input.Mutations || this.Mutations != null && @@ -785,6 +804,16 @@ public bool Equals(TransferEvent input) this.Reason == input.Reason || this.Reason.Equals(input.Reason) ) && + ( + this.SchemeTraceID == input.SchemeTraceID || + (this.SchemeTraceID != null && + this.SchemeTraceID.Equals(input.SchemeTraceID)) + ) && + ( + this.SchemeUniqueTransactionID == input.SchemeUniqueTransactionID || + (this.SchemeUniqueTransactionID != null && + this.SchemeUniqueTransactionID.Equals(input.SchemeUniqueTransactionID)) + ) && ( this.Status == input.Status || this.Status.Equals(input.Status) @@ -794,11 +823,6 @@ public bool Equals(TransferEvent input) (this.TransactionId != null && this.TransactionId.Equals(input.TransactionId)) ) && - ( - this.TransferOperation == input.TransferOperation || - (this.TransferOperation != null && - this.TransferOperation.Equals(input.TransferOperation)) - ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -844,6 +868,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Id.GetHashCode(); } + if (this.Modification != null) + { + hashCode = (hashCode * 59) + this.Modification.GetHashCode(); + } if (this.Mutations != null) { hashCode = (hashCode * 59) + this.Mutations.GetHashCode(); @@ -853,15 +881,19 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.OriginalAmount.GetHashCode(); } hashCode = (hashCode * 59) + this.Reason.GetHashCode(); + if (this.SchemeTraceID != null) + { + hashCode = (hashCode * 59) + this.SchemeTraceID.GetHashCode(); + } + if (this.SchemeUniqueTransactionID != null) + { + hashCode = (hashCode * 59) + this.SchemeUniqueTransactionID.GetHashCode(); + } hashCode = (hashCode * 59) + this.Status.GetHashCode(); if (this.TransactionId != null) { hashCode = (hashCode * 59) + this.TransactionId.GetHashCode(); } - if (this.TransferOperation != null) - { - hashCode = (hashCode * 59) + this.TransferOperation.GetHashCode(); - } hashCode = (hashCode * 59) + this.Type.GetHashCode(); if (this.UpdateDate != null) { diff --git a/Adyen/Model/TransferWebhooks/TransferOperation.cs b/Adyen/Model/TransferWebhooks/TransferOperation.cs deleted file mode 100644 index 267251a28..000000000 --- a/Adyen/Model/TransferWebhooks/TransferOperation.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 3 -* -* 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.TransferWebhooks -{ - /// - /// TransferOperation - /// - [DataContract(Name = "TransferOperation")] - public partial class TransferOperation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The direction of the money movement.. - /// The reference returned when the amend was initiated.. - /// The type of amend for the transfer.. - public TransferOperation(string direction = default(string), string reference = default(string), string type = default(string)) - { - this.Direction = direction; - this.Reference = reference; - this.Type = type; - } - - /// - /// The direction of the money movement. - /// - /// The direction of the money movement. - [DataMember(Name = "direction", EmitDefaultValue = false)] - public string Direction { get; set; } - - /// - /// The reference returned when the amend was initiated. - /// - /// The reference returned when the amend was initiated. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The type of amend for the transfer. - /// - /// The type of amend for the transfer. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { 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 TransferOperation {\n"); - sb.Append(" Direction: ").Append(Direction).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Type: ").Append(Type).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 true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferOperation); - } - - /// - /// Returns true if TransferOperation instances are equal - /// - /// Instance of TransferOperation to be compared - /// Boolean - public bool Equals(TransferOperation input) - { - if (input == null) - { - return false; - } - return - ( - this.Direction == input.Direction || - (this.Direction != null && - this.Direction.Equals(input.Direction)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Direction != null) - { - hashCode = (hashCode * 59) + this.Direction.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/HKLocalAccountIdentification.cs b/Adyen/Model/Transfers/HKLocalAccountIdentification.cs index 1324e0a4c..90a7f32df 100644 --- a/Adyen/Model/Transfers/HKLocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/HKLocalAccountIdentification.cs @@ -62,29 +62,29 @@ protected HKLocalAccountIdentification() { } /// /// Initializes a new instance of the class. /// - /// The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. (required). - /// The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. (required). + /// The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. (required). + /// The 3-digit clearing code, without separators or whitespace. (required). /// **hkLocal** (required) (default to TypeEnum.HkLocal). - public HKLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.HkLocal) + public HKLocalAccountIdentification(string accountNumber = default(string), string clearingCode = default(string), TypeEnum type = TypeEnum.HkLocal) { this.AccountNumber = accountNumber; - this.BankCode = bankCode; + this.ClearingCode = clearingCode; this.Type = type; } /// - /// The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. + /// The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. /// - /// The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. + /// The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } /// - /// The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. + /// The 3-digit clearing code, without separators or whitespace. /// - /// The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. - [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] - public string BankCode { get; set; } + /// The 3-digit clearing code, without separators or whitespace. + [DataMember(Name = "clearingCode", IsRequired = false, EmitDefaultValue = false)] + public string ClearingCode { get; set; } /// /// Returns the string presentation of the object @@ -95,7 +95,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class HKLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); + sb.Append(" ClearingCode: ").Append(ClearingCode).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -138,9 +138,9 @@ public bool Equals(HKLocalAccountIdentification input) this.AccountNumber.Equals(input.AccountNumber)) ) && ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) + this.ClearingCode == input.ClearingCode || + (this.ClearingCode != null && + this.ClearingCode.Equals(input.ClearingCode)) ) && ( this.Type == input.Type || @@ -161,9 +161,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } - if (this.BankCode != null) + if (this.ClearingCode != null) { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); + hashCode = (hashCode * 59) + this.ClearingCode.GetHashCode(); } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; @@ -177,27 +177,27 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 19) + if (this.AccountNumber != null && this.AccountNumber.Length > 12) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 19.", new [] { "AccountNumber" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 12.", new [] { "AccountNumber" }); } // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 6) + if (this.AccountNumber != null && this.AccountNumber.Length < 9) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 6.", new [] { "AccountNumber" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 9.", new [] { "AccountNumber" }); } - // BankCode (string) maxLength - if (this.BankCode != null && this.BankCode.Length > 6) + // ClearingCode (string) maxLength + if (this.ClearingCode != null && this.ClearingCode.Length > 3) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be less than 6.", new [] { "BankCode" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingCode, length must be less than 3.", new [] { "ClearingCode" }); } - // BankCode (string) minLength - if (this.BankCode != null && this.BankCode.Length < 6) + // ClearingCode (string) minLength + if (this.ClearingCode != null && this.ClearingCode.Length < 3) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be greater than 6.", new [] { "BankCode" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingCode, length must be greater than 3.", new [] { "ClearingCode" }); } yield break; diff --git a/Adyen/Model/Transfers/MerchantData.cs b/Adyen/Model/Transfers/MerchantData.cs index afbf0c589..1fc555296 100644 --- a/Adyen/Model/Transfers/MerchantData.cs +++ b/Adyen/Model/Transfers/MerchantData.cs @@ -35,18 +35,27 @@ public partial class MerchantData : IEquatable, IValidatableObject /// /// Initializes a new instance of the class. /// + /// The unique identifier of the merchant's acquirer.. /// The merchant category code.. /// The merchant identifier.. /// nameLocation. /// The merchant postal code.. - public MerchantData(string mcc = default(string), string merchantId = default(string), NameLocation nameLocation = default(NameLocation), string postalCode = default(string)) + public MerchantData(string acquirerId = default(string), string mcc = default(string), string merchantId = default(string), NameLocation nameLocation = default(NameLocation), string postalCode = default(string)) { + this.AcquirerId = acquirerId; this.Mcc = mcc; this.MerchantId = merchantId; this.NameLocation = nameLocation; this.PostalCode = postalCode; } + /// + /// The unique identifier of the merchant's acquirer. + /// + /// The unique identifier of the merchant's acquirer. + [DataMember(Name = "acquirerId", EmitDefaultValue = false)] + public string AcquirerId { get; set; } + /// /// The merchant category code. /// @@ -82,6 +91,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MerchantData {\n"); + sb.Append(" AcquirerId: ").Append(AcquirerId).Append("\n"); sb.Append(" Mcc: ").Append(Mcc).Append("\n"); sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); sb.Append(" NameLocation: ").Append(NameLocation).Append("\n"); @@ -121,6 +131,11 @@ public bool Equals(MerchantData input) return false; } return + ( + this.AcquirerId == input.AcquirerId || + (this.AcquirerId != null && + this.AcquirerId.Equals(input.AcquirerId)) + ) && ( this.Mcc == input.Mcc || (this.Mcc != null && @@ -152,6 +167,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (this.AcquirerId != null) + { + hashCode = (hashCode * 59) + this.AcquirerId.GetHashCode(); + } if (this.Mcc != null) { hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); diff --git a/Adyen/Model/Transfers/NZLocalAccountIdentification.cs b/Adyen/Model/Transfers/NZLocalAccountIdentification.cs index 8a9955f34..b505f7743 100644 --- a/Adyen/Model/Transfers/NZLocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/NZLocalAccountIdentification.cs @@ -62,39 +62,21 @@ protected NZLocalAccountIdentification() { } /// /// Initializes a new instance of the class. /// - /// The 7-digit bank account number, without separators or whitespace. (required). - /// The 2- to 3-digit account suffix, without separators or whitespace. (required). - /// The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. (required). + /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. (required). /// **nzLocal** (required) (default to TypeEnum.NzLocal). - public NZLocalAccountIdentification(string accountNumber = default(string), string accountSuffix = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.NzLocal) + public NZLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NzLocal) { this.AccountNumber = accountNumber; - this.AccountSuffix = accountSuffix; - this.BankCode = bankCode; this.Type = type; } /// - /// The 7-digit bank account number, without separators or whitespace. + /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. /// - /// The 7-digit bank account number, without separators or whitespace. + /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } - /// - /// The 2- to 3-digit account suffix, without separators or whitespace. - /// - /// The 2- to 3-digit account suffix, without separators or whitespace. - [DataMember(Name = "accountSuffix", IsRequired = false, EmitDefaultValue = false)] - public string AccountSuffix { get; set; } - - /// - /// The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. - /// - /// The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. - [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] - public string BankCode { get; set; } - /// /// Returns the string presentation of the object /// @@ -104,8 +86,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class NZLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AccountSuffix: ").Append(AccountSuffix).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -147,16 +127,6 @@ public bool Equals(NZLocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && - ( - this.AccountSuffix == input.AccountSuffix || - (this.AccountSuffix != null && - this.AccountSuffix.Equals(input.AccountSuffix)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -176,14 +146,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } - if (this.AccountSuffix != null) - { - hashCode = (hashCode * 59) + this.AccountSuffix.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } @@ -196,39 +158,15 @@ public override int GetHashCode() public IEnumerable Validate(ValidationContext validationContext) { // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 7) + if (this.AccountNumber != null && this.AccountNumber.Length > 16) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 7.", new [] { "AccountNumber" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 16.", new [] { "AccountNumber" }); } // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 7) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 7.", new [] { "AccountNumber" }); - } - - // AccountSuffix (string) maxLength - if (this.AccountSuffix != null && this.AccountSuffix.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountSuffix, length must be less than 3.", new [] { "AccountSuffix" }); - } - - // AccountSuffix (string) minLength - if (this.AccountSuffix != null && this.AccountSuffix.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountSuffix, length must be greater than 2.", new [] { "AccountSuffix" }); - } - - // BankCode (string) maxLength - if (this.BankCode != null && this.BankCode.Length > 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be less than 6.", new [] { "BankCode" }); - } - - // BankCode (string) minLength - if (this.BankCode != null && this.BankCode.Length < 6) + if (this.AccountNumber != null && this.AccountNumber.Length < 15) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be greater than 6.", new [] { "BankCode" }); + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 15.", new [] { "AccountNumber" }); } yield break; diff --git a/Adyen/Model/Transfers/ServiceError.cs b/Adyen/Model/Transfers/ServiceError.cs new file mode 100644 index 000000000..ea34c68e3 --- /dev/null +++ b/Adyen/Model/Transfers/ServiceError.cs @@ -0,0 +1,201 @@ +/* +* Transfers API +* +* +* The version of the OpenAPI document: 3 +* +* 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.Transfers +{ + /// + /// ServiceError + /// + [DataContract(Name = "ServiceError")] + public partial class ServiceError : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The error code mapped to the error message.. + /// The category of the error.. + /// A short explanation of the issue.. + /// The PSP reference of the payment.. + /// The HTTP response status.. + public ServiceError(string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) + { + this.ErrorCode = errorCode; + this.ErrorType = errorType; + this.Message = message; + this.PspReference = pspReference; + this.Status = status; + } + + /// + /// The error code mapped to the error message. + /// + /// The error code mapped to the error message. + [DataMember(Name = "errorCode", EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// The category of the error. + /// + /// The category of the error. + [DataMember(Name = "errorType", EmitDefaultValue = false)] + public string ErrorType { get; set; } + + /// + /// A short explanation of the issue. + /// + /// A short explanation of the issue. + [DataMember(Name = "message", EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// The PSP reference of the payment. + /// + /// The PSP reference of the payment. + [DataMember(Name = "pspReference", EmitDefaultValue = false)] + public string PspReference { get; set; } + + /// + /// The HTTP response status. + /// + /// The HTTP response status. + [DataMember(Name = "status", EmitDefaultValue = false)] + public int? Status { 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 ServiceError {\n"); + sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); + sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" PspReference: ").Append(PspReference).Append("\n"); + sb.Append(" Status: ").Append(Status).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 true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ServiceError); + } + + /// + /// Returns true if ServiceError instances are equal + /// + /// Instance of ServiceError to be compared + /// Boolean + public bool Equals(ServiceError input) + { + if (input == null) + { + return false; + } + return + ( + this.ErrorCode == input.ErrorCode || + (this.ErrorCode != null && + this.ErrorCode.Equals(input.ErrorCode)) + ) && + ( + this.ErrorType == input.ErrorType || + (this.ErrorType != null && + this.ErrorType.Equals(input.ErrorType)) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && + ( + this.PspReference == input.PspReference || + (this.PspReference != null && + this.PspReference.Equals(input.PspReference)) + ) && + ( + this.Status == input.Status || + this.Status.Equals(input.Status) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ErrorCode != null) + { + hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); + } + if (this.ErrorType != null) + { + hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); + } + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + if (this.PspReference != null) + { + hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + return hashCode; + } + } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Adyen/Model/Transfers/Transaction.cs b/Adyen/Model/Transfers/TransactionData.cs similarity index 86% rename from Adyen/Model/Transfers/Transaction.cs rename to Adyen/Model/Transfers/TransactionData.cs index 02cc670c0..aa9167e8b 100644 --- a/Adyen/Model/Transfers/Transaction.cs +++ b/Adyen/Model/Transfers/TransactionData.cs @@ -27,10 +27,10 @@ namespace Adyen.Model.Transfers { /// - /// Transaction + /// TransactionData /// - [DataContract(Name = "Transaction")] - public partial class Transaction : IEquatable, IValidatableObject + [DataContract(Name = "TransactionData")] + public partial class TransactionData : IEquatable, IValidatableObject { /// /// The category of the transaction indicating the type of activity. Possible values: * **platformPayment**: The transaction is a payment or payment modification made with an Adyen merchant account. * **internal**: The transaction resulted from an internal adjustment such as a deposit correction or invoice deduction. * **bank**: The transaction is a bank-related activity, such as sending a payout or receiving funds. * **issuedCard**: The transaction is a card-related activity, such as using an Adyen-issued card to pay online. @@ -79,7 +79,13 @@ public enum CategoryEnum /// Enum PlatformPayment for value: platformPayment /// [EnumMember(Value = "platformPayment")] - PlatformPayment = 7 + PlatformPayment = 7, + + /// + /// Enum Upgrade for value: upgrade + /// + [EnumMember(Value = "upgrade")] + Upgrade = 8 } @@ -143,149 +149,191 @@ public enum TypeEnum [EnumMember(Value = "balanceAdjustment")] BalanceAdjustment = 3, + /// + /// Enum BalanceMigration for value: balanceMigration + /// + [EnumMember(Value = "balanceMigration")] + BalanceMigration = 4, + /// /// Enum BalanceRollover for value: balanceRollover /// [EnumMember(Value = "balanceRollover")] - BalanceRollover = 4, + BalanceRollover = 5, /// /// Enum BankTransfer for value: bankTransfer /// [EnumMember(Value = "bankTransfer")] - BankTransfer = 5, + BankTransfer = 6, /// /// Enum Capture for value: capture /// [EnumMember(Value = "capture")] - Capture = 6, + Capture = 7, /// /// Enum CaptureReversal for value: captureReversal /// [EnumMember(Value = "captureReversal")] - CaptureReversal = 7, + CaptureReversal = 8, /// /// Enum CardTransfer for value: cardTransfer /// [EnumMember(Value = "cardTransfer")] - CardTransfer = 8, + CardTransfer = 9, + + /// + /// Enum CashOutFee for value: cashOutFee + /// + [EnumMember(Value = "cashOutFee")] + CashOutFee = 10, + + /// + /// Enum CashOutFunding for value: cashOutFunding + /// + [EnumMember(Value = "cashOutFunding")] + CashOutFunding = 11, + + /// + /// Enum CashOutInstruction for value: cashOutInstruction + /// + [EnumMember(Value = "cashOutInstruction")] + CashOutInstruction = 12, /// /// Enum Chargeback for value: chargeback /// [EnumMember(Value = "chargeback")] - Chargeback = 9, + Chargeback = 13, + + /// + /// Enum ChargebackCorrection for value: chargebackCorrection + /// + [EnumMember(Value = "chargebackCorrection")] + ChargebackCorrection = 14, /// /// Enum ChargebackReversal for value: chargebackReversal /// [EnumMember(Value = "chargebackReversal")] - ChargebackReversal = 10, + ChargebackReversal = 15, + + /// + /// Enum ChargebackReversalCorrection for value: chargebackReversalCorrection + /// + [EnumMember(Value = "chargebackReversalCorrection")] + ChargebackReversalCorrection = 16, /// /// Enum DepositCorrection for value: depositCorrection /// [EnumMember(Value = "depositCorrection")] - DepositCorrection = 11, + DepositCorrection = 17, /// /// Enum Fee for value: fee /// [EnumMember(Value = "fee")] - Fee = 12, + Fee = 18, /// /// Enum Grant for value: grant /// [EnumMember(Value = "grant")] - Grant = 13, + Grant = 19, /// /// Enum Installment for value: installment /// [EnumMember(Value = "installment")] - Installment = 14, + Installment = 20, /// /// Enum InstallmentReversal for value: installmentReversal /// [EnumMember(Value = "installmentReversal")] - InstallmentReversal = 15, + InstallmentReversal = 21, /// /// Enum InternalTransfer for value: internalTransfer /// [EnumMember(Value = "internalTransfer")] - InternalTransfer = 16, + InternalTransfer = 22, /// /// Enum InvoiceDeduction for value: invoiceDeduction /// [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 17, + InvoiceDeduction = 23, /// /// Enum Leftover for value: leftover /// [EnumMember(Value = "leftover")] - Leftover = 18, + Leftover = 24, /// /// Enum ManualCorrection for value: manualCorrection /// [EnumMember(Value = "manualCorrection")] - ManualCorrection = 19, + ManualCorrection = 25, /// /// Enum MiscCost for value: miscCost /// [EnumMember(Value = "miscCost")] - MiscCost = 20, + MiscCost = 26, /// /// Enum Payment for value: payment /// [EnumMember(Value = "payment")] - Payment = 21, + Payment = 27, /// /// Enum PaymentCost for value: paymentCost /// [EnumMember(Value = "paymentCost")] - PaymentCost = 22, + PaymentCost = 28, /// /// Enum Refund for value: refund /// [EnumMember(Value = "refund")] - Refund = 23, + Refund = 29, /// /// Enum RefundReversal for value: refundReversal /// [EnumMember(Value = "refundReversal")] - RefundReversal = 24, + RefundReversal = 30, /// /// Enum Repayment for value: repayment /// [EnumMember(Value = "repayment")] - Repayment = 25, + Repayment = 31, /// /// Enum ReserveAdjustment for value: reserveAdjustment /// [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 26, + ReserveAdjustment = 32, /// /// Enum SecondChargeback for value: secondChargeback /// [EnumMember(Value = "secondChargeback")] - SecondChargeback = 27 + SecondChargeback = 33, + + /// + /// Enum SecondChargebackCorrection for value: secondChargebackCorrection + /// + [EnumMember(Value = "secondChargebackCorrection")] + SecondChargebackCorrection = 34 } @@ -297,34 +345,34 @@ public enum TypeEnum [DataMember(Name = "type", EmitDefaultValue = false)] public TypeEnum? Type { get; set; } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected Transaction() { } + protected TransactionData() { } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Unique identifier of the account holder. (required). /// amount (required). /// Unique identifier of the balance account. (required). - /// Unique identifier of the balance platform. (required). - /// The date the transaction was booked to the balance account. (required). + /// The unique identifier of the balance platform. (required). + /// The date the transaction was booked into the balance account. (required). /// The category of the transaction indicating the type of activity. Possible values: * **platformPayment**: The transaction is a payment or payment modification made with an Adyen merchant account. * **internal**: The transaction resulted from an internal adjustment such as a deposit correction or invoice deduction. * **bank**: The transaction is a bank-related activity, such as sending a payout or receiving funds. * **issuedCard**: The transaction is a card-related activity, such as using an Adyen-issued card to pay online. . /// counterparty (required). /// The date the transaction was created. (required). /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. /// The `description` from the `/transfers` request.. - /// The PSP reference in the journal.. - /// Unique identifier of the transaction. (required). + /// The PSP reference of the transaction in the journal.. + /// The unique identifier of the transaction. (required). /// instructedAmount. - /// Unique identifier of the payment instrument that was used for the transaction.. + /// The unique identifier of the payment instrument that was used for the transaction.. /// The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference. (required). /// The reference sent to or received from the counterparty. * For outgoing funds, this is the [`referenceForBeneficiary`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__resParam_referenceForBeneficiary) from the [`/transfers`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_referenceForBeneficiary) request. * For incoming funds, this is the reference from the sender.. /// The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. (required). /// Unique identifier of the related transfer.. /// The type of the transaction. Possible values: **payment**, **capture**, **captureReversal**, **refund** **refundReversal**, **chargeback**, **chargebackReversal**, **secondChargeback**, **atmWithdrawal**, **atmWithdrawalReversal**, **internalTransfer**, **manualCorrection**, **invoiceDeduction**, **depositCorrection**, **bankTransfer**, **miscCost**, **paymentCost**, **fee**. /// The date the transfer amount becomes available in the balance account. (required). - public Transaction(string accountHolderId = default(string), Amount amount = default(Amount), string balanceAccountId = default(string), string balancePlatform = default(string), DateTime bookingDate = default(DateTime), CategoryEnum? category = default(CategoryEnum?), CounterpartyV3 counterparty = default(CounterpartyV3), DateTime createdAt = default(DateTime), DateTime creationDate = default(DateTime), string description = default(string), string eventId = default(string), string id = default(string), Amount instructedAmount = default(Amount), string paymentInstrumentId = default(string), string reference = default(string), string referenceForBeneficiary = default(string), StatusEnum status = default(StatusEnum), string transferId = default(string), TypeEnum? type = default(TypeEnum?), DateTime valueDate = default(DateTime)) + public TransactionData(string accountHolderId = default(string), Amount amount = default(Amount), string balanceAccountId = default(string), string balancePlatform = default(string), DateTime bookingDate = default(DateTime), CategoryEnum? category = default(CategoryEnum?), CounterpartyV3 counterparty = default(CounterpartyV3), DateTime createdAt = default(DateTime), DateTime creationDate = default(DateTime), string description = default(string), string eventId = default(string), string id = default(string), Amount instructedAmount = default(Amount), string paymentInstrumentId = default(string), string reference = default(string), string referenceForBeneficiary = default(string), StatusEnum status = default(StatusEnum), string transferId = default(string), TypeEnum? type = default(TypeEnum?), DateTime valueDate = default(DateTime)) { this.AccountHolderId = accountHolderId; this.Amount = amount; @@ -369,16 +417,16 @@ protected Transaction() { } public string BalanceAccountId { get; set; } /// - /// Unique identifier of the balance platform. + /// The unique identifier of the balance platform. /// - /// Unique identifier of the balance platform. + /// The unique identifier of the balance platform. [DataMember(Name = "balancePlatform", IsRequired = false, EmitDefaultValue = false)] public string BalancePlatform { get; set; } /// - /// The date the transaction was booked to the balance account. + /// The date the transaction was booked into the balance account. /// - /// The date the transaction was booked to the balance account. + /// The date the transaction was booked into the balance account. [DataMember(Name = "bookingDate", IsRequired = false, EmitDefaultValue = false)] public DateTime BookingDate { get; set; } @@ -410,16 +458,16 @@ protected Transaction() { } public string Description { get; set; } /// - /// The PSP reference in the journal. + /// The PSP reference of the transaction in the journal. /// - /// The PSP reference in the journal. + /// The PSP reference of the transaction in the journal. [DataMember(Name = "eventId", EmitDefaultValue = false)] public string EventId { get; set; } /// - /// Unique identifier of the transaction. + /// The unique identifier of the transaction. /// - /// Unique identifier of the transaction. + /// The unique identifier of the transaction. [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] public string Id { get; set; } @@ -430,9 +478,9 @@ protected Transaction() { } public Amount InstructedAmount { get; set; } /// - /// Unique identifier of the payment instrument that was used for the transaction. + /// The unique identifier of the payment instrument that was used for the transaction. /// - /// Unique identifier of the payment instrument that was used for the transaction. + /// The unique identifier of the payment instrument that was used for the transaction. [DataMember(Name = "paymentInstrumentId", EmitDefaultValue = false)] public string PaymentInstrumentId { get; set; } @@ -471,7 +519,7 @@ protected Transaction() { } public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class Transaction {\n"); + sb.Append("class TransactionData {\n"); sb.Append(" AccountHolderId: ").Append(AccountHolderId).Append("\n"); sb.Append(" Amount: ").Append(Amount).Append("\n"); sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); @@ -512,15 +560,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as Transaction); + return this.Equals(input as TransactionData); } /// - /// Returns true if Transaction instances are equal + /// Returns true if TransactionData instances are equal /// - /// Instance of Transaction to be compared + /// Instance of TransactionData to be compared /// Boolean - public bool Equals(Transaction input) + public bool Equals(TransactionData input) { if (input == null) { diff --git a/Adyen/Model/Transfers/TransactionSearchResponse.cs b/Adyen/Model/Transfers/TransactionSearchResponse.cs index b7c9be341..ce7cdef76 100644 --- a/Adyen/Model/Transfers/TransactionSearchResponse.cs +++ b/Adyen/Model/Transfers/TransactionSearchResponse.cs @@ -37,7 +37,7 @@ public partial class TransactionSearchResponse : IEquatable /// links. /// Contains the transactions that match the query parameters.. - public TransactionSearchResponse(Links links = default(Links), List data = default(List)) + public TransactionSearchResponse(Links links = default(Links), List data = default(List)) { this.Links = links; this.Data = data; @@ -54,7 +54,7 @@ public partial class TransactionSearchResponse : IEquatable /// Contains the transactions that match the query parameters. [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } + public List Data { get; set; } /// /// Returns the string presentation of the object diff --git a/Adyen/Model/Transfers/Transfer.cs b/Adyen/Model/Transfers/Transfer.cs index 5e9ebb039..0f7ce4c72 100644 --- a/Adyen/Model/Transfers/Transfer.cs +++ b/Adyen/Model/Transfers/Transfer.cs @@ -33,9 +33,9 @@ namespace Adyen.Model.Transfers public partial class Transfer : IEquatable, IValidatableObject { /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + /// The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + /// The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. [JsonConverter(typeof(StringEnumConverter))] public enum CategoryEnum { @@ -67,9 +67,9 @@ public enum CategoryEnum /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + /// The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + /// The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. [DataMember(Name = "category", IsRequired = false, EmitDefaultValue = false)] public CategoryEnum Category { get; set; } /// @@ -101,9 +101,9 @@ public enum DirectionEnum [DataMember(Name = "direction", EmitDefaultValue = false)] public DirectionEnum? Direction { get; set; } /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field. /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field. [JsonConverter(typeof(StringEnumConverter))] public enum PriorityEnum { @@ -153,9 +153,9 @@ public enum PriorityEnum /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field. /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field. [DataMember(Name = "priority", EmitDefaultValue = false)] public PriorityEnum? Priority { get; set; } /// @@ -177,71 +177,89 @@ public enum ReasonEnum [EnumMember(Value = "approved")] Approved = 2, + /// + /// Enum BalanceAccountTemporarilyBlockedByTransactionRule for value: balanceAccountTemporarilyBlockedByTransactionRule + /// + [EnumMember(Value = "balanceAccountTemporarilyBlockedByTransactionRule")] + BalanceAccountTemporarilyBlockedByTransactionRule = 3, + /// /// Enum CounterpartyAccountBlocked for value: counterpartyAccountBlocked /// [EnumMember(Value = "counterpartyAccountBlocked")] - CounterpartyAccountBlocked = 3, + CounterpartyAccountBlocked = 4, /// /// Enum CounterpartyAccountClosed for value: counterpartyAccountClosed /// [EnumMember(Value = "counterpartyAccountClosed")] - CounterpartyAccountClosed = 4, + CounterpartyAccountClosed = 5, /// /// Enum CounterpartyAccountNotFound for value: counterpartyAccountNotFound /// [EnumMember(Value = "counterpartyAccountNotFound")] - CounterpartyAccountNotFound = 5, + CounterpartyAccountNotFound = 6, /// /// Enum CounterpartyAddressRequired for value: counterpartyAddressRequired /// [EnumMember(Value = "counterpartyAddressRequired")] - CounterpartyAddressRequired = 6, + CounterpartyAddressRequired = 7, /// /// Enum CounterpartyBankTimedOut for value: counterpartyBankTimedOut /// [EnumMember(Value = "counterpartyBankTimedOut")] - CounterpartyBankTimedOut = 7, + CounterpartyBankTimedOut = 8, /// /// Enum CounterpartyBankUnavailable for value: counterpartyBankUnavailable /// [EnumMember(Value = "counterpartyBankUnavailable")] - CounterpartyBankUnavailable = 8, + CounterpartyBankUnavailable = 9, + + /// + /// Enum DeclinedByTransactionRule for value: declinedByTransactionRule + /// + [EnumMember(Value = "declinedByTransactionRule")] + DeclinedByTransactionRule = 10, /// /// Enum Error for value: error /// [EnumMember(Value = "error")] - Error = 9, + Error = 11, /// /// Enum NotEnoughBalance for value: notEnoughBalance /// [EnumMember(Value = "notEnoughBalance")] - NotEnoughBalance = 10, + NotEnoughBalance = 12, /// /// Enum RefusedByCounterpartyBank for value: refusedByCounterpartyBank /// [EnumMember(Value = "refusedByCounterpartyBank")] - RefusedByCounterpartyBank = 11, + RefusedByCounterpartyBank = 13, /// /// Enum RouteNotFound for value: routeNotFound /// [EnumMember(Value = "routeNotFound")] - RouteNotFound = 12, + RouteNotFound = 14, + + /// + /// Enum ScaFailed for value: scaFailed + /// + [EnumMember(Value = "scaFailed")] + ScaFailed = 15, /// /// Enum Unknown for value: unknown /// [EnumMember(Value = "unknown")] - Unknown = 13 + Unknown = 16 } @@ -553,119 +571,95 @@ public enum StatusEnum [EnumMember(Value = "miscCostPending")] MiscCostPending = 49, - /// - /// Enum OperationAuthorized for value: operationAuthorized - /// - [EnumMember(Value = "operationAuthorized")] - OperationAuthorized = 50, - - /// - /// Enum OperationBooked for value: operationBooked - /// - [EnumMember(Value = "operationBooked")] - OperationBooked = 51, - - /// - /// Enum OperationPending for value: operationPending - /// - [EnumMember(Value = "operationPending")] - OperationPending = 52, - - /// - /// Enum OperationReceived for value: operationReceived - /// - [EnumMember(Value = "operationReceived")] - OperationReceived = 53, - /// /// Enum PaymentCost for value: paymentCost /// [EnumMember(Value = "paymentCost")] - PaymentCost = 54, + PaymentCost = 50, /// /// Enum PaymentCostPending for value: paymentCostPending /// [EnumMember(Value = "paymentCostPending")] - PaymentCostPending = 55, + PaymentCostPending = 51, /// /// Enum Received for value: received /// [EnumMember(Value = "received")] - Received = 56, + Received = 52, /// /// Enum RefundPending for value: refundPending /// [EnumMember(Value = "refundPending")] - RefundPending = 57, + RefundPending = 53, /// /// Enum RefundReversalPending for value: refundReversalPending /// [EnumMember(Value = "refundReversalPending")] - RefundReversalPending = 58, + RefundReversalPending = 54, /// /// Enum RefundReversed for value: refundReversed /// [EnumMember(Value = "refundReversed")] - RefundReversed = 59, + RefundReversed = 55, /// /// Enum Refunded for value: refunded /// [EnumMember(Value = "refunded")] - Refunded = 60, + Refunded = 56, /// /// Enum RefundedExternally for value: refundedExternally /// [EnumMember(Value = "refundedExternally")] - RefundedExternally = 61, + RefundedExternally = 57, /// /// Enum Refused for value: refused /// [EnumMember(Value = "refused")] - Refused = 62, + Refused = 58, /// /// Enum ReserveAdjustment for value: reserveAdjustment /// [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 63, + ReserveAdjustment = 59, /// /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending /// [EnumMember(Value = "reserveAdjustmentPending")] - ReserveAdjustmentPending = 64, + ReserveAdjustmentPending = 60, /// /// Enum Returned for value: returned /// [EnumMember(Value = "returned")] - Returned = 65, + Returned = 61, /// /// Enum SecondChargeback for value: secondChargeback /// [EnumMember(Value = "secondChargeback")] - SecondChargeback = 66, + SecondChargeback = 62, /// /// Enum SecondChargebackPending for value: secondChargebackPending /// [EnumMember(Value = "secondChargebackPending")] - SecondChargebackPending = 67, + SecondChargebackPending = 63, /// /// Enum Undefined for value: undefined /// [EnumMember(Value = "undefined")] - Undefined = 68 + Undefined = 64 } @@ -688,7 +682,7 @@ protected Transfer() { } /// amount (required). /// balanceAccount. /// The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id).. - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. (required). + /// The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. (required). /// counterparty (required). /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. /// Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?**. @@ -696,7 +690,7 @@ protected Transfer() { } /// The ID of the resource.. /// paymentInstrument. /// The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) used in the transfer.. - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN).. + /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field.. /// Additional information about the status of the transfer.. /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference.. /// A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others.. diff --git a/Adyen/Model/Transfers/TransferInfo.cs b/Adyen/Model/Transfers/TransferInfo.cs index 2312dfb11..aa386c516 100644 --- a/Adyen/Model/Transfers/TransferInfo.cs +++ b/Adyen/Model/Transfers/TransferInfo.cs @@ -149,20 +149,18 @@ protected TransferInfo() { } /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. (required). /// counterparty (required). /// Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?**. - /// The ID of the resource.. /// The unique identifier of the source [payment instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/paymentInstruments__resParam_id).. /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN).. /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference.. /// A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others.. /// ultimateParty. - public TransferInfo(Amount amount = default(Amount), string balanceAccountId = default(string), CategoryEnum category = default(CategoryEnum), CounterpartyInfoV3 counterparty = default(CounterpartyInfoV3), string description = default(string), string id = default(string), string paymentInstrumentId = default(string), PriorityEnum? priority = default(PriorityEnum?), string reference = default(string), string referenceForBeneficiary = default(string), UltimatePartyIdentification ultimateParty = default(UltimatePartyIdentification)) + public TransferInfo(Amount amount = default(Amount), string balanceAccountId = default(string), CategoryEnum category = default(CategoryEnum), CounterpartyInfoV3 counterparty = default(CounterpartyInfoV3), string description = default(string), string paymentInstrumentId = default(string), PriorityEnum? priority = default(PriorityEnum?), string reference = default(string), string referenceForBeneficiary = default(string), UltimatePartyIdentification ultimateParty = default(UltimatePartyIdentification)) { this.Amount = amount; this.Category = category; this.Counterparty = counterparty; this.BalanceAccountId = balanceAccountId; this.Description = description; - this.Id = id; this.PaymentInstrumentId = paymentInstrumentId; this.Priority = priority; this.Reference = reference; @@ -196,13 +194,6 @@ protected TransferInfo() { } [DataMember(Name = "description", EmitDefaultValue = false)] public string Description { get; set; } - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - /// /// The unique identifier of the source [payment instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/paymentInstruments__resParam_id). /// @@ -243,7 +234,6 @@ public override string ToString() sb.Append(" Category: ").Append(Category).Append("\n"); sb.Append(" Counterparty: ").Append(Counterparty).Append("\n"); sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" PaymentInstrumentId: ").Append(PaymentInstrumentId).Append("\n"); sb.Append(" Priority: ").Append(Priority).Append("\n"); sb.Append(" Reference: ").Append(Reference).Append("\n"); @@ -308,11 +298,6 @@ public bool Equals(TransferInfo input) (this.Description != null && this.Description.Equals(input.Description)) ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && ( this.PaymentInstrumentId == input.PaymentInstrumentId || (this.PaymentInstrumentId != null && @@ -365,10 +350,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Description.GetHashCode(); } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } if (this.PaymentInstrumentId != null) { hashCode = (hashCode * 59) + this.PaymentInstrumentId.GetHashCode();