Skip to content

Commit ecbc5b7

Browse files
authored
Merge pull request #1166 from Adyen/v32.1.0-acswebhook
Generate AcsWebhooks models
2 parents 78683fd + c90452d commit ecbc5b7

File tree

3 files changed

+100
-13
lines changed

3 files changed

+100
-13
lines changed

Adyen/Model/AcsWebhooks/AuthenticationNotificationData.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ protected AuthenticationNotificationData() { }
7676
/// </summary>
7777
/// <param name="authentication">authentication (required).</param>
7878
/// <param name="balancePlatform">The unique identifier of the balance platform..</param>
79-
/// <param name="id">Unique identifier of the authentication. (required).</param>
80-
/// <param name="paymentInstrumentId">Unique identifier of the payment instrument that was used for the authentication. (required).</param>
79+
/// <param name="id">The unique identifier of the authentication. (required).</param>
80+
/// <param name="paymentInstrumentId">The unique identifier of the payment instrument that was used for the authentication. (required).</param>
8181
/// <param name="purchase">purchase (required).</param>
8282
/// <param name="status">Outcome of the authentication. Allowed values: * authenticated * rejected * error (required).</param>
8383
public AuthenticationNotificationData(AuthenticationInfo authentication = default(AuthenticationInfo), string balancePlatform = default(string), string id = default(string), string paymentInstrumentId = default(string), PurchaseInfo purchase = default(PurchaseInfo), StatusEnum status = default(StatusEnum))
@@ -104,16 +104,16 @@ protected AuthenticationNotificationData() { }
104104
public string BalancePlatform { get; set; }
105105

106106
/// <summary>
107-
/// Unique identifier of the authentication.
107+
/// The unique identifier of the authentication.
108108
/// </summary>
109-
/// <value>Unique identifier of the authentication.</value>
109+
/// <value>The unique identifier of the authentication.</value>
110110
[DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)]
111111
public string Id { get; set; }
112112

113113
/// <summary>
114-
/// Unique identifier of the payment instrument that was used for the authentication.
114+
/// The unique identifier of the payment instrument that was used for the authentication.
115115
/// </summary>
116-
/// <value>Unique identifier of the payment instrument that was used for the authentication.</value>
116+
/// <value>The unique identifier of the payment instrument that was used for the authentication.</value>
117117
[DataMember(Name = "paymentInstrumentId", IsRequired = false, EmitDefaultValue = false)]
118118
public string PaymentInstrumentId { get; set; }
119119

Adyen/Model/AcsWebhooks/PurchaseInfo.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ protected PurchaseInfo() { }
4040
/// <summary>
4141
/// Initializes a new instance of the <see cref="PurchaseInfo" /> class.
4242
/// </summary>
43-
/// <param name="date">Date of the purchase. (required).</param>
44-
/// <param name="merchantName">Name of the merchant. (required).</param>
43+
/// <param name="date">The date of the purchase. (required).</param>
44+
/// <param name="merchantName">The name of the business that the cardholder purchased from. (required).</param>
4545
/// <param name="originalAmount">originalAmount (required).</param>
4646
public PurchaseInfo(string date = default(string), string merchantName = default(string), Amount originalAmount = default(Amount))
4747
{
@@ -51,16 +51,16 @@ protected PurchaseInfo() { }
5151
}
5252

5353
/// <summary>
54-
/// Date of the purchase.
54+
/// The date of the purchase.
5555
/// </summary>
56-
/// <value>Date of the purchase.</value>
56+
/// <value>The date of the purchase.</value>
5757
[DataMember(Name = "date", IsRequired = false, EmitDefaultValue = false)]
5858
public string Date { get; set; }
5959

6060
/// <summary>
61-
/// Name of the merchant.
61+
/// The name of the business that the cardholder purchased from.
6262
/// </summary>
63-
/// <value>Name of the merchant.</value>
63+
/// <value>The name of the business that the cardholder purchased from.</value>
6464
[DataMember(Name = "merchantName", IsRequired = false, EmitDefaultValue = false)]
6565
public string MerchantName { get; set; }
6666

