Skip to content

Commit

Permalink
false[adyen-sdk-automation] automated change (#1044)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdyenAutomationBot authored Aug 16, 2024
1 parent 5402e3a commit 25d999f
Show file tree
Hide file tree
Showing 66 changed files with 5,379 additions and 766 deletions.
21 changes: 20 additions & 1 deletion Adyen/Model/Checkout/AchDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ public enum TypeEnum
/// <param name="ownerName">The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don&#39;t accept &#39;ø&#39;. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. &gt; If provided details don&#39;t match the required format, the response returns the error message: 203 &#39;Invalid bank account holder name&#39;..</param>
/// <param name="recurringDetailReference">This is the &#x60;recurringDetailReference&#x60; returned in the response when you created the token..</param>
/// <param name="storedPaymentMethodId">This is the &#x60;recurringDetailReference&#x60; returned in the response when you created the token..</param>
/// <param name="transferInstrumentId">The unique identifier of your user&#39;s verified transfer instrument, which you can use to top up their balance accounts..</param>
/// <param name="type">**ach** (default to TypeEnum.Ach).</param>
public AchDetails(string bankAccountNumber = default(string), BankAccountTypeEnum? bankAccountType = default(BankAccountTypeEnum?), string bankLocationId = default(string), string checkoutAttemptId = default(string), string encryptedBankAccountNumber = default(string), string encryptedBankLocationId = default(string), string ownerName = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = TypeEnum.Ach)
public AchDetails(string bankAccountNumber = default(string), BankAccountTypeEnum? bankAccountType = default(BankAccountTypeEnum?), string bankLocationId = default(string), string checkoutAttemptId = default(string), string encryptedBankAccountNumber = default(string), string encryptedBankLocationId = default(string), string ownerName = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), string transferInstrumentId = default(string), TypeEnum? type = TypeEnum.Ach)
{
this.BankAccountNumber = bankAccountNumber;
this.BankAccountType = bankAccountType;
Expand All @@ -142,6 +143,7 @@ public enum TypeEnum
this.OwnerName = ownerName;
this.RecurringDetailReference = recurringDetailReference;
this.StoredPaymentMethodId = storedPaymentMethodId;
this.TransferInstrumentId = transferInstrumentId;
this.Type = type;
}

Expand Down Expand Up @@ -202,6 +204,13 @@ public enum TypeEnum
[DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)]
public string StoredPaymentMethodId { get; set; }

