Skip to content

Commit

Permalink
false[adyen-sdk-automation] automated change (#1009)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdyenAutomationBot authored Apr 25, 2024
1 parent 60bc6a6 commit 07d740a
Show file tree
Hide file tree
Showing 5 changed files with 389 additions and 93 deletions.
191 changes: 191 additions & 0 deletions Adyen/Model/Management/AmexInfo.cs
Original file line number Diff line number Diff line change
@@ -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
{
/// <summary>
/// AmexInfo
/// </summary>
[DataContract(Name = "AmexInfo")]
public partial class AmexInfo : IEquatable<AmexInfo>, IValidatableObject
{
/// <summary>
/// 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.
/// </summary>
/// <value>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.</value>
[JsonConverter(typeof(StringEnumConverter))]
public enum ServiceLevelEnum
{
/// <summary>
/// Enum NoContract for value: noContract
/// </summary>
[EnumMember(Value = "noContract")]
NoContract = 1,

/// <summary>
/// Enum GatewayContract for value: gatewayContract
/// </summary>
[EnumMember(Value = "gatewayContract")]
GatewayContract = 2,

/// <summary>
/// Enum PaymentDesignatorContract for value: paymentDesignatorContract
/// </summary>
[EnumMember(Value = "paymentDesignatorContract")]
PaymentDesignatorContract = 3

}


/// <summary>
/// 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.
/// </summary>
/// <value>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.</value>
[DataMember(Name = "serviceLevel", IsRequired = false, EmitDefaultValue = false)]
public ServiceLevelEnum ServiceLevel { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="AmexInfo" /> class.
/// </summary>
[JsonConstructorAttribute]
protected AmexInfo() { }
/// <summary>
/// Initializes a new instance of the <see cref="AmexInfo" /> class.
/// </summary>
/// <param name="midNumber">MID (Merchant ID) number. Format: 10 numeric characters. Must be provided only when requesting &#x60;gatewayContract&#x60; or &#x60;paymentDesignatorContract&#x60; service levels..</param>
/// <param name="reuseMidNumber">Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for &#x60;gatewayContract&#x60; and &#x60;paymentDesignatorContract&#x60; service levels. The default value is &#x60;false&#x60;. (default to false).</param>
/// <param name="serviceLevel">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).</param>
public AmexInfo(string midNumber = default(string), bool? reuseMidNumber = false, ServiceLevelEnum serviceLevel = default(ServiceLevelEnum))
{
this.ServiceLevel = serviceLevel;
this.MidNumber = midNumber;
this.ReuseMidNumber = reuseMidNumber;
}

/// <summary>
/// MID (Merchant ID) number. Format: 10 numeric characters. Must be provided only when requesting &#x60;gatewayContract&#x60; or &#x60;paymentDesignatorContract&#x60; service levels.
/// </summary>
/// <value>MID (Merchant ID) number. Format: 10 numeric characters. Must be provided only when requesting &#x60;gatewayContract&#x60; or &#x60;paymentDesignatorContract&#x60; service levels.</value>
[DataMember(Name = "midNumber", EmitDefaultValue = false)]
public string MidNumber { get; set; }

/// <summary>
/// Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for &#x60;gatewayContract&#x60; and &#x60;paymentDesignatorContract&#x60; service levels. The default value is &#x60;false&#x60;.
/// </summary>
/// <value>Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for &#x60;gatewayContract&#x60; and &#x60;paymentDesignatorContract&#x60; service levels. The default value is &#x60;false&#x60;.</value>
[DataMember(Name = "reuseMidNumber", EmitDefaultValue = false)]
public bool? ReuseMidNumber { 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 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();
}

/// <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 AmexInfo);
}

/// <summary>
/// Returns true if AmexInfo instances are equal
/// </summary>
/// <param name="input">Instance of AmexInfo to be compared</param>
/// <returns>Boolean</returns>
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)
);
}

/// <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.MidNumber != null)
{
hashCode = (hashCode * 59) + this.MidNumber.GetHashCode();
}
hashCode = (hashCode * 59) + this.ReuseMidNumber.GetHashCode();
hashCode = (hashCode * 59) + this.ServiceLevel.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;
}
}

}
20 changes: 19 additions & 1 deletion Adyen/Model/Management/PaymentMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ protected PaymentMethod() { }
/// </summary>
/// <param name="afterpayTouch">afterpayTouch.</param>
/// <param name="allowed">Indicates whether receiving payments is allowed. This value is set to **true** by Adyen after screening your merchant account..</param>
/// <param name="amex">amex.</param>
/// <param name="applePay">applePay.</param>
/// <param name="bcmc">bcmc.</param>
/// <param name="businessLineId">The unique identifier of the business line. Required if you are a [platform model](https://docs.adyen.com/platforms)..</param>
Expand Down Expand Up @@ -117,11 +118,12 @@ protected PaymentMethod() { }
/// <param name="verificationStatus">Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected**.</param>
/// <param name="vipps">vipps.</param>
/// <param name="visa">visa.</param>
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<string> countries = default(List<string>), GenericPmWithTdiInfo cup = default(GenericPmWithTdiInfo), List<string> currencies = default(List<string>), List<string> customRoutingFlags = default(List<string>), 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<string> storeIds = default(List<string>), 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<string> countries = default(List<string>), GenericPmWithTdiInfo cup = default(GenericPmWithTdiInfo), List<string> currencies = default(List<string>), List<string> customRoutingFlags = default(List<string>), 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<string> storeIds = default(List<string>), 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;
Expand Down Expand Up @@ -171,6 +173,12 @@ protected PaymentMethod() { }
[DataMember(Name = "allowed", EmitDefaultValue = false)]
public bool? Allowed { get; set; }

/// <summary>
/// Gets or Sets Amex
/// </summary>
[DataMember(Name = "amex", EmitDefaultValue = false)]
public AmexInfo Amex { get; set; }

/// <summary>
/// Gets or Sets ApplePay
/// </summary>
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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 &&
Expand Down Expand Up @@ -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();
Expand Down
Loading

0 comments on commit 07d740a

Please sign in to comment.