Adyen/Model/AcsWebhooks/RelayedAuthenticationRequest.cs

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,28 @@ namespace Adyen.Model.AcsWebhooks
3232
[DataContract(Name = "RelayedAuthenticationRequest")]
3333
public partial class RelayedAuthenticationRequest : IEquatable<RelayedAuthenticationRequest>, IValidatableObject
3434
{
35+
/// <summary>
36+
/// Type of notification.
37+
/// </summary>
38+
/// <value>Type of notification.</value>
39+
[JsonConverter(typeof(StringEnumConverter))]
40+
public enum TypeEnum
41+
{
42+
/// <summary>
43+
/// Enum BalancePlatformAuthenticationRelayed for value: balancePlatform.authentication.relayed
44+
/// </summary>
45+
[EnumMember(Value = "balancePlatform.authentication.relayed")]
46+
BalancePlatformAuthenticationRelayed = 1
47+
48+
}
49+
50+
51+
/// <summary>
52+
/// Type of notification.
53+
/// </summary>
54+
/// <value>Type of notification.</value>
55+
[DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)]
56+
public TypeEnum Type { get; set; }
3557
/// <summary>
3658
/// Initializes a new instance of the <see cref="RelayedAuthenticationRequest" /> class.
3759
/// </summary>
@@ -40,16 +62,31 @@ protected RelayedAuthenticationRequest() { }
4062
/// <summary>
4163
/// Initializes a new instance of the <see cref="RelayedAuthenticationRequest" /> class.
4264
/// </summary>
65+
/// <param name="environment">The environment from which the webhook originated. Possible values: **test**, **live**. (required).</param>
4366
/// <param name="id">The unique identifier of the challenge. (required).</param>
4467
/// <param name="paymentInstrumentId">The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_) used for the purchase. (required).</param>
4568
/// <param name="purchase">purchase (required).</param>
46-
public RelayedAuthenticationRequest(string id = default(string), string paymentInstrumentId = default(string), Purchase purchase = default(Purchase))
69+
/// <param name="threeDSRequestorAppURL">URL for auto-switching to the threeDS Requestor App. If not present, the threeDS Requestor App doesn&#39;t support auto-switching..</param>
70+
/// <param name="timestamp">When the event was queued..</param>
71+
/// <param name="type">Type of notification. (required).</param>
72+
public RelayedAuthenticationRequest(string environment = default(string), string id = default(string), string paymentInstrumentId = default(string), Purchase purchase = default(Purchase), string threeDSRequestorAppURL = default(string), DateTime timestamp = default(DateTime), TypeEnum type = default(TypeEnum))
4773
{
74+
this.Environment = environment;
4875
this.Id = id;
4976
this.PaymentInstrumentId = paymentInstrumentId;
5077
this.Purchase = purchase;
78+
this.Type = type;
79+
this.ThreeDSRequestorAppURL = threeDSRequestorAppURL;
80+
this.Timestamp = timestamp;
5181
}
5282

83+
/// <summary>
84+
/// The environment from which the webhook originated. Possible values: **test**, **live**.
85+
/// </summary>
86+
/// <value>The environment from which the webhook originated. Possible values: **test**, **live**. </value>
87+
[DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)]
88+
public string Environment { get; set; }
89+
5390
/// <summary>
5491
/// The unique identifier of the challenge.
5592
/// </summary>
@@ -70,6 +107,20 @@ protected RelayedAuthenticationRequest() { }
70107
[DataMember(Name = "purchase", IsRequired = false, EmitDefaultValue = false)]
71108
public Purchase Purchase { get; set; }
72109

110+
/// <summary>
111+
/// URL for auto-switching to the threeDS Requestor App. If not present, the threeDS Requestor App doesn&#39;t support auto-switching.
112+
/// </summary>
113+
/// <value>URL for auto-switching to the threeDS Requestor App. If not present, the threeDS Requestor App doesn&#39;t support auto-switching.</value>
114+
[DataMember(Name = "threeDSRequestorAppURL", EmitDefaultValue = false)]
115+
public string ThreeDSRequestorAppURL { get; set; }
116+
117+
/// <summary>
118+
/// When the event was queued.
119+
/// </summary>
120+
/// <value>When the event was queued.</value>
121+
[DataMember(Name = "timestamp", EmitDefaultValue = false)]
122+
public DateTime Timestamp { get; set; }
123+
73124
/// <summary>
74125
/// Returns the string presentation of the object
75126
/// </summary>
@@ -78,9 +129,13 @@ public override string ToString()
78129
{
79130
StringBuilder sb = new StringBuilder();
80131
sb.Append("class RelayedAuthenticationRequest {\n");
132+
sb.Append(" Environment: ").Append(Environment).Append("\n");
81133
sb.Append(" Id: ").Append(Id).Append("\n");
82134
sb.Append(" PaymentInstrumentId: ").Append(PaymentInstrumentId).Append("\n");
83135
sb.Append(" Purchase: ").Append(Purchase).Append("\n");
136+
sb.Append(" ThreeDSRequestorAppURL: ").Append(ThreeDSRequestorAppURL).Append("\n");
137+
sb.Append(" Timestamp: ").Append(Timestamp).Append("\n");
138+
sb.Append(" Type: ").Append(Type).Append("\n");
84139
sb.Append("}\n");
85140
return sb.ToString();
86141
}
@@ -116,6 +171,11 @@ public bool Equals(RelayedAuthenticationRequest input)
116171
return false;
117172
}
118173
return
174+
(
175+
this.Environment == input.Environment ||
176+
(this.Environment != null &&
177+
this.Environment.Equals(input.Environment))
178+
) &&
119179
(
120180
this.Id == input.Id ||
121181
(this.Id != null &&
@@ -130,6 +190,20 @@ public bool Equals(RelayedAuthenticationRequest input)
130190
this.Purchase == input.Purchase ||
131191
(this.Purchase != null &&
132192
this.Purchase.Equals(input.Purchase))
193+
) &&
194+
(
195+
this.ThreeDSRequestorAppURL == input.ThreeDSRequestorAppURL ||
196+
(this.ThreeDSRequestorAppURL != null &&
197+
this.ThreeDSRequestorAppURL.Equals(input.ThreeDSRequestorAppURL))
198+
) &&
199+
(
200+
this.Timestamp == input.Timestamp ||
201+
(this.Timestamp != null &&
202+
this.Timestamp.Equals(input.Timestamp))
203+
) &&
204+
(
205+
this.Type == input.Type ||
206+
this.Type.Equals(input.Type)
133207
);
134208
}
135209

@@ -142,6 +216,10 @@ public override int GetHashCode()
142216
unchecked // Overflow is fine, just wrap
143217
{
144218
int hashCode = 41;
219+
if (this.Environment != null)
220+
{
221+
hashCode = (hashCode * 59) + this.Environment.GetHashCode();
222+
}
145223
if (this.Id != null)
146224
{
147225
hashCode = (hashCode * 59) + this.Id.GetHashCode();
@@ -154,6 +232,15 @@ public override int GetHashCode()
154232
{
155233
hashCode = (hashCode * 59) + this.Purchase.GetHashCode();
156234
}
235+
if (this.ThreeDSRequestorAppURL != null)
236+
{
237+
hashCode = (hashCode * 59) + this.ThreeDSRequestorAppURL.GetHashCode();
238+
}
239+
if (this.Timestamp != null)
240+
{
241+
hashCode = (hashCode * 59) + this.Timestamp.GetHashCode();
242+
}
243+
hashCode = (hashCode * 59) + this.Type.GetHashCode();
157244
return hashCode;
158245
}
159246
}

0 commit comments

Comments
 (0)