Skip to content

Commit 9c8aaa7

Browse files
false[adyen-sdk-automation] automated change (#1088)
1 parent deb6ebb commit 9c8aaa7

22 files changed

+1714
-231
lines changed

Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,13 @@ protected CreateSweepConfigurationV2() { }
395395
[DataMember(Name = "description", EmitDefaultValue = false)]
396396
public string Description { get; set; }
397397

398+
/// <summary>
399+
/// The human readable reason for disabling the sweep.
400+
/// </summary>
401+
/// <value>The human readable reason for disabling the sweep.</value>
402+
[DataMember(Name = "reasonDetail", EmitDefaultValue = false)]
403+
public string ReasonDetail { get; private set; }
404+
398405
/// <summary>
399406
/// Your reference for the sweep configuration.
400407
/// </summary>
@@ -447,6 +454,7 @@ public override string ToString()
447454
sb.Append(" Description: ").Append(Description).Append("\n");
448455
sb.Append(" Priorities: ").Append(Priorities).Append("\n");
449456
sb.Append(" Reason: ").Append(Reason).Append("\n");
457+
sb.Append(" ReasonDetail: ").Append(ReasonDetail).Append("\n");
450458
sb.Append(" Reference: ").Append(Reference).Append("\n");
451459
sb.Append(" ReferenceForBeneficiary: ").Append(ReferenceForBeneficiary).Append("\n");
452460
sb.Append(" Schedule: ").Append(Schedule).Append("\n");
@@ -517,6 +525,11 @@ public bool Equals(CreateSweepConfigurationV2 input)
517525
this.Reason == input.Reason ||
518526
this.Reason.Equals(input.Reason)
519527
) &&
528+
(
529+
this.ReasonDetail == input.ReasonDetail ||
530+
(this.ReasonDetail != null &&
531+
this.ReasonDetail.Equals(input.ReasonDetail))
532+
) &&
520533
(
521534
this.Reference == input.Reference ||
522535
(this.Reference != null &&
@@ -581,6 +594,10 @@ public override int GetHashCode()
581594
}
582595
hashCode = (hashCode * 59) + this.Priorities.GetHashCode();
583596
hashCode = (hashCode * 59) + this.Reason.GetHashCode();
597+
if (this.ReasonDetail != null)
598+
{
599+
hashCode = (hashCode * 59) + this.ReasonDetail.GetHashCode();
600+
}
584601
if (this.Reference != null)
585602
{
586603
hashCode = (hashCode * 59) + this.Reference.GetHashCode();

Adyen/Model/BalancePlatform/SweepConfigurationV2.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,13 @@ protected SweepConfigurationV2() { }
402402
[DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)]
403403
public string Id { get; private set; }
404404

405+
/// <summary>
406+
/// The human readable reason for disabling the sweep.
407+
/// </summary>
408+
/// <value>The human readable reason for disabling the sweep.</value>
409+
[DataMember(Name = "reasonDetail", EmitDefaultValue = false)]
410+
public string ReasonDetail { get; private set; }
411+
405412
/// <summary>
406413
/// Your reference for the sweep configuration.
407414
/// </summary>
@@ -455,6 +462,7 @@ public override string ToString()
455462
sb.Append(" Id: ").Append(Id).Append("\n");
456463
sb.Append(" Priorities: ").Append(Priorities).Append("\n");
457464
sb.Append(" Reason: ").Append(Reason).Append("\n");
465+
sb.Append(" ReasonDetail: ").Append(ReasonDetail).Append("\n");
458466
sb.Append(" Reference: ").Append(Reference).Append("\n");
459467
sb.Append(" ReferenceForBeneficiary: ").Append(ReferenceForBeneficiary).Append("\n");
460468
sb.Append(" Schedule: ").Append(Schedule).Append("\n");
@@ -530,6 +538,11 @@ public bool Equals(SweepConfigurationV2 input)
530538
this.Reason == input.Reason ||
531539
this.Reason.Equals(input.Reason)
532540
) &&
541+
(
542+
this.ReasonDetail == input.ReasonDetail ||
543+
(this.ReasonDetail != null &&
544+
this.ReasonDetail.Equals(input.ReasonDetail))
545+
) &&
533546
(
534547
this.Reference == input.Reference ||
535548
(this.Reference != null &&
@@ -598,6 +611,10 @@ public override int GetHashCode()
598611
}
599612
hashCode = (hashCode * 59) + this.Priorities.GetHashCode();
600613
hashCode = (hashCode * 59) + this.Reason.GetHashCode();
614+
if (this.ReasonDetail != null)
615+
{
616+
hashCode = (hashCode * 59) + this.ReasonDetail.GetHashCode();
617+
}
601618
if (this.Reference != null)
602619
{
603620
hashCode = (hashCode * 59) + this.Reference.GetHashCode();

Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,13 @@ public enum TypeEnum
397397
[DataMember(Name = "id", EmitDefaultValue = false)]
398398
public string Id { get; private set; }
399399

400+
/// <summary>
401+
/// The human readable reason for disabling the sweep.
402+
/// </summary>
403+
/// <value>The human readable reason for disabling the sweep.</value>
404+
[DataMember(Name = "reasonDetail", EmitDefaultValue = false)]
405+
public string ReasonDetail { get; private set; }
406+
400407
/// <summary>
401408
/// Your reference for the sweep configuration.
402409
/// </summary>
@@ -450,6 +457,7 @@ public override string ToString()
450457
sb.Append(" Id: ").Append(Id).Append("\n");
451458
sb.Append(" Priorities: ").Append(Priorities).Append("\n");
452459
sb.Append(" Reason: ").Append(Reason).Append("\n");
460+
sb.Append(" ReasonDetail: ").Append(ReasonDetail).Append("\n");
453461
sb.Append(" Reference: ").Append(Reference).Append("\n");
454462
sb.Append(" ReferenceForBeneficiary: ").Append(ReferenceForBeneficiary).Append("\n");
455463
sb.Append(" Schedule: ").Append(Schedule).Append("\n");
@@ -525,6 +533,11 @@ public bool Equals(UpdateSweepConfigurationV2 input)
525533
this.Reason == input.Reason ||
526534
this.Reason.Equals(input.Reason)
527535
) &&
536+
(
537+
this.ReasonDetail == input.ReasonDetail ||
538+
(this.ReasonDetail != null &&
539+
this.ReasonDetail.Equals(input.ReasonDetail))
540+
) &&
528541
(
529542
this.Reference == input.Reference ||
530543
(this.Reference != null &&
@@ -593,6 +606,10 @@ public override int GetHashCode()
593606
}
594607
hashCode = (hashCode * 59) + this.Priorities.GetHashCode();
595608
hashCode = (hashCode * 59) + this.Reason.GetHashCode();
609+
if (this.ReasonDetail != null)
610+
{
611+
hashCode = (hashCode * 59) + this.ReasonDetail.GetHashCode();
612+
}
596613
if (this.Reference != null)
597614
{
598615
hashCode = (hashCode * 59) + this.Reference.GetHashCode();

Adyen/Model/Checkout/Amount.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,25 @@ protected Amount() { }
4040
/// <summary>
4141
/// Initializes a new instance of the <see cref="Amount" /> class.
4242
/// </summary>
43-
/// <param name="currency">The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). (required).</param>
44-
/// <param name="value">The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). (required).</param>
43+
/// <param name="currency">The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). (required).</param>
44+
/// <param name="value">The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). (required).</param>
4545
public Amount(string currency = default(string), long? value = default(long?))
4646
{
4747
this.Currency = currency;
4848
this.Value = value;
4949
}
5050

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

5858
/// <summary>
59-
/// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).
59+
/// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
6060
/// </summary>
61-
/// <value>The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).</value>
61+
/// <value>The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).</value>
6262
[DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)]
6363
public long? Value { get; set; }
6464

Adyen/Model/Checkout/CheckoutPaymentMethod.cs

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,18 @@ public CheckoutPaymentMethod(PaymentDetails actualInstance)
454454
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
455455
}
456456

457+
/// <summary>
458+
/// Initializes a new instance of the <see cref="CheckoutPaymentMethod" /> class
459+
/// with the <see cref="PseDetails" /> class
460+
/// </summary>
461+
/// <param name="actualInstance">An instance of PseDetails.</param>
462+
public CheckoutPaymentMethod(PseDetails actualInstance)
463+
{
464+
this.IsNullable = false;
465+
this.SchemaType= "oneOf";
466+
this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
467+
}
468+
457469
/// <summary>
458470
/// Initializes a new instance of the <see cref="CheckoutPaymentMethod" /> class
459471
/// with the <see cref="RatepayDetails" /> class
@@ -764,6 +776,10 @@ public override Object ActualInstance
764776
{
765777
this._actualInstance = value;
766778
}
779+
else if (value.GetType() == typeof(PseDetails))
780+
{
781+
this._actualInstance = value;
782+
}
767783
else if (value.GetType() == typeof(RatepayDetails))
768784
{
769785
this._actualInstance = value;
@@ -818,7 +834,7 @@ public override Object ActualInstance
818834
}
819835
else
820836
{
821-
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, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails");
837+
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, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails");
822838
}
823839
}
824840
}
@@ -1173,6 +1189,16 @@ public PaymentDetails GetPaymentDetails()
11731189
return (PaymentDetails)this.ActualInstance;
11741190
}
11751191

