diff --git a/Adyen/Model/BalancePlatform/AULocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/AULocalAccountIdentification.cs index c278244f4..4b44d0521 100644 --- a/Adyen/Model/BalancePlatform/AULocalAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/AULocalAccountIdentification.cs @@ -64,7 +64,7 @@ protected AULocalAccountIdentification() { } /// /// The bank account number, without separators or whitespace. (required). /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. (required). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **auLocal** (required) (default to TypeEnum.AuLocal). public AULocalAccountIdentification(string accountNumber = default(string), string bsbCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.AuLocal) { @@ -90,9 +90,9 @@ protected AULocalAccountIdentification() { } public string BsbCode { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.cs index d86ae0898..17b6fc453 100644 --- a/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.cs @@ -65,7 +65,7 @@ protected BRLocalAccountIdentification() { } /// The bank account number, without separators or whitespace. (required). /// The 3-digit bank code, with leading zeros. (required). /// The bank account branch number, without separators or whitespace. (required). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **brLocal** (required) (default to TypeEnum.BrLocal). public BRLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string branchNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.BrLocal) { @@ -99,9 +99,9 @@ protected BRLocalAccountIdentification() { } public string BranchNumber { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/CALocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/CALocalAccountIdentification.cs index 7720ff3cf..6540b05cb 100644 --- a/Adyen/Model/BalancePlatform/CALocalAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/CALocalAccountIdentification.cs @@ -92,7 +92,7 @@ protected CALocalAccountIdentification() { } /// /// The 5- to 12-digit bank account number, without separators or whitespace. (required). /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// The 3-digit institution number, without separators or whitespace. (required). /// The 5-digit transit number, without separators or whitespace. (required). /// **caLocal** (required) (default to TypeEnum.CaLocal). @@ -115,9 +115,9 @@ protected CALocalAccountIdentification() { } public string AccountNumber { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.cs index 4930259b7..30f70ba07 100644 --- a/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.cs @@ -64,7 +64,7 @@ protected CZLocalAccountIdentification() { } /// /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) (required). /// The 4-digit bank code (Kód banky), without separators or whitespace. (required). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **czLocal** (required) (default to TypeEnum.CzLocal). public CZLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.CzLocal) { @@ -90,9 +90,9 @@ protected CZLocalAccountIdentification() { } public string BankCode { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.cs index d58cca7e8..c18faf989 100644 --- a/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.cs @@ -64,7 +64,7 @@ protected DKLocalAccountIdentification() { } /// /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). (required). /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). (required). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **dkLocal** (required) (default to TypeEnum.DkLocal). public DKLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.DkLocal) { @@ -90,9 +90,9 @@ protected DKLocalAccountIdentification() { } public string BankCode { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.cs index c7243d21e..ff59d90f1 100644 --- a/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.cs @@ -64,7 +64,7 @@ protected HKLocalAccountIdentification() { } /// /// The 9- to 15-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). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **hkLocal** (required) (default to TypeEnum.HkLocal). public HKLocalAccountIdentification(string accountNumber = default(string), string clearingCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.HkLocal) { @@ -90,9 +90,9 @@ protected HKLocalAccountIdentification() { } public string ClearingCode { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/HULocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/HULocalAccountIdentification.cs index 1c4c32ba7..4935bf3bc 100644 --- a/Adyen/Model/BalancePlatform/HULocalAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/HULocalAccountIdentification.cs @@ -63,7 +63,7 @@ protected HULocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 24-digit bank account number, without separators or whitespace. (required). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **huLocal** (required) (default to TypeEnum.HuLocal). public HULocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.HuLocal) { @@ -81,9 +81,9 @@ protected HULocalAccountIdentification() { } public string AccountNumber { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/IbanAccountIdentification.cs b/Adyen/Model/BalancePlatform/IbanAccountIdentification.cs index 34a1c630f..252eca3b1 100644 --- a/Adyen/Model/BalancePlatform/IbanAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/IbanAccountIdentification.cs @@ -62,7 +62,7 @@ protected IbanAccountIdentification() { } /// /// Initializes a new instance of the class. /// - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. (required). /// **iban** (required) (default to TypeEnum.Iban). public IbanAccountIdentification(string formFactor = "physical", string iban = default(string), TypeEnum type = TypeEnum.Iban) @@ -74,9 +74,9 @@ protected IbanAccountIdentification() { } } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.cs index 45a1eea6d..53c682130 100644 --- a/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.cs @@ -63,7 +63,7 @@ protected NOLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 11-digit bank account number, without separators or whitespace. (required). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **noLocal** (required) (default to TypeEnum.NoLocal). public NOLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.NoLocal) { @@ -81,9 +81,9 @@ protected NOLocalAccountIdentification() { } public string AccountNumber { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.cs index 5b5a4de9f..2c6d910cb 100644 --- a/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.cs @@ -63,7 +63,7 @@ protected NZLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// 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). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **nzLocal** (required) (default to TypeEnum.NzLocal). public NZLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.NzLocal) { @@ -81,9 +81,9 @@ protected NZLocalAccountIdentification() { } public string AccountNumber { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.cs b/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.cs index b498a9b48..5df4114f2 100644 --- a/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.cs @@ -65,7 +65,7 @@ protected NumberAndBicAccountIdentification() { } /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. (required). /// additionalBankIdentification. /// The bank's 8- or 11-character BIC or SWIFT code. (required). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **numberAndBic** (required) (default to TypeEnum.NumberAndBic). public NumberAndBicAccountIdentification(string accountNumber = default(string), AdditionalBankIdentification additionalBankIdentification = default(AdditionalBankIdentification), string bic = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.NumberAndBic) { @@ -98,9 +98,9 @@ protected NumberAndBicAccountIdentification() { } public string Bic { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.cs index b7bbd6d8f..63e12561c 100644 --- a/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.cs @@ -63,7 +63,7 @@ protected PLLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. (required). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **plLocal** (required) (default to TypeEnum.PlLocal). public PLLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.PlLocal) { @@ -81,9 +81,9 @@ protected PLLocalAccountIdentification() { } public string AccountNumber { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/PaymentInstrument.cs b/Adyen/Model/BalancePlatform/PaymentInstrument.cs index 0443ad196..86c155f0a 100644 --- a/Adyen/Model/BalancePlatform/PaymentInstrument.cs +++ b/Adyen/Model/BalancePlatform/PaymentInstrument.cs @@ -178,6 +178,7 @@ protected PaymentInstrument() { } /// /// Initializes a new instance of the class. /// + /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**.. /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. (required). /// bankAccount. /// card. @@ -189,12 +190,13 @@ protected PaymentInstrument() { } /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. . /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.. /// Type of payment instrument. Possible value: **card**, **bankAccount**. (required). - public PaymentInstrument(string balanceAccountId = default(string), PaymentInstrumentBankAccount bankAccount = default(PaymentInstrumentBankAccount), Card card = default(Card), string description = default(string), string id = default(string), string issuingCountryCode = default(string), string paymentInstrumentGroupId = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), StatusReasonEnum? statusReason = default(StatusReasonEnum?), TypeEnum type = default(TypeEnum)) + public PaymentInstrument(List additionalBankAccountIdentifications = default(List), string balanceAccountId = default(string), PaymentInstrumentBankAccount bankAccount = default(PaymentInstrumentBankAccount), Card card = default(Card), string description = default(string), string id = default(string), string issuingCountryCode = default(string), string paymentInstrumentGroupId = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), StatusReasonEnum? statusReason = default(StatusReasonEnum?), TypeEnum type = default(TypeEnum)) { this.BalanceAccountId = balanceAccountId; this.Id = id; this.IssuingCountryCode = issuingCountryCode; this.Type = type; + this.AdditionalBankAccountIdentifications = additionalBankAccountIdentifications; this.BankAccount = bankAccount; this.Card = card; this.Description = description; @@ -204,6 +206,13 @@ protected PaymentInstrument() { } this.StatusReason = statusReason; } + /// + /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. + /// + /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. + [DataMember(Name = "additionalBankAccountIdentifications", EmitDefaultValue = false)] + public List AdditionalBankAccountIdentifications { get; set; } + /// /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. /// @@ -266,6 +275,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class PaymentInstrument {\n"); + sb.Append(" AdditionalBankAccountIdentifications: ").Append(AdditionalBankAccountIdentifications).Append("\n"); sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); sb.Append(" Card: ").Append(Card).Append("\n"); @@ -312,6 +322,12 @@ public bool Equals(PaymentInstrument input) return false; } return + ( + this.AdditionalBankAccountIdentifications == input.AdditionalBankAccountIdentifications || + this.AdditionalBankAccountIdentifications != null && + input.AdditionalBankAccountIdentifications != null && + this.AdditionalBankAccountIdentifications.SequenceEqual(input.AdditionalBankAccountIdentifications) + ) && ( this.BalanceAccountId == input.BalanceAccountId || (this.BalanceAccountId != null && @@ -375,6 +391,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (this.AdditionalBankAccountIdentifications != null) + { + hashCode = (hashCode * 59) + this.AdditionalBankAccountIdentifications.GetHashCode(); + } if (this.BalanceAccountId != null) { hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); diff --git a/Adyen/Model/BalancePlatform/PaymentInstrumentAdditionalBankAccountIdentificationsInner.cs b/Adyen/Model/BalancePlatform/PaymentInstrumentAdditionalBankAccountIdentificationsInner.cs new file mode 100644 index 000000000..bdb9cd5f1 --- /dev/null +++ b/Adyen/Model/BalancePlatform/PaymentInstrumentAdditionalBankAccountIdentificationsInner.cs @@ -0,0 +1,248 @@ +/* +* Configuration API +* +* +* The version of the OpenAPI document: 2 +* +* 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.BalancePlatform +{ + /// + /// PaymentInstrumentAdditionalBankAccountIdentificationsInner + /// + [JsonConverter(typeof(PaymentInstrumentAdditionalBankAccountIdentificationsInnerJsonConverter))] + [DataContract(Name = "PaymentInstrument_additionalBankAccountIdentifications_inner")] + public partial class PaymentInstrumentAdditionalBankAccountIdentificationsInner : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of IbanAccountIdentification. + public PaymentInstrumentAdditionalBankAccountIdentificationsInner(IbanAccountIdentification 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(IbanAccountIdentification)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: IbanAccountIdentification"); + } + } + } + + /// + /// Get the actual instance of `IbanAccountIdentification`. If the actual instance is not `IbanAccountIdentification`, + /// the InvalidClassException will be thrown + /// + /// An instance of IbanAccountIdentification + public IbanAccountIdentification GetIbanAccountIdentification() + { + return (IbanAccountIdentification)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 PaymentInstrumentAdditionalBankAccountIdentificationsInner {\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, PaymentInstrumentAdditionalBankAccountIdentificationsInner.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of PaymentInstrumentAdditionalBankAccountIdentificationsInner + /// + /// JSON string + /// An instance of PaymentInstrumentAdditionalBankAccountIdentificationsInner + public static PaymentInstrumentAdditionalBankAccountIdentificationsInner FromJson(string jsonString) + { + PaymentInstrumentAdditionalBankAccountIdentificationsInner newPaymentInstrumentAdditionalBankAccountIdentificationsInner = null; + + if (string.IsNullOrEmpty(jsonString)) + { + return newPaymentInstrumentAdditionalBankAccountIdentificationsInner; + } + 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 IbanAccountIdentification type enums + if (ContainsValue(type)) + { + newPaymentInstrumentAdditionalBankAccountIdentificationsInner = new PaymentInstrumentAdditionalBankAccountIdentificationsInner(JsonConvert.DeserializeObject(jsonString, PaymentInstrumentAdditionalBankAccountIdentificationsInner.SerializerSettings)); + matchedTypes.Add("IbanAccountIdentification"); + 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 newPaymentInstrumentAdditionalBankAccountIdentificationsInner; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PaymentInstrumentAdditionalBankAccountIdentificationsInner); + } + + /// + /// Returns true if PaymentInstrumentAdditionalBankAccountIdentificationsInner instances are equal + /// + /// Instance of PaymentInstrumentAdditionalBankAccountIdentificationsInner to be compared + /// Boolean + public bool Equals(PaymentInstrumentAdditionalBankAccountIdentificationsInner 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 PaymentInstrumentAdditionalBankAccountIdentificationsInner + /// + public class PaymentInstrumentAdditionalBankAccountIdentificationsInnerJsonConverter : 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(PaymentInstrumentAdditionalBankAccountIdentificationsInner).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 PaymentInstrumentAdditionalBankAccountIdentificationsInner.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/BalancePlatform/PaymentInstrumentBankAccount.cs b/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.cs index 4560c4858..cb35ce9e1 100644 --- a/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.cs +++ b/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.cs @@ -46,6 +46,18 @@ public PaymentInstrumentBankAccount(IbanAccountIdentification actualInstance) 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 UKLocalAccountIdentification. + public PaymentInstrumentBankAccount(UKLocalAccountIdentification 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 @@ -76,13 +88,17 @@ public override Object ActualInstance { this._actualInstance = value; } + else if (value.GetType() == typeof(UKLocalAccountIdentification)) + { + this._actualInstance = value; + } else if (value.GetType() == typeof(USLocalAccountIdentification)) { this._actualInstance = value; } else { - throw new ArgumentException("Invalid instance found. Must be the following types: IbanAccountIdentification, USLocalAccountIdentification"); + throw new ArgumentException("Invalid instance found. Must be the following types: IbanAccountIdentification, UKLocalAccountIdentification, USLocalAccountIdentification"); } } } @@ -97,6 +113,16 @@ public IbanAccountIdentification GetIbanAccountIdentification() return (IbanAccountIdentification)this.ActualInstance; } + /// + /// Get the actual instance of `UKLocalAccountIdentification`. If the actual instance is not `UKLocalAccountIdentification`, + /// the InvalidClassException will be thrown + /// + /// An instance of UKLocalAccountIdentification + public UKLocalAccountIdentification GetUKLocalAccountIdentification() + { + return (UKLocalAccountIdentification)this.ActualInstance; + } + /// /// Get the actual instance of `USLocalAccountIdentification`. If the actual instance is not `USLocalAccountIdentification`, /// the InvalidClassException will be thrown @@ -160,6 +186,13 @@ public static PaymentInstrumentBankAccount FromJson(string jsonString) matchedTypes.Add("IbanAccountIdentification"); match++; } + // Check if the jsonString type enum matches the UKLocalAccountIdentification type enums + if (ContainsValue(type)) + { + newPaymentInstrumentBankAccount = new PaymentInstrumentBankAccount(JsonConvert.DeserializeObject(jsonString, PaymentInstrumentBankAccount.SerializerSettings)); + matchedTypes.Add("UKLocalAccountIdentification"); + match++; + } // Check if the jsonString type enum matches the USLocalAccountIdentification type enums if (ContainsValue(type)) { diff --git a/Adyen/Model/BalancePlatform/SELocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/SELocalAccountIdentification.cs index de1d9edda..4ac0febe7 100644 --- a/Adyen/Model/BalancePlatform/SELocalAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/SELocalAccountIdentification.cs @@ -64,7 +64,7 @@ protected SELocalAccountIdentification() { } /// /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. (required). /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. (required). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **seLocal** (required) (default to TypeEnum.SeLocal). public SELocalAccountIdentification(string accountNumber = default(string), string clearingNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.SeLocal) { @@ -90,9 +90,9 @@ protected SELocalAccountIdentification() { } public string ClearingNumber { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.cs index 59496905a..86b96c622 100644 --- a/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.cs @@ -64,7 +64,7 @@ protected SGLocalAccountIdentification() { } /// /// The 4- to 19-digit bank account number, without separators or whitespace. (required). /// The bank's 8- or 11-character BIC or SWIFT code. (required). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **sgLocal** (default to TypeEnum.SgLocal). public SGLocalAccountIdentification(string accountNumber = default(string), string bic = default(string), string formFactor = "physical", TypeEnum? type = TypeEnum.SgLocal) { @@ -90,9 +90,9 @@ protected SGLocalAccountIdentification() { } public string Bic { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.cs index acbdbeaad..516e42afb 100644 --- a/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.cs @@ -63,7 +63,7 @@ protected UKLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 8-digit bank account number, without separators or whitespace. (required). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. (required). /// **ukLocal** (required) (default to TypeEnum.UkLocal). public UKLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", string sortCode = default(string), TypeEnum type = TypeEnum.UkLocal) @@ -83,9 +83,9 @@ protected UKLocalAccountIdentification() { } public string AccountNumber { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/USLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/USLocalAccountIdentification.cs index d70e0ed9c..7f07d84e0 100644 --- a/Adyen/Model/BalancePlatform/USLocalAccountIdentification.cs +++ b/Adyen/Model/BalancePlatform/USLocalAccountIdentification.cs @@ -92,7 +92,7 @@ protected USLocalAccountIdentification() { } /// /// The bank account number, without separators or whitespace. (required). /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. (required). /// **usLocal** (required) (default to TypeEnum.UsLocal). public USLocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string formFactor = "physical", string routingNumber = default(string), TypeEnum type = TypeEnum.UsLocal) @@ -113,9 +113,9 @@ protected USLocalAccountIdentification() { } public string AccountNumber { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.cs b/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.cs index 6fc165459..0162d24b5 100644 --- a/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.cs +++ b/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.cs @@ -178,6 +178,7 @@ protected UpdatePaymentInstrument() { } /// /// Initializes a new instance of the class. /// + /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**.. /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. (required). /// bankAccount. /// card. @@ -190,12 +191,13 @@ protected UpdatePaymentInstrument() { } /// Comment for the status of the payment instrument. Required if `statusReason` is **other**.. /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.. /// Type of payment instrument. Possible value: **card**, **bankAccount**. (required). - public UpdatePaymentInstrument(string balanceAccountId = default(string), PaymentInstrumentBankAccount bankAccount = default(PaymentInstrumentBankAccount), Card card = default(Card), string description = default(string), string id = default(string), string issuingCountryCode = default(string), string paymentInstrumentGroupId = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), string statusComment = default(string), StatusReasonEnum? statusReason = default(StatusReasonEnum?), TypeEnum type = default(TypeEnum)) + public UpdatePaymentInstrument(List additionalBankAccountIdentifications = default(List), string balanceAccountId = default(string), PaymentInstrumentBankAccount bankAccount = default(PaymentInstrumentBankAccount), Card card = default(Card), string description = default(string), string id = default(string), string issuingCountryCode = default(string), string paymentInstrumentGroupId = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), string statusComment = default(string), StatusReasonEnum? statusReason = default(StatusReasonEnum?), TypeEnum type = default(TypeEnum)) { this.BalanceAccountId = balanceAccountId; this.Id = id; this.IssuingCountryCode = issuingCountryCode; this.Type = type; + this.AdditionalBankAccountIdentifications = additionalBankAccountIdentifications; this.BankAccount = bankAccount; this.Card = card; this.Description = description; @@ -206,6 +208,13 @@ protected UpdatePaymentInstrument() { } this.StatusReason = statusReason; } + /// + /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. + /// + /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. + [DataMember(Name = "additionalBankAccountIdentifications", EmitDefaultValue = false)] + public List AdditionalBankAccountIdentifications { get; set; } + /// /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. /// @@ -275,6 +284,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class UpdatePaymentInstrument {\n"); + sb.Append(" AdditionalBankAccountIdentifications: ").Append(AdditionalBankAccountIdentifications).Append("\n"); sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); sb.Append(" Card: ").Append(Card).Append("\n"); @@ -322,6 +332,12 @@ public bool Equals(UpdatePaymentInstrument input) return false; } return + ( + this.AdditionalBankAccountIdentifications == input.AdditionalBankAccountIdentifications || + this.AdditionalBankAccountIdentifications != null && + input.AdditionalBankAccountIdentifications != null && + this.AdditionalBankAccountIdentifications.SequenceEqual(input.AdditionalBankAccountIdentifications) + ) && ( this.BalanceAccountId == input.BalanceAccountId || (this.BalanceAccountId != null && @@ -390,6 +406,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (this.AdditionalBankAccountIdentifications != null) + { + hashCode = (hashCode * 59) + this.AdditionalBankAccountIdentifications.GetHashCode(); + } if (this.BalanceAccountId != null) { hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); diff --git a/Adyen/Model/Checkout/AchDetails.cs b/Adyen/Model/Checkout/AchDetails.cs index dea2209fb..7baed30f2 100644 --- a/Adyen/Model/Checkout/AchDetails.cs +++ b/Adyen/Model/Checkout/AchDetails.cs @@ -121,12 +121,7 @@ public enum TypeEnum /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected AchDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number (without separators). (required). + /// The bank account number (without separators).. /// The bank account type (checking, savings...).. /// The bank routing number of the account. The field value is `nil` in most cases.. /// The checkout attempt identifier.. @@ -154,7 +149,7 @@ protected AchDetails() { } /// The bank account number (without separators). /// /// The bank account number (without separators). - [DataMember(Name = "bankAccountNumber", IsRequired = false, EmitDefaultValue = false)] + [DataMember(Name = "bankAccountNumber", EmitDefaultValue = false)] public string BankAccountNumber { get; set; } /// diff --git a/Adyen/Model/Checkout/AncvDetails.cs b/Adyen/Model/Checkout/AncvDetails.cs new file mode 100644 index 000000000..a76033b4c --- /dev/null +++ b/Adyen/Model/Checkout/AncvDetails.cs @@ -0,0 +1,223 @@ +/* +* Adyen Checkout API +* +* +* The version of the OpenAPI document: 71 +* +* 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 +{ + /// + /// AncvDetails + /// + [DataContract(Name = "AncvDetails")] + public partial class AncvDetails : IEquatable, IValidatableObject + { + /// + /// **ancv** + /// + /// **ancv** + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + /// + /// Enum Ancv for value: ancv + /// + [EnumMember(Value = "ancv")] + Ancv = 1 + + } + + + /// + /// **ancv** + /// + /// **ancv** + [DataMember(Name = "type", EmitDefaultValue = false)] + public TypeEnum? Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// ANCV account identification (email or account number). + /// The checkout attempt identifier.. + /// This is the `recurringDetailReference` returned in the response when you created the token.. + /// This is the `recurringDetailReference` returned in the response when you created the token.. + /// **ancv**. + public AncvDetails(string beneficiaryId = default(string), string checkoutAttemptId = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = default(TypeEnum?)) + { + this.BeneficiaryId = beneficiaryId; + this.CheckoutAttemptId = checkoutAttemptId; + this.RecurringDetailReference = recurringDetailReference; + this.StoredPaymentMethodId = storedPaymentMethodId; + this.Type = type; + } + + /// + /// ANCV account identification (email or account number) + /// + /// ANCV account identification (email or account number) + [DataMember(Name = "beneficiaryId", EmitDefaultValue = false)] + public string BeneficiaryId { get; set; } + + /// + /// The checkout attempt identifier. + /// + /// The checkout attempt identifier. + [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] + public string CheckoutAttemptId { get; set; } + + /// + /// This is the `recurringDetailReference` returned in the response when you created the token. + /// + /// This is the `recurringDetailReference` returned in the response when you created the token. + [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] + [Obsolete] + public string RecurringDetailReference { get; set; } + + /// + /// This is the `recurringDetailReference` returned in the response when you created the token. + /// + /// This is the `recurringDetailReference` returned in the response when you created the token. + [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] + public string StoredPaymentMethodId { 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 AncvDetails {\n"); + sb.Append(" BeneficiaryId: ").Append(BeneficiaryId).Append("\n"); + sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); + sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); + sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).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 AncvDetails); + } + + /// + /// Returns true if AncvDetails instances are equal + /// + /// Instance of AncvDetails to be compared + /// Boolean + public bool Equals(AncvDetails input) + { + if (input == null) + { + return false; + } + return + ( + this.BeneficiaryId == input.BeneficiaryId || + (this.BeneficiaryId != null && + this.BeneficiaryId.Equals(input.BeneficiaryId)) + ) && + ( + this.CheckoutAttemptId == input.CheckoutAttemptId || + (this.CheckoutAttemptId != null && + this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) + ) && + ( + this.RecurringDetailReference == input.RecurringDetailReference || + (this.RecurringDetailReference != null && + this.RecurringDetailReference.Equals(input.RecurringDetailReference)) + ) && + ( + this.StoredPaymentMethodId == input.StoredPaymentMethodId || + (this.StoredPaymentMethodId != null && + this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) + ) && + ( + this.Type == input.Type || + 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.BeneficiaryId != null) + { + hashCode = (hashCode * 59) + this.BeneficiaryId.GetHashCode(); + } + if (this.CheckoutAttemptId != null) + { + hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); + } + if (this.RecurringDetailReference != null) + { + hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); + } + if (this.StoredPaymentMethodId != null) + { + hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + return hashCode; + } + } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // StoredPaymentMethodId (string) maxLength + if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); + } + + yield break; + } + } + +} diff --git a/Adyen/Model/Checkout/BillingAddress.cs b/Adyen/Model/Checkout/BillingAddress.cs index 16678445f..4b1e4119e 100644 --- a/Adyen/Model/Checkout/BillingAddress.cs +++ b/Adyen/Model/Checkout/BillingAddress.cs @@ -234,6 +234,12 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HouseNumberOrName, length must be less than 3000.", new [] { "HouseNumberOrName" }); } + // StateOrProvince (string) maxLength + if (this.StateOrProvince != null && this.StateOrProvince.Length > 1000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StateOrProvince, length must be less than 1000.", new [] { "StateOrProvince" }); + } + // Street (string) maxLength if (this.Street != null && this.Street.Length > 3000) { diff --git a/Adyen/Model/Checkout/CardDetails.cs b/Adyen/Model/Checkout/CardDetails.cs index daba6ca87..595d17f36 100644 --- a/Adyen/Model/Checkout/CardDetails.cs +++ b/Adyen/Model/Checkout/CardDetails.cs @@ -541,6 +541,12 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedSecurityCode, length must be less than 15000.", new [] { "EncryptedSecurityCode" }); } + // HolderName (string) maxLength + if (this.HolderName != null && this.HolderName.Length > 15000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HolderName, length must be less than 15000.", new [] { "HolderName" }); + } + // StoredPaymentMethodId (string) maxLength if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) { diff --git a/Adyen/Model/Checkout/CardDetailsRequest.cs b/Adyen/Model/Checkout/CardDetailsRequest.cs index 1ef2ca07a..462d6bd44 100644 --- a/Adyen/Model/Checkout/CardDetailsRequest.cs +++ b/Adyen/Model/Checkout/CardDetailsRequest.cs @@ -204,6 +204,12 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // EncryptedCardNumber (string) maxLength + if (this.EncryptedCardNumber != null && this.EncryptedCardNumber.Length > 15000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedCardNumber, length must be less than 15000.", new [] { "EncryptedCardNumber" }); + } + yield break; } } diff --git a/Adyen/Model/Checkout/CardDetailsResponse.cs b/Adyen/Model/Checkout/CardDetailsResponse.cs index 82022d740..72b0eb3c3 100644 --- a/Adyen/Model/Checkout/CardDetailsResponse.cs +++ b/Adyen/Model/Checkout/CardDetailsResponse.cs @@ -36,9 +36,11 @@ public partial class CardDetailsResponse : IEquatable, IVal /// Initializes a new instance of the class. /// /// The list of brands identified for the card.. - public CardDetailsResponse(List brands = default(List)) + /// The two-letter country code of the country where the card was issued.. + public CardDetailsResponse(List brands = default(List), string issuingCountryCode = default(string)) { this.Brands = brands; + this.IssuingCountryCode = issuingCountryCode; } /// @@ -48,6 +50,13 @@ public partial class CardDetailsResponse : IEquatable, IVal [DataMember(Name = "brands", EmitDefaultValue = false)] public List Brands { get; set; } + /// + /// The two-letter country code of the country where the card was issued. + /// + /// The two-letter country code of the country where the card was issued. + [DataMember(Name = "issuingCountryCode", EmitDefaultValue = false)] + public string IssuingCountryCode { get; set; } + /// /// Returns the string presentation of the object /// @@ -57,6 +66,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class CardDetailsResponse {\n"); sb.Append(" Brands: ").Append(Brands).Append("\n"); + sb.Append(" IssuingCountryCode: ").Append(IssuingCountryCode).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -97,6 +107,11 @@ public bool Equals(CardDetailsResponse input) this.Brands != null && input.Brands != null && this.Brands.SequenceEqual(input.Brands) + ) && + ( + this.IssuingCountryCode == input.IssuingCountryCode || + (this.IssuingCountryCode != null && + this.IssuingCountryCode.Equals(input.IssuingCountryCode)) ); } @@ -113,6 +128,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Brands.GetHashCode(); } + if (this.IssuingCountryCode != null) + { + hashCode = (hashCode * 59) + this.IssuingCountryCode.GetHashCode(); + } return hashCode; } } diff --git a/Adyen/Model/Checkout/CardDonations.cs b/Adyen/Model/Checkout/CardDonations.cs index 6cbb2d4d5..8bccbaf95 100644 --- a/Adyen/Model/Checkout/CardDonations.cs +++ b/Adyen/Model/Checkout/CardDonations.cs @@ -541,6 +541,12 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedSecurityCode, length must be less than 15000.", new [] { "EncryptedSecurityCode" }); } + // HolderName (string) maxLength + if (this.HolderName != null && this.HolderName.Length > 15000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HolderName, length must be less than 15000.", new [] { "HolderName" }); + } + // StoredPaymentMethodId (string) maxLength if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) { diff --git a/Adyen/Model/Checkout/CheckoutPaymentMethod.cs b/Adyen/Model/Checkout/CheckoutPaymentMethod.cs index f8c88f417..6b02788b3 100644 --- a/Adyen/Model/Checkout/CheckoutPaymentMethod.cs +++ b/Adyen/Model/Checkout/CheckoutPaymentMethod.cs @@ -70,6 +70,18 @@ public CheckoutPaymentMethod(AmazonPayDetails actualInstance) 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 AncvDetails. + public CheckoutPaymentMethod(AncvDetails 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 @@ -528,6 +540,10 @@ public override Object ActualInstance { this._actualInstance = value; } + else if (value.GetType() == typeof(AncvDetails)) + { + this._actualInstance = value; + } else if (value.GetType() == typeof(AndroidPayDetails)) { this._actualInstance = value; @@ -674,7 +690,7 @@ public override Object ActualInstance } 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"); + throw new ArgumentException("Invalid instance found. Must be the following types: AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, 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"); } } } @@ -709,6 +725,16 @@ public AmazonPayDetails GetAmazonPayDetails() return (AmazonPayDetails)this.ActualInstance; } + /// + /// Get the actual instance of `AncvDetails`. If the actual instance is not `AncvDetails`, + /// the InvalidClassException will be thrown + /// + /// An instance of AncvDetails + public AncvDetails GetAncvDetails() + { + return (AncvDetails)this.ActualInstance; + } + /// /// Get the actual instance of `AndroidPayDetails`. If the actual instance is not `AndroidPayDetails`, /// the InvalidClassException will be thrown @@ -1136,6 +1162,13 @@ public static CheckoutPaymentMethod FromJson(string jsonString) matchedTypes.Add("AmazonPayDetails"); match++; } + // Check if the jsonString type enum matches the AncvDetails type enums + if (ContainsValue(type)) + { + newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); + matchedTypes.Add("AncvDetails"); + match++; + } // Check if the jsonString type enum matches the AndroidPayDetails type enums if (ContainsValue(type)) { diff --git a/Adyen/Model/Checkout/CreateCheckoutSessionRequest.cs b/Adyen/Model/Checkout/CreateCheckoutSessionRequest.cs index 12782f194..28e97d29a 100644 --- a/Adyen/Model/Checkout/CreateCheckoutSessionRequest.cs +++ b/Adyen/Model/Checkout/CreateCheckoutSessionRequest.cs @@ -1298,6 +1298,12 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // ReturnUrl (string) maxLength + if (this.ReturnUrl != null && this.ReturnUrl.Length > 8000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReturnUrl, length must be less than 8000.", new [] { "ReturnUrl" }); + } + // ShopperReference (string) maxLength if (this.ShopperReference != null && this.ShopperReference.Length > 256) { diff --git a/Adyen/Model/Checkout/CreateCheckoutSessionResponse.cs b/Adyen/Model/Checkout/CreateCheckoutSessionResponse.cs index 7f3556fab..7d1de8726 100644 --- a/Adyen/Model/Checkout/CreateCheckoutSessionResponse.cs +++ b/Adyen/Model/Checkout/CreateCheckoutSessionResponse.cs @@ -1352,6 +1352,12 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // ReturnUrl (string) maxLength + if (this.ReturnUrl != null && this.ReturnUrl.Length > 8000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReturnUrl, length must be less than 8000.", new [] { "ReturnUrl" }); + } + // ShopperReference (string) maxLength if (this.ShopperReference != null && this.ShopperReference.Length > 256) { diff --git a/Adyen/Model/Checkout/DeliveryAddress.cs b/Adyen/Model/Checkout/DeliveryAddress.cs index f0042b765..06985b57d 100644 --- a/Adyen/Model/Checkout/DeliveryAddress.cs +++ b/Adyen/Model/Checkout/DeliveryAddress.cs @@ -270,6 +270,12 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HouseNumberOrName, length must be less than 3000.", new [] { "HouseNumberOrName" }); } + // StateOrProvince (string) maxLength + if (this.StateOrProvince != null && this.StateOrProvince.Length > 1000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StateOrProvince, length must be less than 1000.", new [] { "StateOrProvince" }); + } + // Street (string) maxLength if (this.Street != null && this.Street.Length > 3000) { diff --git a/Adyen/Model/Checkout/DonationPaymentRequest.cs b/Adyen/Model/Checkout/DonationPaymentRequest.cs index d16df72ff..1ea545a68 100644 --- a/Adyen/Model/Checkout/DonationPaymentRequest.cs +++ b/Adyen/Model/Checkout/DonationPaymentRequest.cs @@ -951,6 +951,12 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // CountryCode (string) maxLength + if (this.CountryCode != null && this.CountryCode.Length > 100) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CountryCode, length must be less than 100.", new [] { "CountryCode" }); + } + // DeviceFingerprint (string) maxLength if (this.DeviceFingerprint != null && this.DeviceFingerprint.Length > 5000) { @@ -969,6 +975,12 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReturnUrl, length must be less than 8000.", new [] { "ReturnUrl" }); } + // ShopperIP (string) maxLength + if (this.ShopperIP != null && this.ShopperIP.Length > 1000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperIP, length must be less than 1000.", new [] { "ShopperIP" }); + } + // ShopperReference (string) maxLength if (this.ShopperReference != null && this.ShopperReference.Length > 256) { diff --git a/Adyen/Model/Checkout/EncryptedOrderData.cs b/Adyen/Model/Checkout/EncryptedOrderData.cs index 885b4aa10..0f73d11a0 100644 --- a/Adyen/Model/Checkout/EncryptedOrderData.cs +++ b/Adyen/Model/Checkout/EncryptedOrderData.cs @@ -146,6 +146,12 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // OrderData (string) maxLength + if (this.OrderData != null && this.OrderData.Length > 5000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for OrderData, length must be less than 5000.", new [] { "OrderData" }); + } + yield break; } } diff --git a/Adyen/Model/Checkout/GooglePayDetails.cs b/Adyen/Model/Checkout/GooglePayDetails.cs index 95e183bf2..a3d43457f 100644 --- a/Adyen/Model/Checkout/GooglePayDetails.cs +++ b/Adyen/Model/Checkout/GooglePayDetails.cs @@ -270,6 +270,12 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // GooglePayToken (string) maxLength + if (this.GooglePayToken != null && this.GooglePayToken.Length > 10000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GooglePayToken, length must be less than 10000.", new [] { "GooglePayToken" }); + } + // StoredPaymentMethodId (string) maxLength if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) { diff --git a/Adyen/Model/Checkout/GooglePayDonations.cs b/Adyen/Model/Checkout/GooglePayDonations.cs index fe217cb19..0c25259b9 100644 --- a/Adyen/Model/Checkout/GooglePayDonations.cs +++ b/Adyen/Model/Checkout/GooglePayDonations.cs @@ -270,6 +270,12 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // GooglePayToken (string) maxLength + if (this.GooglePayToken != null && this.GooglePayToken.Length > 10000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GooglePayToken, length must be less than 10000.", new [] { "GooglePayToken" }); + } + // StoredPaymentMethodId (string) maxLength if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) { diff --git a/Adyen/Model/Checkout/LineItem.cs b/Adyen/Model/Checkout/LineItem.cs index cae877748..c773b3325 100644 --- a/Adyen/Model/Checkout/LineItem.cs +++ b/Adyen/Model/Checkout/LineItem.cs @@ -406,6 +406,12 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // Description (string) maxLength + if (this.Description != null && this.Description.Length > 10000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 10000.", new [] { "Description" }); + } + yield break; } } diff --git a/Adyen/Model/Checkout/Name.cs b/Adyen/Model/Checkout/Name.cs index c061ee3ba..0839df0a6 100644 --- a/Adyen/Model/Checkout/Name.cs +++ b/Adyen/Model/Checkout/Name.cs @@ -146,6 +146,18 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // FirstName (string) maxLength + if (this.FirstName != null && this.FirstName.Length > 80) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, length must be less than 80.", new [] { "FirstName" }); + } + + // LastName (string) maxLength + if (this.LastName != null && this.LastName.Length > 80) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, length must be less than 80.", new [] { "LastName" }); + } + yield break; } } diff --git a/Adyen/Model/Checkout/PayWithGoogleDetails.cs b/Adyen/Model/Checkout/PayWithGoogleDetails.cs index a28151fdd..5de521a16 100644 --- a/Adyen/Model/Checkout/PayWithGoogleDetails.cs +++ b/Adyen/Model/Checkout/PayWithGoogleDetails.cs @@ -251,6 +251,12 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // GooglePayToken (string) maxLength + if (this.GooglePayToken != null && this.GooglePayToken.Length > 5000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GooglePayToken, length must be less than 5000.", new [] { "GooglePayToken" }); + } + // StoredPaymentMethodId (string) maxLength if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) { diff --git a/Adyen/Model/Checkout/PayWithGoogleDonations.cs b/Adyen/Model/Checkout/PayWithGoogleDonations.cs index d9433d4fa..07802aa73 100644 --- a/Adyen/Model/Checkout/PayWithGoogleDonations.cs +++ b/Adyen/Model/Checkout/PayWithGoogleDonations.cs @@ -251,6 +251,12 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // GooglePayToken (string) maxLength + if (this.GooglePayToken != null && this.GooglePayToken.Length > 5000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GooglePayToken, length must be less than 5000.", new [] { "GooglePayToken" }); + } + // StoredPaymentMethodId (string) maxLength if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) { diff --git a/Adyen/Model/Checkout/PaymentCompletionDetails.cs b/Adyen/Model/Checkout/PaymentCompletionDetails.cs index cb251891e..a94093ea9 100644 --- a/Adyen/Model/Checkout/PaymentCompletionDetails.cs +++ b/Adyen/Model/Checkout/PaymentCompletionDetails.cs @@ -450,6 +450,12 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MD, length must be less than 20000.", new [] { "MD" }); } + // PaReq (string) maxLength + if (this.PaReq != null && this.PaReq.Length > 20000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PaReq, length must be less than 20000.", new [] { "PaReq" }); + } + // PaRes (string) maxLength if (this.PaRes != null && this.PaRes.Length > 20000) { diff --git a/Adyen/Model/Checkout/PaymentLinkRequest.cs b/Adyen/Model/Checkout/PaymentLinkRequest.cs index fac3f3bc8..030f5ff2d 100644 --- a/Adyen/Model/Checkout/PaymentLinkRequest.cs +++ b/Adyen/Model/Checkout/PaymentLinkRequest.cs @@ -892,6 +892,42 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // CountryCode (string) maxLength + if (this.CountryCode != null && this.CountryCode.Length > 100) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CountryCode, length must be less than 100.", new [] { "CountryCode" }); + } + + // Mcc (string) maxLength + if (this.Mcc != null && this.Mcc.Length > 16) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Mcc, length must be less than 16.", new [] { "Mcc" }); + } + + // MerchantOrderReference (string) maxLength + if (this.MerchantOrderReference != null && this.MerchantOrderReference.Length > 1000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MerchantOrderReference, length must be less than 1000.", new [] { "MerchantOrderReference" }); + } + + // ReturnUrl (string) maxLength + if (this.ReturnUrl != null && this.ReturnUrl.Length > 8000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReturnUrl, length must be less than 8000.", new [] { "ReturnUrl" }); + } + + // ShopperEmail (string) maxLength + if (this.ShopperEmail != null && this.ShopperEmail.Length > 500) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperEmail, length must be less than 500.", new [] { "ShopperEmail" }); + } + + // ShopperLocale (string) maxLength + if (this.ShopperLocale != null && this.ShopperLocale.Length > 32) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperLocale, length must be less than 32.", new [] { "ShopperLocale" }); + } + // ShopperReference (string) maxLength if (this.ShopperReference != null && this.ShopperReference.Length > 256) { @@ -904,6 +940,24 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be greater than 3.", new [] { "ShopperReference" }); } + // ShopperStatement (string) maxLength + if (this.ShopperStatement != null && this.ShopperStatement.Length > 10000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperStatement, length must be less than 10000.", new [] { "ShopperStatement" }); + } + + // SocialSecurityNumber (string) maxLength + if (this.SocialSecurityNumber != null && this.SocialSecurityNumber.Length > 32) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SocialSecurityNumber, length must be less than 32.", new [] { "SocialSecurityNumber" }); + } + + // TelephoneNumber (string) maxLength + if (this.TelephoneNumber != null && this.TelephoneNumber.Length > 32) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TelephoneNumber, length must be less than 32.", new [] { "TelephoneNumber" }); + } + yield break; } } diff --git a/Adyen/Model/Checkout/PaymentLinkResponse.cs b/Adyen/Model/Checkout/PaymentLinkResponse.cs index bf83287c7..b2f284de4 100644 --- a/Adyen/Model/Checkout/PaymentLinkResponse.cs +++ b/Adyen/Model/Checkout/PaymentLinkResponse.cs @@ -999,6 +999,42 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // CountryCode (string) maxLength + if (this.CountryCode != null && this.CountryCode.Length > 100) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CountryCode, length must be less than 100.", new [] { "CountryCode" }); + } + + // Mcc (string) maxLength + if (this.Mcc != null && this.Mcc.Length > 16) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Mcc, length must be less than 16.", new [] { "Mcc" }); + } + + // MerchantOrderReference (string) maxLength + if (this.MerchantOrderReference != null && this.MerchantOrderReference.Length > 1000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MerchantOrderReference, length must be less than 1000.", new [] { "MerchantOrderReference" }); + } + + // ReturnUrl (string) maxLength + if (this.ReturnUrl != null && this.ReturnUrl.Length > 8000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReturnUrl, length must be less than 8000.", new [] { "ReturnUrl" }); + } + + // ShopperEmail (string) maxLength + if (this.ShopperEmail != null && this.ShopperEmail.Length > 500) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperEmail, length must be less than 500.", new [] { "ShopperEmail" }); + } + + // ShopperLocale (string) maxLength + if (this.ShopperLocale != null && this.ShopperLocale.Length > 32) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperLocale, length must be less than 32.", new [] { "ShopperLocale" }); + } + // ShopperReference (string) maxLength if (this.ShopperReference != null && this.ShopperReference.Length > 256) { @@ -1011,6 +1047,24 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be greater than 3.", new [] { "ShopperReference" }); } + // ShopperStatement (string) maxLength + if (this.ShopperStatement != null && this.ShopperStatement.Length > 10000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperStatement, length must be less than 10000.", new [] { "ShopperStatement" }); + } + + // SocialSecurityNumber (string) maxLength + if (this.SocialSecurityNumber != null && this.SocialSecurityNumber.Length > 32) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SocialSecurityNumber, length must be less than 32.", new [] { "SocialSecurityNumber" }); + } + + // TelephoneNumber (string) maxLength + if (this.TelephoneNumber != null && this.TelephoneNumber.Length > 32) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TelephoneNumber, length must be less than 32.", new [] { "TelephoneNumber" }); + } + yield break; } } diff --git a/Adyen/Model/Checkout/PaymentRequest.cs b/Adyen/Model/Checkout/PaymentRequest.cs index 9750b7f8e..82bb90fef 100644 --- a/Adyen/Model/Checkout/PaymentRequest.cs +++ b/Adyen/Model/Checkout/PaymentRequest.cs @@ -1450,18 +1450,42 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // CheckoutAttemptId (string) maxLength + if (this.CheckoutAttemptId != null && this.CheckoutAttemptId.Length > 256) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CheckoutAttemptId, length must be less than 256.", new [] { "CheckoutAttemptId" }); + } + + // CountryCode (string) maxLength + if (this.CountryCode != null && this.CountryCode.Length > 100) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CountryCode, length must be less than 100.", new [] { "CountryCode" }); + } + // DeviceFingerprint (string) maxLength if (this.DeviceFingerprint != null && this.DeviceFingerprint.Length > 5000) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DeviceFingerprint, length must be less than 5000.", new [] { "DeviceFingerprint" }); } + // MerchantOrderReference (string) maxLength + if (this.MerchantOrderReference != null && this.MerchantOrderReference.Length > 1000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MerchantOrderReference, length must be less than 1000.", new [] { "MerchantOrderReference" }); + } + // Origin (string) maxLength if (this.Origin != null && this.Origin.Length > 80) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Origin, length must be less than 80.", new [] { "Origin" }); } + // ShopperIP (string) maxLength + if (this.ShopperIP != null && this.ShopperIP.Length > 1000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperIP, length must be less than 1000.", new [] { "ShopperIP" }); + } + // ShopperReference (string) maxLength if (this.ShopperReference != null && this.ShopperReference.Length > 256) { @@ -1474,6 +1498,12 @@ public override int GetHashCode() yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be greater than 3.", new [] { "ShopperReference" }); } + // ShopperStatement (string) maxLength + if (this.ShopperStatement != null && this.ShopperStatement.Length > 10000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperStatement, length must be less than 10000.", new [] { "ShopperStatement" }); + } + // Store (string) maxLength if (this.Store != null && this.Store.Length > 64) { diff --git a/Adyen/Model/Checkout/RiskData.cs b/Adyen/Model/Checkout/RiskData.cs index 31bb3222e..d24cacd18 100644 --- a/Adyen/Model/Checkout/RiskData.cs +++ b/Adyen/Model/Checkout/RiskData.cs @@ -176,6 +176,12 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // ClientData (string) maxLength + if (this.ClientData != null && this.ClientData.Length > 5000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClientData, length must be less than 5000.", new [] { "ClientData" }); + } + yield break; } } diff --git a/Adyen/Model/Checkout/SamsungPayDetails.cs b/Adyen/Model/Checkout/SamsungPayDetails.cs index f5a45d200..947f90d23 100644 --- a/Adyen/Model/Checkout/SamsungPayDetails.cs +++ b/Adyen/Model/Checkout/SamsungPayDetails.cs @@ -251,6 +251,12 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // SamsungPayToken (string) maxLength + if (this.SamsungPayToken != null && this.SamsungPayToken.Length > 10000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SamsungPayToken, length must be less than 10000.", new [] { "SamsungPayToken" }); + } + // StoredPaymentMethodId (string) maxLength if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) { diff --git a/Adyen/Model/Checkout/Split.cs b/Adyen/Model/Checkout/Split.cs index 78b801e49..3d769d47a 100644 --- a/Adyen/Model/Checkout/Split.cs +++ b/Adyen/Model/Checkout/Split.cs @@ -33,9 +33,9 @@ namespace Adyen.Model.Checkout public partial class Split : IEquatable, IValidatableObject { /// - /// The type of the split item. Possible values: * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): **BalanceAccount**, **Commission**, **Default**, **PaymentFee**, **Remainder**, **Surcharge**, **Tip**, **VAT**. + /// The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. /// - /// The type of the split item. Possible values: * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): **BalanceAccount**, **Commission**, **Default**, **PaymentFee**, **Remainder**, **Surcharge**, **Tip**, **VAT**. + /// The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { @@ -133,9 +133,9 @@ public enum TypeEnum /// - /// The type of the split item. Possible values: * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): **BalanceAccount**, **Commission**, **Default**, **PaymentFee**, **Remainder**, **Surcharge**, **Tip**, **VAT**. + /// The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. /// - /// The type of the split item. Possible values: * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): **BalanceAccount**, **Commission**, **Default**, **PaymentFee**, **Remainder**, **Surcharge**, **Tip**, **VAT**. + /// The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] public TypeEnum Type { get; set; } /// @@ -149,8 +149,8 @@ protected Split() { } /// The unique identifier of the account to which the split amount is booked. Required if `type` is **MarketPlace** or **BalanceAccount**. * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): The [`accountCode`](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccount#request-accountCode) of the account to which the split amount is booked. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): The [`balanceAccountId`](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/balanceAccounts/_id_#path-id) of the account to which the split amount is booked.. /// amount. /// Your description for the split item.. - /// Your unique reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports.. - /// The type of the split item. Possible values: * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): **BalanceAccount**, **Commission**, **Default**, **PaymentFee**, **Remainder**, **Surcharge**, **Tip**, **VAT**. (required). + /// Your unique reference for the part of the payment booked to the specified `account`. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports.. + /// The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. (required). public Split(string account = default(string), SplitAmount amount = default(SplitAmount), string description = default(string), string reference = default(string), TypeEnum type = default(TypeEnum)) { this.Type = type; @@ -181,9 +181,9 @@ protected Split() { } public string Description { get; set; } /// - /// Your unique reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. + /// Your unique reference for the part of the payment booked to the specified `account`. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. /// - /// Your unique reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. + /// Your unique reference for the part of the payment booked to the specified `account`. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. [DataMember(Name = "reference", EmitDefaultValue = false)] public string Reference { get; set; } diff --git a/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.cs b/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.cs index 7488b3f0f..7efadb14e 100644 --- a/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.cs +++ b/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.cs @@ -62,7 +62,7 @@ protected IbanAccountIdentification() { } /// /// Initializes a new instance of the class. /// - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. (required). /// **iban** (required) (default to TypeEnum.Iban). public IbanAccountIdentification(string formFactor = "physical", string iban = default(string), TypeEnum type = TypeEnum.Iban) @@ -74,9 +74,9 @@ protected IbanAccountIdentification() { } } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.cs b/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.cs index 57373e1b0..fc0b7c142 100644 --- a/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.cs +++ b/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.cs @@ -138,6 +138,7 @@ protected PaymentInstrument() { } /// /// Initializes a new instance of the class. /// + /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**.. /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. (required). /// bankAccount. /// card. @@ -148,12 +149,13 @@ protected PaymentInstrument() { } /// Your reference for the payment instrument, maximum 150 characters.. /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **Active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **Requested**. Possible values: * **Active**: The payment instrument is active and can be used to make payments. * **Requested**: The payment instrument has been requested. This state is applicable for physical cards. * **Inactive**: The payment instrument is inactive and cannot be used to make payments. * **Suspended**: The payment instrument is temporarily suspended and cannot be used to make payments. * **Closed**: The payment instrument is permanently closed. This action cannot be undone. * **Stolen** * **Lost** . /// Type of payment instrument. Possible value: **card**, **bankAccount**. (required). - public PaymentInstrument(string balanceAccountId = default(string), PaymentInstrumentBankAccount bankAccount = default(PaymentInstrumentBankAccount), Card card = default(Card), string description = default(string), string id = default(string), string issuingCountryCode = default(string), string paymentInstrumentGroupId = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), TypeEnum type = default(TypeEnum)) + public PaymentInstrument(List additionalBankAccountIdentifications = default(List), string balanceAccountId = default(string), PaymentInstrumentBankAccount bankAccount = default(PaymentInstrumentBankAccount), Card card = default(Card), string description = default(string), string id = default(string), string issuingCountryCode = default(string), string paymentInstrumentGroupId = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), TypeEnum type = default(TypeEnum)) { this.BalanceAccountId = balanceAccountId; this.Id = id; this.IssuingCountryCode = issuingCountryCode; this.Type = type; + this.AdditionalBankAccountIdentifications = additionalBankAccountIdentifications; this.BankAccount = bankAccount; this.Card = card; this.Description = description; @@ -162,6 +164,13 @@ protected PaymentInstrument() { } this.Status = status; } + /// + /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. + /// + /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. + [DataMember(Name = "additionalBankAccountIdentifications", EmitDefaultValue = false)] + public List AdditionalBankAccountIdentifications { get; set; } + /// /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. /// @@ -224,6 +233,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class PaymentInstrument {\n"); + sb.Append(" AdditionalBankAccountIdentifications: ").Append(AdditionalBankAccountIdentifications).Append("\n"); sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); sb.Append(" Card: ").Append(Card).Append("\n"); @@ -269,6 +279,12 @@ public bool Equals(PaymentInstrument input) return false; } return + ( + this.AdditionalBankAccountIdentifications == input.AdditionalBankAccountIdentifications || + this.AdditionalBankAccountIdentifications != null && + input.AdditionalBankAccountIdentifications != null && + this.AdditionalBankAccountIdentifications.SequenceEqual(input.AdditionalBankAccountIdentifications) + ) && ( this.BalanceAccountId == input.BalanceAccountId || (this.BalanceAccountId != null && @@ -328,6 +344,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (this.AdditionalBankAccountIdentifications != null) + { + hashCode = (hashCode * 59) + this.AdditionalBankAccountIdentifications.GetHashCode(); + } if (this.BalanceAccountId != null) { hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); diff --git a/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.cs b/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.cs new file mode 100644 index 000000000..093562c54 --- /dev/null +++ b/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.cs @@ -0,0 +1,248 @@ +/* +* Configuration webhooks +* +* +* The version of the OpenAPI document: 1 +* +* 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.ConfigurationWebhooks +{ + /// + /// PaymentInstrumentAdditionalBankAccountIdentificationsInner + /// + [JsonConverter(typeof(PaymentInstrumentAdditionalBankAccountIdentificationsInnerJsonConverter))] + [DataContract(Name = "PaymentInstrument_additionalBankAccountIdentifications_inner")] + public partial class PaymentInstrumentAdditionalBankAccountIdentificationsInner : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of IbanAccountIdentification. + public PaymentInstrumentAdditionalBankAccountIdentificationsInner(IbanAccountIdentification 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(IbanAccountIdentification)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: IbanAccountIdentification"); + } + } + } + + /// + /// Get the actual instance of `IbanAccountIdentification`. If the actual instance is not `IbanAccountIdentification`, + /// the InvalidClassException will be thrown + /// + /// An instance of IbanAccountIdentification + public IbanAccountIdentification GetIbanAccountIdentification() + { + return (IbanAccountIdentification)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 PaymentInstrumentAdditionalBankAccountIdentificationsInner {\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, PaymentInstrumentAdditionalBankAccountIdentificationsInner.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of PaymentInstrumentAdditionalBankAccountIdentificationsInner + /// + /// JSON string + /// An instance of PaymentInstrumentAdditionalBankAccountIdentificationsInner + public static PaymentInstrumentAdditionalBankAccountIdentificationsInner FromJson(string jsonString) + { + PaymentInstrumentAdditionalBankAccountIdentificationsInner newPaymentInstrumentAdditionalBankAccountIdentificationsInner = null; + + if (string.IsNullOrEmpty(jsonString)) + { + return newPaymentInstrumentAdditionalBankAccountIdentificationsInner; + } + 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 IbanAccountIdentification type enums + if (ContainsValue(type)) + { + newPaymentInstrumentAdditionalBankAccountIdentificationsInner = new PaymentInstrumentAdditionalBankAccountIdentificationsInner(JsonConvert.DeserializeObject(jsonString, PaymentInstrumentAdditionalBankAccountIdentificationsInner.SerializerSettings)); + matchedTypes.Add("IbanAccountIdentification"); + 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 newPaymentInstrumentAdditionalBankAccountIdentificationsInner; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PaymentInstrumentAdditionalBankAccountIdentificationsInner); + } + + /// + /// Returns true if PaymentInstrumentAdditionalBankAccountIdentificationsInner instances are equal + /// + /// Instance of PaymentInstrumentAdditionalBankAccountIdentificationsInner to be compared + /// Boolean + public bool Equals(PaymentInstrumentAdditionalBankAccountIdentificationsInner 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 PaymentInstrumentAdditionalBankAccountIdentificationsInner + /// + public class PaymentInstrumentAdditionalBankAccountIdentificationsInnerJsonConverter : 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(PaymentInstrumentAdditionalBankAccountIdentificationsInner).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 PaymentInstrumentAdditionalBankAccountIdentificationsInner.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/ConfigurationWebhooks/PaymentInstrumentBankAccount.cs b/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentBankAccount.cs index 09bd54cb0..2e21e6412 100644 --- a/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentBankAccount.cs +++ b/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentBankAccount.cs @@ -46,6 +46,18 @@ public PaymentInstrumentBankAccount(IbanAccountIdentification actualInstance) 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 UKLocalAccountIdentification. + public PaymentInstrumentBankAccount(UKLocalAccountIdentification 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 @@ -76,13 +88,17 @@ public override Object ActualInstance { this._actualInstance = value; } + else if (value.GetType() == typeof(UKLocalAccountIdentification)) + { + this._actualInstance = value; + } else if (value.GetType() == typeof(USLocalAccountIdentification)) { this._actualInstance = value; } else { - throw new ArgumentException("Invalid instance found. Must be the following types: IbanAccountIdentification, USLocalAccountIdentification"); + throw new ArgumentException("Invalid instance found. Must be the following types: IbanAccountIdentification, UKLocalAccountIdentification, USLocalAccountIdentification"); } } } @@ -97,6 +113,16 @@ public IbanAccountIdentification GetIbanAccountIdentification() return (IbanAccountIdentification)this.ActualInstance; } + /// + /// Get the actual instance of `UKLocalAccountIdentification`. If the actual instance is not `UKLocalAccountIdentification`, + /// the InvalidClassException will be thrown + /// + /// An instance of UKLocalAccountIdentification + public UKLocalAccountIdentification GetUKLocalAccountIdentification() + { + return (UKLocalAccountIdentification)this.ActualInstance; + } + /// /// Get the actual instance of `USLocalAccountIdentification`. If the actual instance is not `USLocalAccountIdentification`, /// the InvalidClassException will be thrown @@ -160,6 +186,13 @@ public static PaymentInstrumentBankAccount FromJson(string jsonString) matchedTypes.Add("IbanAccountIdentification"); match++; } + // Check if the jsonString type enum matches the UKLocalAccountIdentification type enums + if (ContainsValue(type)) + { + newPaymentInstrumentBankAccount = new PaymentInstrumentBankAccount(JsonConvert.DeserializeObject(jsonString, PaymentInstrumentBankAccount.SerializerSettings)); + matchedTypes.Add("UKLocalAccountIdentification"); + match++; + } // Check if the jsonString type enum matches the USLocalAccountIdentification type enums if (ContainsValue(type)) { diff --git a/Adyen/Model/ConfigurationWebhooks/UKLocalAccountIdentification.cs b/Adyen/Model/ConfigurationWebhooks/UKLocalAccountIdentification.cs new file mode 100644 index 000000000..23042b8cc --- /dev/null +++ b/Adyen/Model/ConfigurationWebhooks/UKLocalAccountIdentification.cs @@ -0,0 +1,227 @@ +/* +* Configuration webhooks +* +* +* The version of the OpenAPI document: 1 +* +* 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.ConfigurationWebhooks +{ + /// + /// UKLocalAccountIdentification + /// + [DataContract(Name = "UKLocalAccountIdentification")] + public partial class UKLocalAccountIdentification : IEquatable, IValidatableObject + { + /// + /// **ukLocal** + /// + /// **ukLocal** + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + /// + /// Enum UkLocal for value: ukLocal + /// + [EnumMember(Value = "ukLocal")] + UkLocal = 1 + + } + + + /// + /// **ukLocal** + /// + /// **ukLocal** + [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] + public TypeEnum Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected UKLocalAccountIdentification() { } + /// + /// Initializes a new instance of the class. + /// + /// The 8-digit bank account number, without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). + /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. (required). + /// **ukLocal** (required) (default to TypeEnum.UkLocal). + public UKLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", string sortCode = default(string), TypeEnum type = TypeEnum.UkLocal) + { + this.AccountNumber = accountNumber; + this.SortCode = sortCode; + this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; + } + + /// + /// The 8-digit bank account number, without separators or whitespace. + /// + /// The 8-digit bank account number, without separators or whitespace. + [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] + public string AccountNumber { get; set; } + + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + + /// + /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. + /// + /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. + [DataMember(Name = "sortCode", IsRequired = false, EmitDefaultValue = false)] + public string SortCode { 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 UKLocalAccountIdentification {\n"); + sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); + sb.Append(" SortCode: ").Append(SortCode).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 UKLocalAccountIdentification); + } + + /// + /// Returns true if UKLocalAccountIdentification instances are equal + /// + /// Instance of UKLocalAccountIdentification to be compared + /// Boolean + public bool Equals(UKLocalAccountIdentification input) + { + if (input == null) + { + return false; + } + return + ( + this.AccountNumber == input.AccountNumber || + (this.AccountNumber != null && + this.AccountNumber.Equals(input.AccountNumber)) + ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && + ( + this.SortCode == input.SortCode || + (this.SortCode != null && + this.SortCode.Equals(input.SortCode)) + ) && + ( + this.Type == input.Type || + 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.AccountNumber != null) + { + hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); + } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } + if (this.SortCode != null) + { + hashCode = (hashCode * 59) + this.SortCode.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + return hashCode; + } + } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + // AccountNumber (string) maxLength + if (this.AccountNumber != null && this.AccountNumber.Length > 8) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 8.", new [] { "AccountNumber" }); + } + + // AccountNumber (string) minLength + if (this.AccountNumber != null && this.AccountNumber.Length < 8) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 8.", new [] { "AccountNumber" }); + } + + // SortCode (string) maxLength + if (this.SortCode != null && this.SortCode.Length > 6) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SortCode, length must be less than 6.", new [] { "SortCode" }); + } + + // SortCode (string) minLength + if (this.SortCode != null && this.SortCode.Length < 6) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SortCode, length must be greater than 6.", new [] { "SortCode" }); + } + + yield break; + } + } + +} diff --git a/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.cs b/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.cs index c064ada97..5d26b9fdd 100644 --- a/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.cs +++ b/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.cs @@ -92,7 +92,7 @@ protected USLocalAccountIdentification() { } /// /// The bank account number, without separators or whitespace. (required). /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). - /// The form factor of bank account. (default to "physical"). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. (required). /// **usLocal** (required) (default to TypeEnum.UsLocal). public USLocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string formFactor = "physical", string routingNumber = default(string), TypeEnum type = TypeEnum.UsLocal) @@ -113,9 +113,9 @@ protected USLocalAccountIdentification() { } public string AccountNumber { get; set; } /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. /// - /// The form factor of bank account. + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. [DataMember(Name = "formFactor", EmitDefaultValue = false)] public string FormFactor { get; set; } diff --git a/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.cs index 892822d68..b27b9d12b 100644 --- a/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.cs +++ b/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.cs @@ -64,12 +64,15 @@ protected AULocalAccountIdentification() { } /// /// The bank account number, without separators or whitespace. (required). /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. (required). + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). /// **auLocal** (required) (default to TypeEnum.AuLocal). - public AULocalAccountIdentification(string accountNumber = default(string), string bsbCode = default(string), TypeEnum type = TypeEnum.AuLocal) + public AULocalAccountIdentification(string accountNumber = default(string), string bsbCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.AuLocal) { this.AccountNumber = accountNumber; this.BsbCode = bsbCode; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -86,6 +89,13 @@ protected AULocalAccountIdentification() { } [DataMember(Name = "bsbCode", IsRequired = false, EmitDefaultValue = false)] public string BsbCode { get; set; } + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class AULocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" BsbCode: ").Append(BsbCode).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(AULocalAccountIdentification input) (this.BsbCode != null && this.BsbCode.Equals(input.BsbCode)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.BsbCode.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.cs b/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.cs index 024a4d94a..19f8c9e5e 100644 --- a/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.cs +++ b/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.cs @@ -33,9 +33,9 @@ namespace Adyen.Model.LegalEntityManagement public partial class AcceptTermsOfServiceResponse : IEquatable, IValidatableObject { /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { @@ -79,15 +79,21 @@ public enum TypeEnum /// Enum AdyenIssuing for value: adyenIssuing /// [EnumMember(Value = "adyenIssuing")] - AdyenIssuing = 7 + AdyenIssuing = 7, + + /// + /// Enum AdyenPccr for value: adyenPccr + /// + [EnumMember(Value = "adyenPccr")] + AdyenPccr = 8 } /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** [DataMember(Name = "type", EmitDefaultValue = false)] public TypeEnum? Type { get; set; } /// @@ -98,7 +104,7 @@ public enum TypeEnum /// The IP address of the user that accepted the Terms of Service.. /// The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English.. /// The unique identifier of the Terms of Service document.. - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** . + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** . public AcceptTermsOfServiceResponse(string acceptedBy = default(string), string id = default(string), string ipAddress = default(string), string language = default(string), string termsOfServiceDocumentId = default(string), TypeEnum? type = default(TypeEnum?)) { this.AcceptedBy = acceptedBy; diff --git a/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.cs index 99feeeefc..6fa835b88 100644 --- a/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.cs +++ b/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.cs @@ -92,16 +92,19 @@ protected CALocalAccountIdentification() { } /// /// The 5- to 12-digit bank account number, without separators or whitespace. (required). /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). /// The 3-digit institution number, without separators or whitespace. (required). /// The 5-digit transit number, without separators or whitespace. (required). /// **caLocal** (required) (default to TypeEnum.CaLocal). - public CALocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string institutionNumber = default(string), string transitNumber = default(string), TypeEnum type = TypeEnum.CaLocal) + public CALocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string formFactor = "physical", string institutionNumber = default(string), string transitNumber = default(string), TypeEnum type = TypeEnum.CaLocal) { this.AccountNumber = accountNumber; this.InstitutionNumber = institutionNumber; this.TransitNumber = transitNumber; this.Type = type; this.AccountType = accountType; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -111,6 +114,13 @@ protected CALocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// The 3-digit institution number, without separators or whitespace. /// @@ -135,6 +145,7 @@ public override string ToString() sb.Append("class CALocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" AccountType: ").Append(AccountType).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" InstitutionNumber: ").Append(InstitutionNumber).Append("\n"); sb.Append(" TransitNumber: ").Append(TransitNumber).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); @@ -182,6 +193,11 @@ public bool Equals(CALocalAccountIdentification input) this.AccountType == input.AccountType || this.AccountType.Equals(input.AccountType) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.InstitutionNumber == input.InstitutionNumber || (this.InstitutionNumber != null && @@ -212,6 +228,10 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } if (this.InstitutionNumber != null) { hashCode = (hashCode * 59) + this.InstitutionNumber.GetHashCode(); diff --git a/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.cs index a5d2db692..43b0a2d4b 100644 --- a/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.cs +++ b/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.cs @@ -64,12 +64,15 @@ protected CZLocalAccountIdentification() { } /// /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) (required). /// The 4-digit bank code (Kód banky), without separators or whitespace. (required). + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). /// **czLocal** (required) (default to TypeEnum.CzLocal). - public CZLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.CzLocal) + public CZLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.CzLocal) { this.AccountNumber = accountNumber; this.BankCode = bankCode; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -86,6 +89,13 @@ protected CZLocalAccountIdentification() { } [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] public string BankCode { get; set; } + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class CZLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" BankCode: ").Append(BankCode).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(CZLocalAccountIdentification input) (this.BankCode != null && this.BankCode.Equals(input.BankCode)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.cs b/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.cs index 9ea91acad..fa7ec7c06 100644 --- a/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.cs +++ b/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.cs @@ -78,7 +78,13 @@ public enum TermsOfServiceTypesEnum /// Enum AdyenIssuing for value: adyenIssuing /// [EnumMember(Value = "adyenIssuing")] - AdyenIssuing = 7 + AdyenIssuing = 7, + + /// + /// Enum AdyenPccr for value: adyenPccr + /// + [EnumMember(Value = "adyenPccr")] + AdyenPccr = 8 } diff --git a/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.cs index fc77229d0..ada220761 100644 --- a/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.cs +++ b/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.cs @@ -64,12 +64,15 @@ protected DKLocalAccountIdentification() { } /// /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). (required). /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). (required). + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). /// **dkLocal** (required) (default to TypeEnum.DkLocal). - public DKLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.DkLocal) + public DKLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.DkLocal) { this.AccountNumber = accountNumber; this.BankCode = bankCode; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -86,6 +89,13 @@ protected DKLocalAccountIdentification() { } [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] public string BankCode { get; set; } + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class DKLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" BankCode: ").Append(BankCode).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(DKLocalAccountIdentification input) (this.BankCode != null && this.BankCode.Equals(input.BankCode)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/LegalEntityManagement/Document.cs b/Adyen/Model/LegalEntityManagement/Document.cs index 8e8a38a4e..946dbcc7f 100644 --- a/Adyen/Model/LegalEntityManagement/Document.cs +++ b/Adyen/Model/LegalEntityManagement/Document.cs @@ -33,9 +33,9 @@ namespace Adyen.Model.LegalEntityManagement public partial class Document : IEquatable, IValidatableObject { /// - /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). /// - /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { @@ -105,31 +105,55 @@ public enum TypeEnum [EnumMember(Value = "proofOfOrganizationTaxInfo")] ProofOfOrganizationTaxInfo = 11, + /// + /// Enum ProofOfIndividualTaxId for value: proofOfIndividualTaxId + /// + [EnumMember(Value = "proofOfIndividualTaxId")] + ProofOfIndividualTaxId = 12, + + /// + /// Enum ProofOfOwnership for value: proofOfOwnership + /// + [EnumMember(Value = "proofOfOwnership")] + ProofOfOwnership = 13, + + /// + /// Enum ProofOfSignatory for value: proofOfSignatory + /// + [EnumMember(Value = "proofOfSignatory")] + ProofOfSignatory = 14, + + /// + /// Enum LiveSelfie for value: liveSelfie + /// + [EnumMember(Value = "liveSelfie")] + LiveSelfie = 15, + /// /// Enum ProofOfIndustry for value: proofOfIndustry /// [EnumMember(Value = "proofOfIndustry")] - ProofOfIndustry = 12, + ProofOfIndustry = 16, /// /// Enum ConstitutionalDocument for value: constitutionalDocument /// [EnumMember(Value = "constitutionalDocument")] - ConstitutionalDocument = 13, + ConstitutionalDocument = 17, /// /// Enum ProofOfFundingOrWealthSource for value: proofOfFundingOrWealthSource /// [EnumMember(Value = "proofOfFundingOrWealthSource")] - ProofOfFundingOrWealthSource = 14 + ProofOfFundingOrWealthSource = 18 } /// - /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). /// - /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] public TypeEnum Type { get; set; } /// @@ -149,7 +173,7 @@ protected Document() { } /// The state or province where the document was issued (AU only).. /// The number in the document.. /// owner. - /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). (required). + /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). (required). public Document(Attachment attachment = default(Attachment), List attachments = default(List), string description = default(string), string expiryDate = default(string), string fileName = default(string), string issuerCountry = default(string), string issuerState = default(string), string number = default(string), OwnerEntity owner = default(OwnerEntity), TypeEnum type = default(TypeEnum)) { this.Description = description; diff --git a/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.cs b/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.cs index 14c7ea788..ea5636355 100644 --- a/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.cs +++ b/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.cs @@ -33,9 +33,9 @@ namespace Adyen.Model.LegalEntityManagement public partial class GetTermsOfServiceDocumentRequest : IEquatable, IValidatableObject { /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { @@ -79,15 +79,21 @@ public enum TypeEnum /// Enum AdyenIssuing for value: adyenIssuing /// [EnumMember(Value = "adyenIssuing")] - AdyenIssuing = 7 + AdyenIssuing = 7, + + /// + /// Enum AdyenPccr for value: adyenPccr + /// + [EnumMember(Value = "adyenPccr")] + AdyenPccr = 8 } /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] public TypeEnum Type { get; set; } /// @@ -99,7 +105,7 @@ protected GetTermsOfServiceDocumentRequest() { } /// Initializes a new instance of the class. /// /// The language to be used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English. (required). - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** (required). + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** (required). public GetTermsOfServiceDocumentRequest(string language = default(string), TypeEnum type = default(TypeEnum)) { this.Language = language; diff --git a/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.cs b/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.cs index 167d89dc0..5ad27f010 100644 --- a/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.cs +++ b/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.cs @@ -33,9 +33,9 @@ namespace Adyen.Model.LegalEntityManagement public partial class GetTermsOfServiceDocumentResponse : IEquatable, IValidatableObject { /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { @@ -79,15 +79,21 @@ public enum TypeEnum /// Enum AdyenIssuing for value: adyenIssuing /// [EnumMember(Value = "adyenIssuing")] - AdyenIssuing = 7 + AdyenIssuing = 7, + + /// + /// Enum AdyenPccr for value: adyenPccr + /// + [EnumMember(Value = "adyenPccr")] + AdyenPccr = 8 } /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** [DataMember(Name = "type", EmitDefaultValue = false)] public TypeEnum? Type { get; set; } /// @@ -97,7 +103,7 @@ public enum TypeEnum /// The unique identifier of the legal entity.. /// The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English.. /// The unique identifier of the Terms of Service document.. - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** . + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** . public GetTermsOfServiceDocumentResponse(byte[] document = default(byte[]), string id = default(string), string language = default(string), string termsOfServiceDocumentId = default(string), TypeEnum? type = default(TypeEnum?)) { this.Document = document; diff --git a/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.cs index 4324ce6b5..9ca18f8dd 100644 --- a/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.cs +++ b/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.cs @@ -64,12 +64,15 @@ protected HKLocalAccountIdentification() { } /// /// The 9- to 15-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). + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). /// **hkLocal** (required) (default to TypeEnum.HkLocal). - public HKLocalAccountIdentification(string accountNumber = default(string), string clearingCode = default(string), TypeEnum type = TypeEnum.HkLocal) + public HKLocalAccountIdentification(string accountNumber = default(string), string clearingCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.HkLocal) { this.AccountNumber = accountNumber; this.ClearingCode = clearingCode; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -86,6 +89,13 @@ protected HKLocalAccountIdentification() { } [DataMember(Name = "clearingCode", IsRequired = false, EmitDefaultValue = false)] public string ClearingCode { get; set; } + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class HKLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" ClearingCode: ").Append(ClearingCode).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(HKLocalAccountIdentification input) (this.ClearingCode != null && this.ClearingCode.Equals(input.ClearingCode)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ClearingCode.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.cs index b2b97842b..89baed95c 100644 --- a/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.cs +++ b/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.cs @@ -63,11 +63,14 @@ protected HULocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 24-digit bank account number, without separators or whitespace. (required). + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). /// **huLocal** (required) (default to TypeEnum.HuLocal). - public HULocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.HuLocal) + public HULocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.HuLocal) { this.AccountNumber = accountNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -77,6 +80,13 @@ protected HULocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -86,6 +96,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class HULocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -127,6 +138,11 @@ public bool Equals(HULocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -146,6 +162,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.cs index 82520ac4b..a89cd801a 100644 --- a/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.cs +++ b/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.cs @@ -62,14 +62,24 @@ protected IbanAccountIdentification() { } /// /// Initializes a new instance of the class. /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. (required). /// **iban** (required) (default to TypeEnum.Iban). - public IbanAccountIdentification(string iban = default(string), TypeEnum type = TypeEnum.Iban) + public IbanAccountIdentification(string formFactor = "physical", string iban = default(string), TypeEnum type = TypeEnum.Iban) { this.Iban = iban; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. /// @@ -85,6 +95,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class IbanAccountIdentification {\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Iban: ").Append(Iban).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); @@ -122,6 +133,11 @@ public bool Equals(IbanAccountIdentification input) return false; } return + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Iban == input.Iban || (this.Iban != null && @@ -142,6 +158,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } if (this.Iban != null) { hashCode = (hashCode * 59) + this.Iban.GetHashCode(); diff --git a/Adyen/Model/LegalEntityManagement/LegalEntity.cs b/Adyen/Model/LegalEntityManagement/LegalEntity.cs index a88bd60dc..90577aef1 100644 --- a/Adyen/Model/LegalEntityManagement/LegalEntity.cs +++ b/Adyen/Model/LegalEntityManagement/LegalEntity.cs @@ -96,9 +96,8 @@ protected LegalEntity() { } /// soleProprietorship. /// trust. /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**.. - /// unincorporatedPartnership. /// A key-value pair that specifies the [verification process](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details/) for a legal entity. Set to **upfront** for [upfront verification](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details#upfront).. - public LegalEntity(List documentDetails = default(List), List documents = default(List), List entityAssociations = default(List), Individual individual = default(Individual), Organization organization = default(Organization), List problems = default(List), string reference = default(string), SoleProprietorship soleProprietorship = default(SoleProprietorship), Trust trust = default(Trust), TypeEnum? type = default(TypeEnum?), UnincorporatedPartnership unincorporatedPartnership = default(UnincorporatedPartnership), string verificationPlan = default(string)) + public LegalEntity(List documentDetails = default(List), List documents = default(List), List entityAssociations = default(List), Individual individual = default(Individual), Organization organization = default(Organization), List problems = default(List), string reference = default(string), SoleProprietorship soleProprietorship = default(SoleProprietorship), Trust trust = default(Trust), TypeEnum? type = default(TypeEnum?), string verificationPlan = default(string)) { this.DocumentDetails = documentDetails; this.Documents = documents; @@ -110,7 +109,6 @@ protected LegalEntity() { } this.SoleProprietorship = soleProprietorship; this.Trust = trust; this.Type = type; - this.UnincorporatedPartnership = unincorporatedPartnership; this.VerificationPlan = verificationPlan; } @@ -195,12 +193,6 @@ protected LegalEntity() { } [DataMember(Name = "trust", EmitDefaultValue = false)] public Trust Trust { get; set; } - /// - /// Gets or Sets UnincorporatedPartnership - /// - [DataMember(Name = "unincorporatedPartnership", EmitDefaultValue = false)] - public UnincorporatedPartnership UnincorporatedPartnership { get; set; } - /// /// List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. /// @@ -236,7 +228,6 @@ public override string ToString() sb.Append(" TransferInstruments: ").Append(TransferInstruments).Append("\n"); sb.Append(" Trust: ").Append(Trust).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" UnincorporatedPartnership: ").Append(UnincorporatedPartnership).Append("\n"); sb.Append(" VerificationDeadlines: ").Append(VerificationDeadlines).Append("\n"); sb.Append(" VerificationPlan: ").Append(VerificationPlan).Append("\n"); sb.Append("}\n"); @@ -344,11 +335,6 @@ public bool Equals(LegalEntity input) this.Type == input.Type || this.Type.Equals(input.Type) ) && - ( - this.UnincorporatedPartnership == input.UnincorporatedPartnership || - (this.UnincorporatedPartnership != null && - this.UnincorporatedPartnership.Equals(input.UnincorporatedPartnership)) - ) && ( this.VerificationDeadlines == input.VerificationDeadlines || this.VerificationDeadlines != null && @@ -420,10 +406,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.Trust.GetHashCode(); } hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.UnincorporatedPartnership != null) - { - hashCode = (hashCode * 59) + this.UnincorporatedPartnership.GetHashCode(); - } if (this.VerificationDeadlines != null) { hashCode = (hashCode * 59) + this.VerificationDeadlines.GetHashCode(); diff --git a/Adyen/Model/LegalEntityManagement/LegalEntityInfo.cs b/Adyen/Model/LegalEntityManagement/LegalEntityInfo.cs index 80cdb0ba1..21774a5d3 100644 --- a/Adyen/Model/LegalEntityManagement/LegalEntityInfo.cs +++ b/Adyen/Model/LegalEntityManagement/LegalEntityInfo.cs @@ -88,9 +88,8 @@ public enum TypeEnum /// soleProprietorship. /// trust. /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**.. - /// unincorporatedPartnership. /// A key-value pair that specifies the [verification process](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details/) for a legal entity. Set to **upfront** for [upfront verification](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details#upfront).. - public LegalEntityInfo(List entityAssociations = default(List), Individual individual = default(Individual), Organization organization = default(Organization), string reference = default(string), SoleProprietorship soleProprietorship = default(SoleProprietorship), Trust trust = default(Trust), TypeEnum? type = default(TypeEnum?), UnincorporatedPartnership unincorporatedPartnership = default(UnincorporatedPartnership), string verificationPlan = default(string)) + public LegalEntityInfo(List entityAssociations = default(List), Individual individual = default(Individual), Organization organization = default(Organization), string reference = default(string), SoleProprietorship soleProprietorship = default(SoleProprietorship), Trust trust = default(Trust), TypeEnum? type = default(TypeEnum?), string verificationPlan = default(string)) { this.EntityAssociations = entityAssociations; this.Individual = individual; @@ -99,7 +98,6 @@ public enum TypeEnum this.SoleProprietorship = soleProprietorship; this.Trust = trust; this.Type = type; - this.UnincorporatedPartnership = unincorporatedPartnership; this.VerificationPlan = verificationPlan; } @@ -148,12 +146,6 @@ public enum TypeEnum [DataMember(Name = "trust", EmitDefaultValue = false)] public Trust Trust { get; set; } - /// - /// Gets or Sets UnincorporatedPartnership - /// - [DataMember(Name = "unincorporatedPartnership", EmitDefaultValue = false)] - public UnincorporatedPartnership UnincorporatedPartnership { get; set; } - /// /// A key-value pair that specifies the [verification process](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details/) for a legal entity. Set to **upfront** for [upfront verification](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details#upfront). /// @@ -177,7 +169,6 @@ public override string ToString() sb.Append(" SoleProprietorship: ").Append(SoleProprietorship).Append("\n"); sb.Append(" Trust: ").Append(Trust).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" UnincorporatedPartnership: ").Append(UnincorporatedPartnership).Append("\n"); sb.Append(" VerificationPlan: ").Append(VerificationPlan).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -255,11 +246,6 @@ public bool Equals(LegalEntityInfo input) this.Type == input.Type || this.Type.Equals(input.Type) ) && - ( - this.UnincorporatedPartnership == input.UnincorporatedPartnership || - (this.UnincorporatedPartnership != null && - this.UnincorporatedPartnership.Equals(input.UnincorporatedPartnership)) - ) && ( this.VerificationPlan == input.VerificationPlan || (this.VerificationPlan != null && @@ -305,10 +291,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.Trust.GetHashCode(); } hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.UnincorporatedPartnership != null) - { - hashCode = (hashCode * 59) + this.UnincorporatedPartnership.GetHashCode(); - } if (this.VerificationPlan != null) { hashCode = (hashCode * 59) + this.VerificationPlan.GetHashCode(); diff --git a/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.cs b/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.cs index a02377d8a..7154f42af 100644 --- a/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.cs +++ b/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.cs @@ -93,9 +93,8 @@ protected LegalEntityInfoRequiredType() { } /// soleProprietorship. /// trust. /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. (required). - /// unincorporatedPartnership. /// A key-value pair that specifies the [verification process](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details/) for a legal entity. Set to **upfront** for [upfront verification](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details#upfront).. - public LegalEntityInfoRequiredType(List entityAssociations = default(List), Individual individual = default(Individual), Organization organization = default(Organization), string reference = default(string), SoleProprietorship soleProprietorship = default(SoleProprietorship), Trust trust = default(Trust), TypeEnum type = default(TypeEnum), UnincorporatedPartnership unincorporatedPartnership = default(UnincorporatedPartnership), string verificationPlan = default(string)) + public LegalEntityInfoRequiredType(List entityAssociations = default(List), Individual individual = default(Individual), Organization organization = default(Organization), string reference = default(string), SoleProprietorship soleProprietorship = default(SoleProprietorship), Trust trust = default(Trust), TypeEnum type = default(TypeEnum), string verificationPlan = default(string)) { this.Type = type; this.EntityAssociations = entityAssociations; @@ -104,7 +103,6 @@ protected LegalEntityInfoRequiredType() { } this.Reference = reference; this.SoleProprietorship = soleProprietorship; this.Trust = trust; - this.UnincorporatedPartnership = unincorporatedPartnership; this.VerificationPlan = verificationPlan; } @@ -153,12 +151,6 @@ protected LegalEntityInfoRequiredType() { } [DataMember(Name = "trust", EmitDefaultValue = false)] public Trust Trust { get; set; } - /// - /// Gets or Sets UnincorporatedPartnership - /// - [DataMember(Name = "unincorporatedPartnership", EmitDefaultValue = false)] - public UnincorporatedPartnership UnincorporatedPartnership { get; set; } - /// /// A key-value pair that specifies the [verification process](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details/) for a legal entity. Set to **upfront** for [upfront verification](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details#upfront). /// @@ -182,7 +174,6 @@ public override string ToString() sb.Append(" SoleProprietorship: ").Append(SoleProprietorship).Append("\n"); sb.Append(" Trust: ").Append(Trust).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" UnincorporatedPartnership: ").Append(UnincorporatedPartnership).Append("\n"); sb.Append(" VerificationPlan: ").Append(VerificationPlan).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -260,11 +251,6 @@ public bool Equals(LegalEntityInfoRequiredType input) this.Type == input.Type || this.Type.Equals(input.Type) ) && - ( - this.UnincorporatedPartnership == input.UnincorporatedPartnership || - (this.UnincorporatedPartnership != null && - this.UnincorporatedPartnership.Equals(input.UnincorporatedPartnership)) - ) && ( this.VerificationPlan == input.VerificationPlan || (this.VerificationPlan != null && @@ -310,10 +296,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.Trust.GetHashCode(); } hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.UnincorporatedPartnership != null) - { - hashCode = (hashCode * 59) + this.UnincorporatedPartnership.GetHashCode(); - } if (this.VerificationPlan != null) { hashCode = (hashCode * 59) + this.VerificationPlan.GetHashCode(); diff --git a/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.cs index cb37a815a..5a16e76b0 100644 --- a/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.cs +++ b/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.cs @@ -63,11 +63,14 @@ protected NOLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 11-digit bank account number, without separators or whitespace. (required). + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). /// **noLocal** (required) (default to TypeEnum.NoLocal). - public NOLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NoLocal) + public NOLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.NoLocal) { this.AccountNumber = accountNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -77,6 +80,13 @@ protected NOLocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -86,6 +96,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class NOLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -127,6 +138,11 @@ public bool Equals(NOLocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -146,6 +162,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.cs index 2bb6fdaea..4837b046f 100644 --- a/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.cs +++ b/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.cs @@ -63,11 +63,14 @@ protected NZLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// 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). + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). /// **nzLocal** (required) (default to TypeEnum.NzLocal). - public NZLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NzLocal) + public NZLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.NzLocal) { this.AccountNumber = accountNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -77,6 +80,13 @@ protected NZLocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -86,6 +96,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class NZLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -127,6 +138,11 @@ public bool Equals(NZLocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -146,6 +162,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/LegalEntityManagement/Name.cs b/Adyen/Model/LegalEntityManagement/Name.cs index cac4fead6..d1f895a0c 100644 --- a/Adyen/Model/LegalEntityManagement/Name.cs +++ b/Adyen/Model/LegalEntityManagement/Name.cs @@ -40,9 +40,9 @@ protected Name() { } /// /// Initializes a new instance of the class. /// - /// The individual's first name. (required). + /// The individual's first name. Must not be blank. (required). /// The infix in the individual's name, if any.. - /// The individual's last name. (required). + /// The individual's last name. Must not be blank. (required). public Name(string firstName = default(string), string infix = default(string), string lastName = default(string)) { this.FirstName = firstName; @@ -51,9 +51,9 @@ protected Name() { } } /// - /// The individual's first name. + /// The individual's first name. Must not be blank. /// - /// The individual's first name. + /// The individual's first name. Must not be blank. [DataMember(Name = "firstName", IsRequired = false, EmitDefaultValue = false)] public string FirstName { get; set; } @@ -65,9 +65,9 @@ protected Name() { } public string Infix { get; set; } /// - /// The individual's last name. + /// The individual's last name. Must not be blank. /// - /// The individual's last name. + /// The individual's last name. Must not be blank. [DataMember(Name = "lastName", IsRequired = false, EmitDefaultValue = false)] public string LastName { get; set; } diff --git a/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.cs index 534e019c1..64056111e 100644 --- a/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.cs +++ b/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.cs @@ -65,13 +65,16 @@ protected NumberAndBicAccountIdentification() { } /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. (required). /// additionalBankIdentification. /// The bank's 8- or 11-character BIC or SWIFT code. (required). + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). /// **numberAndBic** (required) (default to TypeEnum.NumberAndBic). - public NumberAndBicAccountIdentification(string accountNumber = default(string), AdditionalBankIdentification additionalBankIdentification = default(AdditionalBankIdentification), string bic = default(string), TypeEnum type = TypeEnum.NumberAndBic) + public NumberAndBicAccountIdentification(string accountNumber = default(string), AdditionalBankIdentification additionalBankIdentification = default(AdditionalBankIdentification), string bic = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.NumberAndBic) { this.AccountNumber = accountNumber; this.Bic = bic; this.Type = type; this.AdditionalBankIdentification = additionalBankIdentification; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -94,6 +97,13 @@ protected NumberAndBicAccountIdentification() { } [DataMember(Name = "bic", IsRequired = false, EmitDefaultValue = false)] public string Bic { get; set; } + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -105,6 +115,7 @@ public override string ToString() sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" AdditionalBankIdentification: ").Append(AdditionalBankIdentification).Append("\n"); sb.Append(" Bic: ").Append(Bic).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -156,6 +167,11 @@ public bool Equals(NumberAndBicAccountIdentification input) (this.Bic != null && this.Bic.Equals(input.Bic)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -183,6 +199,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Bic.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.cs b/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.cs index 6000a49be..e2049b5b0 100644 --- a/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.cs +++ b/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.cs @@ -37,7 +37,7 @@ public partial class OnboardingLinkInfo : IEquatable, IValid /// /// The language that will be used for the page, specified by a combination of two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language and [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. See [possible values](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details/hosted#supported-languages). If not specified in the request or if the language is not supported, the page uses the browser language. If the browser language is not supported, the page uses **en-US** by default.. /// The URL where the user is redirected after they complete hosted onboarding.. - /// Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, these values are set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. By default, these value are set to **false**. Set the following values to **true** to require the user to sign PCI questionnaires based on their sales channels. The user must sign PCI questionnaires for all relevant sales channels. - **requirePciSignEcommerce** - **requirePciSignPos** - **requirePciSignEcomMoto** - **requirePciSignPosMoto** . + /// Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, these values are set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country (including Switzerland and the UK) than the country of their legal entity. By default, these value are set to **false**. Set the following values to **true** to require the user to sign PCI questionnaires based on their sales channels. The user must sign PCI questionnaires for all relevant sales channels. - **requirePciSignEcommerce** - **requirePciSignPos** - **requirePciSignEcomMoto** - **requirePciSignPosMoto** . /// The unique identifier of the hosted onboarding theme.. public OnboardingLinkInfo(string locale = default(string), string redirectUrl = default(string), Dictionary settings = default(Dictionary), string themeId = default(string)) { @@ -62,9 +62,9 @@ public partial class OnboardingLinkInfo : IEquatable, IValid public string RedirectUrl { get; set; } /// - /// Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, these values are set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. By default, these value are set to **false**. Set the following values to **true** to require the user to sign PCI questionnaires based on their sales channels. The user must sign PCI questionnaires for all relevant sales channels. - **requirePciSignEcommerce** - **requirePciSignPos** - **requirePciSignEcomMoto** - **requirePciSignPosMoto** + /// Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, these values are set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country (including Switzerland and the UK) than the country of their legal entity. By default, these value are set to **false**. Set the following values to **true** to require the user to sign PCI questionnaires based on their sales channels. The user must sign PCI questionnaires for all relevant sales channels. - **requirePciSignEcommerce** - **requirePciSignPos** - **requirePciSignEcomMoto** - **requirePciSignPosMoto** /// - /// Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, these values are set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. By default, these value are set to **false**. Set the following values to **true** to require the user to sign PCI questionnaires based on their sales channels. The user must sign PCI questionnaires for all relevant sales channels. - **requirePciSignEcommerce** - **requirePciSignPos** - **requirePciSignEcomMoto** - **requirePciSignPosMoto** + /// Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, these values are set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country (including Switzerland and the UK) than the country of their legal entity. By default, these value are set to **false**. Set the following values to **true** to require the user to sign PCI questionnaires based on their sales channels. The user must sign PCI questionnaires for all relevant sales channels. - **requirePciSignEcommerce** - **requirePciSignPos** - **requirePciSignEcomMoto** - **requirePciSignPosMoto** [DataMember(Name = "settings", EmitDefaultValue = false)] public Dictionary Settings { get; set; } diff --git a/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.cs index 58b7386ba..e2e4d6a20 100644 --- a/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.cs +++ b/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.cs @@ -63,11 +63,14 @@ protected PLLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. (required). + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). /// **plLocal** (required) (default to TypeEnum.PlLocal). - public PLLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.PlLocal) + public PLLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.PlLocal) { this.AccountNumber = accountNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -77,6 +80,13 @@ protected PLLocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -86,6 +96,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class PLLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -127,6 +138,11 @@ public bool Equals(PLLocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -146,6 +162,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.cs index 4446c9fae..3484a29b2 100644 --- a/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.cs +++ b/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.cs @@ -64,12 +64,15 @@ protected SELocalAccountIdentification() { } /// /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. (required). /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. (required). + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). /// **seLocal** (required) (default to TypeEnum.SeLocal). - public SELocalAccountIdentification(string accountNumber = default(string), string clearingNumber = default(string), TypeEnum type = TypeEnum.SeLocal) + public SELocalAccountIdentification(string accountNumber = default(string), string clearingNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.SeLocal) { this.AccountNumber = accountNumber; this.ClearingNumber = clearingNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -86,6 +89,13 @@ protected SELocalAccountIdentification() { } [DataMember(Name = "clearingNumber", IsRequired = false, EmitDefaultValue = false)] public string ClearingNumber { get; set; } + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class SELocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" ClearingNumber: ").Append(ClearingNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(SELocalAccountIdentification input) (this.ClearingNumber != null && this.ClearingNumber.Equals(input.ClearingNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ClearingNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.cs index ccebbc099..3438af6f9 100644 --- a/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.cs +++ b/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.cs @@ -64,11 +64,14 @@ protected SGLocalAccountIdentification() { } /// /// The 4- to 19-digit bank account number, without separators or whitespace. (required). /// The bank's 8- or 11-character BIC or SWIFT code. (required). + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). /// **sgLocal** (default to TypeEnum.SgLocal). - public SGLocalAccountIdentification(string accountNumber = default(string), string bic = default(string), TypeEnum? type = TypeEnum.SgLocal) + public SGLocalAccountIdentification(string accountNumber = default(string), string bic = default(string), string formFactor = "physical", TypeEnum? type = TypeEnum.SgLocal) { this.AccountNumber = accountNumber; this.Bic = bic; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; this.Type = type; } @@ -86,6 +89,13 @@ protected SGLocalAccountIdentification() { } [DataMember(Name = "bic", IsRequired = false, EmitDefaultValue = false)] public string Bic { get; set; } + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class SGLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" Bic: ").Append(Bic).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(SGLocalAccountIdentification input) (this.Bic != null && this.Bic.Equals(input.Bic)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Bic.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.cs b/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.cs index f25faf760..9211731e6 100644 --- a/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.cs +++ b/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.cs @@ -33,9 +33,9 @@ namespace Adyen.Model.LegalEntityManagement public partial class TermsOfServiceAcceptanceInfo : IEquatable, IValidatableObject { /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { @@ -79,15 +79,21 @@ public enum TypeEnum /// Enum AdyenIssuing for value: adyenIssuing /// [EnumMember(Value = "adyenIssuing")] - AdyenIssuing = 7 + AdyenIssuing = 7, + + /// + /// Enum AdyenPccr for value: adyenPccr + /// + [EnumMember(Value = "adyenPccr")] + AdyenPccr = 8 } /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** [DataMember(Name = "type", EmitDefaultValue = false)] public TypeEnum? Type { get; set; } /// @@ -97,7 +103,7 @@ public enum TypeEnum /// The unique identifier of the legal entity for which the Terms of Service are accepted.. /// The date when the Terms of Service were accepted.. /// An Adyen-generated reference for the accepted Terms of Service.. - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** . + /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** . public TermsOfServiceAcceptanceInfo(string acceptedBy = default(string), string acceptedFor = default(string), DateTime createdAt = default(DateTime), string id = default(string), TypeEnum? type = default(TypeEnum?)) { this.AcceptedBy = acceptedBy; diff --git a/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.cs index e19973b88..248860c59 100644 --- a/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.cs +++ b/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.cs @@ -63,13 +63,16 @@ protected UKLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 8-digit bank account number, without separators or whitespace. (required). + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. (required). /// **ukLocal** (required) (default to TypeEnum.UkLocal). - public UKLocalAccountIdentification(string accountNumber = default(string), string sortCode = default(string), TypeEnum type = TypeEnum.UkLocal) + public UKLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", string sortCode = default(string), TypeEnum type = TypeEnum.UkLocal) { this.AccountNumber = accountNumber; this.SortCode = sortCode; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -79,6 +82,13 @@ protected UKLocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. /// @@ -95,6 +105,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class UKLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" SortCode: ").Append(SortCode).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); @@ -137,6 +148,11 @@ public bool Equals(UKLocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.SortCode == input.SortCode || (this.SortCode != null && @@ -161,6 +177,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } if (this.SortCode != null) { hashCode = (hashCode * 59) + this.SortCode.GetHashCode(); diff --git a/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.cs index 2ac78476e..4579cede6 100644 --- a/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.cs +++ b/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.cs @@ -92,14 +92,17 @@ protected USLocalAccountIdentification() { } /// /// The bank account number, without separators or whitespace. (required). /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. (required). /// **usLocal** (required) (default to TypeEnum.UsLocal). - public USLocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string routingNumber = default(string), TypeEnum type = TypeEnum.UsLocal) + public USLocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string formFactor = "physical", string routingNumber = default(string), TypeEnum type = TypeEnum.UsLocal) { this.AccountNumber = accountNumber; this.RoutingNumber = routingNumber; this.Type = type; this.AccountType = accountType; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -109,6 +112,13 @@ protected USLocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + /// + /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. /// @@ -126,6 +136,7 @@ public override string ToString() sb.Append("class USLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" AccountType: ").Append(AccountType).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" RoutingNumber: ").Append(RoutingNumber).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); @@ -172,6 +183,11 @@ public bool Equals(USLocalAccountIdentification input) this.AccountType == input.AccountType || this.AccountType.Equals(input.AccountType) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.RoutingNumber == input.RoutingNumber || (this.RoutingNumber != null && @@ -197,6 +213,10 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } if (this.RoutingNumber != null) { hashCode = (hashCode * 59) + this.RoutingNumber.GetHashCode(); diff --git a/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.cs b/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.cs deleted file mode 100644 index 06252cf31..000000000 --- a/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.cs +++ /dev/null @@ -1,454 +0,0 @@ -/* -* Legal Entity Management 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.LegalEntityManagement -{ - /// - /// UnincorporatedPartnership - /// - [DataContract(Name = "UnincorporatedPartnership")] - public partial class UnincorporatedPartnership : IEquatable, IValidatableObject - { - /// - /// Type of Partnership. Possible values: * **limitedPartnership** * **generalPartnership** * **familyPartnership** * **commercialPartnership** * **publicPartnership** * **otherPartnership** * **gbr** * **gmbh** * **kgaa** * **cv** * **vof** * **maatschap** * **privateFundLimitedPartnership** * **businessTrustEntity** * **businessPartnership** - /// - /// Type of Partnership. Possible values: * **limitedPartnership** * **generalPartnership** * **familyPartnership** * **commercialPartnership** * **publicPartnership** * **otherPartnership** * **gbr** * **gmbh** * **kgaa** * **cv** * **vof** * **maatschap** * **privateFundLimitedPartnership** * **businessTrustEntity** * **businessPartnership** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum LimitedPartnership for value: limitedPartnership - /// - [EnumMember(Value = "limitedPartnership")] - LimitedPartnership = 1, - - /// - /// Enum GeneralPartnership for value: generalPartnership - /// - [EnumMember(Value = "generalPartnership")] - GeneralPartnership = 2, - - /// - /// Enum FamilyPartnership for value: familyPartnership - /// - [EnumMember(Value = "familyPartnership")] - FamilyPartnership = 3, - - /// - /// Enum CommercialPartnership for value: commercialPartnership - /// - [EnumMember(Value = "commercialPartnership")] - CommercialPartnership = 4, - - /// - /// Enum PublicPartnership for value: publicPartnership - /// - [EnumMember(Value = "publicPartnership")] - PublicPartnership = 5, - - /// - /// Enum OtherPartnership for value: otherPartnership - /// - [EnumMember(Value = "otherPartnership")] - OtherPartnership = 6, - - /// - /// Enum Gbr for value: gbr - /// - [EnumMember(Value = "gbr")] - Gbr = 7, - - /// - /// Enum Gmbh for value: gmbh - /// - [EnumMember(Value = "gmbh")] - Gmbh = 8, - - /// - /// Enum Kgaa for value: kgaa - /// - [EnumMember(Value = "kgaa")] - Kgaa = 9, - - /// - /// Enum Cv for value: cv - /// - [EnumMember(Value = "cv")] - Cv = 10, - - /// - /// Enum Vof for value: vof - /// - [EnumMember(Value = "vof")] - Vof = 11, - - /// - /// Enum Maatschap for value: maatschap - /// - [EnumMember(Value = "maatschap")] - Maatschap = 12, - - /// - /// Enum PrivateFundLimitedPartnership for value: privateFundLimitedPartnership - /// - [EnumMember(Value = "privateFundLimitedPartnership")] - PrivateFundLimitedPartnership = 13, - - /// - /// Enum BusinessTrustEntity for value: businessTrustEntity - /// - [EnumMember(Value = "businessTrustEntity")] - BusinessTrustEntity = 14, - - /// - /// Enum BusinessPartnership for value: businessPartnership - /// - [EnumMember(Value = "businessPartnership")] - BusinessPartnership = 15 - - } - - - /// - /// Type of Partnership. Possible values: * **limitedPartnership** * **generalPartnership** * **familyPartnership** * **commercialPartnership** * **publicPartnership** * **otherPartnership** * **gbr** * **gmbh** * **kgaa** * **cv** * **vof** * **maatschap** * **privateFundLimitedPartnership** * **businessTrustEntity** * **businessPartnership** - /// - /// Type of Partnership. Possible values: * **limitedPartnership** * **generalPartnership** * **familyPartnership** * **commercialPartnership** * **publicPartnership** * **otherPartnership** * **gbr** * **gmbh** * **kgaa** * **cv** * **vof** * **maatschap** * **privateFundLimitedPartnership** * **businessTrustEntity** * **businessPartnership** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - [JsonConverter(typeof(StringEnumConverter))] - public enum VatAbsenceReasonEnum - { - /// - /// Enum IndustryExemption for value: industryExemption - /// - [EnumMember(Value = "industryExemption")] - IndustryExemption = 1, - - /// - /// Enum BelowTaxThreshold for value: belowTaxThreshold - /// - [EnumMember(Value = "belowTaxThreshold")] - BelowTaxThreshold = 2 - - } - - - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - [DataMember(Name = "vatAbsenceReason", EmitDefaultValue = false)] - public VatAbsenceReasonEnum? VatAbsenceReason { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UnincorporatedPartnership() { } - /// - /// Initializes a new instance of the class. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. (required). - /// The date when the legal arrangement was incorporated in YYYY-MM-DD format.. - /// Short description about the Legal Arrangement.. - /// The registered name, if different from the `name`.. - /// The legal name. (required). - /// principalPlaceOfBusiness. - /// registeredAddress (required). - /// The registration number.. - /// The tax information of the entity.. - /// Type of Partnership. Possible values: * **limitedPartnership** * **generalPartnership** * **familyPartnership** * **commercialPartnership** * **publicPartnership** * **otherPartnership** * **gbr** * **gmbh** * **kgaa** * **cv** * **vof** * **maatschap** * **privateFundLimitedPartnership** * **businessTrustEntity** * **businessPartnership** (required). - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**.. - /// The VAT number.. - public UnincorporatedPartnership(string countryOfGoverningLaw = default(string), string dateOfIncorporation = default(string), string description = default(string), string doingBusinessAs = default(string), string name = default(string), Address principalPlaceOfBusiness = default(Address), Address registeredAddress = default(Address), string registrationNumber = default(string), List taxInformation = default(List), TypeEnum type = default(TypeEnum), VatAbsenceReasonEnum? vatAbsenceReason = default(VatAbsenceReasonEnum?), string vatNumber = default(string)) - { - this.CountryOfGoverningLaw = countryOfGoverningLaw; - this.Name = name; - this.RegisteredAddress = registeredAddress; - this.Type = type; - this.DateOfIncorporation = dateOfIncorporation; - this.Description = description; - this.DoingBusinessAs = doingBusinessAs; - this.PrincipalPlaceOfBusiness = principalPlaceOfBusiness; - this.RegistrationNumber = registrationNumber; - this.TaxInformation = taxInformation; - this.VatAbsenceReason = vatAbsenceReason; - this.VatNumber = vatNumber; - } - - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. - [DataMember(Name = "countryOfGoverningLaw", IsRequired = false, EmitDefaultValue = false)] - public string CountryOfGoverningLaw { get; set; } - - /// - /// The date when the legal arrangement was incorporated in YYYY-MM-DD format. - /// - /// The date when the legal arrangement was incorporated in YYYY-MM-DD format. - [DataMember(Name = "dateOfIncorporation", EmitDefaultValue = false)] - public string DateOfIncorporation { get; set; } - - /// - /// Short description about the Legal Arrangement. - /// - /// Short description about the Legal Arrangement. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The registered name, if different from the `name`. - /// - /// The registered name, if different from the `name`. - [DataMember(Name = "doingBusinessAs", EmitDefaultValue = false)] - public string DoingBusinessAs { get; set; } - - /// - /// The legal name. - /// - /// The legal name. - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Gets or Sets PrincipalPlaceOfBusiness - /// - [DataMember(Name = "principalPlaceOfBusiness", EmitDefaultValue = false)] - public Address PrincipalPlaceOfBusiness { get; set; } - - /// - /// Gets or Sets RegisteredAddress - /// - [DataMember(Name = "registeredAddress", IsRequired = false, EmitDefaultValue = false)] - public Address RegisteredAddress { get; set; } - - /// - /// The registration number. - /// - /// The registration number. - [DataMember(Name = "registrationNumber", EmitDefaultValue = false)] - public string RegistrationNumber { get; set; } - - /// - /// The tax information of the entity. - /// - /// The tax information of the entity. - [DataMember(Name = "taxInformation", EmitDefaultValue = false)] - public List TaxInformation { get; set; } - - /// - /// The VAT number. - /// - /// The VAT number. - [DataMember(Name = "vatNumber", EmitDefaultValue = false)] - public string VatNumber { 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 UnincorporatedPartnership {\n"); - sb.Append(" CountryOfGoverningLaw: ").Append(CountryOfGoverningLaw).Append("\n"); - sb.Append(" DateOfIncorporation: ").Append(DateOfIncorporation).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" DoingBusinessAs: ").Append(DoingBusinessAs).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PrincipalPlaceOfBusiness: ").Append(PrincipalPlaceOfBusiness).Append("\n"); - sb.Append(" RegisteredAddress: ").Append(RegisteredAddress).Append("\n"); - sb.Append(" RegistrationNumber: ").Append(RegistrationNumber).Append("\n"); - sb.Append(" TaxInformation: ").Append(TaxInformation).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" VatAbsenceReason: ").Append(VatAbsenceReason).Append("\n"); - sb.Append(" VatNumber: ").Append(VatNumber).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 UnincorporatedPartnership); - } - - /// - /// Returns true if UnincorporatedPartnership instances are equal - /// - /// Instance of UnincorporatedPartnership to be compared - /// Boolean - public bool Equals(UnincorporatedPartnership input) - { - if (input == null) - { - return false; - } - return - ( - this.CountryOfGoverningLaw == input.CountryOfGoverningLaw || - (this.CountryOfGoverningLaw != null && - this.CountryOfGoverningLaw.Equals(input.CountryOfGoverningLaw)) - ) && - ( - this.DateOfIncorporation == input.DateOfIncorporation || - (this.DateOfIncorporation != null && - this.DateOfIncorporation.Equals(input.DateOfIncorporation)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DoingBusinessAs == input.DoingBusinessAs || - (this.DoingBusinessAs != null && - this.DoingBusinessAs.Equals(input.DoingBusinessAs)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PrincipalPlaceOfBusiness == input.PrincipalPlaceOfBusiness || - (this.PrincipalPlaceOfBusiness != null && - this.PrincipalPlaceOfBusiness.Equals(input.PrincipalPlaceOfBusiness)) - ) && - ( - this.RegisteredAddress == input.RegisteredAddress || - (this.RegisteredAddress != null && - this.RegisteredAddress.Equals(input.RegisteredAddress)) - ) && - ( - this.RegistrationNumber == input.RegistrationNumber || - (this.RegistrationNumber != null && - this.RegistrationNumber.Equals(input.RegistrationNumber)) - ) && - ( - this.TaxInformation == input.TaxInformation || - this.TaxInformation != null && - input.TaxInformation != null && - this.TaxInformation.SequenceEqual(input.TaxInformation) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.VatAbsenceReason == input.VatAbsenceReason || - this.VatAbsenceReason.Equals(input.VatAbsenceReason) - ) && - ( - this.VatNumber == input.VatNumber || - (this.VatNumber != null && - this.VatNumber.Equals(input.VatNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CountryOfGoverningLaw != null) - { - hashCode = (hashCode * 59) + this.CountryOfGoverningLaw.GetHashCode(); - } - if (this.DateOfIncorporation != null) - { - hashCode = (hashCode * 59) + this.DateOfIncorporation.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.DoingBusinessAs != null) - { - hashCode = (hashCode * 59) + this.DoingBusinessAs.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PrincipalPlaceOfBusiness != null) - { - hashCode = (hashCode * 59) + this.PrincipalPlaceOfBusiness.GetHashCode(); - } - if (this.RegisteredAddress != null) - { - hashCode = (hashCode * 59) + this.RegisteredAddress.GetHashCode(); - } - if (this.RegistrationNumber != null) - { - hashCode = (hashCode * 59) + this.RegistrationNumber.GetHashCode(); - } - if (this.TaxInformation != null) - { - hashCode = (hashCode * 59) + this.TaxInformation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - hashCode = (hashCode * 59) + this.VatAbsenceReason.GetHashCode(); - if (this.VatNumber != null) - { - hashCode = (hashCode * 59) + this.VatNumber.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/Management/SplitConfigurationLogic.cs b/Adyen/Model/Management/SplitConfigurationLogic.cs index 8723a8fb7..4931956bf 100644 --- a/Adyen/Model/Management/SplitConfigurationLogic.cs +++ b/Adyen/Model/Management/SplitConfigurationLogic.cs @@ -33,9 +33,9 @@ namespace Adyen.Model.Management public partial class SplitConfigurationLogic : IEquatable, IValidatableObject { /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum AcquiringFeesEnum { @@ -55,15 +55,15 @@ public enum AcquiringFeesEnum /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [DataMember(Name = "acquiringFees", EmitDefaultValue = false)] public AcquiringFeesEnum? AcquiringFees { get; set; } /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum AdyenCommissionEnum { @@ -83,15 +83,15 @@ public enum AdyenCommissionEnum /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [DataMember(Name = "adyenCommission", EmitDefaultValue = false)] public AdyenCommissionEnum? AdyenCommission { get; set; } /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum AdyenFeesEnum { @@ -111,15 +111,15 @@ public enum AdyenFeesEnum /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [DataMember(Name = "adyenFees", EmitDefaultValue = false)] public AdyenFeesEnum? AdyenFees { get; set; } /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum AdyenMarkupEnum { @@ -139,15 +139,15 @@ public enum AdyenMarkupEnum /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [DataMember(Name = "adyenMarkup", EmitDefaultValue = false)] public AdyenMarkupEnum? AdyenMarkup { get; set; } /// - /// Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. /// - /// Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. [JsonConverter(typeof(StringEnumConverter))] public enum ChargebackEnum { @@ -173,15 +173,15 @@ public enum ChargebackEnum /// - /// Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. /// - /// Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. [DataMember(Name = "chargeback", EmitDefaultValue = false)] public ChargebackEnum? Chargeback { get; set; } /// - /// Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** /// - /// Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** [JsonConverter(typeof(StringEnumConverter))] public enum ChargebackCostAllocationEnum { @@ -201,15 +201,15 @@ public enum ChargebackCostAllocationEnum /// - /// Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** /// - /// Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** [DataMember(Name = "chargebackCostAllocation", EmitDefaultValue = false)] public ChargebackCostAllocationEnum? ChargebackCostAllocation { get; set; } /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum InterchangeEnum { @@ -229,15 +229,15 @@ public enum InterchangeEnum /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [DataMember(Name = "interchange", EmitDefaultValue = false)] public InterchangeEnum? Interchange { get; set; } /// - /// Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum PaymentFeeEnum { @@ -257,15 +257,77 @@ public enum PaymentFeeEnum /// - /// Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [DataMember(Name = "paymentFee", EmitDefaultValue = false)] public PaymentFeeEnum? PaymentFee { get; set; } /// - /// Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** /// - /// Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** + [JsonConverter(typeof(StringEnumConverter))] + public enum RefundEnum + { + /// + /// Enum DeductFromLiableAccount for value: deductFromLiableAccount + /// + [EnumMember(Value = "deductFromLiableAccount")] + DeductFromLiableAccount = 1, + + /// + /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount + /// + [EnumMember(Value = "deductFromOneBalanceAccount")] + DeductFromOneBalanceAccount = 2, + + /// + /// Enum DeductAccordingToSplitRatio for value: deductAccordingToSplitRatio + /// + [EnumMember(Value = "deductAccordingToSplitRatio")] + DeductAccordingToSplitRatio = 3 + + } + + + /// + /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** + /// + /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** + [DataMember(Name = "refund", EmitDefaultValue = false)] + public RefundEnum? Refund { get; set; } + /// + /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + /// + /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + [JsonConverter(typeof(StringEnumConverter))] + public enum RefundCostAllocationEnum + { + /// + /// Enum DeductFromLiableAccount for value: deductFromLiableAccount + /// + [EnumMember(Value = "deductFromLiableAccount")] + DeductFromLiableAccount = 1, + + /// + /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount + /// + [EnumMember(Value = "deductFromOneBalanceAccount")] + DeductFromOneBalanceAccount = 2 + + } + + + /// + /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + /// + /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + [DataMember(Name = "refundCostAllocation", EmitDefaultValue = false)] + public RefundCostAllocationEnum? RefundCostAllocation { get; set; } + /// + /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// + /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum RemainderEnum { @@ -285,15 +347,15 @@ public enum RemainderEnum /// - /// Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. [DataMember(Name = "remainder", EmitDefaultValue = false)] public RemainderEnum? Remainder { get; set; } /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum SchemeFeeEnum { @@ -313,15 +375,15 @@ public enum SchemeFeeEnum /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [DataMember(Name = "schemeFee", EmitDefaultValue = false)] public SchemeFeeEnum? SchemeFee { get; set; } /// - /// Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** + /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** /// - /// Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** + /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** [JsonConverter(typeof(StringEnumConverter))] public enum SurchargeEnum { @@ -341,15 +403,15 @@ public enum SurchargeEnum /// - /// Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** + /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** /// - /// Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** + /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** [DataMember(Name = "surcharge", EmitDefaultValue = false)] public SurchargeEnum? Surcharge { get; set; } /// - /// Specifies the logic to apply when booking tips (gratuity). Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. /// - /// Specifies the logic to apply when booking tips (gratuity). Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum TipEnum { @@ -369,9 +431,9 @@ public enum TipEnum /// - /// Specifies the logic to apply when booking tips (gratuity). Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. /// - /// Specifies the logic to apply when booking tips (gratuity). Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. [DataMember(Name = "tip", EmitDefaultValue = false)] public TipEnum? Tip { get; set; } /// @@ -382,21 +444,23 @@ protected SplitConfigurationLogic() { } /// /// Initializes a new instance of the class. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. + /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. /// additionalCommission. - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**.. - /// Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. + /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. + /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. + /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**.. + /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// commission (required). - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**.. - /// Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - /// Specifies the logic to apply when booking tips (gratuity). Possible values: **addToLiableAccount**, **addToOneBalanceAccount**.. - public SplitConfigurationLogic(AcquiringFeesEnum? acquiringFees = default(AcquiringFeesEnum?), AdditionalCommission additionalCommission = default(AdditionalCommission), AdyenCommissionEnum? adyenCommission = default(AdyenCommissionEnum?), AdyenFeesEnum? adyenFees = default(AdyenFeesEnum?), AdyenMarkupEnum? adyenMarkup = default(AdyenMarkupEnum?), ChargebackEnum? chargeback = default(ChargebackEnum?), ChargebackCostAllocationEnum? chargebackCostAllocation = default(ChargebackCostAllocationEnum?), Commission commission = default(Commission), InterchangeEnum? interchange = default(InterchangeEnum?), PaymentFeeEnum? paymentFee = default(PaymentFeeEnum?), RemainderEnum? remainder = default(RemainderEnum?), SchemeFeeEnum? schemeFee = default(SchemeFeeEnum?), SurchargeEnum? surcharge = default(SurchargeEnum?), TipEnum? tip = default(TipEnum?)) + /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. + /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. + /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**.. + /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. + /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**.. + public SplitConfigurationLogic(AcquiringFeesEnum? acquiringFees = default(AcquiringFeesEnum?), AdditionalCommission additionalCommission = default(AdditionalCommission), AdyenCommissionEnum? adyenCommission = default(AdyenCommissionEnum?), AdyenFeesEnum? adyenFees = default(AdyenFeesEnum?), AdyenMarkupEnum? adyenMarkup = default(AdyenMarkupEnum?), ChargebackEnum? chargeback = default(ChargebackEnum?), ChargebackCostAllocationEnum? chargebackCostAllocation = default(ChargebackCostAllocationEnum?), Commission commission = default(Commission), InterchangeEnum? interchange = default(InterchangeEnum?), PaymentFeeEnum? paymentFee = default(PaymentFeeEnum?), RefundEnum? refund = default(RefundEnum?), RefundCostAllocationEnum? refundCostAllocation = default(RefundCostAllocationEnum?), RemainderEnum? remainder = default(RemainderEnum?), SchemeFeeEnum? schemeFee = default(SchemeFeeEnum?), SurchargeEnum? surcharge = default(SurchargeEnum?), TipEnum? tip = default(TipEnum?)) { this.Commission = commission; this.AcquiringFees = acquiringFees; @@ -408,6 +472,8 @@ protected SplitConfigurationLogic() { } this.ChargebackCostAllocation = chargebackCostAllocation; this.Interchange = interchange; this.PaymentFee = paymentFee; + this.Refund = refund; + this.RefundCostAllocation = refundCostAllocation; this.Remainder = remainder; this.SchemeFee = schemeFee; this.Surcharge = surcharge; @@ -427,9 +493,9 @@ protected SplitConfigurationLogic() { } public Commission Commission { get; set; } /// - /// Unique identifier of the split logic that is applied when the split configuration conditions are met. + /// Unique identifier of the collection of split instructions that are applied when the rule conditions are met. /// - /// Unique identifier of the split logic that is applied when the split configuration conditions are met. + /// Unique identifier of the collection of split instructions that are applied when the rule conditions are met. [DataMember(Name = "splitLogicId", EmitDefaultValue = false)] public string SplitLogicId { get; private set; } @@ -451,6 +517,8 @@ public override string ToString() sb.Append(" Commission: ").Append(Commission).Append("\n"); sb.Append(" Interchange: ").Append(Interchange).Append("\n"); sb.Append(" PaymentFee: ").Append(PaymentFee).Append("\n"); + sb.Append(" Refund: ").Append(Refund).Append("\n"); + sb.Append(" RefundCostAllocation: ").Append(RefundCostAllocation).Append("\n"); sb.Append(" Remainder: ").Append(Remainder).Append("\n"); sb.Append(" SchemeFee: ").Append(SchemeFee).Append("\n"); sb.Append(" SplitLogicId: ").Append(SplitLogicId).Append("\n"); @@ -533,6 +601,14 @@ public bool Equals(SplitConfigurationLogic input) this.PaymentFee == input.PaymentFee || this.PaymentFee.Equals(input.PaymentFee) ) && + ( + this.Refund == input.Refund || + this.Refund.Equals(input.Refund) + ) && + ( + this.RefundCostAllocation == input.RefundCostAllocation || + this.RefundCostAllocation.Equals(input.RefundCostAllocation) + ) && ( this.Remainder == input.Remainder || this.Remainder.Equals(input.Remainder) @@ -581,6 +657,8 @@ public override int GetHashCode() } hashCode = (hashCode * 59) + this.Interchange.GetHashCode(); hashCode = (hashCode * 59) + this.PaymentFee.GetHashCode(); + hashCode = (hashCode * 59) + this.Refund.GetHashCode(); + hashCode = (hashCode * 59) + this.RefundCostAllocation.GetHashCode(); hashCode = (hashCode * 59) + this.Remainder.GetHashCode(); hashCode = (hashCode * 59) + this.SchemeFee.GetHashCode(); if (this.SplitLogicId != null) diff --git a/Adyen/Model/Management/StoreAndForward.cs b/Adyen/Model/Management/StoreAndForward.cs new file mode 100644 index 000000000..651db77a2 --- /dev/null +++ b/Adyen/Model/Management/StoreAndForward.cs @@ -0,0 +1,163 @@ +/* +* Management 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.Management +{ + /// + /// StoreAndForward + /// + [DataContract(Name = "StoreAndForward")] + public partial class StoreAndForward : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The maximum amount that the terminal accepts for a single store-and-forward payment.. + /// The maximum number of store-and-forward transactions per terminal that you can process while offline.. + /// supportedCardTypes. + public StoreAndForward(List maxAmount = default(List), int? maxPayments = default(int?), SupportedCardTypes supportedCardTypes = default(SupportedCardTypes)) + { + this.MaxAmount = maxAmount; + this.MaxPayments = maxPayments; + this.SupportedCardTypes = supportedCardTypes; + } + + /// + /// The maximum amount that the terminal accepts for a single store-and-forward payment. + /// + /// The maximum amount that the terminal accepts for a single store-and-forward payment. + [DataMember(Name = "maxAmount", EmitDefaultValue = false)] + public List MaxAmount { get; set; } + + /// + /// The maximum number of store-and-forward transactions per terminal that you can process while offline. + /// + /// The maximum number of store-and-forward transactions per terminal that you can process while offline. + [DataMember(Name = "maxPayments", EmitDefaultValue = false)] + public int? MaxPayments { get; set; } + + /// + /// Gets or Sets SupportedCardTypes + /// + [DataMember(Name = "supportedCardTypes", EmitDefaultValue = false)] + public SupportedCardTypes SupportedCardTypes { 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 StoreAndForward {\n"); + sb.Append(" MaxAmount: ").Append(MaxAmount).Append("\n"); + sb.Append(" MaxPayments: ").Append(MaxPayments).Append("\n"); + sb.Append(" SupportedCardTypes: ").Append(SupportedCardTypes).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 StoreAndForward); + } + + /// + /// Returns true if StoreAndForward instances are equal + /// + /// Instance of StoreAndForward to be compared + /// Boolean + public bool Equals(StoreAndForward input) + { + if (input == null) + { + return false; + } + return + ( + this.MaxAmount == input.MaxAmount || + this.MaxAmount != null && + input.MaxAmount != null && + this.MaxAmount.SequenceEqual(input.MaxAmount) + ) && + ( + this.MaxPayments == input.MaxPayments || + this.MaxPayments.Equals(input.MaxPayments) + ) && + ( + this.SupportedCardTypes == input.SupportedCardTypes || + (this.SupportedCardTypes != null && + this.SupportedCardTypes.Equals(input.SupportedCardTypes)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MaxAmount != null) + { + hashCode = (hashCode * 59) + this.MaxAmount.GetHashCode(); + } + hashCode = (hashCode * 59) + this.MaxPayments.GetHashCode(); + if (this.SupportedCardTypes != null) + { + hashCode = (hashCode * 59) + this.SupportedCardTypes.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/Management/SupportedCardTypes.cs b/Adyen/Model/Management/SupportedCardTypes.cs new file mode 100644 index 000000000..d9410842a --- /dev/null +++ b/Adyen/Model/Management/SupportedCardTypes.cs @@ -0,0 +1,185 @@ +/* +* Management 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.Management +{ + /// + /// SupportedCardTypes + /// + [DataContract(Name = "SupportedCardTypes")] + public partial class SupportedCardTypes : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Set to **true** to accept credit cards.. + /// Set to **true** to accept debit cards.. + /// Set to **true** to accept cards that allow deferred debit.. + /// Set to **true** to accept prepaid cards.. + /// Set to **true** to accept card types for which the terminal can't determine the funding source while offline.. + public SupportedCardTypes(bool? credit = default(bool?), bool? debit = default(bool?), bool? deferredDebit = default(bool?), bool? prepaid = default(bool?), bool? unknown = default(bool?)) + { + this.Credit = credit; + this.Debit = debit; + this.DeferredDebit = deferredDebit; + this.Prepaid = prepaid; + this.Unknown = unknown; + } + + /// + /// Set to **true** to accept credit cards. + /// + /// Set to **true** to accept credit cards. + [DataMember(Name = "credit", EmitDefaultValue = false)] + public bool? Credit { get; set; } + + /// + /// Set to **true** to accept debit cards. + /// + /// Set to **true** to accept debit cards. + [DataMember(Name = "debit", EmitDefaultValue = false)] + public bool? Debit { get; set; } + + /// + /// Set to **true** to accept cards that allow deferred debit. + /// + /// Set to **true** to accept cards that allow deferred debit. + [DataMember(Name = "deferredDebit", EmitDefaultValue = false)] + public bool? DeferredDebit { get; set; } + + /// + /// Set to **true** to accept prepaid cards. + /// + /// Set to **true** to accept prepaid cards. + [DataMember(Name = "prepaid", EmitDefaultValue = false)] + public bool? Prepaid { get; set; } + + /// + /// Set to **true** to accept card types for which the terminal can't determine the funding source while offline. + /// + /// Set to **true** to accept card types for which the terminal can't determine the funding source while offline. + [DataMember(Name = "unknown", EmitDefaultValue = false)] + public bool? Unknown { 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 SupportedCardTypes {\n"); + sb.Append(" Credit: ").Append(Credit).Append("\n"); + sb.Append(" Debit: ").Append(Debit).Append("\n"); + sb.Append(" DeferredDebit: ").Append(DeferredDebit).Append("\n"); + sb.Append(" Prepaid: ").Append(Prepaid).Append("\n"); + sb.Append(" Unknown: ").Append(Unknown).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 SupportedCardTypes); + } + + /// + /// Returns true if SupportedCardTypes instances are equal + /// + /// Instance of SupportedCardTypes to be compared + /// Boolean + public bool Equals(SupportedCardTypes input) + { + if (input == null) + { + return false; + } + return + ( + this.Credit == input.Credit || + this.Credit.Equals(input.Credit) + ) && + ( + this.Debit == input.Debit || + this.Debit.Equals(input.Debit) + ) && + ( + this.DeferredDebit == input.DeferredDebit || + this.DeferredDebit.Equals(input.DeferredDebit) + ) && + ( + this.Prepaid == input.Prepaid || + this.Prepaid.Equals(input.Prepaid) + ) && + ( + this.Unknown == input.Unknown || + this.Unknown.Equals(input.Unknown) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Credit.GetHashCode(); + hashCode = (hashCode * 59) + this.Debit.GetHashCode(); + hashCode = (hashCode * 59) + this.DeferredDebit.GetHashCode(); + hashCode = (hashCode * 59) + this.Prepaid.GetHashCode(); + hashCode = (hashCode * 59) + this.Unknown.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/Management/TerminalSettings.cs b/Adyen/Model/Management/TerminalSettings.cs index aaa34c656..1f3ba0cd3 100644 --- a/Adyen/Model/Management/TerminalSettings.cs +++ b/Adyen/Model/Management/TerminalSettings.cs @@ -51,12 +51,13 @@ public partial class TerminalSettings : IEquatable, IValidatab /// refunds. /// signature. /// standalone. + /// storeAndForward. /// surcharge. /// tapToPay. /// terminalInstructions. /// timeouts. /// wifiProfiles. - public TerminalSettings(CardholderReceipt cardholderReceipt = default(CardholderReceipt), Connectivity connectivity = default(Connectivity), List gratuities = default(List), Hardware hardware = default(Hardware), Localization localization = default(Localization), Nexo nexo = default(Nexo), OfflineProcessing offlineProcessing = default(OfflineProcessing), Opi opi = default(Opi), Passcodes passcodes = default(Passcodes), PayAtTable payAtTable = default(PayAtTable), Payment payment = default(Payment), ReceiptOptions receiptOptions = default(ReceiptOptions), ReceiptPrinting receiptPrinting = default(ReceiptPrinting), Refunds refunds = default(Refunds), Signature signature = default(Signature), Standalone standalone = default(Standalone), Surcharge surcharge = default(Surcharge), TapToPay tapToPay = default(TapToPay), TerminalInstructions terminalInstructions = default(TerminalInstructions), Timeouts timeouts = default(Timeouts), WifiProfiles wifiProfiles = default(WifiProfiles)) + public TerminalSettings(CardholderReceipt cardholderReceipt = default(CardholderReceipt), Connectivity connectivity = default(Connectivity), List gratuities = default(List), Hardware hardware = default(Hardware), Localization localization = default(Localization), Nexo nexo = default(Nexo), OfflineProcessing offlineProcessing = default(OfflineProcessing), Opi opi = default(Opi), Passcodes passcodes = default(Passcodes), PayAtTable payAtTable = default(PayAtTable), Payment payment = default(Payment), ReceiptOptions receiptOptions = default(ReceiptOptions), ReceiptPrinting receiptPrinting = default(ReceiptPrinting), Refunds refunds = default(Refunds), Signature signature = default(Signature), Standalone standalone = default(Standalone), StoreAndForward storeAndForward = default(StoreAndForward), Surcharge surcharge = default(Surcharge), TapToPay tapToPay = default(TapToPay), TerminalInstructions terminalInstructions = default(TerminalInstructions), Timeouts timeouts = default(Timeouts), WifiProfiles wifiProfiles = default(WifiProfiles)) { this.CardholderReceipt = cardholderReceipt; this.Connectivity = connectivity; @@ -74,6 +75,7 @@ public partial class TerminalSettings : IEquatable, IValidatab this.Refunds = refunds; this.Signature = signature; this.Standalone = standalone; + this.StoreAndForward = storeAndForward; this.Surcharge = surcharge; this.TapToPay = tapToPay; this.TerminalInstructions = terminalInstructions; @@ -178,6 +180,12 @@ public partial class TerminalSettings : IEquatable, IValidatab [DataMember(Name = "standalone", EmitDefaultValue = false)] public Standalone Standalone { get; set; } + /// + /// Gets or Sets StoreAndForward + /// + [DataMember(Name = "storeAndForward", EmitDefaultValue = false)] + public StoreAndForward StoreAndForward { get; set; } + /// /// Gets or Sets Surcharge /// @@ -232,6 +240,7 @@ public override string ToString() sb.Append(" Refunds: ").Append(Refunds).Append("\n"); sb.Append(" Signature: ").Append(Signature).Append("\n"); sb.Append(" Standalone: ").Append(Standalone).Append("\n"); + sb.Append(" StoreAndForward: ").Append(StoreAndForward).Append("\n"); sb.Append(" Surcharge: ").Append(Surcharge).Append("\n"); sb.Append(" TapToPay: ").Append(TapToPay).Append("\n"); sb.Append(" TerminalInstructions: ").Append(TerminalInstructions).Append("\n"); @@ -353,6 +362,11 @@ public bool Equals(TerminalSettings input) (this.Standalone != null && this.Standalone.Equals(input.Standalone)) ) && + ( + this.StoreAndForward == input.StoreAndForward || + (this.StoreAndForward != null && + this.StoreAndForward.Equals(input.StoreAndForward)) + ) && ( this.Surcharge == input.Surcharge || (this.Surcharge != null && @@ -453,6 +467,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Standalone.GetHashCode(); } + if (this.StoreAndForward != null) + { + hashCode = (hashCode * 59) + this.StoreAndForward.GetHashCode(); + } if (this.Surcharge != null) { hashCode = (hashCode * 59) + this.Surcharge.GetHashCode(); diff --git a/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.cs b/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.cs index 7a609f00b..eaebc3c40 100644 --- a/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.cs +++ b/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.cs @@ -33,9 +33,9 @@ namespace Adyen.Model.Management public partial class UpdateSplitConfigurationLogicRequest : IEquatable, IValidatableObject { /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum AcquiringFeesEnum { @@ -55,15 +55,15 @@ public enum AcquiringFeesEnum /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [DataMember(Name = "acquiringFees", EmitDefaultValue = false)] public AcquiringFeesEnum? AcquiringFees { get; set; } /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum AdyenCommissionEnum { @@ -83,15 +83,15 @@ public enum AdyenCommissionEnum /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [DataMember(Name = "adyenCommission", EmitDefaultValue = false)] public AdyenCommissionEnum? AdyenCommission { get; set; } /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum AdyenFeesEnum { @@ -111,15 +111,15 @@ public enum AdyenFeesEnum /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [DataMember(Name = "adyenFees", EmitDefaultValue = false)] public AdyenFeesEnum? AdyenFees { get; set; } /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum AdyenMarkupEnum { @@ -139,15 +139,15 @@ public enum AdyenMarkupEnum /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [DataMember(Name = "adyenMarkup", EmitDefaultValue = false)] public AdyenMarkupEnum? AdyenMarkup { get; set; } /// - /// Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. /// - /// Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. [JsonConverter(typeof(StringEnumConverter))] public enum ChargebackEnum { @@ -173,15 +173,15 @@ public enum ChargebackEnum /// - /// Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. /// - /// Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. [DataMember(Name = "chargeback", EmitDefaultValue = false)] public ChargebackEnum? Chargeback { get; set; } /// - /// Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** /// - /// Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** [JsonConverter(typeof(StringEnumConverter))] public enum ChargebackCostAllocationEnum { @@ -201,15 +201,15 @@ public enum ChargebackCostAllocationEnum /// - /// Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** /// - /// Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** [DataMember(Name = "chargebackCostAllocation", EmitDefaultValue = false)] public ChargebackCostAllocationEnum? ChargebackCostAllocation { get; set; } /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum InterchangeEnum { @@ -229,15 +229,15 @@ public enum InterchangeEnum /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [DataMember(Name = "interchange", EmitDefaultValue = false)] public InterchangeEnum? Interchange { get; set; } /// - /// Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum PaymentFeeEnum { @@ -257,15 +257,77 @@ public enum PaymentFeeEnum /// - /// Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [DataMember(Name = "paymentFee", EmitDefaultValue = false)] public PaymentFeeEnum? PaymentFee { get; set; } /// - /// Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** /// - /// Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** + [JsonConverter(typeof(StringEnumConverter))] + public enum RefundEnum + { + /// + /// Enum DeductFromLiableAccount for value: deductFromLiableAccount + /// + [EnumMember(Value = "deductFromLiableAccount")] + DeductFromLiableAccount = 1, + + /// + /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount + /// + [EnumMember(Value = "deductFromOneBalanceAccount")] + DeductFromOneBalanceAccount = 2, + + /// + /// Enum DeductAccordingToSplitRatio for value: deductAccordingToSplitRatio + /// + [EnumMember(Value = "deductAccordingToSplitRatio")] + DeductAccordingToSplitRatio = 3 + + } + + + /// + /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** + /// + /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** + [DataMember(Name = "refund", EmitDefaultValue = false)] + public RefundEnum? Refund { get; set; } + /// + /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + /// + /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + [JsonConverter(typeof(StringEnumConverter))] + public enum RefundCostAllocationEnum + { + /// + /// Enum DeductFromLiableAccount for value: deductFromLiableAccount + /// + [EnumMember(Value = "deductFromLiableAccount")] + DeductFromLiableAccount = 1, + + /// + /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount + /// + [EnumMember(Value = "deductFromOneBalanceAccount")] + DeductFromOneBalanceAccount = 2 + + } + + + /// + /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + /// + /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + [DataMember(Name = "refundCostAllocation", EmitDefaultValue = false)] + public RefundCostAllocationEnum? RefundCostAllocation { get; set; } + /// + /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// + /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum RemainderEnum { @@ -285,15 +347,15 @@ public enum RemainderEnum /// - /// Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. [DataMember(Name = "remainder", EmitDefaultValue = false)] public RemainderEnum? Remainder { get; set; } /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum SchemeFeeEnum { @@ -313,15 +375,15 @@ public enum SchemeFeeEnum /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. [DataMember(Name = "schemeFee", EmitDefaultValue = false)] public SchemeFeeEnum? SchemeFee { get; set; } /// - /// Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** + /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** /// - /// Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** + /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** [JsonConverter(typeof(StringEnumConverter))] public enum SurchargeEnum { @@ -341,15 +403,15 @@ public enum SurchargeEnum /// - /// Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** + /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** /// - /// Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** + /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** [DataMember(Name = "surcharge", EmitDefaultValue = false)] public SurchargeEnum? Surcharge { get; set; } /// - /// Specifies the logic to apply when booking tips (gratuity). Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. /// - /// Specifies the logic to apply when booking tips (gratuity). Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. [JsonConverter(typeof(StringEnumConverter))] public enum TipEnum { @@ -369,9 +431,9 @@ public enum TipEnum /// - /// Specifies the logic to apply when booking tips (gratuity). Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. /// - /// Specifies the logic to apply when booking tips (gratuity). Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. [DataMember(Name = "tip", EmitDefaultValue = false)] public TipEnum? Tip { get; set; } /// @@ -382,21 +444,23 @@ protected UpdateSplitConfigurationLogicRequest() { } /// /// Initializes a new instance of the class. /// - /// Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. + /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. /// additionalCommission. - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**.. - /// Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. + /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. + /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. + /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**.. + /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. /// commission (required). - /// Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**.. - /// Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - /// Specifies the logic to apply when booking tips (gratuity). Possible values: **addToLiableAccount**, **addToOneBalanceAccount**.. - public UpdateSplitConfigurationLogicRequest(AcquiringFeesEnum? acquiringFees = default(AcquiringFeesEnum?), AdditionalCommission additionalCommission = default(AdditionalCommission), AdyenCommissionEnum? adyenCommission = default(AdyenCommissionEnum?), AdyenFeesEnum? adyenFees = default(AdyenFeesEnum?), AdyenMarkupEnum? adyenMarkup = default(AdyenMarkupEnum?), ChargebackEnum? chargeback = default(ChargebackEnum?), ChargebackCostAllocationEnum? chargebackCostAllocation = default(ChargebackCostAllocationEnum?), Commission commission = default(Commission), InterchangeEnum? interchange = default(InterchangeEnum?), PaymentFeeEnum? paymentFee = default(PaymentFeeEnum?), RemainderEnum? remainder = default(RemainderEnum?), SchemeFeeEnum? schemeFee = default(SchemeFeeEnum?), SurchargeEnum? surcharge = default(SurchargeEnum?), TipEnum? tip = default(TipEnum?)) + /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. + /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. + /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**.. + /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. + /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**.. + public UpdateSplitConfigurationLogicRequest(AcquiringFeesEnum? acquiringFees = default(AcquiringFeesEnum?), AdditionalCommission additionalCommission = default(AdditionalCommission), AdyenCommissionEnum? adyenCommission = default(AdyenCommissionEnum?), AdyenFeesEnum? adyenFees = default(AdyenFeesEnum?), AdyenMarkupEnum? adyenMarkup = default(AdyenMarkupEnum?), ChargebackEnum? chargeback = default(ChargebackEnum?), ChargebackCostAllocationEnum? chargebackCostAllocation = default(ChargebackCostAllocationEnum?), Commission commission = default(Commission), InterchangeEnum? interchange = default(InterchangeEnum?), PaymentFeeEnum? paymentFee = default(PaymentFeeEnum?), RefundEnum? refund = default(RefundEnum?), RefundCostAllocationEnum? refundCostAllocation = default(RefundCostAllocationEnum?), RemainderEnum? remainder = default(RemainderEnum?), SchemeFeeEnum? schemeFee = default(SchemeFeeEnum?), SurchargeEnum? surcharge = default(SurchargeEnum?), TipEnum? tip = default(TipEnum?)) { this.Commission = commission; this.AcquiringFees = acquiringFees; @@ -408,6 +472,8 @@ protected UpdateSplitConfigurationLogicRequest() { } this.ChargebackCostAllocation = chargebackCostAllocation; this.Interchange = interchange; this.PaymentFee = paymentFee; + this.Refund = refund; + this.RefundCostAllocation = refundCostAllocation; this.Remainder = remainder; this.SchemeFee = schemeFee; this.Surcharge = surcharge; @@ -427,9 +493,9 @@ protected UpdateSplitConfigurationLogicRequest() { } public Commission Commission { get; set; } /// - /// Unique identifier of the split logic that is applied when the split configuration conditions are met. + /// Unique identifier of the collection of split instructions that are applied when the rule conditions are met. /// - /// Unique identifier of the split logic that is applied when the split configuration conditions are met. + /// Unique identifier of the collection of split instructions that are applied when the rule conditions are met. [DataMember(Name = "splitLogicId", EmitDefaultValue = false)] public string SplitLogicId { get; private set; } @@ -451,6 +517,8 @@ public override string ToString() sb.Append(" Commission: ").Append(Commission).Append("\n"); sb.Append(" Interchange: ").Append(Interchange).Append("\n"); sb.Append(" PaymentFee: ").Append(PaymentFee).Append("\n"); + sb.Append(" Refund: ").Append(Refund).Append("\n"); + sb.Append(" RefundCostAllocation: ").Append(RefundCostAllocation).Append("\n"); sb.Append(" Remainder: ").Append(Remainder).Append("\n"); sb.Append(" SchemeFee: ").Append(SchemeFee).Append("\n"); sb.Append(" SplitLogicId: ").Append(SplitLogicId).Append("\n"); @@ -533,6 +601,14 @@ public bool Equals(UpdateSplitConfigurationLogicRequest input) this.PaymentFee == input.PaymentFee || this.PaymentFee.Equals(input.PaymentFee) ) && + ( + this.Refund == input.Refund || + this.Refund.Equals(input.Refund) + ) && + ( + this.RefundCostAllocation == input.RefundCostAllocation || + this.RefundCostAllocation.Equals(input.RefundCostAllocation) + ) && ( this.Remainder == input.Remainder || this.Remainder.Equals(input.Remainder) @@ -581,6 +657,8 @@ public override int GetHashCode() } hashCode = (hashCode * 59) + this.Interchange.GetHashCode(); hashCode = (hashCode * 59) + this.PaymentFee.GetHashCode(); + hashCode = (hashCode * 59) + this.Refund.GetHashCode(); + hashCode = (hashCode * 59) + this.RefundCostAllocation.GetHashCode(); hashCode = (hashCode * 59) + this.Remainder.GetHashCode(); hashCode = (hashCode * 59) + this.SchemeFee.GetHashCode(); if (this.SplitLogicId != null) diff --git a/Adyen/Model/Payment/Name.cs b/Adyen/Model/Payment/Name.cs index 89930ca7a..f525f422e 100644 --- a/Adyen/Model/Payment/Name.cs +++ b/Adyen/Model/Payment/Name.cs @@ -146,6 +146,18 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // FirstName (string) maxLength + if (this.FirstName != null && this.FirstName.Length > 80) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, length must be less than 80.", new [] { "FirstName" }); + } + + // LastName (string) maxLength + if (this.LastName != null && this.LastName.Length > 80) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, length must be less than 80.", new [] { "LastName" }); + } + yield break; } } diff --git a/Adyen/Model/Payment/PaymentRequest.cs b/Adyen/Model/Payment/PaymentRequest.cs index 74b3b4b4a..05b6b81c2 100644 --- a/Adyen/Model/Payment/PaymentRequest.cs +++ b/Adyen/Model/Payment/PaymentRequest.cs @@ -217,7 +217,7 @@ protected PaymentRequest() { } /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**.. /// The shopper's social security number.. /// An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split).. - /// The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms).. + /// Required for Adyen for Platforms integrations if you have a platform setup. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/marketplaces-and-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment.. /// The shopper's telephone number.. /// 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). @@ -564,9 +564,9 @@ protected PaymentRequest() { } public List Splits { get; set; } /// - /// The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). + /// Required for Adyen for Platforms integrations if you have a platform setup. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/marketplaces-and-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. /// - /// The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). + /// Required for Adyen for Platforms integrations if you have a platform setup. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/marketplaces-and-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. [DataMember(Name = "store", EmitDefaultValue = false)] public string Store { get; set; } diff --git a/Adyen/Model/Payment/PaymentRequest3d.cs b/Adyen/Model/Payment/PaymentRequest3d.cs index b8c09f0df..960522c54 100644 --- a/Adyen/Model/Payment/PaymentRequest3d.cs +++ b/Adyen/Model/Payment/PaymentRequest3d.cs @@ -153,7 +153,7 @@ protected PaymentRequest3d() { } /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**.. /// The shopper's social security number.. /// An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split).. - /// The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms).. + /// Required for Adyen for Platforms integrations if you have a platform setup. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/marketplaces-and-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment.. /// The shopper's telephone number.. /// 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). @@ -457,9 +457,9 @@ protected PaymentRequest3d() { } public List Splits { get; set; } /// - /// The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). + /// Required for Adyen for Platforms integrations if you have a platform setup. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/marketplaces-and-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. /// - /// The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). + /// Required for Adyen for Platforms integrations if you have a platform setup. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/marketplaces-and-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. [DataMember(Name = "store", EmitDefaultValue = false)] public string Store { get; set; } diff --git a/Adyen/Model/Payment/PaymentRequest3ds2.cs b/Adyen/Model/Payment/PaymentRequest3ds2.cs index 2d60c090d..d7bc40cb2 100644 --- a/Adyen/Model/Payment/PaymentRequest3ds2.cs +++ b/Adyen/Model/Payment/PaymentRequest3ds2.cs @@ -151,7 +151,7 @@ protected PaymentRequest3ds2() { } /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**.. /// The shopper's social security number.. /// An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split).. - /// The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms).. + /// Required for Adyen for Platforms integrations if you have a platform setup. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/marketplaces-and-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment.. /// The shopper's telephone number.. /// threeDS2RequestData. /// threeDS2Result. @@ -443,9 +443,9 @@ protected PaymentRequest3ds2() { } public List Splits { get; set; } /// - /// The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). + /// Required for Adyen for Platforms integrations if you have a platform setup. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/marketplaces-and-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. /// - /// The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). + /// Required for Adyen for Platforms integrations if you have a platform setup. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/marketplaces-and-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. [DataMember(Name = "store", EmitDefaultValue = false)] public string Store { get; set; } diff --git a/Adyen/Model/Payment/Split.cs b/Adyen/Model/Payment/Split.cs index eedc7c81a..25acb7803 100644 --- a/Adyen/Model/Payment/Split.cs +++ b/Adyen/Model/Payment/Split.cs @@ -39,59 +39,95 @@ public partial class Split : IEquatable, IValidatableObject [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { + /// + /// 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 MarketPlace for value: MarketPlace /// [EnumMember(Value = "MarketPlace")] - MarketPlace = 4, + MarketPlace = 9, /// /// Enum PaymentFee for value: PaymentFee /// [EnumMember(Value = "PaymentFee")] - PaymentFee = 5, + PaymentFee = 10, /// /// Enum Remainder for value: Remainder /// [EnumMember(Value = "Remainder")] - Remainder = 6, + Remainder = 11, + + /// + /// Enum SchemeFee for value: SchemeFee + /// + [EnumMember(Value = "SchemeFee")] + SchemeFee = 12, /// /// Enum Surcharge for value: Surcharge /// [EnumMember(Value = "Surcharge")] - Surcharge = 7, + Surcharge = 13, /// /// Enum Tip for value: Tip /// [EnumMember(Value = "Tip")] - Tip = 8, + Tip = 14, /// /// Enum VAT for value: VAT /// [EnumMember(Value = "VAT")] - VAT = 9 + VAT = 15 } diff --git a/Adyen/Model/Payment/ThreeDS2RequestData.cs b/Adyen/Model/Payment/ThreeDS2RequestData.cs index 08b877930..744b70d5f 100644 --- a/Adyen/Model/Payment/ThreeDS2RequestData.cs +++ b/Adyen/Model/Payment/ThreeDS2RequestData.cs @@ -136,6 +136,40 @@ public enum ChallengeIndicatorEnum [Obsolete] public ChallengeIndicatorEnum? ChallengeIndicator { get; set; } /// + /// The platform of the shopper. Allowed values: * `iOS` * `android` * `browser` + /// + /// The platform of the shopper. Allowed values: * `iOS` * `android` * `browser` + [JsonConverter(typeof(StringEnumConverter))] + public enum PlatformEnum + { + /// + /// Enum IOS for value: iOS + /// + [EnumMember(Value = "iOS")] + IOS = 1, + + /// + /// Enum Android for value: android + /// + [EnumMember(Value = "android")] + Android = 2, + + /// + /// Enum Browser for value: browser + /// + [EnumMember(Value = "browser")] + Browser = 3 + + } + + + /// + /// The platform of the shopper. Allowed values: * `iOS` * `android` * `browser` + /// + /// The platform of the shopper. Allowed values: * `iOS` * `android` * `browser` + [DataMember(Name = "platform", EmitDefaultValue = false)] + public PlatformEnum? Platform { get; set; } + /// /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only /// /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only @@ -304,6 +338,7 @@ protected ThreeDS2RequestData() { } /// URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**.. /// Value **true** indicates that the transaction was de-tokenised prior to being received by the ACS.. /// Indicates the type of payment for which an authentication is requested (message extension). + /// The platform of the shopper. Allowed values: * `iOS` * `android` * `browser`. /// Indicates the maximum number of authorisations permitted for instalment payments. Length: 1–3 characters.. /// Date after which no further authorisations shall be performed. Format: YYYYMMDD. /// Indicates the minimum number of days between authorisations. Maximum length: 4 characters.. @@ -326,7 +361,7 @@ protected ThreeDS2RequestData() { } /// Identify the type of the transaction being authenticated.. /// The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0.. /// workPhone. - public ThreeDS2RequestData(AcctInfo acctInfo = default(AcctInfo), AcctTypeEnum? acctType = default(AcctTypeEnum?), string acquirerBIN = default(string), string acquirerMerchantID = default(string), AddrMatchEnum? addrMatch = default(AddrMatchEnum?), bool? authenticationOnly = false, ChallengeIndicatorEnum? challengeIndicator = default(ChallengeIndicatorEnum?), string deviceChannel = default(string), DeviceRenderOptions deviceRenderOptions = default(DeviceRenderOptions), Phone homePhone = default(Phone), string mcc = default(string), string merchantName = default(string), string messageVersion = default(string), Phone mobilePhone = default(Phone), string notificationURL = default(string), bool? payTokenInd = default(bool?), string paymentAuthenticationUseCase = default(string), string purchaseInstalData = default(string), string recurringExpiry = default(string), string recurringFrequency = default(string), string sdkAppID = default(string), string sdkEncData = default(string), SDKEphemPubKey sdkEphemPubKey = default(SDKEphemPubKey), int? sdkMaxTimeout = 60, string sdkReferenceNumber = default(string), string sdkTransID = default(string), string sdkVersion = default(string), string threeDSCompInd = default(string), string threeDSRequestorAuthenticationInd = default(string), ThreeDSRequestorAuthenticationInfo threeDSRequestorAuthenticationInfo = default(ThreeDSRequestorAuthenticationInfo), ThreeDSRequestorChallengeIndEnum? threeDSRequestorChallengeInd = default(ThreeDSRequestorChallengeIndEnum?), string threeDSRequestorID = default(string), string threeDSRequestorName = default(string), ThreeDSRequestorPriorAuthenticationInfo threeDSRequestorPriorAuthenticationInfo = default(ThreeDSRequestorPriorAuthenticationInfo), string threeDSRequestorURL = default(string), TransTypeEnum? transType = default(TransTypeEnum?), TransactionTypeEnum? transactionType = default(TransactionTypeEnum?), string whiteListStatus = default(string), Phone workPhone = default(Phone)) + public ThreeDS2RequestData(AcctInfo acctInfo = default(AcctInfo), AcctTypeEnum? acctType = default(AcctTypeEnum?), string acquirerBIN = default(string), string acquirerMerchantID = default(string), AddrMatchEnum? addrMatch = default(AddrMatchEnum?), bool? authenticationOnly = false, ChallengeIndicatorEnum? challengeIndicator = default(ChallengeIndicatorEnum?), string deviceChannel = default(string), DeviceRenderOptions deviceRenderOptions = default(DeviceRenderOptions), Phone homePhone = default(Phone), string mcc = default(string), string merchantName = default(string), string messageVersion = default(string), Phone mobilePhone = default(Phone), string notificationURL = default(string), bool? payTokenInd = default(bool?), string paymentAuthenticationUseCase = default(string), PlatformEnum? platform = default(PlatformEnum?), string purchaseInstalData = default(string), string recurringExpiry = default(string), string recurringFrequency = default(string), string sdkAppID = default(string), string sdkEncData = default(string), SDKEphemPubKey sdkEphemPubKey = default(SDKEphemPubKey), int? sdkMaxTimeout = 60, string sdkReferenceNumber = default(string), string sdkTransID = default(string), string sdkVersion = default(string), string threeDSCompInd = default(string), string threeDSRequestorAuthenticationInd = default(string), ThreeDSRequestorAuthenticationInfo threeDSRequestorAuthenticationInfo = default(ThreeDSRequestorAuthenticationInfo), ThreeDSRequestorChallengeIndEnum? threeDSRequestorChallengeInd = default(ThreeDSRequestorChallengeIndEnum?), string threeDSRequestorID = default(string), string threeDSRequestorName = default(string), ThreeDSRequestorPriorAuthenticationInfo threeDSRequestorPriorAuthenticationInfo = default(ThreeDSRequestorPriorAuthenticationInfo), string threeDSRequestorURL = default(string), TransTypeEnum? transType = default(TransTypeEnum?), TransactionTypeEnum? transactionType = default(TransactionTypeEnum?), string whiteListStatus = default(string), Phone workPhone = default(Phone)) { this.DeviceChannel = deviceChannel; this.AcctInfo = acctInfo; @@ -345,6 +380,7 @@ protected ThreeDS2RequestData() { } this.NotificationURL = notificationURL; this.PayTokenInd = payTokenInd; this.PaymentAuthenticationUseCase = paymentAuthenticationUseCase; + this.Platform = platform; this.PurchaseInstalData = purchaseInstalData; this.RecurringExpiry = recurringExpiry; this.RecurringFrequency = recurringFrequency; @@ -618,6 +654,7 @@ public override string ToString() sb.Append(" NotificationURL: ").Append(NotificationURL).Append("\n"); sb.Append(" PayTokenInd: ").Append(PayTokenInd).Append("\n"); sb.Append(" PaymentAuthenticationUseCase: ").Append(PaymentAuthenticationUseCase).Append("\n"); + sb.Append(" Platform: ").Append(Platform).Append("\n"); sb.Append(" PurchaseInstalData: ").Append(PurchaseInstalData).Append("\n"); sb.Append(" RecurringExpiry: ").Append(RecurringExpiry).Append("\n"); sb.Append(" RecurringFrequency: ").Append(RecurringFrequency).Append("\n"); @@ -755,6 +792,10 @@ public bool Equals(ThreeDS2RequestData input) (this.PaymentAuthenticationUseCase != null && this.PaymentAuthenticationUseCase.Equals(input.PaymentAuthenticationUseCase)) ) && + ( + this.Platform == input.Platform || + this.Platform.Equals(input.Platform) + ) && ( this.PurchaseInstalData == input.PurchaseInstalData || (this.PurchaseInstalData != null && @@ -925,6 +966,7 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.PaymentAuthenticationUseCase.GetHashCode(); } + hashCode = (hashCode * 59) + this.Platform.GetHashCode(); if (this.PurchaseInstalData != null) { hashCode = (hashCode * 59) + this.PurchaseInstalData.GetHashCode(); diff --git a/Adyen/Model/Payout/Name.cs b/Adyen/Model/Payout/Name.cs index c291e326b..359d3438a 100644 --- a/Adyen/Model/Payout/Name.cs +++ b/Adyen/Model/Payout/Name.cs @@ -146,6 +146,18 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // FirstName (string) maxLength + if (this.FirstName != null && this.FirstName.Length > 80) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, length must be less than 80.", new [] { "FirstName" }); + } + + // LastName (string) maxLength + if (this.LastName != null && this.LastName.Length > 80) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, length must be less than 80.", new [] { "LastName" }); + } + yield break; } } diff --git a/Adyen/Model/Recurring/Name.cs b/Adyen/Model/Recurring/Name.cs index ef181e954..1e2bd6711 100644 --- a/Adyen/Model/Recurring/Name.cs +++ b/Adyen/Model/Recurring/Name.cs @@ -146,6 +146,18 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // FirstName (string) maxLength + if (this.FirstName != null && this.FirstName.Length > 80) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, length must be less than 80.", new [] { "FirstName" }); + } + + // LastName (string) maxLength + if (this.LastName != null && this.LastName.Length > 80) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, length must be less than 80.", new [] { "LastName" }); + } + yield break; } } diff --git a/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.cs index ffd556e9b..649b83e91 100644 --- a/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.cs @@ -64,12 +64,15 @@ protected AULocalAccountIdentification() { } /// /// The bank account number, without separators or whitespace. (required). /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **auLocal** (required) (default to TypeEnum.AuLocal). - public AULocalAccountIdentification(string accountNumber = default(string), string bsbCode = default(string), TypeEnum type = TypeEnum.AuLocal) + public AULocalAccountIdentification(string accountNumber = default(string), string bsbCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.AuLocal) { this.AccountNumber = accountNumber; this.BsbCode = bsbCode; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -86,6 +89,13 @@ protected AULocalAccountIdentification() { } [DataMember(Name = "bsbCode", IsRequired = false, EmitDefaultValue = false)] public string BsbCode { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class AULocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" BsbCode: ").Append(BsbCode).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(AULocalAccountIdentification input) (this.BsbCode != null && this.BsbCode.Equals(input.BsbCode)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.BsbCode.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.cs index 7b1e3e327..38bad0c5e 100644 --- a/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.cs @@ -65,13 +65,16 @@ protected BRLocalAccountIdentification() { } /// The bank account number, without separators or whitespace. (required). /// The 3-digit bank code, with leading zeros. (required). /// The bank account branch number, without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **brLocal** (required) (default to TypeEnum.BrLocal). - public BRLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string branchNumber = default(string), TypeEnum type = TypeEnum.BrLocal) + public BRLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string branchNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.BrLocal) { this.AccountNumber = accountNumber; this.BankCode = bankCode; this.BranchNumber = branchNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -95,6 +98,13 @@ protected BRLocalAccountIdentification() { } [DataMember(Name = "branchNumber", IsRequired = false, EmitDefaultValue = false)] public string BranchNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -106,6 +116,7 @@ public override string ToString() sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" BankCode: ").Append(BankCode).Append("\n"); sb.Append(" BranchNumber: ").Append(BranchNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -157,6 +168,11 @@ public bool Equals(BRLocalAccountIdentification input) (this.BranchNumber != null && this.BranchNumber.Equals(input.BranchNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -184,6 +200,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.BranchNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.cs index fed732ce1..2ca0a6eb8 100644 --- a/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.cs @@ -92,16 +92,19 @@ protected CALocalAccountIdentification() { } /// /// The 5- to 12-digit bank account number, without separators or whitespace. (required). /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// The 3-digit institution number, without separators or whitespace. (required). /// The 5-digit transit number, without separators or whitespace. (required). /// **caLocal** (required) (default to TypeEnum.CaLocal). - public CALocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string institutionNumber = default(string), string transitNumber = default(string), TypeEnum type = TypeEnum.CaLocal) + public CALocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string formFactor = "physical", string institutionNumber = default(string), string transitNumber = default(string), TypeEnum type = TypeEnum.CaLocal) { this.AccountNumber = accountNumber; this.InstitutionNumber = institutionNumber; this.TransitNumber = transitNumber; this.Type = type; this.AccountType = accountType; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -111,6 +114,13 @@ protected CALocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// The 3-digit institution number, without separators or whitespace. /// @@ -135,6 +145,7 @@ public override string ToString() sb.Append("class CALocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" AccountType: ").Append(AccountType).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" InstitutionNumber: ").Append(InstitutionNumber).Append("\n"); sb.Append(" TransitNumber: ").Append(TransitNumber).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); @@ -182,6 +193,11 @@ public bool Equals(CALocalAccountIdentification input) this.AccountType == input.AccountType || this.AccountType.Equals(input.AccountType) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.InstitutionNumber == input.InstitutionNumber || (this.InstitutionNumber != null && @@ -212,6 +228,10 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } if (this.InstitutionNumber != null) { hashCode = (hashCode * 59) + this.InstitutionNumber.GetHashCode(); diff --git a/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.cs index f5abd4dc5..f12cda61c 100644 --- a/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.cs @@ -64,12 +64,15 @@ protected CZLocalAccountIdentification() { } /// /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) (required). /// The 4-digit bank code (Kód banky), without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **czLocal** (required) (default to TypeEnum.CzLocal). - public CZLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.CzLocal) + public CZLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.CzLocal) { this.AccountNumber = accountNumber; this.BankCode = bankCode; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -86,6 +89,13 @@ protected CZLocalAccountIdentification() { } [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] public string BankCode { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class CZLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" BankCode: ").Append(BankCode).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(CZLocalAccountIdentification input) (this.BankCode != null && this.BankCode.Equals(input.BankCode)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.cs index 70de06423..0f8efffa6 100644 --- a/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.cs @@ -64,12 +64,15 @@ protected DKLocalAccountIdentification() { } /// /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). (required). /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **dkLocal** (required) (default to TypeEnum.DkLocal). - public DKLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.DkLocal) + public DKLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.DkLocal) { this.AccountNumber = accountNumber; this.BankCode = bankCode; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -86,6 +89,13 @@ protected DKLocalAccountIdentification() { } [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] public string BankCode { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class DKLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" BankCode: ").Append(BankCode).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(DKLocalAccountIdentification input) (this.BankCode != null && this.BankCode.Equals(input.BankCode)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.cs index a86982f41..8bd73b185 100644 --- a/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.cs @@ -64,12 +64,15 @@ protected HKLocalAccountIdentification() { } /// /// The 9- to 15-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). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **hkLocal** (required) (default to TypeEnum.HkLocal). - public HKLocalAccountIdentification(string accountNumber = default(string), string clearingCode = default(string), TypeEnum type = TypeEnum.HkLocal) + public HKLocalAccountIdentification(string accountNumber = default(string), string clearingCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.HkLocal) { this.AccountNumber = accountNumber; this.ClearingCode = clearingCode; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -86,6 +89,13 @@ protected HKLocalAccountIdentification() { } [DataMember(Name = "clearingCode", IsRequired = false, EmitDefaultValue = false)] public string ClearingCode { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class HKLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" ClearingCode: ").Append(ClearingCode).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(HKLocalAccountIdentification input) (this.ClearingCode != null && this.ClearingCode.Equals(input.ClearingCode)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ClearingCode.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.cs index 0c194b29c..4c6ead60c 100644 --- a/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.cs @@ -63,11 +63,14 @@ protected HULocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 24-digit bank account number, without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **huLocal** (required) (default to TypeEnum.HuLocal). - public HULocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.HuLocal) + public HULocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.HuLocal) { this.AccountNumber = accountNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -77,6 +80,13 @@ protected HULocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -86,6 +96,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class HULocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -127,6 +138,11 @@ public bool Equals(HULocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -146,6 +162,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/TransferWebhooks/IbanAccountIdentification.cs b/Adyen/Model/TransferWebhooks/IbanAccountIdentification.cs index 840440053..9742fcf31 100644 --- a/Adyen/Model/TransferWebhooks/IbanAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/IbanAccountIdentification.cs @@ -62,14 +62,24 @@ protected IbanAccountIdentification() { } /// /// Initializes a new instance of the class. /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. (required). /// **iban** (required) (default to TypeEnum.Iban). - public IbanAccountIdentification(string iban = default(string), TypeEnum type = TypeEnum.Iban) + public IbanAccountIdentification(string formFactor = "physical", string iban = default(string), TypeEnum type = TypeEnum.Iban) { this.Iban = iban; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. /// @@ -85,6 +95,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class IbanAccountIdentification {\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Iban: ").Append(Iban).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); @@ -122,6 +133,11 @@ public bool Equals(IbanAccountIdentification input) return false; } return + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Iban == input.Iban || (this.Iban != null && @@ -142,6 +158,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } if (this.Iban != null) { hashCode = (hashCode * 59) + this.Iban.GetHashCode(); diff --git a/Adyen/Model/TransferWebhooks/Modification.cs b/Adyen/Model/TransferWebhooks/Modification.cs index addcd1987..1c657560c 100644 --- a/Adyen/Model/TransferWebhooks/Modification.cs +++ b/Adyen/Model/TransferWebhooks/Modification.cs @@ -387,41 +387,47 @@ public enum StatusEnum [EnumMember(Value = "refused")] Refused = 58, + /// + /// Enum Rejected for value: rejected + /// + [EnumMember(Value = "rejected")] + Rejected = 59, + /// /// Enum ReserveAdjustment for value: reserveAdjustment /// [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 59, + ReserveAdjustment = 60, /// /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending /// [EnumMember(Value = "reserveAdjustmentPending")] - ReserveAdjustmentPending = 60, + ReserveAdjustmentPending = 61, /// /// Enum Returned for value: returned /// [EnumMember(Value = "returned")] - Returned = 61, + Returned = 62, /// /// Enum SecondChargeback for value: secondChargeback /// [EnumMember(Value = "secondChargeback")] - SecondChargeback = 62, + SecondChargeback = 63, /// /// Enum SecondChargebackPending for value: secondChargebackPending /// [EnumMember(Value = "secondChargebackPending")] - SecondChargebackPending = 63, + SecondChargebackPending = 64, /// /// Enum Undefined for value: undefined /// [EnumMember(Value = "undefined")] - Undefined = 64 + Undefined = 65 } diff --git a/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.cs index ddfa7726e..250b26018 100644 --- a/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.cs @@ -63,11 +63,14 @@ protected NOLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 11-digit bank account number, without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **noLocal** (required) (default to TypeEnum.NoLocal). - public NOLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NoLocal) + public NOLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.NoLocal) { this.AccountNumber = accountNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -77,6 +80,13 @@ protected NOLocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -86,6 +96,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class NOLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -127,6 +138,11 @@ public bool Equals(NOLocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -146,6 +162,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.cs index 0f73302b6..0091ff4f7 100644 --- a/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.cs @@ -63,11 +63,14 @@ protected NZLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// 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). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **nzLocal** (required) (default to TypeEnum.NzLocal). - public NZLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NzLocal) + public NZLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.NzLocal) { this.AccountNumber = accountNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -77,6 +80,13 @@ protected NZLocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -86,6 +96,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class NZLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -127,6 +138,11 @@ public bool Equals(NZLocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -146,6 +162,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.cs b/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.cs index 697ad6e8e..cab1694a8 100644 --- a/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.cs @@ -65,13 +65,16 @@ protected NumberAndBicAccountIdentification() { } /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. (required). /// additionalBankIdentification. /// The bank's 8- or 11-character BIC or SWIFT code. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **numberAndBic** (required) (default to TypeEnum.NumberAndBic). - public NumberAndBicAccountIdentification(string accountNumber = default(string), AdditionalBankIdentification additionalBankIdentification = default(AdditionalBankIdentification), string bic = default(string), TypeEnum type = TypeEnum.NumberAndBic) + public NumberAndBicAccountIdentification(string accountNumber = default(string), AdditionalBankIdentification additionalBankIdentification = default(AdditionalBankIdentification), string bic = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.NumberAndBic) { this.AccountNumber = accountNumber; this.Bic = bic; this.Type = type; this.AdditionalBankIdentification = additionalBankIdentification; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -94,6 +97,13 @@ protected NumberAndBicAccountIdentification() { } [DataMember(Name = "bic", IsRequired = false, EmitDefaultValue = false)] public string Bic { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -105,6 +115,7 @@ public override string ToString() sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" AdditionalBankIdentification: ").Append(AdditionalBankIdentification).Append("\n"); sb.Append(" Bic: ").Append(Bic).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -156,6 +167,11 @@ public bool Equals(NumberAndBicAccountIdentification input) (this.Bic != null && this.Bic.Equals(input.Bic)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -183,6 +199,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Bic.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.cs index 429f6bd7d..bbc4117eb 100644 --- a/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.cs @@ -63,11 +63,14 @@ protected PLLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **plLocal** (required) (default to TypeEnum.PlLocal). - public PLLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.PlLocal) + public PLLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.PlLocal) { this.AccountNumber = accountNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -77,6 +80,13 @@ protected PLLocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -86,6 +96,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class PLLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -127,6 +138,11 @@ public bool Equals(PLLocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -146,6 +162,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.cs index 8fcb831c7..a0a9bf66c 100644 --- a/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.cs @@ -64,12 +64,15 @@ protected SELocalAccountIdentification() { } /// /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. (required). /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **seLocal** (required) (default to TypeEnum.SeLocal). - public SELocalAccountIdentification(string accountNumber = default(string), string clearingNumber = default(string), TypeEnum type = TypeEnum.SeLocal) + public SELocalAccountIdentification(string accountNumber = default(string), string clearingNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.SeLocal) { this.AccountNumber = accountNumber; this.ClearingNumber = clearingNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -86,6 +89,13 @@ protected SELocalAccountIdentification() { } [DataMember(Name = "clearingNumber", IsRequired = false, EmitDefaultValue = false)] public string ClearingNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class SELocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" ClearingNumber: ").Append(ClearingNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(SELocalAccountIdentification input) (this.ClearingNumber != null && this.ClearingNumber.Equals(input.ClearingNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ClearingNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.cs index 7fcc9c416..7da6746f8 100644 --- a/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.cs @@ -64,11 +64,14 @@ protected SGLocalAccountIdentification() { } /// /// The 4- to 19-digit bank account number, without separators or whitespace. (required). /// The bank's 8- or 11-character BIC or SWIFT code. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **sgLocal** (default to TypeEnum.SgLocal). - public SGLocalAccountIdentification(string accountNumber = default(string), string bic = default(string), TypeEnum? type = TypeEnum.SgLocal) + public SGLocalAccountIdentification(string accountNumber = default(string), string bic = default(string), string formFactor = "physical", TypeEnum? type = TypeEnum.SgLocal) { this.AccountNumber = accountNumber; this.Bic = bic; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; this.Type = type; } @@ -86,6 +89,13 @@ protected SGLocalAccountIdentification() { } [DataMember(Name = "bic", IsRequired = false, EmitDefaultValue = false)] public string Bic { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class SGLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" Bic: ").Append(Bic).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(SGLocalAccountIdentification input) (this.Bic != null && this.Bic.Equals(input.Bic)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Bic.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/TransferWebhooks/TransferData.cs b/Adyen/Model/TransferWebhooks/TransferData.cs index f8829b67c..7a4be3f04 100644 --- a/Adyen/Model/TransferWebhooks/TransferData.cs +++ b/Adyen/Model/TransferWebhooks/TransferData.cs @@ -567,41 +567,47 @@ public enum StatusEnum [EnumMember(Value = "refused")] Refused = 58, + /// + /// Enum Rejected for value: rejected + /// + [EnumMember(Value = "rejected")] + Rejected = 59, + /// /// Enum ReserveAdjustment for value: reserveAdjustment /// [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 59, + ReserveAdjustment = 60, /// /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending /// [EnumMember(Value = "reserveAdjustmentPending")] - ReserveAdjustmentPending = 60, + ReserveAdjustmentPending = 61, /// /// Enum Returned for value: returned /// [EnumMember(Value = "returned")] - Returned = 61, + Returned = 62, /// /// Enum SecondChargeback for value: secondChargeback /// [EnumMember(Value = "secondChargeback")] - SecondChargeback = 62, + SecondChargeback = 63, /// /// Enum SecondChargebackPending for value: secondChargebackPending /// [EnumMember(Value = "secondChargebackPending")] - SecondChargebackPending = 63, + SecondChargebackPending = 64, /// /// Enum Undefined for value: undefined /// [EnumMember(Value = "undefined")] - Undefined = 64 + Undefined = 65 } @@ -649,179 +655,191 @@ public enum TypeEnum [EnumMember(Value = "balanceRollover")] BalanceRollover = 5, + /// + /// Enum BankDirectDebit for value: bankDirectDebit + /// + [EnumMember(Value = "bankDirectDebit")] + BankDirectDebit = 6, + /// /// Enum BankTransfer for value: bankTransfer /// [EnumMember(Value = "bankTransfer")] - BankTransfer = 6, + BankTransfer = 7, /// /// Enum Capture for value: capture /// [EnumMember(Value = "capture")] - Capture = 7, + Capture = 8, /// /// Enum CaptureReversal for value: captureReversal /// [EnumMember(Value = "captureReversal")] - CaptureReversal = 8, + CaptureReversal = 9, /// /// Enum CardTransfer for value: cardTransfer /// [EnumMember(Value = "cardTransfer")] - CardTransfer = 9, + CardTransfer = 10, /// /// Enum CashOutFee for value: cashOutFee /// [EnumMember(Value = "cashOutFee")] - CashOutFee = 10, + CashOutFee = 11, /// /// Enum CashOutFunding for value: cashOutFunding /// [EnumMember(Value = "cashOutFunding")] - CashOutFunding = 11, + CashOutFunding = 12, /// /// Enum CashOutInstruction for value: cashOutInstruction /// [EnumMember(Value = "cashOutInstruction")] - CashOutInstruction = 12, + CashOutInstruction = 13, /// /// Enum Chargeback for value: chargeback /// [EnumMember(Value = "chargeback")] - Chargeback = 13, + Chargeback = 14, /// /// Enum ChargebackCorrection for value: chargebackCorrection /// [EnumMember(Value = "chargebackCorrection")] - ChargebackCorrection = 14, + ChargebackCorrection = 15, /// /// Enum ChargebackReversal for value: chargebackReversal /// [EnumMember(Value = "chargebackReversal")] - ChargebackReversal = 15, + ChargebackReversal = 16, /// /// Enum ChargebackReversalCorrection for value: chargebackReversalCorrection /// [EnumMember(Value = "chargebackReversalCorrection")] - ChargebackReversalCorrection = 16, + ChargebackReversalCorrection = 17, /// /// Enum DepositCorrection for value: depositCorrection /// [EnumMember(Value = "depositCorrection")] - DepositCorrection = 17, + DepositCorrection = 18, /// /// Enum Fee for value: fee /// [EnumMember(Value = "fee")] - Fee = 18, + Fee = 19, /// /// Enum Grant for value: grant /// [EnumMember(Value = "grant")] - Grant = 19, + Grant = 20, /// /// Enum Installment for value: installment /// [EnumMember(Value = "installment")] - Installment = 20, + Installment = 21, /// /// Enum InstallmentReversal for value: installmentReversal /// [EnumMember(Value = "installmentReversal")] - InstallmentReversal = 21, + InstallmentReversal = 22, + + /// + /// Enum InternalDirectDebit for value: internalDirectDebit + /// + [EnumMember(Value = "internalDirectDebit")] + InternalDirectDebit = 23, /// /// Enum InternalTransfer for value: internalTransfer /// [EnumMember(Value = "internalTransfer")] - InternalTransfer = 22, + InternalTransfer = 24, /// /// Enum InvoiceDeduction for value: invoiceDeduction /// [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 23, + InvoiceDeduction = 25, /// /// Enum Leftover for value: leftover /// [EnumMember(Value = "leftover")] - Leftover = 24, + Leftover = 26, /// /// Enum ManualCorrection for value: manualCorrection /// [EnumMember(Value = "manualCorrection")] - ManualCorrection = 25, + ManualCorrection = 27, /// /// Enum MiscCost for value: miscCost /// [EnumMember(Value = "miscCost")] - MiscCost = 26, + MiscCost = 28, /// /// Enum Payment for value: payment /// [EnumMember(Value = "payment")] - Payment = 27, + Payment = 29, /// /// Enum PaymentCost for value: paymentCost /// [EnumMember(Value = "paymentCost")] - PaymentCost = 28, + PaymentCost = 30, /// /// Enum Refund for value: refund /// [EnumMember(Value = "refund")] - Refund = 29, + Refund = 31, /// /// Enum RefundReversal for value: refundReversal /// [EnumMember(Value = "refundReversal")] - RefundReversal = 30, + RefundReversal = 32, /// /// Enum Repayment for value: repayment /// [EnumMember(Value = "repayment")] - Repayment = 31, + Repayment = 33, /// /// Enum ReserveAdjustment for value: reserveAdjustment /// [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 32, + ReserveAdjustment = 34, /// /// Enum SecondChargeback for value: secondChargeback /// [EnumMember(Value = "secondChargeback")] - SecondChargeback = 33, + SecondChargeback = 35, /// /// Enum SecondChargebackCorrection for value: secondChargebackCorrection /// [EnumMember(Value = "secondChargebackCorrection")] - SecondChargebackCorrection = 34 + SecondChargebackCorrection = 36 } diff --git a/Adyen/Model/TransferWebhooks/TransferEvent.cs b/Adyen/Model/TransferWebhooks/TransferEvent.cs index f89dfc829..e1118f1b0 100644 --- a/Adyen/Model/TransferWebhooks/TransferEvent.cs +++ b/Adyen/Model/TransferWebhooks/TransferEvent.cs @@ -499,41 +499,47 @@ public enum StatusEnum [EnumMember(Value = "refused")] Refused = 58, + /// + /// Enum Rejected for value: rejected + /// + [EnumMember(Value = "rejected")] + Rejected = 59, + /// /// Enum ReserveAdjustment for value: reserveAdjustment /// [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 59, + ReserveAdjustment = 60, /// /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending /// [EnumMember(Value = "reserveAdjustmentPending")] - ReserveAdjustmentPending = 60, + ReserveAdjustmentPending = 61, /// /// Enum Returned for value: returned /// [EnumMember(Value = "returned")] - Returned = 61, + Returned = 62, /// /// Enum SecondChargeback for value: secondChargeback /// [EnumMember(Value = "secondChargeback")] - SecondChargeback = 62, + SecondChargeback = 63, /// /// Enum SecondChargebackPending for value: secondChargebackPending /// [EnumMember(Value = "secondChargebackPending")] - SecondChargebackPending = 63, + SecondChargebackPending = 64, /// /// Enum Undefined for value: undefined /// [EnumMember(Value = "undefined")] - Undefined = 64 + Undefined = 65 } diff --git a/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.cs index 558228009..132615750 100644 --- a/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.cs @@ -63,13 +63,16 @@ protected UKLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 8-digit bank account number, without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. (required). /// **ukLocal** (required) (default to TypeEnum.UkLocal). - public UKLocalAccountIdentification(string accountNumber = default(string), string sortCode = default(string), TypeEnum type = TypeEnum.UkLocal) + public UKLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", string sortCode = default(string), TypeEnum type = TypeEnum.UkLocal) { this.AccountNumber = accountNumber; this.SortCode = sortCode; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -79,6 +82,13 @@ protected UKLocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. /// @@ -95,6 +105,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class UKLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" SortCode: ").Append(SortCode).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); @@ -137,6 +148,11 @@ public bool Equals(UKLocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.SortCode == input.SortCode || (this.SortCode != null && @@ -161,6 +177,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } if (this.SortCode != null) { hashCode = (hashCode * 59) + this.SortCode.GetHashCode(); diff --git a/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.cs index 343796272..b1b24bad7 100644 --- a/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.cs +++ b/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.cs @@ -92,14 +92,17 @@ protected USLocalAccountIdentification() { } /// /// The bank account number, without separators or whitespace. (required). /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. (required). /// **usLocal** (required) (default to TypeEnum.UsLocal). - public USLocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string routingNumber = default(string), TypeEnum type = TypeEnum.UsLocal) + public USLocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string formFactor = "physical", string routingNumber = default(string), TypeEnum type = TypeEnum.UsLocal) { this.AccountNumber = accountNumber; this.RoutingNumber = routingNumber; this.Type = type; this.AccountType = accountType; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -109,6 +112,13 @@ protected USLocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. /// @@ -126,6 +136,7 @@ public override string ToString() sb.Append("class USLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" AccountType: ").Append(AccountType).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" RoutingNumber: ").Append(RoutingNumber).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); @@ -172,6 +183,11 @@ public bool Equals(USLocalAccountIdentification input) this.AccountType == input.AccountType || this.AccountType.Equals(input.AccountType) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.RoutingNumber == input.RoutingNumber || (this.RoutingNumber != null && @@ -197,6 +213,10 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } if (this.RoutingNumber != null) { hashCode = (hashCode * 59) + this.RoutingNumber.GetHashCode(); diff --git a/Adyen/Model/Transfers/AULocalAccountIdentification.cs b/Adyen/Model/Transfers/AULocalAccountIdentification.cs index c73bc6570..1cf9a3593 100644 --- a/Adyen/Model/Transfers/AULocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/AULocalAccountIdentification.cs @@ -64,12 +64,15 @@ protected AULocalAccountIdentification() { } /// /// The bank account number, without separators or whitespace. (required). /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **auLocal** (required) (default to TypeEnum.AuLocal). - public AULocalAccountIdentification(string accountNumber = default(string), string bsbCode = default(string), TypeEnum type = TypeEnum.AuLocal) + public AULocalAccountIdentification(string accountNumber = default(string), string bsbCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.AuLocal) { this.AccountNumber = accountNumber; this.BsbCode = bsbCode; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -86,6 +89,13 @@ protected AULocalAccountIdentification() { } [DataMember(Name = "bsbCode", IsRequired = false, EmitDefaultValue = false)] public string BsbCode { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class AULocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" BsbCode: ").Append(BsbCode).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(AULocalAccountIdentification input) (this.BsbCode != null && this.BsbCode.Equals(input.BsbCode)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.BsbCode.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/Transfers/AmountAdjustment.cs b/Adyen/Model/Transfers/AmountAdjustment.cs new file mode 100644 index 000000000..3dbf9ee94 --- /dev/null +++ b/Adyen/Model/Transfers/AmountAdjustment.cs @@ -0,0 +1,191 @@ +/* +* Transfers API +* +* +* The version of the OpenAPI document: 4 +* +* 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 +{ + /// + /// AmountAdjustment + /// + [DataContract(Name = "AmountAdjustment")] + public partial class AmountAdjustment : IEquatable, IValidatableObject + { + /// + /// The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**. + /// + /// The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**. + [JsonConverter(typeof(StringEnumConverter))] + public enum AmountAdjustmentTypeEnum + { + /// + /// Enum AtmMarkup for value: atmMarkup + /// + [EnumMember(Value = "atmMarkup")] + AtmMarkup = 1, + + /// + /// Enum AuthHoldReserve for value: authHoldReserve + /// + [EnumMember(Value = "authHoldReserve")] + AuthHoldReserve = 2, + + /// + /// Enum Exchange for value: exchange + /// + [EnumMember(Value = "exchange")] + Exchange = 3, + + /// + /// Enum ForexMarkup for value: forexMarkup + /// + [EnumMember(Value = "forexMarkup")] + ForexMarkup = 4 + + } + + + /// + /// The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**. + /// + /// The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**. + [DataMember(Name = "amountAdjustmentType", EmitDefaultValue = false)] + public AmountAdjustmentTypeEnum? AmountAdjustmentType { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// amount. + /// The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**.. + /// The basepoints associated with the applied markup.. + public AmountAdjustment(Amount amount = default(Amount), AmountAdjustmentTypeEnum? amountAdjustmentType = default(AmountAdjustmentTypeEnum?), int? basepoints = default(int?)) + { + this.Amount = amount; + this.AmountAdjustmentType = amountAdjustmentType; + this.Basepoints = basepoints; + } + + /// + /// Gets or Sets Amount + /// + [DataMember(Name = "amount", EmitDefaultValue = false)] + public Amount Amount { get; set; } + + /// + /// The basepoints associated with the applied markup. + /// + /// The basepoints associated with the applied markup. + [DataMember(Name = "basepoints", EmitDefaultValue = false)] + public int? Basepoints { 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 AmountAdjustment {\n"); + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" AmountAdjustmentType: ").Append(AmountAdjustmentType).Append("\n"); + sb.Append(" Basepoints: ").Append(Basepoints).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 AmountAdjustment); + } + + /// + /// Returns true if AmountAdjustment instances are equal + /// + /// Instance of AmountAdjustment to be compared + /// Boolean + public bool Equals(AmountAdjustment input) + { + if (input == null) + { + return false; + } + return + ( + this.Amount == input.Amount || + (this.Amount != null && + this.Amount.Equals(input.Amount)) + ) && + ( + this.AmountAdjustmentType == input.AmountAdjustmentType || + this.AmountAdjustmentType.Equals(input.AmountAdjustmentType) + ) && + ( + this.Basepoints == input.Basepoints || + this.Basepoints.Equals(input.Basepoints) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Amount != null) + { + hashCode = (hashCode * 59) + this.Amount.GetHashCode(); + } + hashCode = (hashCode * 59) + this.AmountAdjustmentType.GetHashCode(); + hashCode = (hashCode * 59) + this.Basepoints.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/BRLocalAccountIdentification.cs b/Adyen/Model/Transfers/BRLocalAccountIdentification.cs index cdd1ba9bb..f75e00f67 100644 --- a/Adyen/Model/Transfers/BRLocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/BRLocalAccountIdentification.cs @@ -65,13 +65,16 @@ protected BRLocalAccountIdentification() { } /// The bank account number, without separators or whitespace. (required). /// The 3-digit bank code, with leading zeros. (required). /// The bank account branch number, without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **brLocal** (required) (default to TypeEnum.BrLocal). - public BRLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string branchNumber = default(string), TypeEnum type = TypeEnum.BrLocal) + public BRLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string branchNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.BrLocal) { this.AccountNumber = accountNumber; this.BankCode = bankCode; this.BranchNumber = branchNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -95,6 +98,13 @@ protected BRLocalAccountIdentification() { } [DataMember(Name = "branchNumber", IsRequired = false, EmitDefaultValue = false)] public string BranchNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -106,6 +116,7 @@ public override string ToString() sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" BankCode: ").Append(BankCode).Append("\n"); sb.Append(" BranchNumber: ").Append(BranchNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -157,6 +168,11 @@ public bool Equals(BRLocalAccountIdentification input) (this.BranchNumber != null && this.BranchNumber.Equals(input.BranchNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -184,6 +200,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.BranchNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/Transfers/BalanceMutation.cs b/Adyen/Model/Transfers/BalanceMutation.cs new file mode 100644 index 000000000..ca32ab37e --- /dev/null +++ b/Adyen/Model/Transfers/BalanceMutation.cs @@ -0,0 +1,174 @@ +/* +* Transfers API +* +* +* The version of the OpenAPI document: 4 +* +* 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 +{ + /// + /// BalanceMutation + /// + [DataContract(Name = "BalanceMutation")] + public partial class BalanceMutation : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The amount in the payment's currency that is debited or credited on the balance accounting register.. + /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).. + /// The amount in the payment's currency that is debited or credited on the received accounting register.. + /// The amount in the payment's currency that is debited or credited on the reserved accounting register.. + public BalanceMutation(long? balance = default(long?), string currency = default(string), long? received = default(long?), long? reserved = default(long?)) + { + this.Balance = balance; + this.Currency = currency; + this.Received = received; + this.Reserved = reserved; + } + + /// + /// The amount in the payment's currency that is debited or credited on the balance accounting register. + /// + /// The amount in the payment's currency that is debited or credited on the balance accounting register. + [DataMember(Name = "balance", EmitDefaultValue = false)] + public long? Balance { get; set; } + + /// + /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + /// + /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + [DataMember(Name = "currency", EmitDefaultValue = false)] + public string Currency { get; set; } + + /// + /// The amount in the payment's currency that is debited or credited on the received accounting register. + /// + /// The amount in the payment's currency that is debited or credited on the received accounting register. + [DataMember(Name = "received", EmitDefaultValue = false)] + public long? Received { get; set; } + + /// + /// The amount in the payment's currency that is debited or credited on the reserved accounting register. + /// + /// The amount in the payment's currency that is debited or credited on the reserved accounting register. + [DataMember(Name = "reserved", EmitDefaultValue = false)] + public long? Reserved { 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 BalanceMutation {\n"); + sb.Append(" Balance: ").Append(Balance).Append("\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); + sb.Append(" Received: ").Append(Received).Append("\n"); + sb.Append(" Reserved: ").Append(Reserved).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 BalanceMutation); + } + + /// + /// Returns true if BalanceMutation instances are equal + /// + /// Instance of BalanceMutation to be compared + /// Boolean + public bool Equals(BalanceMutation input) + { + if (input == null) + { + return false; + } + return + ( + this.Balance == input.Balance || + this.Balance.Equals(input.Balance) + ) && + ( + this.Currency == input.Currency || + (this.Currency != null && + this.Currency.Equals(input.Currency)) + ) && + ( + this.Received == input.Received || + this.Received.Equals(input.Received) + ) && + ( + this.Reserved == input.Reserved || + this.Reserved.Equals(input.Reserved) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Balance.GetHashCode(); + if (this.Currency != null) + { + hashCode = (hashCode * 59) + this.Currency.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Received.GetHashCode(); + hashCode = (hashCode * 59) + this.Reserved.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/CALocalAccountIdentification.cs b/Adyen/Model/Transfers/CALocalAccountIdentification.cs index fc961d81d..289d52abd 100644 --- a/Adyen/Model/Transfers/CALocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/CALocalAccountIdentification.cs @@ -92,16 +92,19 @@ protected CALocalAccountIdentification() { } /// /// The 5- to 12-digit bank account number, without separators or whitespace. (required). /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// The 3-digit institution number, without separators or whitespace. (required). /// The 5-digit transit number, without separators or whitespace. (required). /// **caLocal** (required) (default to TypeEnum.CaLocal). - public CALocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string institutionNumber = default(string), string transitNumber = default(string), TypeEnum type = TypeEnum.CaLocal) + public CALocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string formFactor = "physical", string institutionNumber = default(string), string transitNumber = default(string), TypeEnum type = TypeEnum.CaLocal) { this.AccountNumber = accountNumber; this.InstitutionNumber = institutionNumber; this.TransitNumber = transitNumber; this.Type = type; this.AccountType = accountType; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -111,6 +114,13 @@ protected CALocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// The 3-digit institution number, without separators or whitespace. /// @@ -135,6 +145,7 @@ public override string ToString() sb.Append("class CALocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" AccountType: ").Append(AccountType).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" InstitutionNumber: ").Append(InstitutionNumber).Append("\n"); sb.Append(" TransitNumber: ").Append(TransitNumber).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); @@ -182,6 +193,11 @@ public bool Equals(CALocalAccountIdentification input) this.AccountType == input.AccountType || this.AccountType.Equals(input.AccountType) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.InstitutionNumber == input.InstitutionNumber || (this.InstitutionNumber != null && @@ -212,6 +228,10 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } if (this.InstitutionNumber != null) { hashCode = (hashCode * 59) + this.InstitutionNumber.GetHashCode(); diff --git a/Adyen/Model/Transfers/CZLocalAccountIdentification.cs b/Adyen/Model/Transfers/CZLocalAccountIdentification.cs index 7baf2d303..0f5eeb3dd 100644 --- a/Adyen/Model/Transfers/CZLocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/CZLocalAccountIdentification.cs @@ -64,12 +64,15 @@ protected CZLocalAccountIdentification() { } /// /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) (required). /// The 4-digit bank code (Kód banky), without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **czLocal** (required) (default to TypeEnum.CzLocal). - public CZLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.CzLocal) + public CZLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.CzLocal) { this.AccountNumber = accountNumber; this.BankCode = bankCode; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -86,6 +89,13 @@ protected CZLocalAccountIdentification() { } [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] public string BankCode { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class CZLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" BankCode: ").Append(BankCode).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(CZLocalAccountIdentification input) (this.BankCode != null && this.BankCode.Equals(input.BankCode)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/Transfers/DKLocalAccountIdentification.cs b/Adyen/Model/Transfers/DKLocalAccountIdentification.cs index 3a29c95a0..1643f9453 100644 --- a/Adyen/Model/Transfers/DKLocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/DKLocalAccountIdentification.cs @@ -64,12 +64,15 @@ protected DKLocalAccountIdentification() { } /// /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). (required). /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **dkLocal** (required) (default to TypeEnum.DkLocal). - public DKLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.DkLocal) + public DKLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.DkLocal) { this.AccountNumber = accountNumber; this.BankCode = bankCode; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -86,6 +89,13 @@ protected DKLocalAccountIdentification() { } [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] public string BankCode { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class DKLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" BankCode: ").Append(BankCode).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(DKLocalAccountIdentification input) (this.BankCode != null && this.BankCode.Equals(input.BankCode)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/Transfers/FindTransfersResponse.cs b/Adyen/Model/Transfers/FindTransfersResponse.cs new file mode 100644 index 000000000..8d7aa423e --- /dev/null +++ b/Adyen/Model/Transfers/FindTransfersResponse.cs @@ -0,0 +1,148 @@ +/* +* Transfers API +* +* +* The version of the OpenAPI document: 4 +* +* 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 +{ + /// + /// FindTransfersResponse + /// + [DataContract(Name = "FindTransfersResponse")] + public partial class FindTransfersResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// links. + /// Contains the transfers that match the query parameters.. + public FindTransfersResponse(Links links = default(Links), List data = default(List)) + { + this.Links = links; + this.Data = data; + } + + /// + /// Gets or Sets Links + /// + [DataMember(Name = "_links", EmitDefaultValue = false)] + public Links Links { get; set; } + + /// + /// Contains the transfers that match the query parameters. + /// + /// Contains the transfers that match the query parameters. + [DataMember(Name = "data", EmitDefaultValue = false)] + public List Data { 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 FindTransfersResponse {\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" Data: ").Append(Data).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 FindTransfersResponse); + } + + /// + /// Returns true if FindTransfersResponse instances are equal + /// + /// Instance of FindTransfersResponse to be compared + /// Boolean + public bool Equals(FindTransfersResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.Links == input.Links || + (this.Links != null && + this.Links.Equals(input.Links)) + ) && + ( + this.Data == input.Data || + this.Data != null && + input.Data != null && + this.Data.SequenceEqual(input.Data) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Links != null) + { + hashCode = (hashCode * 59) + this.Links.GetHashCode(); + } + if (this.Data != null) + { + hashCode = (hashCode * 59) + this.Data.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 eb7eada4e..5ce1d6664 100644 --- a/Adyen/Model/Transfers/HKLocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/HKLocalAccountIdentification.cs @@ -64,12 +64,15 @@ protected HKLocalAccountIdentification() { } /// /// The 9- to 15-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). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **hkLocal** (required) (default to TypeEnum.HkLocal). - public HKLocalAccountIdentification(string accountNumber = default(string), string clearingCode = default(string), TypeEnum type = TypeEnum.HkLocal) + public HKLocalAccountIdentification(string accountNumber = default(string), string clearingCode = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.HkLocal) { this.AccountNumber = accountNumber; this.ClearingCode = clearingCode; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -86,6 +89,13 @@ protected HKLocalAccountIdentification() { } [DataMember(Name = "clearingCode", IsRequired = false, EmitDefaultValue = false)] public string ClearingCode { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class HKLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" ClearingCode: ").Append(ClearingCode).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(HKLocalAccountIdentification input) (this.ClearingCode != null && this.ClearingCode.Equals(input.ClearingCode)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ClearingCode.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/Transfers/HULocalAccountIdentification.cs b/Adyen/Model/Transfers/HULocalAccountIdentification.cs index 2a3945077..aa51c05d7 100644 --- a/Adyen/Model/Transfers/HULocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/HULocalAccountIdentification.cs @@ -63,11 +63,14 @@ protected HULocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 24-digit bank account number, without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **huLocal** (required) (default to TypeEnum.HuLocal). - public HULocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.HuLocal) + public HULocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.HuLocal) { this.AccountNumber = accountNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -77,6 +80,13 @@ protected HULocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -86,6 +96,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class HULocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -127,6 +138,11 @@ public bool Equals(HULocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -146,6 +162,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/Transfers/IbanAccountIdentification.cs b/Adyen/Model/Transfers/IbanAccountIdentification.cs index 20c892836..be5d4e799 100644 --- a/Adyen/Model/Transfers/IbanAccountIdentification.cs +++ b/Adyen/Model/Transfers/IbanAccountIdentification.cs @@ -62,14 +62,24 @@ protected IbanAccountIdentification() { } /// /// Initializes a new instance of the class. /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. (required). /// **iban** (required) (default to TypeEnum.Iban). - public IbanAccountIdentification(string iban = default(string), TypeEnum type = TypeEnum.Iban) + public IbanAccountIdentification(string formFactor = "physical", string iban = default(string), TypeEnum type = TypeEnum.Iban) { this.Iban = iban; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. /// @@ -85,6 +95,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class IbanAccountIdentification {\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Iban: ").Append(Iban).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); @@ -122,6 +133,11 @@ public bool Equals(IbanAccountIdentification input) return false; } return + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Iban == input.Iban || (this.Iban != null && @@ -142,6 +158,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } if (this.Iban != null) { hashCode = (hashCode * 59) + this.Iban.GetHashCode(); diff --git a/Adyen/Model/Transfers/Link.cs b/Adyen/Model/Transfers/Link.cs index 07e555b1d..c71f539c0 100644 --- a/Adyen/Model/Transfers/Link.cs +++ b/Adyen/Model/Transfers/Link.cs @@ -35,15 +35,16 @@ public partial class Link : IEquatable, IValidatableObject /// /// Initializes a new instance of the class. /// - /// href. + /// The link to the resource.. public Link(string href = default(string)) { this.Href = href; } /// - /// Gets or Sets Href + /// The link to the resource. /// + /// The link to the resource. [DataMember(Name = "href", EmitDefaultValue = false)] public string Href { get; set; } diff --git a/Adyen/Model/Transfers/Modification.cs b/Adyen/Model/Transfers/Modification.cs new file mode 100644 index 000000000..2810591c9 --- /dev/null +++ b/Adyen/Model/Transfers/Modification.cs @@ -0,0 +1,600 @@ +/* +* Transfers API +* +* +* The version of the OpenAPI document: 4 +* +* 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 +{ + /// + /// 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 Rejected for value: rejected + /// + [EnumMember(Value = "rejected")] + Rejected = 59, + + /// + /// Enum ReserveAdjustment for value: reserveAdjustment + /// + [EnumMember(Value = "reserveAdjustment")] + ReserveAdjustment = 60, + + /// + /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending + /// + [EnumMember(Value = "reserveAdjustmentPending")] + ReserveAdjustmentPending = 61, + + /// + /// Enum Returned for value: returned + /// + [EnumMember(Value = "returned")] + Returned = 62, + + /// + /// Enum SecondChargeback for value: secondChargeback + /// + [EnumMember(Value = "secondChargeback")] + SecondChargeback = 63, + + /// + /// Enum SecondChargebackPending for value: secondChargebackPending + /// + [EnumMember(Value = "secondChargebackPending")] + SecondChargebackPending = 64, + + /// + /// Enum Undefined for value: undefined + /// + [EnumMember(Value = "undefined")] + Undefined = 65 + + } + + + /// + /// 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/Transfers/NOLocalAccountIdentification.cs b/Adyen/Model/Transfers/NOLocalAccountIdentification.cs index 21a6de275..d4d25e97d 100644 --- a/Adyen/Model/Transfers/NOLocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/NOLocalAccountIdentification.cs @@ -63,11 +63,14 @@ protected NOLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 11-digit bank account number, without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **noLocal** (required) (default to TypeEnum.NoLocal). - public NOLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NoLocal) + public NOLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.NoLocal) { this.AccountNumber = accountNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -77,6 +80,13 @@ protected NOLocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -86,6 +96,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class NOLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -127,6 +138,11 @@ public bool Equals(NOLocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -146,6 +162,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/Transfers/NZLocalAccountIdentification.cs b/Adyen/Model/Transfers/NZLocalAccountIdentification.cs index db7bc6b61..c8559f1c7 100644 --- a/Adyen/Model/Transfers/NZLocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/NZLocalAccountIdentification.cs @@ -63,11 +63,14 @@ protected NZLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// 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). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **nzLocal** (required) (default to TypeEnum.NzLocal). - public NZLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NzLocal) + public NZLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.NzLocal) { this.AccountNumber = accountNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -77,6 +80,13 @@ protected NZLocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -86,6 +96,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class NZLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -127,6 +138,11 @@ public bool Equals(NZLocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -146,6 +162,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/Transfers/NumberAndBicAccountIdentification.cs b/Adyen/Model/Transfers/NumberAndBicAccountIdentification.cs index 92c34e628..757ccdfbb 100644 --- a/Adyen/Model/Transfers/NumberAndBicAccountIdentification.cs +++ b/Adyen/Model/Transfers/NumberAndBicAccountIdentification.cs @@ -65,13 +65,16 @@ protected NumberAndBicAccountIdentification() { } /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. (required). /// additionalBankIdentification. /// The bank's 8- or 11-character BIC or SWIFT code. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **numberAndBic** (required) (default to TypeEnum.NumberAndBic). - public NumberAndBicAccountIdentification(string accountNumber = default(string), AdditionalBankIdentification additionalBankIdentification = default(AdditionalBankIdentification), string bic = default(string), TypeEnum type = TypeEnum.NumberAndBic) + public NumberAndBicAccountIdentification(string accountNumber = default(string), AdditionalBankIdentification additionalBankIdentification = default(AdditionalBankIdentification), string bic = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.NumberAndBic) { this.AccountNumber = accountNumber; this.Bic = bic; this.Type = type; this.AdditionalBankIdentification = additionalBankIdentification; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -94,6 +97,13 @@ protected NumberAndBicAccountIdentification() { } [DataMember(Name = "bic", IsRequired = false, EmitDefaultValue = false)] public string Bic { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -105,6 +115,7 @@ public override string ToString() sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" AdditionalBankIdentification: ").Append(AdditionalBankIdentification).Append("\n"); sb.Append(" Bic: ").Append(Bic).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -156,6 +167,11 @@ public bool Equals(NumberAndBicAccountIdentification input) (this.Bic != null && this.Bic.Equals(input.Bic)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -183,6 +199,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Bic.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/Transfers/PLLocalAccountIdentification.cs b/Adyen/Model/Transfers/PLLocalAccountIdentification.cs index 886cd3d87..da1a5fa03 100644 --- a/Adyen/Model/Transfers/PLLocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/PLLocalAccountIdentification.cs @@ -63,11 +63,14 @@ protected PLLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **plLocal** (required) (default to TypeEnum.PlLocal). - public PLLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.PlLocal) + public PLLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.PlLocal) { this.AccountNumber = accountNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -77,6 +80,13 @@ protected PLLocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -86,6 +96,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class PLLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -127,6 +138,11 @@ public bool Equals(PLLocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -146,6 +162,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/Transfers/SELocalAccountIdentification.cs b/Adyen/Model/Transfers/SELocalAccountIdentification.cs index 127079745..6403bbdae 100644 --- a/Adyen/Model/Transfers/SELocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/SELocalAccountIdentification.cs @@ -64,12 +64,15 @@ protected SELocalAccountIdentification() { } /// /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. (required). /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **seLocal** (required) (default to TypeEnum.SeLocal). - public SELocalAccountIdentification(string accountNumber = default(string), string clearingNumber = default(string), TypeEnum type = TypeEnum.SeLocal) + public SELocalAccountIdentification(string accountNumber = default(string), string clearingNumber = default(string), string formFactor = "physical", TypeEnum type = TypeEnum.SeLocal) { this.AccountNumber = accountNumber; this.ClearingNumber = clearingNumber; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -86,6 +89,13 @@ protected SELocalAccountIdentification() { } [DataMember(Name = "clearingNumber", IsRequired = false, EmitDefaultValue = false)] public string ClearingNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class SELocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" ClearingNumber: ").Append(ClearingNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(SELocalAccountIdentification input) (this.ClearingNumber != null && this.ClearingNumber.Equals(input.ClearingNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ClearingNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/Transfers/SGLocalAccountIdentification.cs b/Adyen/Model/Transfers/SGLocalAccountIdentification.cs index ff769d54f..a463862a7 100644 --- a/Adyen/Model/Transfers/SGLocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/SGLocalAccountIdentification.cs @@ -64,11 +64,14 @@ protected SGLocalAccountIdentification() { } /// /// The 4- to 19-digit bank account number, without separators or whitespace. (required). /// The bank's 8- or 11-character BIC or SWIFT code. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// **sgLocal** (default to TypeEnum.SgLocal). - public SGLocalAccountIdentification(string accountNumber = default(string), string bic = default(string), TypeEnum? type = TypeEnum.SgLocal) + public SGLocalAccountIdentification(string accountNumber = default(string), string bic = default(string), string formFactor = "physical", TypeEnum? type = TypeEnum.SgLocal) { this.AccountNumber = accountNumber; this.Bic = bic; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; this.Type = type; } @@ -86,6 +89,13 @@ protected SGLocalAccountIdentification() { } [DataMember(Name = "bic", IsRequired = false, EmitDefaultValue = false)] public string Bic { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// Returns the string presentation of the object /// @@ -96,6 +106,7 @@ public override string ToString() sb.Append("class SGLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" Bic: ").Append(Bic).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -142,6 +153,11 @@ public bool Equals(SGLocalAccountIdentification input) (this.Bic != null && this.Bic.Equals(input.Bic)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -165,6 +181,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Bic.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/Transfers/Transaction.cs b/Adyen/Model/Transfers/Transaction.cs index 73238e16d..602440f42 100644 --- a/Adyen/Model/Transfers/Transaction.cs +++ b/Adyen/Model/Transfers/Transaction.cs @@ -78,7 +78,7 @@ protected Transaction() { } /// The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. (required). /// transfer. /// The date the transfer amount becomes available in the balance account. (required). - public Transaction(ResourceReference accountHolder = default(ResourceReference), Amount amount = default(Amount), ResourceReference balanceAccount = default(ResourceReference), string balancePlatform = default(string), DateTime bookingDate = default(DateTime), DateTime creationDate = default(DateTime), string id = default(string), StatusEnum status = default(StatusEnum), TransferData transfer = default(TransferData), DateTime valueDate = default(DateTime)) + public Transaction(ResourceReference accountHolder = default(ResourceReference), Amount amount = default(Amount), ResourceReference balanceAccount = default(ResourceReference), string balancePlatform = default(string), DateTime bookingDate = default(DateTime), DateTime creationDate = default(DateTime), string id = default(string), StatusEnum status = default(StatusEnum), TransferView transfer = default(TransferView), DateTime valueDate = default(DateTime)) { this.AccountHolder = accountHolder; this.Amount = amount; @@ -142,7 +142,7 @@ protected Transaction() { } /// Gets or Sets Transfer /// [DataMember(Name = "transfer", EmitDefaultValue = false)] - public TransferData Transfer { get; set; } + public TransferView Transfer { get; set; } /// /// The date the transfer amount becomes available in the balance account. diff --git a/Adyen/Model/Transfers/TransactionEventViolation.cs b/Adyen/Model/Transfers/TransactionEventViolation.cs new file mode 100644 index 000000000..6b220514d --- /dev/null +++ b/Adyen/Model/Transfers/TransactionEventViolation.cs @@ -0,0 +1,165 @@ +/* +* Transfers API +* +* +* The version of the OpenAPI document: 4 +* +* 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 +{ + /// + /// TransactionEventViolation + /// + [DataContract(Name = "TransactionEventViolation")] + public partial class TransactionEventViolation : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// An explanation about why the transaction rule failed.. + /// transactionRule. + /// transactionRuleSource. + public TransactionEventViolation(string reason = default(string), TransactionRuleReference transactionRule = default(TransactionRuleReference), TransactionRuleSource transactionRuleSource = default(TransactionRuleSource)) + { + this.Reason = reason; + this.TransactionRule = transactionRule; + this.TransactionRuleSource = transactionRuleSource; + } + + /// + /// An explanation about why the transaction rule failed. + /// + /// An explanation about why the transaction rule failed. + [DataMember(Name = "reason", EmitDefaultValue = false)] + public string Reason { get; set; } + + /// + /// Gets or Sets TransactionRule + /// + [DataMember(Name = "transactionRule", EmitDefaultValue = false)] + public TransactionRuleReference TransactionRule { get; set; } + + /// + /// Gets or Sets TransactionRuleSource + /// + [DataMember(Name = "transactionRuleSource", EmitDefaultValue = false)] + public TransactionRuleSource TransactionRuleSource { 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 TransactionEventViolation {\n"); + sb.Append(" Reason: ").Append(Reason).Append("\n"); + sb.Append(" TransactionRule: ").Append(TransactionRule).Append("\n"); + sb.Append(" TransactionRuleSource: ").Append(TransactionRuleSource).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 TransactionEventViolation); + } + + /// + /// Returns true if TransactionEventViolation instances are equal + /// + /// Instance of TransactionEventViolation to be compared + /// Boolean + public bool Equals(TransactionEventViolation input) + { + if (input == null) + { + return false; + } + return + ( + this.Reason == input.Reason || + (this.Reason != null && + this.Reason.Equals(input.Reason)) + ) && + ( + this.TransactionRule == input.TransactionRule || + (this.TransactionRule != null && + this.TransactionRule.Equals(input.TransactionRule)) + ) && + ( + this.TransactionRuleSource == input.TransactionRuleSource || + (this.TransactionRuleSource != null && + this.TransactionRuleSource.Equals(input.TransactionRuleSource)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Reason != null) + { + hashCode = (hashCode * 59) + this.Reason.GetHashCode(); + } + if (this.TransactionRule != null) + { + hashCode = (hashCode * 59) + this.TransactionRule.GetHashCode(); + } + if (this.TransactionRuleSource != null) + { + hashCode = (hashCode * 59) + this.TransactionRuleSource.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/TransactionRuleReference.cs b/Adyen/Model/Transfers/TransactionRuleReference.cs new file mode 100644 index 000000000..8f5f0251f --- /dev/null +++ b/Adyen/Model/Transfers/TransactionRuleReference.cs @@ -0,0 +1,201 @@ +/* +* Transfers API +* +* +* The version of the OpenAPI document: 4 +* +* 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 +{ + /// + /// TransactionRuleReference + /// + [DataContract(Name = "TransactionRuleReference")] + public partial class TransactionRuleReference : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The description of the resource.. + /// The unique identifier of the resource.. + /// The outcome type of the rule.. + /// The reference for the resource.. + /// The score of the rule in case it's a scoreBased rule.. + public TransactionRuleReference(string description = default(string), string id = default(string), string outcomeType = default(string), string reference = default(string), int? score = default(int?)) + { + this.Description = description; + this.Id = id; + this.OutcomeType = outcomeType; + this.Reference = reference; + this.Score = score; + } + + /// + /// The description of the resource. + /// + /// The description of the resource. + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// The unique identifier of the resource. + /// + /// The unique identifier of the resource. + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// The outcome type of the rule. + /// + /// The outcome type of the rule. + [DataMember(Name = "outcomeType", EmitDefaultValue = false)] + public string OutcomeType { get; set; } + + /// + /// The reference for the resource. + /// + /// The reference for the resource. + [DataMember(Name = "reference", EmitDefaultValue = false)] + public string Reference { get; set; } + + /// + /// The score of the rule in case it's a scoreBased rule. + /// + /// The score of the rule in case it's a scoreBased rule. + [DataMember(Name = "score", EmitDefaultValue = false)] + public int? Score { 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 TransactionRuleReference {\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" OutcomeType: ").Append(OutcomeType).Append("\n"); + sb.Append(" Reference: ").Append(Reference).Append("\n"); + sb.Append(" Score: ").Append(Score).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 TransactionRuleReference); + } + + /// + /// Returns true if TransactionRuleReference instances are equal + /// + /// Instance of TransactionRuleReference to be compared + /// Boolean + public bool Equals(TransactionRuleReference input) + { + if (input == null) + { + return false; + } + return + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.OutcomeType == input.OutcomeType || + (this.OutcomeType != null && + this.OutcomeType.Equals(input.OutcomeType)) + ) && + ( + this.Reference == input.Reference || + (this.Reference != null && + this.Reference.Equals(input.Reference)) + ) && + ( + this.Score == input.Score || + this.Score.Equals(input.Score) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Description != null) + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.OutcomeType != null) + { + hashCode = (hashCode * 59) + this.OutcomeType.GetHashCode(); + } + if (this.Reference != null) + { + hashCode = (hashCode * 59) + this.Reference.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Score.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/TransactionRuleSource.cs b/Adyen/Model/Transfers/TransactionRuleSource.cs new file mode 100644 index 000000000..d94c4e2a4 --- /dev/null +++ b/Adyen/Model/Transfers/TransactionRuleSource.cs @@ -0,0 +1,148 @@ +/* +* Transfers API +* +* +* The version of the OpenAPI document: 4 +* +* 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 +{ + /// + /// TransactionRuleSource + /// + [DataContract(Name = "TransactionRuleSource")] + public partial class TransactionRuleSource : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// ID of the resource, when applicable.. + /// Indicates the type of resource for which the transaction rule is defined. Possible values: * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** * **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide rule imposed by Adyen.. + public TransactionRuleSource(string id = default(string), string type = default(string)) + { + this.Id = id; + this.Type = type; + } + + /// + /// ID of the resource, when applicable. + /// + /// ID of the resource, when applicable. + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Indicates the type of resource for which the transaction rule is defined. Possible values: * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** * **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide rule imposed by Adyen. + /// + /// Indicates the type of resource for which the transaction rule is defined. Possible values: * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** * **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide rule imposed by Adyen. + [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 TransactionRuleSource {\n"); + sb.Append(" Id: ").Append(Id).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 TransactionRuleSource); + } + + /// + /// Returns true if TransactionRuleSource instances are equal + /// + /// Instance of TransactionRuleSource to be compared + /// Boolean + public bool Equals(TransactionRuleSource input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + 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.Id != null) + { + hashCode = (hashCode * 59) + this.Id.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/TransactionRulesResult.cs b/Adyen/Model/Transfers/TransactionRulesResult.cs new file mode 100644 index 000000000..6145d28cf --- /dev/null +++ b/Adyen/Model/Transfers/TransactionRulesResult.cs @@ -0,0 +1,179 @@ +/* +* Transfers API +* +* +* The version of the OpenAPI document: 4 +* +* 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 +{ + /// + /// TransactionRulesResult + /// + [DataContract(Name = "TransactionRulesResult")] + public partial class TransactionRulesResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The advice given by the Risk analysis.. + /// Indicates whether the transaction passed the evaluation for all hardblock rules. + /// The score of the Risk analysis.. + /// Array containing all the transaction rules that the transaction triggered.. + public TransactionRulesResult(string advice = default(string), bool? allHardBlockRulesPassed = default(bool?), int? score = default(int?), List triggeredTransactionRules = default(List)) + { + this.Advice = advice; + this.AllHardBlockRulesPassed = allHardBlockRulesPassed; + this.Score = score; + this.TriggeredTransactionRules = triggeredTransactionRules; + } + + /// + /// The advice given by the Risk analysis. + /// + /// The advice given by the Risk analysis. + [DataMember(Name = "advice", EmitDefaultValue = false)] + public string Advice { get; set; } + + /// + /// Indicates whether the transaction passed the evaluation for all hardblock rules + /// + /// Indicates whether the transaction passed the evaluation for all hardblock rules + [DataMember(Name = "allHardBlockRulesPassed", EmitDefaultValue = false)] + public bool? AllHardBlockRulesPassed { get; set; } + + /// + /// The score of the Risk analysis. + /// + /// The score of the Risk analysis. + [DataMember(Name = "score", EmitDefaultValue = false)] + public int? Score { get; set; } + + /// + /// Array containing all the transaction rules that the transaction triggered. + /// + /// Array containing all the transaction rules that the transaction triggered. + [DataMember(Name = "triggeredTransactionRules", EmitDefaultValue = false)] + public List TriggeredTransactionRules { 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 TransactionRulesResult {\n"); + sb.Append(" Advice: ").Append(Advice).Append("\n"); + sb.Append(" AllHardBlockRulesPassed: ").Append(AllHardBlockRulesPassed).Append("\n"); + sb.Append(" Score: ").Append(Score).Append("\n"); + sb.Append(" TriggeredTransactionRules: ").Append(TriggeredTransactionRules).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 TransactionRulesResult); + } + + /// + /// Returns true if TransactionRulesResult instances are equal + /// + /// Instance of TransactionRulesResult to be compared + /// Boolean + public bool Equals(TransactionRulesResult input) + { + if (input == null) + { + return false; + } + return + ( + this.Advice == input.Advice || + (this.Advice != null && + this.Advice.Equals(input.Advice)) + ) && + ( + this.AllHardBlockRulesPassed == input.AllHardBlockRulesPassed || + this.AllHardBlockRulesPassed.Equals(input.AllHardBlockRulesPassed) + ) && + ( + this.Score == input.Score || + this.Score.Equals(input.Score) + ) && + ( + this.TriggeredTransactionRules == input.TriggeredTransactionRules || + this.TriggeredTransactionRules != null && + input.TriggeredTransactionRules != null && + this.TriggeredTransactionRules.SequenceEqual(input.TriggeredTransactionRules) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Advice != null) + { + hashCode = (hashCode * 59) + this.Advice.GetHashCode(); + } + hashCode = (hashCode * 59) + this.AllHardBlockRulesPassed.GetHashCode(); + hashCode = (hashCode * 59) + this.Score.GetHashCode(); + if (this.TriggeredTransactionRules != null) + { + hashCode = (hashCode * 59) + this.TriggeredTransactionRules.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/Transfer.cs b/Adyen/Model/Transfers/Transfer.cs index 12e66f1cb..5af71b023 100644 --- a/Adyen/Model/Transfers/Transfer.cs +++ b/Adyen/Model/Transfers/Transfer.cs @@ -567,41 +567,47 @@ public enum StatusEnum [EnumMember(Value = "refused")] Refused = 58, + /// + /// Enum Rejected for value: rejected + /// + [EnumMember(Value = "rejected")] + Rejected = 59, + /// /// Enum ReserveAdjustment for value: reserveAdjustment /// [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 59, + ReserveAdjustment = 60, /// /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending /// [EnumMember(Value = "reserveAdjustmentPending")] - ReserveAdjustmentPending = 60, + ReserveAdjustmentPending = 61, /// /// Enum Returned for value: returned /// [EnumMember(Value = "returned")] - Returned = 61, + Returned = 62, /// /// Enum SecondChargeback for value: secondChargeback /// [EnumMember(Value = "secondChargeback")] - SecondChargeback = 62, + SecondChargeback = 63, /// /// Enum SecondChargebackPending for value: secondChargebackPending /// [EnumMember(Value = "secondChargebackPending")] - SecondChargebackPending = 63, + SecondChargebackPending = 64, /// /// Enum Undefined for value: undefined /// [EnumMember(Value = "undefined")] - Undefined = 64 + Undefined = 65 } @@ -613,6 +619,238 @@ public enum StatusEnum [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] public StatusEnum Status { get; set; } /// + /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. + /// + /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + /// + /// Enum AtmWithdrawal for value: atmWithdrawal + /// + [EnumMember(Value = "atmWithdrawal")] + AtmWithdrawal = 1, + + /// + /// Enum AtmWithdrawalReversal for value: atmWithdrawalReversal + /// + [EnumMember(Value = "atmWithdrawalReversal")] + AtmWithdrawalReversal = 2, + + /// + /// Enum BalanceAdjustment for value: balanceAdjustment + /// + [EnumMember(Value = "balanceAdjustment")] + BalanceAdjustment = 3, + + /// + /// Enum BalanceMigration for value: balanceMigration + /// + [EnumMember(Value = "balanceMigration")] + BalanceMigration = 4, + + /// + /// Enum BalanceRollover for value: balanceRollover + /// + [EnumMember(Value = "balanceRollover")] + BalanceRollover = 5, + + /// + /// Enum BankDirectDebit for value: bankDirectDebit + /// + [EnumMember(Value = "bankDirectDebit")] + BankDirectDebit = 6, + + /// + /// Enum BankTransfer for value: bankTransfer + /// + [EnumMember(Value = "bankTransfer")] + BankTransfer = 7, + + /// + /// Enum Capture for value: capture + /// + [EnumMember(Value = "capture")] + Capture = 8, + + /// + /// Enum CaptureReversal for value: captureReversal + /// + [EnumMember(Value = "captureReversal")] + CaptureReversal = 9, + + /// + /// Enum CardTransfer for value: cardTransfer + /// + [EnumMember(Value = "cardTransfer")] + CardTransfer = 10, + + /// + /// Enum CashOutFee for value: cashOutFee + /// + [EnumMember(Value = "cashOutFee")] + CashOutFee = 11, + + /// + /// Enum CashOutFunding for value: cashOutFunding + /// + [EnumMember(Value = "cashOutFunding")] + CashOutFunding = 12, + + /// + /// Enum CashOutInstruction for value: cashOutInstruction + /// + [EnumMember(Value = "cashOutInstruction")] + CashOutInstruction = 13, + + /// + /// Enum Chargeback for value: chargeback + /// + [EnumMember(Value = "chargeback")] + Chargeback = 14, + + /// + /// Enum ChargebackCorrection for value: chargebackCorrection + /// + [EnumMember(Value = "chargebackCorrection")] + ChargebackCorrection = 15, + + /// + /// Enum ChargebackReversal for value: chargebackReversal + /// + [EnumMember(Value = "chargebackReversal")] + ChargebackReversal = 16, + + /// + /// Enum ChargebackReversalCorrection for value: chargebackReversalCorrection + /// + [EnumMember(Value = "chargebackReversalCorrection")] + ChargebackReversalCorrection = 17, + + /// + /// Enum DepositCorrection for value: depositCorrection + /// + [EnumMember(Value = "depositCorrection")] + DepositCorrection = 18, + + /// + /// Enum Fee for value: fee + /// + [EnumMember(Value = "fee")] + Fee = 19, + + /// + /// Enum Grant for value: grant + /// + [EnumMember(Value = "grant")] + Grant = 20, + + /// + /// Enum Installment for value: installment + /// + [EnumMember(Value = "installment")] + Installment = 21, + + /// + /// Enum InstallmentReversal for value: installmentReversal + /// + [EnumMember(Value = "installmentReversal")] + InstallmentReversal = 22, + + /// + /// Enum InternalDirectDebit for value: internalDirectDebit + /// + [EnumMember(Value = "internalDirectDebit")] + InternalDirectDebit = 23, + + /// + /// Enum InternalTransfer for value: internalTransfer + /// + [EnumMember(Value = "internalTransfer")] + InternalTransfer = 24, + + /// + /// Enum InvoiceDeduction for value: invoiceDeduction + /// + [EnumMember(Value = "invoiceDeduction")] + InvoiceDeduction = 25, + + /// + /// Enum Leftover for value: leftover + /// + [EnumMember(Value = "leftover")] + Leftover = 26, + + /// + /// Enum ManualCorrection for value: manualCorrection + /// + [EnumMember(Value = "manualCorrection")] + ManualCorrection = 27, + + /// + /// Enum MiscCost for value: miscCost + /// + [EnumMember(Value = "miscCost")] + MiscCost = 28, + + /// + /// Enum Payment for value: payment + /// + [EnumMember(Value = "payment")] + Payment = 29, + + /// + /// Enum PaymentCost for value: paymentCost + /// + [EnumMember(Value = "paymentCost")] + PaymentCost = 30, + + /// + /// Enum Refund for value: refund + /// + [EnumMember(Value = "refund")] + Refund = 31, + + /// + /// Enum RefundReversal for value: refundReversal + /// + [EnumMember(Value = "refundReversal")] + RefundReversal = 32, + + /// + /// Enum Repayment for value: repayment + /// + [EnumMember(Value = "repayment")] + Repayment = 33, + + /// + /// Enum ReserveAdjustment for value: reserveAdjustment + /// + [EnumMember(Value = "reserveAdjustment")] + ReserveAdjustment = 34, + + /// + /// Enum SecondChargeback for value: secondChargeback + /// + [EnumMember(Value = "secondChargeback")] + SecondChargeback = 35, + + /// + /// Enum SecondChargebackCorrection for value: secondChargebackCorrection + /// + [EnumMember(Value = "secondChargebackCorrection")] + SecondChargebackCorrection = 36 + + } + + + /// + /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. + /// + /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. + [DataMember(Name = "type", EmitDefaultValue = false)] + public TypeEnum? Type { get; set; } + /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] @@ -635,7 +873,8 @@ protected 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.. /// The result of the transfer. For example, **authorised**, **refused**, or **error**. (required). - public Transfer(ResourceReference accountHolder = default(ResourceReference), Amount amount = default(Amount), ResourceReference balanceAccount = default(ResourceReference), CategoryEnum category = default(CategoryEnum), TransferCategoryData categoryData = default(TransferCategoryData), CounterpartyV3 counterparty = default(CounterpartyV3), DateTime creationDate = default(DateTime), string description = default(string), DirectionEnum? direction = default(DirectionEnum?), string id = default(string), PaymentInstrument paymentInstrument = default(PaymentInstrument), ReasonEnum? reason = default(ReasonEnum?), string reference = default(string), string referenceForBeneficiary = default(string), StatusEnum status = default(StatusEnum)) + /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**.. + public Transfer(ResourceReference accountHolder = default(ResourceReference), Amount amount = default(Amount), ResourceReference balanceAccount = default(ResourceReference), CategoryEnum category = default(CategoryEnum), TransferCategoryData categoryData = default(TransferCategoryData), CounterpartyV3 counterparty = default(CounterpartyV3), DateTime creationDate = default(DateTime), string description = default(string), DirectionEnum? direction = default(DirectionEnum?), string id = default(string), PaymentInstrument paymentInstrument = default(PaymentInstrument), ReasonEnum? reason = default(ReasonEnum?), string reference = default(string), string referenceForBeneficiary = default(string), StatusEnum status = default(StatusEnum), TypeEnum? type = default(TypeEnum?)) { this.Amount = amount; this.Category = category; @@ -652,6 +891,7 @@ protected Transfer() { } this.Reason = reason; this.Reference = reference; this.ReferenceForBeneficiary = referenceForBeneficiary; + this.Type = type; } /// @@ -748,6 +988,7 @@ public override string ToString() sb.Append(" Reference: ").Append(Reference).Append("\n"); sb.Append(" ReferenceForBeneficiary: ").Append(ReferenceForBeneficiary).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -853,6 +1094,10 @@ public bool Equals(Transfer input) ( this.Status == input.Status || this.Status.Equals(input.Status) + ) && + ( + this.Type == input.Type || + this.Type.Equals(input.Type) ); } @@ -913,6 +1158,7 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.ReferenceForBeneficiary.GetHashCode(); } hashCode = (hashCode * 59) + this.Status.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } } diff --git a/Adyen/Model/Transfers/TransferData.cs b/Adyen/Model/Transfers/TransferData.cs index f798006da..fe5ab8fc8 100644 --- a/Adyen/Model/Transfers/TransferData.cs +++ b/Adyen/Model/Transfers/TransferData.cs @@ -32,6 +32,824 @@ namespace Adyen.Model.Transfers [DataContract(Name = "TransferData")] public partial class TransferData : IEquatable, IValidatableObject { + /// + /// 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 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 + { + /// + /// Enum Bank for value: bank + /// + [EnumMember(Value = "bank")] + Bank = 1, + + /// + /// Enum Internal for value: internal + /// + [EnumMember(Value = "internal")] + Internal = 2, + + /// + /// Enum IssuedCard for value: issuedCard + /// + [EnumMember(Value = "issuedCard")] + IssuedCard = 3, + + /// + /// Enum PlatformPayment for value: platformPayment + /// + [EnumMember(Value = "platformPayment")] + PlatformPayment = 4 + + } + + + /// + /// 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 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; } + /// + /// The direction of the transfer. Possible values: **incoming**, **outgoing**. + /// + /// The direction of the transfer. Possible values: **incoming**, **outgoing**. + [JsonConverter(typeof(StringEnumConverter))] + public enum DirectionEnum + { + /// + /// Enum Incoming for value: incoming + /// + [EnumMember(Value = "incoming")] + Incoming = 1, + + /// + /// Enum Outgoing for value: outgoing + /// + [EnumMember(Value = "outgoing")] + Outgoing = 2 + + } + + + /// + /// The direction of the transfer. Possible values: **incoming**, **outgoing**. + /// + /// The direction of the transfer. Possible values: **incoming**, **outgoing**. + [DataMember(Name = "direction", EmitDefaultValue = false)] + public DirectionEnum? Direction { get; set; } + /// + /// Additional information about the status of the transfer. + /// + /// Additional information about the status of the transfer. + [JsonConverter(typeof(StringEnumConverter))] + public enum ReasonEnum + { + /// + /// Enum AmountLimitExceeded for value: amountLimitExceeded + /// + [EnumMember(Value = "amountLimitExceeded")] + AmountLimitExceeded = 1, + + /// + /// Enum Approved for value: approved + /// + [EnumMember(Value = "approved")] + Approved = 2, + + /// + /// Enum BalanceAccountTemporarilyBlockedByTransactionRule for value: balanceAccountTemporarilyBlockedByTransactionRule + /// + [EnumMember(Value = "balanceAccountTemporarilyBlockedByTransactionRule")] + BalanceAccountTemporarilyBlockedByTransactionRule = 3, + + /// + /// Enum CounterpartyAccountBlocked for value: counterpartyAccountBlocked + /// + [EnumMember(Value = "counterpartyAccountBlocked")] + CounterpartyAccountBlocked = 4, + + /// + /// Enum CounterpartyAccountClosed for value: counterpartyAccountClosed + /// + [EnumMember(Value = "counterpartyAccountClosed")] + CounterpartyAccountClosed = 5, + + /// + /// Enum CounterpartyAccountNotFound for value: counterpartyAccountNotFound + /// + [EnumMember(Value = "counterpartyAccountNotFound")] + CounterpartyAccountNotFound = 6, + + /// + /// Enum CounterpartyAddressRequired for value: counterpartyAddressRequired + /// + [EnumMember(Value = "counterpartyAddressRequired")] + CounterpartyAddressRequired = 7, + + /// + /// Enum CounterpartyBankTimedOut for value: counterpartyBankTimedOut + /// + [EnumMember(Value = "counterpartyBankTimedOut")] + CounterpartyBankTimedOut = 8, + + /// + /// Enum CounterpartyBankUnavailable for value: counterpartyBankUnavailable + /// + [EnumMember(Value = "counterpartyBankUnavailable")] + CounterpartyBankUnavailable = 9, + + /// + /// Enum DeclinedByTransactionRule for value: declinedByTransactionRule + /// + [EnumMember(Value = "declinedByTransactionRule")] + DeclinedByTransactionRule = 10, + + /// + /// Enum Error for value: error + /// + [EnumMember(Value = "error")] + Error = 11, + + /// + /// Enum NotEnoughBalance for value: notEnoughBalance + /// + [EnumMember(Value = "notEnoughBalance")] + NotEnoughBalance = 12, + + /// + /// Enum RefusedByCounterpartyBank for value: refusedByCounterpartyBank + /// + [EnumMember(Value = "refusedByCounterpartyBank")] + RefusedByCounterpartyBank = 13, + + /// + /// Enum RouteNotFound for value: routeNotFound + /// + [EnumMember(Value = "routeNotFound")] + RouteNotFound = 14, + + /// + /// Enum ScaFailed for value: scaFailed + /// + [EnumMember(Value = "scaFailed")] + ScaFailed = 15, + + /// + /// Enum Unknown for value: unknown + /// + [EnumMember(Value = "unknown")] + Unknown = 16 + + } + + + /// + /// Additional information about the status of the transfer. + /// + /// Additional information about the status of the transfer. + [DataMember(Name = "reason", EmitDefaultValue = false)] + public ReasonEnum? Reason { get; set; } + /// + /// The result of the transfer. For example, **authorised**, **refused**, or **error**. + /// + /// The result of the transfer. For example, **authorised**, **refused**, or **error**. + [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 Rejected for value: rejected + /// + [EnumMember(Value = "rejected")] + Rejected = 59, + + /// + /// Enum ReserveAdjustment for value: reserveAdjustment + /// + [EnumMember(Value = "reserveAdjustment")] + ReserveAdjustment = 60, + + /// + /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending + /// + [EnumMember(Value = "reserveAdjustmentPending")] + ReserveAdjustmentPending = 61, + + /// + /// Enum Returned for value: returned + /// + [EnumMember(Value = "returned")] + Returned = 62, + + /// + /// Enum SecondChargeback for value: secondChargeback + /// + [EnumMember(Value = "secondChargeback")] + SecondChargeback = 63, + + /// + /// Enum SecondChargebackPending for value: secondChargebackPending + /// + [EnumMember(Value = "secondChargebackPending")] + SecondChargebackPending = 64, + + /// + /// Enum Undefined for value: undefined + /// + [EnumMember(Value = "undefined")] + Undefined = 65 + + } + + + /// + /// The result of the transfer. For example, **authorised**, **refused**, or **error**. + /// + /// The result of the transfer. For example, **authorised**, **refused**, or **error**. + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public StatusEnum Status { get; set; } + /// + /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. + /// + /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + /// + /// Enum AtmWithdrawal for value: atmWithdrawal + /// + [EnumMember(Value = "atmWithdrawal")] + AtmWithdrawal = 1, + + /// + /// Enum AtmWithdrawalReversal for value: atmWithdrawalReversal + /// + [EnumMember(Value = "atmWithdrawalReversal")] + AtmWithdrawalReversal = 2, + + /// + /// Enum BalanceAdjustment for value: balanceAdjustment + /// + [EnumMember(Value = "balanceAdjustment")] + BalanceAdjustment = 3, + + /// + /// Enum BalanceMigration for value: balanceMigration + /// + [EnumMember(Value = "balanceMigration")] + BalanceMigration = 4, + + /// + /// Enum BalanceRollover for value: balanceRollover + /// + [EnumMember(Value = "balanceRollover")] + BalanceRollover = 5, + + /// + /// Enum BankDirectDebit for value: bankDirectDebit + /// + [EnumMember(Value = "bankDirectDebit")] + BankDirectDebit = 6, + + /// + /// Enum BankTransfer for value: bankTransfer + /// + [EnumMember(Value = "bankTransfer")] + BankTransfer = 7, + + /// + /// Enum Capture for value: capture + /// + [EnumMember(Value = "capture")] + Capture = 8, + + /// + /// Enum CaptureReversal for value: captureReversal + /// + [EnumMember(Value = "captureReversal")] + CaptureReversal = 9, + + /// + /// Enum CardTransfer for value: cardTransfer + /// + [EnumMember(Value = "cardTransfer")] + CardTransfer = 10, + + /// + /// Enum CashOutFee for value: cashOutFee + /// + [EnumMember(Value = "cashOutFee")] + CashOutFee = 11, + + /// + /// Enum CashOutFunding for value: cashOutFunding + /// + [EnumMember(Value = "cashOutFunding")] + CashOutFunding = 12, + + /// + /// Enum CashOutInstruction for value: cashOutInstruction + /// + [EnumMember(Value = "cashOutInstruction")] + CashOutInstruction = 13, + + /// + /// Enum Chargeback for value: chargeback + /// + [EnumMember(Value = "chargeback")] + Chargeback = 14, + + /// + /// Enum ChargebackCorrection for value: chargebackCorrection + /// + [EnumMember(Value = "chargebackCorrection")] + ChargebackCorrection = 15, + + /// + /// Enum ChargebackReversal for value: chargebackReversal + /// + [EnumMember(Value = "chargebackReversal")] + ChargebackReversal = 16, + + /// + /// Enum ChargebackReversalCorrection for value: chargebackReversalCorrection + /// + [EnumMember(Value = "chargebackReversalCorrection")] + ChargebackReversalCorrection = 17, + + /// + /// Enum DepositCorrection for value: depositCorrection + /// + [EnumMember(Value = "depositCorrection")] + DepositCorrection = 18, + + /// + /// Enum Fee for value: fee + /// + [EnumMember(Value = "fee")] + Fee = 19, + + /// + /// Enum Grant for value: grant + /// + [EnumMember(Value = "grant")] + Grant = 20, + + /// + /// Enum Installment for value: installment + /// + [EnumMember(Value = "installment")] + Installment = 21, + + /// + /// Enum InstallmentReversal for value: installmentReversal + /// + [EnumMember(Value = "installmentReversal")] + InstallmentReversal = 22, + + /// + /// Enum InternalDirectDebit for value: internalDirectDebit + /// + [EnumMember(Value = "internalDirectDebit")] + InternalDirectDebit = 23, + + /// + /// Enum InternalTransfer for value: internalTransfer + /// + [EnumMember(Value = "internalTransfer")] + InternalTransfer = 24, + + /// + /// Enum InvoiceDeduction for value: invoiceDeduction + /// + [EnumMember(Value = "invoiceDeduction")] + InvoiceDeduction = 25, + + /// + /// Enum Leftover for value: leftover + /// + [EnumMember(Value = "leftover")] + Leftover = 26, + + /// + /// Enum ManualCorrection for value: manualCorrection + /// + [EnumMember(Value = "manualCorrection")] + ManualCorrection = 27, + + /// + /// Enum MiscCost for value: miscCost + /// + [EnumMember(Value = "miscCost")] + MiscCost = 28, + + /// + /// Enum Payment for value: payment + /// + [EnumMember(Value = "payment")] + Payment = 29, + + /// + /// Enum PaymentCost for value: paymentCost + /// + [EnumMember(Value = "paymentCost")] + PaymentCost = 30, + + /// + /// Enum Refund for value: refund + /// + [EnumMember(Value = "refund")] + Refund = 31, + + /// + /// Enum RefundReversal for value: refundReversal + /// + [EnumMember(Value = "refundReversal")] + RefundReversal = 32, + + /// + /// Enum Repayment for value: repayment + /// + [EnumMember(Value = "repayment")] + Repayment = 33, + + /// + /// Enum ReserveAdjustment for value: reserveAdjustment + /// + [EnumMember(Value = "reserveAdjustment")] + ReserveAdjustment = 34, + + /// + /// Enum SecondChargeback for value: secondChargeback + /// + [EnumMember(Value = "secondChargeback")] + SecondChargeback = 35, + + /// + /// Enum SecondChargebackCorrection for value: secondChargebackCorrection + /// + [EnumMember(Value = "secondChargebackCorrection")] + SecondChargebackCorrection = 36 + + } + + + /// + /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. + /// + /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. + [DataMember(Name = "type", EmitDefaultValue = false)] + public TypeEnum? Type { get; set; } /// /// Initializes a new instance of the class. /// @@ -40,14 +858,119 @@ protected TransferData() { } /// /// Initializes a new instance of the class. /// + /// accountHolder. + /// amount (required). + /// balanceAccount. + /// The unique identifier of the balance platform.. + /// The list of the latest balance statuses in the transfer.. + /// 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). + /// categoryData. + /// 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] & $ % # @** **~ = + - _ ' \" ! ?**. + /// The direction of the transfer. Possible values: **incoming**, **outgoing**.. + /// The list of events leading up to the current status of the transfer.. /// The ID of the resource.. - /// 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). - public TransferData(string id = default(string), string reference = default(string)) + /// paymentInstrument. + /// 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.. + /// The sequence number of the transfer notification. The numbers start from 1 and increase with each new notification for a specific transfer. It can help you restore the correct sequence of events even if they arrive out of order.. + /// The result of the transfer. For example, **authorised**, **refused**, or **error**. (required). + /// tracking. + /// transactionRulesResult. + /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**.. + public TransferData(ResourceReference accountHolder = default(ResourceReference), Amount amount = default(Amount), ResourceReference balanceAccount = default(ResourceReference), string balancePlatform = default(string), List balances = default(List), CategoryEnum category = default(CategoryEnum), TransferCategoryData categoryData = default(TransferCategoryData), TransferNotificationCounterParty counterparty = default(TransferNotificationCounterParty), DateTime creationDate = default(DateTime), string description = default(string), DirectionEnum? direction = default(DirectionEnum?), List events = default(List), string id = default(string), PaymentInstrument paymentInstrument = default(PaymentInstrument), ReasonEnum? reason = default(ReasonEnum?), string reference = default(string), string referenceForBeneficiary = default(string), int? sequenceNumber = default(int?), StatusEnum status = default(StatusEnum), TransferNotificationTransferTracking tracking = default(TransferNotificationTransferTracking), TransactionRulesResult transactionRulesResult = default(TransactionRulesResult), TypeEnum? type = default(TypeEnum?)) { - this.Reference = reference; + this.Amount = amount; + this.Category = category; + this.Status = status; + this.AccountHolder = accountHolder; + this.BalanceAccount = balanceAccount; + this.BalancePlatform = balancePlatform; + this.Balances = balances; + this.CategoryData = categoryData; + this.Counterparty = counterparty; + this.CreationDate = creationDate; + this.Description = description; + this.Direction = direction; + this.Events = events; this.Id = id; + this.PaymentInstrument = paymentInstrument; + this.Reason = reason; + this.Reference = reference; + this.ReferenceForBeneficiary = referenceForBeneficiary; + this.SequenceNumber = sequenceNumber; + this.Tracking = tracking; + this.TransactionRulesResult = transactionRulesResult; + this.Type = type; } + /// + /// Gets or Sets AccountHolder + /// + [DataMember(Name = "accountHolder", EmitDefaultValue = false)] + public ResourceReference AccountHolder { get; set; } + + /// + /// Gets or Sets Amount + /// + [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] + public Amount Amount { get; set; } + + /// + /// Gets or Sets BalanceAccount + /// + [DataMember(Name = "balanceAccount", EmitDefaultValue = false)] + public ResourceReference BalanceAccount { get; set; } + + /// + /// The unique identifier of the balance platform. + /// + /// The unique identifier of the balance platform. + [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] + public string BalancePlatform { get; set; } + + /// + /// The list of the latest balance statuses in the transfer. + /// + /// The list of the latest balance statuses in the transfer. + [DataMember(Name = "balances", EmitDefaultValue = false)] + public List Balances { get; set; } + + /// + /// Gets or Sets CategoryData + /// + [DataMember(Name = "categoryData", EmitDefaultValue = false)] + public TransferCategoryData CategoryData { get; set; } + + /// + /// Gets or Sets Counterparty + /// + [DataMember(Name = "counterparty", EmitDefaultValue = false)] + public TransferNotificationCounterParty Counterparty { get; set; } + + /// + /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + /// + /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + [DataMember(Name = "creationDate", EmitDefaultValue = false)] + public DateTime CreationDate { get; set; } + + /// + /// 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] & $ % # @** **~ = + - _ ' \" ! ?** + /// + /// 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] & $ % # @** **~ = + - _ ' \" ! ?** + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// The list of events leading up to the current status of the transfer. + /// + /// The list of events leading up to the current status of the transfer. + [DataMember(Name = "events", EmitDefaultValue = false)] + public List Events { get; set; } + /// /// The ID of the resource. /// @@ -56,12 +979,44 @@ protected TransferData() { } public string Id { get; set; } /// - /// 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. + /// Gets or Sets PaymentInstrument /// - /// 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. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] + [DataMember(Name = "paymentInstrument", EmitDefaultValue = false)] + public PaymentInstrument PaymentInstrument { get; set; } + + /// + /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference. + /// + /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference. + [DataMember(Name = "reference", EmitDefaultValue = false)] public string Reference { get; set; } + /// + /// 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. + /// + /// 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. + [DataMember(Name = "referenceForBeneficiary", EmitDefaultValue = false)] + public string ReferenceForBeneficiary { get; set; } + + /// + /// The sequence number of the transfer notification. The numbers start from 1 and increase with each new notification for a specific transfer. It can help you restore the correct sequence of events even if they arrive out of order. + /// + /// The sequence number of the transfer notification. The numbers start from 1 and increase with each new notification for a specific transfer. It can help you restore the correct sequence of events even if they arrive out of order. + [DataMember(Name = "sequenceNumber", EmitDefaultValue = false)] + public int? SequenceNumber { get; set; } + + /// + /// Gets or Sets Tracking + /// + [DataMember(Name = "tracking", EmitDefaultValue = false)] + public TransferNotificationTransferTracking Tracking { get; set; } + + /// + /// Gets or Sets TransactionRulesResult + /// + [DataMember(Name = "transactionRulesResult", EmitDefaultValue = false)] + public TransactionRulesResult TransactionRulesResult { get; set; } + /// /// Returns the string presentation of the object /// @@ -70,8 +1025,28 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TransferData {\n"); + sb.Append(" AccountHolder: ").Append(AccountHolder).Append("\n"); + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" BalanceAccount: ").Append(BalanceAccount).Append("\n"); + sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); + sb.Append(" Balances: ").Append(Balances).Append("\n"); + sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" CategoryData: ").Append(CategoryData).Append("\n"); + sb.Append(" Counterparty: ").Append(Counterparty).Append("\n"); + sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" Events: ").Append(Events).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" PaymentInstrument: ").Append(PaymentInstrument).Append("\n"); + sb.Append(" Reason: ").Append(Reason).Append("\n"); sb.Append(" Reference: ").Append(Reference).Append("\n"); + sb.Append(" ReferenceForBeneficiary: ").Append(ReferenceForBeneficiary).Append("\n"); + sb.Append(" SequenceNumber: ").Append(SequenceNumber).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Tracking: ").Append(Tracking).Append("\n"); + sb.Append(" TransactionRulesResult: ").Append(TransactionRulesResult).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -107,15 +1082,111 @@ public bool Equals(TransferData input) return false; } return + ( + this.AccountHolder == input.AccountHolder || + (this.AccountHolder != null && + this.AccountHolder.Equals(input.AccountHolder)) + ) && + ( + this.Amount == input.Amount || + (this.Amount != null && + this.Amount.Equals(input.Amount)) + ) && + ( + this.BalanceAccount == input.BalanceAccount || + (this.BalanceAccount != null && + this.BalanceAccount.Equals(input.BalanceAccount)) + ) && + ( + this.BalancePlatform == input.BalancePlatform || + (this.BalancePlatform != null && + this.BalancePlatform.Equals(input.BalancePlatform)) + ) && + ( + this.Balances == input.Balances || + this.Balances != null && + input.Balances != null && + this.Balances.SequenceEqual(input.Balances) + ) && + ( + this.Category == input.Category || + this.Category.Equals(input.Category) + ) && + ( + this.CategoryData == input.CategoryData || + (this.CategoryData != null && + this.CategoryData.Equals(input.CategoryData)) + ) && + ( + this.Counterparty == input.Counterparty || + (this.Counterparty != null && + this.Counterparty.Equals(input.Counterparty)) + ) && + ( + this.CreationDate == input.CreationDate || + (this.CreationDate != null && + this.CreationDate.Equals(input.CreationDate)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.Direction == input.Direction || + this.Direction.Equals(input.Direction) + ) && + ( + this.Events == input.Events || + this.Events != null && + input.Events != null && + this.Events.SequenceEqual(input.Events) + ) && ( this.Id == input.Id || (this.Id != null && this.Id.Equals(input.Id)) ) && + ( + this.PaymentInstrument == input.PaymentInstrument || + (this.PaymentInstrument != null && + this.PaymentInstrument.Equals(input.PaymentInstrument)) + ) && + ( + this.Reason == input.Reason || + this.Reason.Equals(input.Reason) + ) && ( this.Reference == input.Reference || (this.Reference != null && this.Reference.Equals(input.Reference)) + ) && + ( + this.ReferenceForBeneficiary == input.ReferenceForBeneficiary || + (this.ReferenceForBeneficiary != null && + this.ReferenceForBeneficiary.Equals(input.ReferenceForBeneficiary)) + ) && + ( + this.SequenceNumber == input.SequenceNumber || + this.SequenceNumber.Equals(input.SequenceNumber) + ) && + ( + this.Status == input.Status || + this.Status.Equals(input.Status) + ) && + ( + this.Tracking == input.Tracking || + (this.Tracking != null && + this.Tracking.Equals(input.Tracking)) + ) && + ( + this.TransactionRulesResult == input.TransactionRulesResult || + (this.TransactionRulesResult != null && + this.TransactionRulesResult.Equals(input.TransactionRulesResult)) + ) && + ( + this.Type == input.Type || + this.Type.Equals(input.Type) ); } @@ -128,14 +1199,76 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (this.AccountHolder != null) + { + hashCode = (hashCode * 59) + this.AccountHolder.GetHashCode(); + } + if (this.Amount != null) + { + hashCode = (hashCode * 59) + this.Amount.GetHashCode(); + } + if (this.BalanceAccount != null) + { + hashCode = (hashCode * 59) + this.BalanceAccount.GetHashCode(); + } + if (this.BalancePlatform != null) + { + hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); + } + if (this.Balances != null) + { + hashCode = (hashCode * 59) + this.Balances.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Category.GetHashCode(); + if (this.CategoryData != null) + { + hashCode = (hashCode * 59) + this.CategoryData.GetHashCode(); + } + if (this.Counterparty != null) + { + hashCode = (hashCode * 59) + this.Counterparty.GetHashCode(); + } + if (this.CreationDate != null) + { + hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); + } + if (this.Description != null) + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Direction.GetHashCode(); + if (this.Events != null) + { + hashCode = (hashCode * 59) + this.Events.GetHashCode(); + } if (this.Id != null) { hashCode = (hashCode * 59) + this.Id.GetHashCode(); } + if (this.PaymentInstrument != null) + { + hashCode = (hashCode * 59) + this.PaymentInstrument.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Reason.GetHashCode(); if (this.Reference != null) { hashCode = (hashCode * 59) + this.Reference.GetHashCode(); } + if (this.ReferenceForBeneficiary != null) + { + hashCode = (hashCode * 59) + this.ReferenceForBeneficiary.GetHashCode(); + } + hashCode = (hashCode * 59) + this.SequenceNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + if (this.Tracking != null) + { + hashCode = (hashCode * 59) + this.Tracking.GetHashCode(); + } + if (this.TransactionRulesResult != null) + { + hashCode = (hashCode * 59) + this.TransactionRulesResult.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } } @@ -146,6 +1279,18 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // Reference (string) maxLength + if (this.Reference != null && this.Reference.Length > 80) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 80.", new [] { "Reference" }); + } + + // ReferenceForBeneficiary (string) maxLength + if (this.ReferenceForBeneficiary != null && this.ReferenceForBeneficiary.Length > 80) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReferenceForBeneficiary, length must be less than 80.", new [] { "ReferenceForBeneficiary" }); + } + yield break; } } diff --git a/Adyen/Model/Transfers/TransferEvent.cs b/Adyen/Model/Transfers/TransferEvent.cs new file mode 100644 index 000000000..c1bf19b04 --- /dev/null +++ b/Adyen/Model/Transfers/TransferEvent.cs @@ -0,0 +1,888 @@ +/* +* Transfers API +* +* +* The version of the OpenAPI document: 4 +* +* 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 +{ + /// + /// TransferEvent + /// + [DataContract(Name = "TransferEvent")] + public partial class TransferEvent : IEquatable, IValidatableObject + { + /// + /// The reason for the transfer status. + /// + /// The reason for the transfer status. + [JsonConverter(typeof(StringEnumConverter))] + public enum ReasonEnum + { + /// + /// Enum AmountLimitExceeded for value: amountLimitExceeded + /// + [EnumMember(Value = "amountLimitExceeded")] + AmountLimitExceeded = 1, + + /// + /// Enum Approved for value: approved + /// + [EnumMember(Value = "approved")] + Approved = 2, + + /// + /// Enum BalanceAccountTemporarilyBlockedByTransactionRule for value: balanceAccountTemporarilyBlockedByTransactionRule + /// + [EnumMember(Value = "balanceAccountTemporarilyBlockedByTransactionRule")] + BalanceAccountTemporarilyBlockedByTransactionRule = 3, + + /// + /// Enum CounterpartyAccountBlocked for value: counterpartyAccountBlocked + /// + [EnumMember(Value = "counterpartyAccountBlocked")] + CounterpartyAccountBlocked = 4, + + /// + /// Enum CounterpartyAccountClosed for value: counterpartyAccountClosed + /// + [EnumMember(Value = "counterpartyAccountClosed")] + CounterpartyAccountClosed = 5, + + /// + /// Enum CounterpartyAccountNotFound for value: counterpartyAccountNotFound + /// + [EnumMember(Value = "counterpartyAccountNotFound")] + CounterpartyAccountNotFound = 6, + + /// + /// Enum CounterpartyAddressRequired for value: counterpartyAddressRequired + /// + [EnumMember(Value = "counterpartyAddressRequired")] + CounterpartyAddressRequired = 7, + + /// + /// Enum CounterpartyBankTimedOut for value: counterpartyBankTimedOut + /// + [EnumMember(Value = "counterpartyBankTimedOut")] + CounterpartyBankTimedOut = 8, + + /// + /// Enum CounterpartyBankUnavailable for value: counterpartyBankUnavailable + /// + [EnumMember(Value = "counterpartyBankUnavailable")] + CounterpartyBankUnavailable = 9, + + /// + /// Enum DeclinedByTransactionRule for value: declinedByTransactionRule + /// + [EnumMember(Value = "declinedByTransactionRule")] + DeclinedByTransactionRule = 10, + + /// + /// Enum Error for value: error + /// + [EnumMember(Value = "error")] + Error = 11, + + /// + /// Enum NotEnoughBalance for value: notEnoughBalance + /// + [EnumMember(Value = "notEnoughBalance")] + NotEnoughBalance = 12, + + /// + /// Enum RefusedByCounterpartyBank for value: refusedByCounterpartyBank + /// + [EnumMember(Value = "refusedByCounterpartyBank")] + RefusedByCounterpartyBank = 13, + + /// + /// Enum RouteNotFound for value: routeNotFound + /// + [EnumMember(Value = "routeNotFound")] + RouteNotFound = 14, + + /// + /// Enum ScaFailed for value: scaFailed + /// + [EnumMember(Value = "scaFailed")] + ScaFailed = 15, + + /// + /// Enum Unknown for value: unknown + /// + [EnumMember(Value = "unknown")] + Unknown = 16 + + } + + + /// + /// The reason for the transfer status. + /// + /// The reason for the transfer status. + [DataMember(Name = "reason", EmitDefaultValue = false)] + public ReasonEnum? Reason { get; set; } + /// + /// 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 Rejected for value: rejected + /// + [EnumMember(Value = "rejected")] + Rejected = 59, + + /// + /// Enum ReserveAdjustment for value: reserveAdjustment + /// + [EnumMember(Value = "reserveAdjustment")] + ReserveAdjustment = 60, + + /// + /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending + /// + [EnumMember(Value = "reserveAdjustmentPending")] + ReserveAdjustmentPending = 61, + + /// + /// Enum Returned for value: returned + /// + [EnumMember(Value = "returned")] + Returned = 62, + + /// + /// Enum SecondChargeback for value: secondChargeback + /// + [EnumMember(Value = "secondChargeback")] + SecondChargeback = 63, + + /// + /// Enum SecondChargebackPending for value: secondChargebackPending + /// + [EnumMember(Value = "secondChargebackPending")] + SecondChargebackPending = 64, + + /// + /// Enum Undefined for value: undefined + /// + [EnumMember(Value = "undefined")] + Undefined = 65 + + } + + + /// + /// The status of the transfer event. + /// + /// The status of the transfer event. + [DataMember(Name = "status", EmitDefaultValue = false)] + public StatusEnum? Status { get; set; } + /// + /// The type of the transfer event. Possible values: **accounting**, **tracking**. + /// + /// The type of the transfer event. Possible values: **accounting**, **tracking**. + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + /// + /// Enum Accounting for value: accounting + /// + [EnumMember(Value = "accounting")] + Accounting = 1, + + /// + /// Enum Tracking for value: tracking + /// + [EnumMember(Value = "tracking")] + Tracking = 2 + + } + + + /// + /// The type of the transfer event. Possible values: **accounting**, **tracking**. + /// + /// The type of the transfer event. Possible values: **accounting**, **tracking**. + [DataMember(Name = "type", EmitDefaultValue = false)] + public TypeEnum? Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// amount. + /// The amount adjustments in this transfer.. + /// 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.. + /// 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.. + /// 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), Modification modification = default(Modification), List mutations = default(List), Amount originalAmount = default(Amount), ReasonEnum? reason = default(ReasonEnum?), 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.Status = status; + this.TransactionId = transactionId; + this.Type = type; + this.UpdateDate = updateDate; + this.ValueDate = valueDate; + } + + /// + /// Gets or Sets Amount + /// + [DataMember(Name = "amount", EmitDefaultValue = false)] + public Amount Amount { get; set; } + + /// + /// The amount adjustments in this transfer. + /// + /// The amount adjustments in this transfer. + [DataMember(Name = "amountAdjustments", EmitDefaultValue = false)] + public List AmountAdjustments { get; set; } + + /// + /// The date when the transfer request was sent. + /// + /// The date when the transfer request was sent. + [DataMember(Name = "bookingDate", EmitDefaultValue = false)] + public DateTime BookingDate { get; set; } + + /// + /// The estimated time the beneficiary should have access to the funds. + /// + /// The estimated time the beneficiary should have access to the funds. + [DataMember(Name = "estimatedArrivalTime", EmitDefaultValue = false)] + public DateTime EstimatedArrivalTime { get; set; } + + /// + /// The unique identifier of the transfer event. + /// + /// The unique identifier of the transfer event. + [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. + /// + /// The list of the balance mutation per event. + [DataMember(Name = "mutations", EmitDefaultValue = false)] + public List Mutations { get; set; } + + /// + /// Gets or Sets OriginalAmount + /// + [DataMember(Name = "originalAmount", EmitDefaultValue = false)] + public Amount OriginalAmount { 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. + /// + /// The id of the transaction that is related to this accounting event. Only sent for events of type **accounting** where the balance changes. + [DataMember(Name = "transactionId", EmitDefaultValue = false)] + public string TransactionId { get; set; } + + /// + /// The date when the tracking status was updated. + /// + /// The date when the tracking status was updated. + [DataMember(Name = "updateDate", EmitDefaultValue = false)] + public DateTime UpdateDate { get; set; } + + /// + /// A future date, when the funds are expected to be deducted from or credited to the balance account. + /// + /// A future date, when the funds are expected to be deducted from or credited to the balance account. + [DataMember(Name = "valueDate", EmitDefaultValue = false)] + public DateTime ValueDate { 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 TransferEvent {\n"); + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" AmountAdjustments: ").Append(AmountAdjustments).Append("\n"); + 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(" Status: ").Append(Status).Append("\n"); + sb.Append(" TransactionId: ").Append(TransactionId).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" UpdateDate: ").Append(UpdateDate).Append("\n"); + sb.Append(" ValueDate: ").Append(ValueDate).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 TransferEvent); + } + + /// + /// Returns true if TransferEvent instances are equal + /// + /// Instance of TransferEvent to be compared + /// Boolean + public bool Equals(TransferEvent input) + { + if (input == null) + { + return false; + } + return + ( + this.Amount == input.Amount || + (this.Amount != null && + this.Amount.Equals(input.Amount)) + ) && + ( + this.AmountAdjustments == input.AmountAdjustments || + this.AmountAdjustments != null && + input.AmountAdjustments != null && + this.AmountAdjustments.SequenceEqual(input.AmountAdjustments) + ) && + ( + this.BookingDate == input.BookingDate || + (this.BookingDate != null && + this.BookingDate.Equals(input.BookingDate)) + ) && + ( + this.EstimatedArrivalTime == input.EstimatedArrivalTime || + (this.EstimatedArrivalTime != null && + this.EstimatedArrivalTime.Equals(input.EstimatedArrivalTime)) + ) && + ( + this.Id == input.Id || + (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 && + input.Mutations != null && + this.Mutations.SequenceEqual(input.Mutations) + ) && + ( + this.OriginalAmount == input.OriginalAmount || + (this.OriginalAmount != null && + this.OriginalAmount.Equals(input.OriginalAmount)) + ) && + ( + this.Reason == input.Reason || + this.Reason.Equals(input.Reason) + ) && + ( + this.Status == input.Status || + this.Status.Equals(input.Status) + ) && + ( + this.TransactionId == input.TransactionId || + (this.TransactionId != null && + this.TransactionId.Equals(input.TransactionId)) + ) && + ( + this.Type == input.Type || + this.Type.Equals(input.Type) + ) && + ( + this.UpdateDate == input.UpdateDate || + (this.UpdateDate != null && + this.UpdateDate.Equals(input.UpdateDate)) + ) && + ( + this.ValueDate == input.ValueDate || + (this.ValueDate != null && + this.ValueDate.Equals(input.ValueDate)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Amount != null) + { + hashCode = (hashCode * 59) + this.Amount.GetHashCode(); + } + if (this.AmountAdjustments != null) + { + hashCode = (hashCode * 59) + this.AmountAdjustments.GetHashCode(); + } + if (this.BookingDate != null) + { + hashCode = (hashCode * 59) + this.BookingDate.GetHashCode(); + } + if (this.EstimatedArrivalTime != null) + { + hashCode = (hashCode * 59) + this.EstimatedArrivalTime.GetHashCode(); + } + if (this.Id != null) + { + 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(); + } + if (this.OriginalAmount != null) + { + hashCode = (hashCode * 59) + this.OriginalAmount.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Reason.GetHashCode(); + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + if (this.TransactionId != null) + { + hashCode = (hashCode * 59) + this.TransactionId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + if (this.UpdateDate != null) + { + hashCode = (hashCode * 59) + this.UpdateDate.GetHashCode(); + } + if (this.ValueDate != null) + { + hashCode = (hashCode * 59) + this.ValueDate.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/TransferNotificationCounterParty.cs b/Adyen/Model/Transfers/TransferNotificationCounterParty.cs new file mode 100644 index 000000000..48a3986ea --- /dev/null +++ b/Adyen/Model/Transfers/TransferNotificationCounterParty.cs @@ -0,0 +1,184 @@ +/* +* Transfers API +* +* +* The version of the OpenAPI document: 4 +* +* 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 +{ + /// + /// TransferNotificationCounterParty + /// + [DataContract(Name = "TransferNotificationCounterParty")] + public partial class TransferNotificationCounterParty : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id).. + /// bankAccount. + /// merchant. + /// Unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id).. + public TransferNotificationCounterParty(string balanceAccountId = default(string), BankAccountV3 bankAccount = default(BankAccountV3), TransferNotificationMerchantData merchant = default(TransferNotificationMerchantData), string transferInstrumentId = default(string)) + { + this.BalanceAccountId = balanceAccountId; + this.BankAccount = bankAccount; + this.Merchant = merchant; + this.TransferInstrumentId = transferInstrumentId; + } + + /// + /// Unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). + /// + /// Unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). + [DataMember(Name = "balanceAccountId", EmitDefaultValue = false)] + public string BalanceAccountId { get; set; } + + /// + /// Gets or Sets BankAccount + /// + [DataMember(Name = "bankAccount", EmitDefaultValue = false)] + public BankAccountV3 BankAccount { get; set; } + + /// + /// Gets or Sets Merchant + /// + [DataMember(Name = "merchant", EmitDefaultValue = false)] + public TransferNotificationMerchantData Merchant { get; set; } + + /// + /// Unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + /// + /// Unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + [DataMember(Name = "transferInstrumentId", EmitDefaultValue = false)] + public string TransferInstrumentId { 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 TransferNotificationCounterParty {\n"); + sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); + sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); + sb.Append(" Merchant: ").Append(Merchant).Append("\n"); + sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).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 TransferNotificationCounterParty); + } + + /// + /// Returns true if TransferNotificationCounterParty instances are equal + /// + /// Instance of TransferNotificationCounterParty to be compared + /// Boolean + public bool Equals(TransferNotificationCounterParty input) + { + if (input == null) + { + return false; + } + return + ( + this.BalanceAccountId == input.BalanceAccountId || + (this.BalanceAccountId != null && + this.BalanceAccountId.Equals(input.BalanceAccountId)) + ) && + ( + this.BankAccount == input.BankAccount || + (this.BankAccount != null && + this.BankAccount.Equals(input.BankAccount)) + ) && + ( + this.Merchant == input.Merchant || + (this.Merchant != null && + this.Merchant.Equals(input.Merchant)) + ) && + ( + this.TransferInstrumentId == input.TransferInstrumentId || + (this.TransferInstrumentId != null && + this.TransferInstrumentId.Equals(input.TransferInstrumentId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.BalanceAccountId != null) + { + hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); + } + if (this.BankAccount != null) + { + hashCode = (hashCode * 59) + this.BankAccount.GetHashCode(); + } + if (this.Merchant != null) + { + hashCode = (hashCode * 59) + this.Merchant.GetHashCode(); + } + if (this.TransferInstrumentId != null) + { + hashCode = (hashCode * 59) + this.TransferInstrumentId.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/TransferNotificationMerchantData.cs b/Adyen/Model/Transfers/TransferNotificationMerchantData.cs new file mode 100644 index 000000000..13d96fec2 --- /dev/null +++ b/Adyen/Model/Transfers/TransferNotificationMerchantData.cs @@ -0,0 +1,243 @@ +/* +* Transfers API +* +* +* The version of the OpenAPI document: 4 +* +* 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 +{ + /// + /// TransferNotificationMerchantData + /// + [DataContract(Name = "TransferNotificationMerchantData")] + public partial class TransferNotificationMerchantData : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The unique identifier of the merchant's acquirer.. + /// The city where the merchant is located.. + /// The country where the merchant is located.. + /// The merchant category code.. + /// The merchant identifier.. + /// The name of the merchant's shop or service.. + /// The merchant postal code.. + public TransferNotificationMerchantData(string acquirerId = default(string), string city = default(string), string country = default(string), string mcc = default(string), string merchantId = default(string), string name = default(string), string postalCode = default(string)) + { + this.AcquirerId = acquirerId; + this.City = city; + this.Country = country; + this.Mcc = mcc; + this.MerchantId = merchantId; + this.Name = name; + 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 city where the merchant is located. + /// + /// The city where the merchant is located. + [DataMember(Name = "city", EmitDefaultValue = false)] + public string City { get; set; } + + /// + /// The country where the merchant is located. + /// + /// The country where the merchant is located. + [DataMember(Name = "country", EmitDefaultValue = false)] + public string Country { get; set; } + + /// + /// The merchant category code. + /// + /// The merchant category code. + [DataMember(Name = "mcc", EmitDefaultValue = false)] + public string Mcc { get; set; } + + /// + /// The merchant identifier. + /// + /// The merchant identifier. + [DataMember(Name = "merchantId", EmitDefaultValue = false)] + public string MerchantId { get; set; } + + /// + /// The name of the merchant's shop or service. + /// + /// The name of the merchant's shop or service. + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// The merchant postal code. + /// + /// The merchant postal code. + [DataMember(Name = "postalCode", EmitDefaultValue = false)] + public string PostalCode { 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 TransferNotificationMerchantData {\n"); + sb.Append(" AcquirerId: ").Append(AcquirerId).Append("\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" Country: ").Append(Country).Append("\n"); + sb.Append(" Mcc: ").Append(Mcc).Append("\n"); + sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PostalCode: ").Append(PostalCode).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 TransferNotificationMerchantData); + } + + /// + /// Returns true if TransferNotificationMerchantData instances are equal + /// + /// Instance of TransferNotificationMerchantData to be compared + /// Boolean + public bool Equals(TransferNotificationMerchantData input) + { + if (input == null) + { + return false; + } + return + ( + this.AcquirerId == input.AcquirerId || + (this.AcquirerId != null && + this.AcquirerId.Equals(input.AcquirerId)) + ) && + ( + 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.Mcc == input.Mcc || + (this.Mcc != null && + this.Mcc.Equals(input.Mcc)) + ) && + ( + this.MerchantId == input.MerchantId || + (this.MerchantId != null && + this.MerchantId.Equals(input.MerchantId)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.PostalCode == input.PostalCode || + (this.PostalCode != null && + this.PostalCode.Equals(input.PostalCode)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + 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.City != null) + { + hashCode = (hashCode * 59) + this.City.GetHashCode(); + } + if (this.Country != null) + { + hashCode = (hashCode * 59) + this.Country.GetHashCode(); + } + if (this.Mcc != null) + { + hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); + } + if (this.MerchantId != null) + { + hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.PostalCode != null) + { + hashCode = (hashCode * 59) + this.PostalCode.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/TransferNotificationTransferTracking.cs b/Adyen/Model/Transfers/TransferNotificationTransferTracking.cs new file mode 100644 index 000000000..458d74189 --- /dev/null +++ b/Adyen/Model/Transfers/TransferNotificationTransferTracking.cs @@ -0,0 +1,159 @@ +/* +* Transfers API +* +* +* The version of the OpenAPI document: 4 +* +* 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 +{ + /// + /// TransferNotificationTransferTracking + /// + [DataContract(Name = "TransferNotificationTransferTracking")] + public partial class TransferNotificationTransferTracking : IEquatable, IValidatableObject + { + /// + /// The tracking status of the transfer. + /// + /// The tracking status of the transfer. + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + /// + /// Enum Credited for value: credited + /// + [EnumMember(Value = "credited")] + Credited = 1 + + } + + + /// + /// The tracking status of the transfer. + /// + /// The tracking status of the transfer. + [DataMember(Name = "status", EmitDefaultValue = false)] + public StatusEnum? Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// The estimated time the beneficiary should have access to the funds.. + /// The tracking status of the transfer.. + public TransferNotificationTransferTracking(DateTime estimatedArrivalTime = default(DateTime), StatusEnum? status = default(StatusEnum?)) + { + this.EstimatedArrivalTime = estimatedArrivalTime; + this.Status = status; + } + + /// + /// The estimated time the beneficiary should have access to the funds. + /// + /// The estimated time the beneficiary should have access to the funds. + [DataMember(Name = "estimatedArrivalTime", EmitDefaultValue = false)] + public DateTime EstimatedArrivalTime { 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 TransferNotificationTransferTracking {\n"); + sb.Append(" EstimatedArrivalTime: ").Append(EstimatedArrivalTime).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 TransferNotificationTransferTracking); + } + + /// + /// Returns true if TransferNotificationTransferTracking instances are equal + /// + /// Instance of TransferNotificationTransferTracking to be compared + /// Boolean + public bool Equals(TransferNotificationTransferTracking input) + { + if (input == null) + { + return false; + } + return + ( + this.EstimatedArrivalTime == input.EstimatedArrivalTime || + (this.EstimatedArrivalTime != null && + this.EstimatedArrivalTime.Equals(input.EstimatedArrivalTime)) + ) && + ( + 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.EstimatedArrivalTime != null) + { + hashCode = (hashCode * 59) + this.EstimatedArrivalTime.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/TransferView.cs b/Adyen/Model/Transfers/TransferView.cs new file mode 100644 index 000000000..f1d84067a --- /dev/null +++ b/Adyen/Model/Transfers/TransferView.cs @@ -0,0 +1,153 @@ +/* +* Transfers API +* +* +* The version of the OpenAPI document: 4 +* +* 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 +{ + /// + /// TransferView + /// + [DataContract(Name = "TransferView")] + public partial class TransferView : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TransferView() { } + /// + /// Initializes a new instance of the class. + /// + /// The ID of the resource.. + /// 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). + public TransferView(string id = default(string), string reference = default(string)) + { + this.Reference = reference; + this.Id = id; + } + + /// + /// The ID of the resource. + /// + /// The ID of the resource. + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] + public string Reference { 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 TransferView {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Reference: ").Append(Reference).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 TransferView); + } + + /// + /// Returns true if TransferView instances are equal + /// + /// Instance of TransferView to be compared + /// Boolean + public bool Equals(TransferView input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Reference == input.Reference || + (this.Reference != null && + this.Reference.Equals(input.Reference)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Reference != null) + { + hashCode = (hashCode * 59) + this.Reference.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/UKLocalAccountIdentification.cs b/Adyen/Model/Transfers/UKLocalAccountIdentification.cs index b63c3fef2..ceeaaeb55 100644 --- a/Adyen/Model/Transfers/UKLocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/UKLocalAccountIdentification.cs @@ -63,13 +63,16 @@ protected UKLocalAccountIdentification() { } /// Initializes a new instance of the class. /// /// The 8-digit bank account number, without separators or whitespace. (required). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. (required). /// **ukLocal** (required) (default to TypeEnum.UkLocal). - public UKLocalAccountIdentification(string accountNumber = default(string), string sortCode = default(string), TypeEnum type = TypeEnum.UkLocal) + public UKLocalAccountIdentification(string accountNumber = default(string), string formFactor = "physical", string sortCode = default(string), TypeEnum type = TypeEnum.UkLocal) { this.AccountNumber = accountNumber; this.SortCode = sortCode; this.Type = type; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -79,6 +82,13 @@ protected UKLocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. /// @@ -95,6 +105,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class UKLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" SortCode: ").Append(SortCode).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); @@ -137,6 +148,11 @@ public bool Equals(UKLocalAccountIdentification input) (this.AccountNumber != null && this.AccountNumber.Equals(input.AccountNumber)) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.SortCode == input.SortCode || (this.SortCode != null && @@ -161,6 +177,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } if (this.SortCode != null) { hashCode = (hashCode * 59) + this.SortCode.GetHashCode(); diff --git a/Adyen/Model/Transfers/USLocalAccountIdentification.cs b/Adyen/Model/Transfers/USLocalAccountIdentification.cs index 52e188da1..1bde0646c 100644 --- a/Adyen/Model/Transfers/USLocalAccountIdentification.cs +++ b/Adyen/Model/Transfers/USLocalAccountIdentification.cs @@ -92,14 +92,17 @@ protected USLocalAccountIdentification() { } /// /// The bank account number, without separators or whitespace. (required). /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. (default to "physical"). /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. (required). /// **usLocal** (required) (default to TypeEnum.UsLocal). - public USLocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string routingNumber = default(string), TypeEnum type = TypeEnum.UsLocal) + public USLocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string formFactor = "physical", string routingNumber = default(string), TypeEnum type = TypeEnum.UsLocal) { this.AccountNumber = accountNumber; this.RoutingNumber = routingNumber; this.Type = type; this.AccountType = accountType; + // use default value if no "formFactor" provided + this.FormFactor = formFactor ?? "physical"; } /// @@ -109,6 +112,13 @@ protected USLocalAccountIdentification() { } [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] public string AccountNumber { get; set; } + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + /// + /// The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. + [DataMember(Name = "formFactor", EmitDefaultValue = false)] + public string FormFactor { get; set; } + /// /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. /// @@ -126,6 +136,7 @@ public override string ToString() sb.Append("class USLocalAccountIdentification {\n"); sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); sb.Append(" AccountType: ").Append(AccountType).Append("\n"); + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); sb.Append(" RoutingNumber: ").Append(RoutingNumber).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); @@ -172,6 +183,11 @@ public bool Equals(USLocalAccountIdentification input) this.AccountType == input.AccountType || this.AccountType.Equals(input.AccountType) ) && + ( + this.FormFactor == input.FormFactor || + (this.FormFactor != null && + this.FormFactor.Equals(input.FormFactor)) + ) && ( this.RoutingNumber == input.RoutingNumber || (this.RoutingNumber != null && @@ -197,6 +213,10 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); } hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); + if (this.FormFactor != null) + { + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); + } if (this.RoutingNumber != null) { hashCode = (hashCode * 59) + this.RoutingNumber.GetHashCode(); diff --git a/Adyen/Service/LegalEntityManagement/DocumentsService.cs b/Adyen/Service/LegalEntityManagement/DocumentsService.cs index 6d95d7575..938f74ebc 100644 --- a/Adyen/Service/LegalEntityManagement/DocumentsService.cs +++ b/Adyen/Service/LegalEntityManagement/DocumentsService.cs @@ -43,18 +43,20 @@ public interface IDocumentsService /// Get a document /// /// - The unique identifier of the document. + /// - Do not load document content while fetching the document. /// - Additional request options. /// . - Model.LegalEntityManagement.Document GetDocument(string id, RequestOptions requestOptions = default); + Model.LegalEntityManagement.Document GetDocument(string id, bool? skipContent = default, RequestOptions requestOptions = default); /// /// Get a document /// /// - The unique identifier of the document. + /// - Do not load document content while fetching the document. /// - Additional request options. /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. /// Task of . - Task GetDocumentAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); + Task GetDocumentAsync(string id, bool? skipContent = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); /// /// Update a document @@ -118,14 +120,17 @@ public async Task DeleteDocumentAsync(string id, RequestOptions requestOptions = await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); } - public Model.LegalEntityManagement.Document GetDocument(string id, RequestOptions requestOptions = default) + public Model.LegalEntityManagement.Document GetDocument(string id, bool? skipContent = default, RequestOptions requestOptions = default) { - return GetDocumentAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); + return GetDocumentAsync(id, skipContent, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); } - public async Task GetDocumentAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) + public async Task GetDocumentAsync(string id, bool? skipContent = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) { - var endpoint = _baseUrl + $"/documents/{id}"; + // Build the query string + var queryParams = new Dictionary(); + if (skipContent != null) queryParams.Add("skipContent", skipContent.ToString()); + var endpoint = _baseUrl + $"/documents/{id}" + ToQueryString(queryParams); var resource = new ServiceResource(this, endpoint); return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); } diff --git a/Adyen/Service/Management/AllowedOriginsCompanyLevelService.cs b/Adyen/Service/Management/AllowedOriginsCompanyLevelService.cs index 21407d7b4..c354522d6 100644 --- a/Adyen/Service/Management/AllowedOriginsCompanyLevelService.cs +++ b/Adyen/Service/Management/AllowedOriginsCompanyLevelService.cs @@ -31,8 +31,8 @@ public interface IAllowedOriginsCompanyLevelService /// - Unique identifier of the API credential. /// - /// - Additional request options. - /// . - Model.Management.AllowedOriginsResponse CreateAllowedOrigin(string companyId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default); + /// . + Model.Management.AllowedOrigin CreateAllowedOrigin(string companyId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default); /// /// Create an allowed origin @@ -42,8 +42,8 @@ public interface IAllowedOriginsCompanyLevelService /// - /// - Additional request options. /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateAllowedOriginAsync(string companyId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); + /// Task of . + Task CreateAllowedOriginAsync(string companyId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); /// /// Delete an allowed origin @@ -118,16 +118,16 @@ public AllowedOriginsCompanyLevelService(Client client) : base(client) _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); } - public Model.Management.AllowedOriginsResponse CreateAllowedOrigin(string companyId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default) + public Model.Management.AllowedOrigin CreateAllowedOrigin(string companyId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default) { return CreateAllowedOriginAsync(companyId, apiCredentialId, allowedOrigin, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); } - public async Task CreateAllowedOriginAsync(string companyId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) + public async Task CreateAllowedOriginAsync(string companyId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) { var endpoint = _baseUrl + $"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins"; var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(allowedOrigin.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); + return await resource.RequestAsync(allowedOrigin.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); } public void DeleteAllowedOrigin(string companyId, string apiCredentialId, string originId, RequestOptions requestOptions = default) diff --git a/Adyen/Service/Management/AllowedOriginsMerchantLevelService.cs b/Adyen/Service/Management/AllowedOriginsMerchantLevelService.cs index ad32d6201..f47988715 100644 --- a/Adyen/Service/Management/AllowedOriginsMerchantLevelService.cs +++ b/Adyen/Service/Management/AllowedOriginsMerchantLevelService.cs @@ -31,8 +31,8 @@ public interface IAllowedOriginsMerchantLevelService /// - Unique identifier of the API credential. /// - /// - Additional request options. - /// . - Model.Management.AllowedOriginsResponse CreateAllowedOrigin(string merchantId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default); + /// . + Model.Management.AllowedOrigin CreateAllowedOrigin(string merchantId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default); /// /// Create an allowed origin @@ -42,8 +42,8 @@ public interface IAllowedOriginsMerchantLevelService /// - /// - Additional request options. /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateAllowedOriginAsync(string merchantId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); + /// Task of . + Task CreateAllowedOriginAsync(string merchantId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); /// /// Delete an allowed origin @@ -118,16 +118,16 @@ public AllowedOriginsMerchantLevelService(Client client) : base(client) _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); } - public Model.Management.AllowedOriginsResponse CreateAllowedOrigin(string merchantId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default) + public Model.Management.AllowedOrigin CreateAllowedOrigin(string merchantId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default) { return CreateAllowedOriginAsync(merchantId, apiCredentialId, allowedOrigin, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); } - public async Task CreateAllowedOriginAsync(string merchantId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) + public async Task CreateAllowedOriginAsync(string merchantId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) { var endpoint = _baseUrl + $"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins"; var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(allowedOrigin.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); + return await resource.RequestAsync(allowedOrigin.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); } public void DeleteAllowedOrigin(string merchantId, string apiCredentialId, string originId, RequestOptions requestOptions = default) diff --git a/Adyen/Service/PaymentService.cs b/Adyen/Service/PaymentService.cs index 721babe58..cd0beb00d 100644 --- a/Adyen/Service/PaymentService.cs +++ b/Adyen/Service/PaymentService.cs @@ -149,6 +149,7 @@ public interface IPaymentService /// - /// - Additional request options. /// . + [Obsolete] Model.Payment.ModificationResult Donate(DonationRequest donationRequest = default, RequestOptions requestOptions = default); /// @@ -158,6 +159,7 @@ public interface IPaymentService /// - Additional request options. /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. /// Task of . + [Obsolete] Task DonateAsync(DonationRequest donationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); /// @@ -343,11 +345,13 @@ public Model.Payment.ModificationResult Capture(CaptureRequest captureRequest = return await resource.RequestAsync(captureRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); } + [Obsolete] public Model.Payment.ModificationResult Donate(DonationRequest donationRequest = default, RequestOptions requestOptions = default) { return DonateAsync(donationRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); } + [Obsolete] public async Task DonateAsync(DonationRequest donationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) { var endpoint = _baseUrl + "/donate"; diff --git a/Adyen/Service/Transfers/TransfersService.cs b/Adyen/Service/Transfers/TransfersService.cs index f80b91328..73a2ed2f6 100644 --- a/Adyen/Service/Transfers/TransfersService.cs +++ b/Adyen/Service/Transfers/TransfersService.cs @@ -24,6 +24,58 @@ namespace Adyen.Service.Transfers /// public interface ITransfersService { + /// + /// Get all transfers + /// + /// - The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `accountHolderId`. + /// - The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/accountHolders/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `balancePlatform`. If you provide a `balanceAccountId`, the `accountHolderId` must be related to the `balanceAccountId`. + /// - The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id). Required if you don't provide an `accountHolderId` or `balancePlatform`. If you provide an `accountHolderId`, the `balanceAccountId` must be related to the `accountHolderId`. + /// - The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_). To use this parameter, you must also provide a `balanceAccountId`, `accountHolderId`, or `balancePlatform`. The `paymentInstrumentId` must be related to the `balanceAccountId` or `accountHolderId` that you provide. + /// - The reference you provided in the POST [/transfers](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers) request + /// - 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. + /// - Only include transfers that have been created on or after this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. + /// - Only include transfers that have been created on or before this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. + /// - The `cursor` returned in the links of the previous response. + /// - The number of items returned per page, maximum of 100 items. By default, the response returns 10 items per page. + /// - Additional request options. + /// . + Model.Transfers.FindTransfersResponse GetAllTransfers(DateTime createdSince, DateTime createdUntil, string balancePlatform = default, string accountHolderId = default, string balanceAccountId = default, string paymentInstrumentId = default, string reference = default, string category = default, string cursor = default, int? limit = default, RequestOptions requestOptions = default); + + /// + /// Get all transfers + /// + /// - The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `accountHolderId`. + /// - The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/accountHolders/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `balancePlatform`. If you provide a `balanceAccountId`, the `accountHolderId` must be related to the `balanceAccountId`. + /// - The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id). Required if you don't provide an `accountHolderId` or `balancePlatform`. If you provide an `accountHolderId`, the `balanceAccountId` must be related to the `accountHolderId`. + /// - The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_). To use this parameter, you must also provide a `balanceAccountId`, `accountHolderId`, or `balancePlatform`. The `paymentInstrumentId` must be related to the `balanceAccountId` or `accountHolderId` that you provide. + /// - The reference you provided in the POST [/transfers](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers) request + /// - 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. + /// - Only include transfers that have been created on or after this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. + /// - Only include transfers that have been created on or before this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. + /// - The `cursor` returned in the links of the previous response. + /// - The number of items returned per page, maximum of 100 items. By default, the response returns 10 items per page. + /// - Additional request options. + /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. + /// Task of . + Task GetAllTransfersAsync(DateTime createdSince, DateTime createdUntil, string balancePlatform = default, string accountHolderId = default, string balanceAccountId = default, string paymentInstrumentId = default, string reference = default, string category = default, string cursor = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); + + /// + /// Get a transfer + /// + /// - Unique identifier of the transfer. + /// - Additional request options. + /// . + Model.Transfers.TransferData GetTransfer(string id, RequestOptions requestOptions = default); + + /// + /// Get a transfer + /// + /// - Unique identifier of the transfer. + /// - Additional request options. + /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. + /// Task of . + Task GetTransferAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); + /// /// Return a transfer /// @@ -74,6 +126,42 @@ public TransfersService(Client client) : base(client) _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/btl/v4"); } + public Model.Transfers.FindTransfersResponse GetAllTransfers(DateTime createdSince, DateTime createdUntil, string balancePlatform = default, string accountHolderId = default, string balanceAccountId = default, string paymentInstrumentId = default, string reference = default, string category = default, string cursor = default, int? limit = default, RequestOptions requestOptions = default) + { + return GetAllTransfersAsync(createdSince, createdUntil, balancePlatform, accountHolderId, balanceAccountId, paymentInstrumentId, reference, category, cursor, limit, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); + } + + public async Task GetAllTransfersAsync(DateTime createdSince, DateTime createdUntil, string balancePlatform = default, string accountHolderId = default, string balanceAccountId = default, string paymentInstrumentId = default, string reference = default, string category = default, string cursor = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) + { + // Build the query string + var queryParams = new Dictionary(); + if (balancePlatform != null) queryParams.Add("balancePlatform", balancePlatform); + if (accountHolderId != null) queryParams.Add("accountHolderId", accountHolderId); + if (balanceAccountId != null) queryParams.Add("balanceAccountId", balanceAccountId); + if (paymentInstrumentId != null) queryParams.Add("paymentInstrumentId", paymentInstrumentId); + if (reference != null) queryParams.Add("reference", reference); + if (category != null) queryParams.Add("category", category); + queryParams.Add("createdSince", createdSince.ToString("yyyy-MM-ddTHH:mm:ssZ")); + queryParams.Add("createdUntil", createdUntil.ToString("yyyy-MM-ddTHH:mm:ssZ")); + if (cursor != null) queryParams.Add("cursor", cursor); + if (limit != null) queryParams.Add("limit", limit.ToString()); + var endpoint = _baseUrl + "/transfers" + ToQueryString(queryParams); + var resource = new ServiceResource(this, endpoint); + return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); + } + + public Model.Transfers.TransferData GetTransfer(string id, RequestOptions requestOptions = default) + { + return GetTransferAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); + } + + public async Task GetTransferAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) + { + var endpoint = _baseUrl + $"/transfers/{id}"; + var resource = new ServiceResource(this, endpoint); + return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); + } + public Model.Transfers.ReturnTransferResponse ReturnTransfer(string transferId, ReturnTransferRequest returnTransferRequest = default, RequestOptions requestOptions = default) { return ReturnTransferAsync(transferId, returnTransferRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult();