From 07d740afc7bb27b7f8a7d0b4d6b14e5bbe9f52e7 Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot <38424300+AdyenAutomationBot@users.noreply.github.com> Date: Thu, 25 Apr 2024 10:03:30 +0200 Subject: [PATCH] false[adyen-sdk-automation] automated change (#1009) --- Adyen/Model/Management/AmexInfo.cs | 191 ++++++++++++++++++ Adyen/Model/Management/PaymentMethod.cs | 20 +- .../Model/Management/PaymentMethodResponse.cs | 86 ++++---- .../Management/PaymentMethodSetupInfo.cs | 106 ++++++---- Adyen/Model/Payment/Installments.cs | 79 +++++++- 5 files changed, 389 insertions(+), 93 deletions(-) create mode 100644 Adyen/Model/Management/AmexInfo.cs diff --git a/Adyen/Model/Management/AmexInfo.cs b/Adyen/Model/Management/AmexInfo.cs new file mode 100644 index 000000000..921a373e7 --- /dev/null +++ b/Adyen/Model/Management/AmexInfo.cs @@ -0,0 +1,191 @@ +/* +* 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 +{ + /// + /// AmexInfo + /// + [DataContract(Name = "AmexInfo")] + public partial class AmexInfo : IEquatable, IValidatableObject + { + /// + /// Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with American Express. * **gatewayContract** — American Express receives the settlement and handles disputes. They then pay out to the merchant directly. * **paymentDesignatorContract** — Adyen receives the settlement and handles disputes. Adyen then pays out to the merchant. + /// + /// Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with American Express. * **gatewayContract** — American Express receives the settlement and handles disputes. They then pay out to the merchant directly. * **paymentDesignatorContract** — Adyen receives the settlement and handles disputes. Adyen then pays out to the merchant. + [JsonConverter(typeof(StringEnumConverter))] + public enum ServiceLevelEnum + { + /// + /// Enum NoContract for value: noContract + /// + [EnumMember(Value = "noContract")] + NoContract = 1, + + /// + /// Enum GatewayContract for value: gatewayContract + /// + [EnumMember(Value = "gatewayContract")] + GatewayContract = 2, + + /// + /// Enum PaymentDesignatorContract for value: paymentDesignatorContract + /// + [EnumMember(Value = "paymentDesignatorContract")] + PaymentDesignatorContract = 3 + + } + + + /// + /// Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with American Express. * **gatewayContract** — American Express receives the settlement and handles disputes. They then pay out to the merchant directly. * **paymentDesignatorContract** — Adyen receives the settlement and handles disputes. Adyen then pays out to the merchant. + /// + /// Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with American Express. * **gatewayContract** — American Express receives the settlement and handles disputes. They then pay out to the merchant directly. * **paymentDesignatorContract** — Adyen receives the settlement and handles disputes. Adyen then pays out to the merchant. + [DataMember(Name = "serviceLevel", IsRequired = false, EmitDefaultValue = false)] + public ServiceLevelEnum ServiceLevel { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected AmexInfo() { } + /// + /// Initializes a new instance of the class. + /// + /// MID (Merchant ID) number. Format: 10 numeric characters. Must be provided only when requesting `gatewayContract` or `paymentDesignatorContract` service levels.. + /// Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for `gatewayContract` and `paymentDesignatorContract` service levels. The default value is `false`. (default to false). + /// Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with American Express. * **gatewayContract** — American Express receives the settlement and handles disputes. They then pay out to the merchant directly. * **paymentDesignatorContract** — Adyen receives the settlement and handles disputes. Adyen then pays out to the merchant. (required). + public AmexInfo(string midNumber = default(string), bool? reuseMidNumber = false, ServiceLevelEnum serviceLevel = default(ServiceLevelEnum)) + { + this.ServiceLevel = serviceLevel; + this.MidNumber = midNumber; + this.ReuseMidNumber = reuseMidNumber; + } + + /// + /// MID (Merchant ID) number. Format: 10 numeric characters. Must be provided only when requesting `gatewayContract` or `paymentDesignatorContract` service levels. + /// + /// MID (Merchant ID) number. Format: 10 numeric characters. Must be provided only when requesting `gatewayContract` or `paymentDesignatorContract` service levels. + [DataMember(Name = "midNumber", EmitDefaultValue = false)] + public string MidNumber { get; set; } + + /// + /// Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for `gatewayContract` and `paymentDesignatorContract` service levels. The default value is `false`. + /// + /// Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for `gatewayContract` and `paymentDesignatorContract` service levels. The default value is `false`. + [DataMember(Name = "reuseMidNumber", EmitDefaultValue = false)] + public bool? ReuseMidNumber { 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 AmexInfo {\n"); + sb.Append(" MidNumber: ").Append(MidNumber).Append("\n"); + sb.Append(" ReuseMidNumber: ").Append(ReuseMidNumber).Append("\n"); + sb.Append(" ServiceLevel: ").Append(ServiceLevel).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 AmexInfo); + } + + /// + /// Returns true if AmexInfo instances are equal + /// + /// Instance of AmexInfo to be compared + /// Boolean + public bool Equals(AmexInfo input) + { + if (input == null) + { + return false; + } + return + ( + this.MidNumber == input.MidNumber || + (this.MidNumber != null && + this.MidNumber.Equals(input.MidNumber)) + ) && + ( + this.ReuseMidNumber == input.ReuseMidNumber || + this.ReuseMidNumber.Equals(input.ReuseMidNumber) + ) && + ( + this.ServiceLevel == input.ServiceLevel || + this.ServiceLevel.Equals(input.ServiceLevel) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MidNumber != null) + { + hashCode = (hashCode * 59) + this.MidNumber.GetHashCode(); + } + hashCode = (hashCode * 59) + this.ReuseMidNumber.GetHashCode(); + hashCode = (hashCode * 59) + this.ServiceLevel.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/PaymentMethod.cs b/Adyen/Model/Management/PaymentMethod.cs index abfa3a6c7..520af505d 100644 --- a/Adyen/Model/Management/PaymentMethod.cs +++ b/Adyen/Model/Management/PaymentMethod.cs @@ -82,6 +82,7 @@ protected PaymentMethod() { } /// /// afterpayTouch. /// Indicates whether receiving payments is allowed. This value is set to **true** by Adyen after screening your merchant account.. + /// amex. /// applePay. /// bcmc. /// The unique identifier of the business line. Required if you are a [platform model](https://docs.adyen.com/platforms).. @@ -117,11 +118,12 @@ protected PaymentMethod() { } /// Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected**. /// vipps. /// visa. - public PaymentMethod(AfterpayTouchInfo afterpayTouch = default(AfterpayTouchInfo), bool? allowed = default(bool?), ApplePayInfo applePay = default(ApplePayInfo), BcmcInfo bcmc = default(BcmcInfo), string businessLineId = default(string), CartesBancairesInfo cartesBancaires = default(CartesBancairesInfo), ClearpayInfo clearpay = default(ClearpayInfo), List countries = default(List), GenericPmWithTdiInfo cup = default(GenericPmWithTdiInfo), List currencies = default(List), List customRoutingFlags = default(List), GenericPmWithTdiInfo diners = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo discover = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo eftposAustralia = default(GenericPmWithTdiInfo), bool? enabled = default(bool?), GiroPayInfo giroPay = default(GiroPayInfo), GenericPmWithTdiInfo girocard = default(GenericPmWithTdiInfo), GooglePayInfo googlePay = default(GooglePayInfo), string id = default(string), GenericPmWithTdiInfo ideal = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo interacCard = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo jcb = default(GenericPmWithTdiInfo), KlarnaInfo klarna = default(KlarnaInfo), GenericPmWithTdiInfo maestro = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo mc = default(GenericPmWithTdiInfo), MealVoucherFRInfo mealVoucherFR = default(MealVoucherFRInfo), PayPalInfo paypal = default(PayPalInfo), string reference = default(string), string shopperInteraction = default(string), SofortInfo sofort = default(SofortInfo), List storeIds = default(List), SwishInfo swish = default(SwishInfo), TwintInfo twint = default(TwintInfo), string type = default(string), VerificationStatusEnum? verificationStatus = default(VerificationStatusEnum?), VippsInfo vipps = default(VippsInfo), GenericPmWithTdiInfo visa = default(GenericPmWithTdiInfo)) + public PaymentMethod(AfterpayTouchInfo afterpayTouch = default(AfterpayTouchInfo), bool? allowed = default(bool?), AmexInfo amex = default(AmexInfo), ApplePayInfo applePay = default(ApplePayInfo), BcmcInfo bcmc = default(BcmcInfo), string businessLineId = default(string), CartesBancairesInfo cartesBancaires = default(CartesBancairesInfo), ClearpayInfo clearpay = default(ClearpayInfo), List countries = default(List), GenericPmWithTdiInfo cup = default(GenericPmWithTdiInfo), List currencies = default(List), List customRoutingFlags = default(List), GenericPmWithTdiInfo diners = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo discover = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo eftposAustralia = default(GenericPmWithTdiInfo), bool? enabled = default(bool?), GiroPayInfo giroPay = default(GiroPayInfo), GenericPmWithTdiInfo girocard = default(GenericPmWithTdiInfo), GooglePayInfo googlePay = default(GooglePayInfo), string id = default(string), GenericPmWithTdiInfo ideal = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo interacCard = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo jcb = default(GenericPmWithTdiInfo), KlarnaInfo klarna = default(KlarnaInfo), GenericPmWithTdiInfo maestro = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo mc = default(GenericPmWithTdiInfo), MealVoucherFRInfo mealVoucherFR = default(MealVoucherFRInfo), PayPalInfo paypal = default(PayPalInfo), string reference = default(string), string shopperInteraction = default(string), SofortInfo sofort = default(SofortInfo), List storeIds = default(List), SwishInfo swish = default(SwishInfo), TwintInfo twint = default(TwintInfo), string type = default(string), VerificationStatusEnum? verificationStatus = default(VerificationStatusEnum?), VippsInfo vipps = default(VippsInfo), GenericPmWithTdiInfo visa = default(GenericPmWithTdiInfo)) { this.Id = id; this.AfterpayTouch = afterpayTouch; this.Allowed = allowed; + this.Amex = amex; this.ApplePay = applePay; this.Bcmc = bcmc; this.BusinessLineId = businessLineId; @@ -171,6 +173,12 @@ protected PaymentMethod() { } [DataMember(Name = "allowed", EmitDefaultValue = false)] public bool? Allowed { get; set; } + /// + /// Gets or Sets Amex + /// + [DataMember(Name = "amex", EmitDefaultValue = false)] + public AmexInfo Amex { get; set; } + /// /// Gets or Sets ApplePay /// @@ -395,6 +403,7 @@ public override string ToString() sb.Append("class PaymentMethod {\n"); sb.Append(" AfterpayTouch: ").Append(AfterpayTouch).Append("\n"); sb.Append(" Allowed: ").Append(Allowed).Append("\n"); + sb.Append(" Amex: ").Append(Amex).Append("\n"); sb.Append(" ApplePay: ").Append(ApplePay).Append("\n"); sb.Append(" Bcmc: ").Append(Bcmc).Append("\n"); sb.Append(" BusinessLineId: ").Append(BusinessLineId).Append("\n"); @@ -474,6 +483,11 @@ public bool Equals(PaymentMethod input) this.Allowed == input.Allowed || this.Allowed.Equals(input.Allowed) ) && + ( + this.Amex == input.Amex || + (this.Amex != null && + this.Amex.Equals(input.Amex)) + ) && ( this.ApplePay == input.ApplePay || (this.ApplePay != null && @@ -667,6 +681,10 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.AfterpayTouch.GetHashCode(); } hashCode = (hashCode * 59) + this.Allowed.GetHashCode(); + if (this.Amex != null) + { + hashCode = (hashCode * 59) + this.Amex.GetHashCode(); + } if (this.ApplePay != null) { hashCode = (hashCode * 59) + this.ApplePay.GetHashCode(); diff --git a/Adyen/Model/Management/PaymentMethodResponse.cs b/Adyen/Model/Management/PaymentMethodResponse.cs index 504694d00..f642c6118 100644 --- a/Adyen/Model/Management/PaymentMethodResponse.cs +++ b/Adyen/Model/Management/PaymentMethodResponse.cs @@ -92,245 +92,251 @@ public enum TypesWithErrorsEnum [EnumMember(Value = "clearpay")] Clearpay = 9, + /// + /// Enum Clicktopay for value: clicktopay + /// + [EnumMember(Value = "clicktopay")] + Clicktopay = 10, + /// /// Enum Cup for value: cup /// [EnumMember(Value = "cup")] - Cup = 10, + Cup = 11, /// /// Enum Diners for value: diners /// [EnumMember(Value = "diners")] - Diners = 11, + Diners = 12, /// /// Enum DirectdebitGB for value: directdebit_GB /// [EnumMember(Value = "directdebit_GB")] - DirectdebitGB = 12, + DirectdebitGB = 13, /// /// Enum Discover for value: discover /// [EnumMember(Value = "discover")] - Discover = 13, + Discover = 14, /// /// Enum EbankingFI for value: ebanking_FI /// [EnumMember(Value = "ebanking_FI")] - EbankingFI = 14, + EbankingFI = 15, /// /// Enum EftposAustralia for value: eftpos_australia /// [EnumMember(Value = "eftpos_australia")] - EftposAustralia = 15, + EftposAustralia = 16, /// /// Enum Elo for value: elo /// [EnumMember(Value = "elo")] - Elo = 16, + Elo = 17, /// /// Enum Elocredit for value: elocredit /// [EnumMember(Value = "elocredit")] - Elocredit = 17, + Elocredit = 18, /// /// Enum Elodebit for value: elodebit /// [EnumMember(Value = "elodebit")] - Elodebit = 18, + Elodebit = 19, /// /// Enum Girocard for value: girocard /// [EnumMember(Value = "girocard")] - Girocard = 19, + Girocard = 20, /// /// Enum Googlepay for value: googlepay /// [EnumMember(Value = "googlepay")] - Googlepay = 20, + Googlepay = 21, /// /// Enum Hiper for value: hiper /// [EnumMember(Value = "hiper")] - Hiper = 21, + Hiper = 22, /// /// Enum Hipercard for value: hipercard /// [EnumMember(Value = "hipercard")] - Hipercard = 22, + Hipercard = 23, /// /// Enum Ideal for value: ideal /// [EnumMember(Value = "ideal")] - Ideal = 23, + Ideal = 24, /// /// Enum InteracCard for value: interac_card /// [EnumMember(Value = "interac_card")] - InteracCard = 24, + InteracCard = 25, /// /// Enum Jcb for value: jcb /// [EnumMember(Value = "jcb")] - Jcb = 25, + Jcb = 26, /// /// Enum Klarna for value: klarna /// [EnumMember(Value = "klarna")] - Klarna = 26, + Klarna = 27, /// /// Enum KlarnaAccount for value: klarna_account /// [EnumMember(Value = "klarna_account")] - KlarnaAccount = 27, + KlarnaAccount = 28, /// /// Enum KlarnaPaynow for value: klarna_paynow /// [EnumMember(Value = "klarna_paynow")] - KlarnaPaynow = 28, + KlarnaPaynow = 29, /// /// Enum Maestro for value: maestro /// [EnumMember(Value = "maestro")] - Maestro = 29, + Maestro = 30, /// /// Enum Mbway for value: mbway /// [EnumMember(Value = "mbway")] - Mbway = 30, + Mbway = 31, /// /// Enum Mc for value: mc /// [EnumMember(Value = "mc")] - Mc = 31, + Mc = 32, /// /// Enum Mcdebit for value: mcdebit /// [EnumMember(Value = "mcdebit")] - Mcdebit = 32, + Mcdebit = 33, /// /// Enum MealVoucherFR for value: mealVoucher_FR /// [EnumMember(Value = "mealVoucher_FR")] - MealVoucherFR = 33, + MealVoucherFR = 34, /// /// Enum Mobilepay for value: mobilepay /// [EnumMember(Value = "mobilepay")] - Mobilepay = 34, + Mobilepay = 35, /// /// Enum Multibanco for value: multibanco /// [EnumMember(Value = "multibanco")] - Multibanco = 35, + Multibanco = 36, /// /// Enum OnlineBankingPL for value: onlineBanking_PL /// [EnumMember(Value = "onlineBanking_PL")] - OnlineBankingPL = 36, + OnlineBankingPL = 37, /// /// Enum Paybybank for value: paybybank /// [EnumMember(Value = "paybybank")] - Paybybank = 37, + Paybybank = 38, /// /// Enum Paypal for value: paypal /// [EnumMember(Value = "paypal")] - Paypal = 38, + Paypal = 39, /// /// Enum Payshop for value: payshop /// [EnumMember(Value = "payshop")] - Payshop = 39, + Payshop = 40, /// /// Enum Swish for value: swish /// [EnumMember(Value = "swish")] - Swish = 40, + Swish = 41, /// /// Enum Trustly for value: trustly /// [EnumMember(Value = "trustly")] - Trustly = 41, + Trustly = 42, /// /// Enum Twint for value: twint /// [EnumMember(Value = "twint")] - Twint = 42, + Twint = 43, /// /// Enum TwintPos for value: twint_pos /// [EnumMember(Value = "twint_pos")] - TwintPos = 43, + TwintPos = 44, /// /// Enum Vipps for value: vipps /// [EnumMember(Value = "vipps")] - Vipps = 44, + Vipps = 45, /// /// Enum Visa for value: visa /// [EnumMember(Value = "visa")] - Visa = 45, + Visa = 46, /// /// Enum Visadebit for value: visadebit /// [EnumMember(Value = "visadebit")] - Visadebit = 46, + Visadebit = 47, /// /// Enum Vpay for value: vpay /// [EnumMember(Value = "vpay")] - Vpay = 47, + Vpay = 48, /// /// Enum Wechatpay for value: wechatpay /// [EnumMember(Value = "wechatpay")] - Wechatpay = 48, + Wechatpay = 49, /// /// Enum WechatpayPos for value: wechatpay_pos /// [EnumMember(Value = "wechatpay_pos")] - WechatpayPos = 49 + WechatpayPos = 50 } diff --git a/Adyen/Model/Management/PaymentMethodSetupInfo.cs b/Adyen/Model/Management/PaymentMethodSetupInfo.cs index dd4b9b0a0..adf65b174 100644 --- a/Adyen/Model/Management/PaymentMethodSetupInfo.cs +++ b/Adyen/Model/Management/PaymentMethodSetupInfo.cs @@ -133,245 +133,251 @@ public enum TypeEnum [EnumMember(Value = "clearpay")] Clearpay = 9, + /// + /// Enum Clicktopay for value: clicktopay + /// + [EnumMember(Value = "clicktopay")] + Clicktopay = 10, + /// /// Enum Cup for value: cup /// [EnumMember(Value = "cup")] - Cup = 10, + Cup = 11, /// /// Enum Diners for value: diners /// [EnumMember(Value = "diners")] - Diners = 11, + Diners = 12, /// /// Enum DirectdebitGB for value: directdebit_GB /// [EnumMember(Value = "directdebit_GB")] - DirectdebitGB = 12, + DirectdebitGB = 13, /// /// Enum Discover for value: discover /// [EnumMember(Value = "discover")] - Discover = 13, + Discover = 14, /// /// Enum EbankingFI for value: ebanking_FI /// [EnumMember(Value = "ebanking_FI")] - EbankingFI = 14, + EbankingFI = 15, /// /// Enum EftposAustralia for value: eftpos_australia /// [EnumMember(Value = "eftpos_australia")] - EftposAustralia = 15, + EftposAustralia = 16, /// /// Enum Elo for value: elo /// [EnumMember(Value = "elo")] - Elo = 16, + Elo = 17, /// /// Enum Elocredit for value: elocredit /// [EnumMember(Value = "elocredit")] - Elocredit = 17, + Elocredit = 18, /// /// Enum Elodebit for value: elodebit /// [EnumMember(Value = "elodebit")] - Elodebit = 18, + Elodebit = 19, /// /// Enum Girocard for value: girocard /// [EnumMember(Value = "girocard")] - Girocard = 19, + Girocard = 20, /// /// Enum Googlepay for value: googlepay /// [EnumMember(Value = "googlepay")] - Googlepay = 20, + Googlepay = 21, /// /// Enum Hiper for value: hiper /// [EnumMember(Value = "hiper")] - Hiper = 21, + Hiper = 22, /// /// Enum Hipercard for value: hipercard /// [EnumMember(Value = "hipercard")] - Hipercard = 22, + Hipercard = 23, /// /// Enum Ideal for value: ideal /// [EnumMember(Value = "ideal")] - Ideal = 23, + Ideal = 24, /// /// Enum InteracCard for value: interac_card /// [EnumMember(Value = "interac_card")] - InteracCard = 24, + InteracCard = 25, /// /// Enum Jcb for value: jcb /// [EnumMember(Value = "jcb")] - Jcb = 25, + Jcb = 26, /// /// Enum Klarna for value: klarna /// [EnumMember(Value = "klarna")] - Klarna = 26, + Klarna = 27, /// /// Enum KlarnaAccount for value: klarna_account /// [EnumMember(Value = "klarna_account")] - KlarnaAccount = 27, + KlarnaAccount = 28, /// /// Enum KlarnaPaynow for value: klarna_paynow /// [EnumMember(Value = "klarna_paynow")] - KlarnaPaynow = 28, + KlarnaPaynow = 29, /// /// Enum Maestro for value: maestro /// [EnumMember(Value = "maestro")] - Maestro = 29, + Maestro = 30, /// /// Enum Mbway for value: mbway /// [EnumMember(Value = "mbway")] - Mbway = 30, + Mbway = 31, /// /// Enum Mc for value: mc /// [EnumMember(Value = "mc")] - Mc = 31, + Mc = 32, /// /// Enum Mcdebit for value: mcdebit /// [EnumMember(Value = "mcdebit")] - Mcdebit = 32, + Mcdebit = 33, /// /// Enum MealVoucherFR for value: mealVoucher_FR /// [EnumMember(Value = "mealVoucher_FR")] - MealVoucherFR = 33, + MealVoucherFR = 34, /// /// Enum Mobilepay for value: mobilepay /// [EnumMember(Value = "mobilepay")] - Mobilepay = 34, + Mobilepay = 35, /// /// Enum Multibanco for value: multibanco /// [EnumMember(Value = "multibanco")] - Multibanco = 35, + Multibanco = 36, /// /// Enum OnlineBankingPL for value: onlineBanking_PL /// [EnumMember(Value = "onlineBanking_PL")] - OnlineBankingPL = 36, + OnlineBankingPL = 37, /// /// Enum Paybybank for value: paybybank /// [EnumMember(Value = "paybybank")] - Paybybank = 37, + Paybybank = 38, /// /// Enum Paypal for value: paypal /// [EnumMember(Value = "paypal")] - Paypal = 38, + Paypal = 39, /// /// Enum Payshop for value: payshop /// [EnumMember(Value = "payshop")] - Payshop = 39, + Payshop = 40, /// /// Enum Swish for value: swish /// [EnumMember(Value = "swish")] - Swish = 40, + Swish = 41, /// /// Enum Trustly for value: trustly /// [EnumMember(Value = "trustly")] - Trustly = 41, + Trustly = 42, /// /// Enum Twint for value: twint /// [EnumMember(Value = "twint")] - Twint = 42, + Twint = 43, /// /// Enum TwintPos for value: twint_pos /// [EnumMember(Value = "twint_pos")] - TwintPos = 43, + TwintPos = 44, /// /// Enum Vipps for value: vipps /// [EnumMember(Value = "vipps")] - Vipps = 44, + Vipps = 45, /// /// Enum Visa for value: visa /// [EnumMember(Value = "visa")] - Visa = 45, + Visa = 46, /// /// Enum Visadebit for value: visadebit /// [EnumMember(Value = "visadebit")] - Visadebit = 46, + Visadebit = 47, /// /// Enum Vpay for value: vpay /// [EnumMember(Value = "vpay")] - Vpay = 47, + Vpay = 48, /// /// Enum Wechatpay for value: wechatpay /// [EnumMember(Value = "wechatpay")] - Wechatpay = 48, + Wechatpay = 49, /// /// Enum WechatpayPos for value: wechatpay_pos /// [EnumMember(Value = "wechatpay_pos")] - WechatpayPos = 49 + WechatpayPos = 50 } @@ -391,6 +397,7 @@ protected PaymentMethodSetupInfo() { } /// Initializes a new instance of the class. /// /// afterpayTouch. + /// amex. /// applePay. /// bcmc. /// The unique identifier of the business line. Required if you are a [platform model](https://docs.adyen.com/platforms).. @@ -423,10 +430,11 @@ protected PaymentMethodSetupInfo() { } /// Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). (required). /// vipps. /// visa. - public PaymentMethodSetupInfo(AfterpayTouchInfo afterpayTouch = default(AfterpayTouchInfo), ApplePayInfo applePay = default(ApplePayInfo), BcmcInfo bcmc = default(BcmcInfo), string businessLineId = default(string), CartesBancairesInfo cartesBancaires = default(CartesBancairesInfo), ClearpayInfo clearpay = default(ClearpayInfo), List countries = default(List), GenericPmWithTdiInfo cup = default(GenericPmWithTdiInfo), List currencies = default(List), List customRoutingFlags = default(List), GenericPmWithTdiInfo diners = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo discover = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo eftposAustralia = default(GenericPmWithTdiInfo), GiroPayInfo giroPay = default(GiroPayInfo), GenericPmWithTdiInfo girocard = default(GenericPmWithTdiInfo), GooglePayInfo googlePay = default(GooglePayInfo), GenericPmWithTdiInfo ideal = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo interacCard = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo jcb = default(GenericPmWithTdiInfo), KlarnaInfo klarna = default(KlarnaInfo), GenericPmWithTdiInfo maestro = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo mc = default(GenericPmWithTdiInfo), MealVoucherFRInfo mealVoucherFR = default(MealVoucherFRInfo), PayPalInfo paypal = default(PayPalInfo), string reference = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), SofortInfo sofort = default(SofortInfo), List storeIds = default(List), SwishInfo swish = default(SwishInfo), TwintInfo twint = default(TwintInfo), TypeEnum type = default(TypeEnum), VippsInfo vipps = default(VippsInfo), GenericPmWithTdiInfo visa = default(GenericPmWithTdiInfo)) + public PaymentMethodSetupInfo(AfterpayTouchInfo afterpayTouch = default(AfterpayTouchInfo), AmexInfo amex = default(AmexInfo), ApplePayInfo applePay = default(ApplePayInfo), BcmcInfo bcmc = default(BcmcInfo), string businessLineId = default(string), CartesBancairesInfo cartesBancaires = default(CartesBancairesInfo), ClearpayInfo clearpay = default(ClearpayInfo), List countries = default(List), GenericPmWithTdiInfo cup = default(GenericPmWithTdiInfo), List currencies = default(List), List customRoutingFlags = default(List), GenericPmWithTdiInfo diners = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo discover = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo eftposAustralia = default(GenericPmWithTdiInfo), GiroPayInfo giroPay = default(GiroPayInfo), GenericPmWithTdiInfo girocard = default(GenericPmWithTdiInfo), GooglePayInfo googlePay = default(GooglePayInfo), GenericPmWithTdiInfo ideal = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo interacCard = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo jcb = default(GenericPmWithTdiInfo), KlarnaInfo klarna = default(KlarnaInfo), GenericPmWithTdiInfo maestro = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo mc = default(GenericPmWithTdiInfo), MealVoucherFRInfo mealVoucherFR = default(MealVoucherFRInfo), PayPalInfo paypal = default(PayPalInfo), string reference = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), SofortInfo sofort = default(SofortInfo), List storeIds = default(List), SwishInfo swish = default(SwishInfo), TwintInfo twint = default(TwintInfo), TypeEnum type = default(TypeEnum), VippsInfo vipps = default(VippsInfo), GenericPmWithTdiInfo visa = default(GenericPmWithTdiInfo)) { this.Type = type; this.AfterpayTouch = afterpayTouch; + this.Amex = amex; this.ApplePay = applePay; this.Bcmc = bcmc; this.BusinessLineId = businessLineId; @@ -466,6 +474,12 @@ protected PaymentMethodSetupInfo() { } [DataMember(Name = "afterpayTouch", EmitDefaultValue = false)] public AfterpayTouchInfo AfterpayTouch { get; set; } + /// + /// Gets or Sets Amex + /// + [DataMember(Name = "amex", EmitDefaultValue = false)] + public AmexInfo Amex { get; set; } + /// /// Gets or Sets ApplePay /// @@ -661,6 +675,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class PaymentMethodSetupInfo {\n"); sb.Append(" AfterpayTouch: ").Append(AfterpayTouch).Append("\n"); + sb.Append(" Amex: ").Append(Amex).Append("\n"); sb.Append(" ApplePay: ").Append(ApplePay).Append("\n"); sb.Append(" Bcmc: ").Append(Bcmc).Append("\n"); sb.Append(" BusinessLineId: ").Append(BusinessLineId).Append("\n"); @@ -733,6 +748,11 @@ public bool Equals(PaymentMethodSetupInfo input) (this.AfterpayTouch != null && this.AfterpayTouch.Equals(input.AfterpayTouch)) ) && + ( + this.Amex == input.Amex || + (this.Amex != null && + this.Amex.Equals(input.Amex)) + ) && ( this.ApplePay == input.ApplePay || (this.ApplePay != null && @@ -910,6 +930,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AfterpayTouch.GetHashCode(); } + if (this.Amex != null) + { + hashCode = (hashCode * 59) + this.Amex.GetHashCode(); + } if (this.ApplePay != null) { hashCode = (hashCode * 59) + this.ApplePay.GetHashCode(); diff --git a/Adyen/Model/Payment/Installments.cs b/Adyen/Model/Payment/Installments.cs index 2163aa3b0..397df2a8d 100644 --- a/Adyen/Model/Payment/Installments.cs +++ b/Adyen/Model/Payment/Installments.cs @@ -33,31 +33,73 @@ namespace Adyen.Model.Payment public partial class Installments : IEquatable, IValidatableObject { /// - /// The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** + /// The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. /// - /// The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** + /// The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. [JsonConverter(typeof(StringEnumConverter))] public enum PlanEnum { + /// + /// Enum BuynowPaylater for value: buynow_paylater + /// + [EnumMember(Value = "buynow_paylater")] + BuynowPaylater = 1, + + /// + /// Enum InteresRefundPrctg for value: interes_refund_prctg + /// + [EnumMember(Value = "interes_refund_prctg")] + InteresRefundPrctg = 2, + + /// + /// Enum InterestBonus for value: interest_bonus + /// + [EnumMember(Value = "interest_bonus")] + InterestBonus = 3, + + /// + /// Enum NointeresRefundPrctg for value: nointeres_refund_prctg + /// + [EnumMember(Value = "nointeres_refund_prctg")] + NointeresRefundPrctg = 4, + + /// + /// Enum NointerestBonus for value: nointerest_bonus + /// + [EnumMember(Value = "nointerest_bonus")] + NointerestBonus = 5, + + /// + /// Enum RefundPrctg for value: refund_prctg + /// + [EnumMember(Value = "refund_prctg")] + RefundPrctg = 6, + /// /// Enum Regular for value: regular /// [EnumMember(Value = "regular")] - Regular = 1, + Regular = 7, /// /// Enum Revolving for value: revolving /// [EnumMember(Value = "revolving")] - Revolving = 2 + Revolving = 8, + + /// + /// Enum WithInterest for value: with_interest + /// + [EnumMember(Value = "with_interest")] + WithInterest = 9 } /// - /// The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** + /// The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. /// - /// The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** + /// The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. [DataMember(Name = "plan", EmitDefaultValue = false)] public PlanEnum? Plan { get; set; } /// @@ -68,18 +110,27 @@ protected Installments() { } /// /// Initializes a new instance of the class. /// - /// The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** . - /// Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. (required). - public Installments(PlanEnum? plan = default(PlanEnum?), int? value = default(int?)) + /// Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico) . + /// The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. . + /// Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico. (required). + public Installments(int? extra = default(int?), PlanEnum? plan = default(PlanEnum?), int? value = default(int?)) { this.Value = value; + this.Extra = extra; this.Plan = plan; } /// - /// Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. + /// Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico) + /// + /// Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico) + [DataMember(Name = "extra", EmitDefaultValue = false)] + public int? Extra { get; set; } + + /// + /// Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico. /// - /// Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. + /// Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico. [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] public int? Value { get; set; } @@ -91,6 +142,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Installments {\n"); + sb.Append(" Extra: ").Append(Extra).Append("\n"); sb.Append(" Plan: ").Append(Plan).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); sb.Append("}\n"); @@ -128,6 +180,10 @@ public bool Equals(Installments input) return false; } return + ( + this.Extra == input.Extra || + this.Extra.Equals(input.Extra) + ) && ( this.Plan == input.Plan || this.Plan.Equals(input.Plan) @@ -147,6 +203,7 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + hashCode = (hashCode * 59) + this.Extra.GetHashCode(); hashCode = (hashCode * 59) + this.Plan.GetHashCode(); hashCode = (hashCode * 59) + this.Value.GetHashCode(); return hashCode;