1192+
/// <summary>
1193+
/// Get the actual instance of `PseDetails`. If the actual instance is not `PseDetails`,
1194+
/// the InvalidClassException will be thrown
1195+
/// </summary>
1196+
/// <returns>An instance of PseDetails</returns>
1197+
public PseDetails GetPseDetails()
1198+
{
1199+
return (PseDetails)this.ActualInstance;
1200+
}
1201+
11761202
/// <summary>
11771203
/// Get the actual instance of `RatepayDetails`. If the actual instance is not `RatepayDetails`,
11781204
/// the InvalidClassException will be thrown
@@ -1594,6 +1620,13 @@ public static CheckoutPaymentMethod FromJson(string jsonString)
15941620
matchedTypes.Add("PaymentDetails");
15951621
match++;
15961622
}
1623+
// Check if the jsonString type enum matches the PseDetails type enums
1624+
if (ContainsValue<PseDetails.TypeEnum>(type))
1625+
{
1626+
newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject<PseDetails>(jsonString, CheckoutPaymentMethod.SerializerSettings));
1627+
matchedTypes.Add("PseDetails");
1628+
match++;
1629+
}
15971630
// Check if the jsonString type enum matches the RatepayDetails type enums
15981631
if (ContainsValue<RatepayDetails.TypeEnum>(type))
15991632
{

0 commit comments

Comments
 (0)