/// <summary>
/// The unique identifier of your user&#39;s verified transfer instrument, which you can use to top up their balance accounts.
/// </summary>
/// <value>The unique identifier of your user&#39;s verified transfer instrument, which you can use to top up their balance accounts.</value>
[DataMember(Name = "transferInstrumentId", EmitDefaultValue = false)]
public string TransferInstrumentId { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand All @@ -219,6 +228,7 @@ public override string ToString()
sb.Append(" OwnerName: ").Append(OwnerName).Append("\n");
sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n");
sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n");
sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n");
sb.Append(" Type: ").Append(Type).Append("\n");
sb.Append("}\n");
return sb.ToString();
Expand Down Expand Up @@ -299,6 +309,11 @@ public bool Equals(AchDetails input)
(this.StoredPaymentMethodId != null &&
this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId))
) &&
(
this.TransferInstrumentId == input.TransferInstrumentId ||
(this.TransferInstrumentId != null &&
this.TransferInstrumentId.Equals(input.TransferInstrumentId))
) &&
(
this.Type == input.Type ||
this.Type.Equals(input.Type)
Expand Down Expand Up @@ -347,6 +362,10 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode();
}
if (this.TransferInstrumentId != null)
{
hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode();
}
hashCode = (hashCode * 59) + this.Type.GetHashCode();
return hashCode;
}
Expand Down
154 changes: 154 additions & 0 deletions Adyen/Model/Checkout/Amounts.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
/*
* 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
{
/// <summary>
/// Amounts
/// </summary>
[DataContract(Name = "Amounts")]
public partial class Amounts : IEquatable<Amounts>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="Amounts" /> class.
/// </summary>
[JsonConstructorAttribute]
protected Amounts() { }
/// <summary>
/// Initializes a new instance of the <see cref="Amounts" /> class.
/// </summary>
/// <param name="currency">The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/). (required).</param>
/// <param name="values">The amounts of the donation (in [minor units](https://docs.adyen.com/development-resources/currency-codes/)). (required).</param>
public Amounts(string currency = default(string), List<long> values = default(List<long>))
{
this.Currency = currency;
this.Values = values;
}

/// <summary>
/// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/).
/// </summary>
/// <value>The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/).</value>
[DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)]
public string Currency { get; set; }

/// <summary>
/// The amounts of the donation (in [minor units](https://docs.adyen.com/development-resources/currency-codes/)).
/// </summary>
/// <value>The amounts of the donation (in [minor units](https://docs.adyen.com/development-resources/currency-codes/)).</value>
[DataMember(Name = "values", IsRequired = false, EmitDefaultValue = false)]
public List<long> Values { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class Amounts {\n");
sb.Append(" Currency: ").Append(Currency).Append("\n");
sb.Append(" Values: ").Append(Values).Append("\n");
sb.Append("}\n");
return sb.ToString();
}

/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}

/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as Amounts);
}

/// <summary>
/// Returns true if Amounts instances are equal
/// </summary>
/// <param name="input">Instance of Amounts to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(Amounts input)
{
if (input == null)
{
return false;
}
return
(
this.Currency == input.Currency ||
(this.Currency != null &&
this.Currency.Equals(input.Currency))
) &&
(
this.Values == input.Values ||
this.Values != null &&
input.Values != null &&
this.Values.SequenceEqual(input.Values)
);
}

/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Currency != null)
{
hashCode = (hashCode * 59) + this.Currency.GetHashCode();
}
if (this.Values != null)
{
hashCode = (hashCode * 59) + this.Values.GetHashCode();
}
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
{
yield break;
}
}

}
21 changes: 20 additions & 1 deletion Adyen/Model/Checkout/BacsDirectDebitDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,17 @@ public enum TypeEnum
/// <param name="holderName">The name of the bank account holder..</param>
/// <param name="recurringDetailReference">This is the &#x60;recurringDetailReference&#x60; returned in the response when you created the token..</param>
/// <param name="storedPaymentMethodId">This is the &#x60;recurringDetailReference&#x60; returned in the response when you created the token..</param>
/// <param name="transferInstrumentId">The unique identifier of your user&#39;s verified transfer instrument, which you can use to top up their balance accounts..</param>
/// <param name="type">**directdebit_GB** (default to TypeEnum.DirectdebitGB).</param>
public BacsDirectDebitDetails(string bankAccountNumber = default(string), string bankLocationId = default(string), string checkoutAttemptId = default(string), string holderName = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = TypeEnum.DirectdebitGB)
public BacsDirectDebitDetails(string bankAccountNumber = default(string), string bankLocationId = default(string), string checkoutAttemptId = default(string), string holderName = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), string transferInstrumentId = default(string), TypeEnum? type = TypeEnum.DirectdebitGB)
{
this.BankAccountNumber = bankAccountNumber;
this.BankLocationId = bankLocationId;
this.CheckoutAttemptId = checkoutAttemptId;
this.HolderName = holderName;
this.RecurringDetailReference = recurringDetailReference;
this.StoredPaymentMethodId = storedPaymentMethodId;
this.TransferInstrumentId = transferInstrumentId;
this.Type = type;
}

Expand Down Expand Up @@ -118,6 +120,13 @@ public enum TypeEnum
[DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)]
public string StoredPaymentMethodId { get; set; }

/// <summary>
/// The unique identifier of your user&#39;s verified transfer instrument, which you can use to top up their balance accounts.
/// </summary>
/// <value>The unique identifier of your user&#39;s verified transfer instrument, which you can use to top up their balance accounts.</value>
[DataMember(Name = "transferInstrumentId", EmitDefaultValue = false)]
public string TransferInstrumentId { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand All @@ -132,6 +141,7 @@ public override string ToString()
sb.Append(" HolderName: ").Append(HolderName).Append("\n");
sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n");
sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n");
sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n");
sb.Append(" Type: ").Append(Type).Append("\n");
sb.Append("}\n");
return sb.ToString();
Expand Down Expand Up @@ -198,6 +208,11 @@ public bool Equals(BacsDirectDebitDetails input)
(this.StoredPaymentMethodId != null &&
this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId))
) &&
(
this.TransferInstrumentId == input.TransferInstrumentId ||
(this.TransferInstrumentId != null &&
this.TransferInstrumentId.Equals(input.TransferInstrumentId))
) &&
(
this.Type == input.Type ||
this.Type.Equals(input.Type)
Expand Down Expand Up @@ -237,6 +252,10 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode();
}
if (this.TransferInstrumentId != null)
{
hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode();
}
hashCode = (hashCode * 59) + this.Type.GetHashCode();
return hashCode;
}
Expand Down
35 changes: 34 additions & 1 deletion Adyen/Model/Checkout/CheckoutPaymentMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,18 @@ public CheckoutPaymentMethod(PayPalDetails actualInstance)
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}

/// <summary>
/// Initializes a new instance of the <see cref="CheckoutPaymentMethod" /> class
/// with the <see cref="PayToDetails" /> class
/// </summary>
/// <param name="actualInstance">An instance of PayToDetails.</param>
public CheckoutPaymentMethod(PayToDetails actualInstance)
{
this.IsNullable = false;
this.SchemaType= "oneOf";
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
}

/// <summary>
/// Initializes a new instance of the <see cref="CheckoutPaymentMethod" /> class
/// with the <see cref="PayUUpiDetails" /> class
Expand Down Expand Up @@ -664,6 +676,10 @@ public override Object ActualInstance
{
this._actualInstance = value;
}
else if (value.GetType() == typeof(PayToDetails))
{
this._actualInstance = value;
}
else if (value.GetType() == typeof(PayUUpiDetails))
{
this._actualInstance = value;
Expand Down Expand Up @@ -722,7 +738,7 @@ public override Object ActualInstance
}
else
{
throw new ArgumentException("Invalid instance found. Must be the following types: AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankDetails, 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, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EcontextVoucherDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails");
}
}
}
Expand Down Expand Up @@ -1007,6 +1023,16 @@ public PayPalDetails GetPayPalDetails()
return (PayPalDetails)this.ActualInstance;
}

/// <summary>
/// Get the actual instance of `PayToDetails`. If the actual instance is not `PayToDetails`,
/// the InvalidClassException will be thrown
/// </summary>
/// <returns>An instance of PayToDetails</returns>
public PayToDetails GetPayToDetails()
{
return (PayToDetails)this.ActualInstance;
}

/// <summary>
/// Get the actual instance of `PayUUpiDetails`. If the actual instance is not `PayUUpiDetails`,
/// the InvalidClassException will be thrown
Expand Down Expand Up @@ -1389,6 +1415,13 @@ public static CheckoutPaymentMethod FromJson(string jsonString)
matchedTypes.Add("PayPalDetails");
match++;
}
// Check if the jsonString type enum matches the PayToDetails type enums
if (ContainsValue<PayToDetails.TypeEnum>(type))
{
newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject<PayToDetails>(jsonString, CheckoutPaymentMethod.SerializerSettings));
matchedTypes.Add("PayToDetails");
match++;
}
// Check if the jsonString type enum matches the PayUUpiDetails type enums
if (ContainsValue<PayUUpiDetails.TypeEnum>(type))
{
Expand Down
Loading

0 comments on commit 25d999f

Please sign in to comment.