Skip to content

Commit 78683fd

Browse files
authored
Merge pull request #1164 from Adyen/v31.1.0-checkout
Generate Checkout models
2 parents db57a69 + 51526d0 commit 78683fd

File tree

7 files changed

+124
-15
lines changed

7 files changed

+124
-15
lines changed

Adyen/Model/Checkout/AdditionalDataSubMerchant.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public partial class AdditionalDataSubMerchant : IEquatable<AdditionalDataSubMer
4141
/// <param name="subMerchantSubSellerSubSellerNrEmail">Required for transactions performed by registered payment facilitators. The email address of the sub-merchant. * Format: Alphanumeric * Maximum length: 40 characters.</param>
4242
/// <param name="subMerchantSubSellerSubSellerNrId">Required for transactions performed by registered payment facilitators. A unique identifier that you create for the sub-merchant, used by schemes to identify the sub-merchant. * Format: Alphanumeric * Maximum length: 15 characters.</param>
4343
/// <param name="subMerchantSubSellerSubSellerNrMcc">Required for transactions performed by registered payment facilitators. The sub-merchant&#39;s 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits.</param>
44-
/// <param name="subMerchantSubSellerSubSellerNrName">Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters.</param>
44+
/// <param name="subMerchantSubSellerSubSellerNrName">Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. Exception: for acquirers in Brazil, this value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters.</param>
4545
/// <param name="subMerchantSubSellerSubSellerNrPhoneNumber">Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters.</param>
4646
/// <param name="subMerchantSubSellerSubSellerNrPostalCode">Required for transactions performed by registered payment facilitators. The postal code of the sub-merchant&#39;s address, without dashes. * Format: Numeric * Fixed length: 8 digits.</param>
4747
/// <param name="subMerchantSubSellerSubSellerNrState">Required for transactions performed by registered payment facilitators. The state code of the sub-merchant&#39;s address, if applicable to the country. * Format: Alphanumeric * Maximum length: 2 characters.</param>
@@ -106,9 +106,9 @@ public partial class AdditionalDataSubMerchant : IEquatable<AdditionalDataSubMer
106106
public string SubMerchantSubSellerSubSellerNrMcc { get; set; }
107107

108108
/// <summary>
109-
/// Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters
109+
/// Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. Exception: for acquirers in Brazil, this value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters
110110
/// </summary>
111-
/// <value>Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters</value>
111+
/// <value>Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. Exception: for acquirers in Brazil, this value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters</value>
112112
[DataMember(Name = "subMerchant.subSeller[subSellerNr].name", EmitDefaultValue = false)]
113113
public string SubMerchantSubSellerSubSellerNrName { get; set; }
114114

Adyen/Model/Checkout/PaymentMethodsRequest.cs

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,32 +112,40 @@ protected PaymentMethodsRequest() { }
112112
/// <param name="allowedPaymentMethods">List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: &#x60;\&quot;allowedPaymentMethods\&quot;:[\&quot;ideal\&quot;,\&quot;applepay\&quot;]&#x60;.</param>
113113
/// <param name="amount">amount.</param>
114114
/// <param name="blockedPaymentMethods">List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: &#x60;\&quot;blockedPaymentMethods\&quot;:[\&quot;ideal\&quot;,\&quot;applepay\&quot;]&#x60;.</param>
115+
/// <param name="browserInfo">browserInfo.</param>
115116
/// <param name="channel">The platform where a payment transaction takes place. This field can be used for filtering out payment methods that are only available on specific platforms. Possible values: * iOS * Android * Web.</param>
116117
/// <param name="countryCode">The shopper&#39;s country code..</param>
117118
/// <param name="merchantAccount">The merchant account identifier, with which you want to process the transaction. (required).</param>
118119
/// <param name="order">order.</param>
119120
/// <param name="shopperConversionId">A unique ID that can be used to associate &#x60;/paymentMethods&#x60; and &#x60;/payments&#x60; requests with the same shopper transaction, offering insights into conversion rates..</param>
121+
/// <param name="shopperEmail">The shopper&#39;s email address. We recommend that you provide this data, as it is used in velocity fraud checks. &gt; For 3D Secure 2 transactions, schemes require &#x60;shopperEmail&#x60; for all browser-based and mobile implementations..</param>
122+
/// <param name="shopperIP">The shopper&#39;s IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). &gt; For 3D Secure 2 transactions, schemes require &#x60;shopperIP&#x60; for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new)..</param>
120123
/// <param name="shopperLocale">The combination of a language code and a country code to specify the language to be used in the payment..</param>
121124
/// <param name="shopperReference">Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. &gt; Your reference must not include personally identifiable information (PII) such as name or email address..</param>
122125
/// <param name="splitCardFundingSources">Boolean value indicating whether the card payment method should be split into separate debit and credit options. (default to false).</param>
123126
/// <param name="store">Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment..</param>
124127
/// <param name="storeFiltrationMode">Specifies how payment methods should be filtered based on the &#39;store&#39; parameter: - &#39;exclusive&#39;: Only payment methods belonging to the specified &#39;store&#39; are returned. - &#39;inclusive&#39;: Payment methods from the &#39;store&#39; and those not associated with any other store are returned..</param>
125-
public PaymentMethodsRequest(Dictionary<string, string> additionalData = default(Dictionary<string, string>), List<string> allowedPaymentMethods = default(List<string>), Amount amount = default(Amount), List<string> blockedPaymentMethods = default(List<string>), ChannelEnum? channel = default(ChannelEnum?), string countryCode = default(string), string merchantAccount = default(string), EncryptedOrderData order = default(EncryptedOrderData), string shopperConversionId = default(string), string shopperLocale = default(string), string shopperReference = default(string), bool? splitCardFundingSources = false, string store = default(string), StoreFiltrationModeEnum? storeFiltrationMode = default(StoreFiltrationModeEnum?))
128+
/// <param name="telephoneNumber">The shopper&#39;s telephone number..</param>
129+
public PaymentMethodsRequest(Dictionary<string, string> additionalData = default(Dictionary<string, string>), List<string> allowedPaymentMethods = default(List<string>), Amount amount = default(Amount), List<string> blockedPaymentMethods = default(List<string>), BrowserInfo browserInfo = default(BrowserInfo), ChannelEnum? channel = default(ChannelEnum?), string countryCode = default(string), string merchantAccount = default(string), EncryptedOrderData order = default(EncryptedOrderData), string shopperConversionId = default(string), string shopperEmail = default(string), string shopperIP = default(string), string shopperLocale = default(string), string shopperReference = default(string), bool? splitCardFundingSources = false, string store = default(string), StoreFiltrationModeEnum? storeFiltrationMode = default(StoreFiltrationModeEnum?), string telephoneNumber = default(string))
126130
{
127131
this.MerchantAccount = merchantAccount;
128132
this.AdditionalData = additionalData;
129133
this.AllowedPaymentMethods = allowedPaymentMethods;
130134
this.Amount = amount;
131135
this.BlockedPaymentMethods = blockedPaymentMethods;
136+
this.BrowserInfo = browserInfo;
132137
this.Channel = channel;
133138
this.CountryCode = countryCode;
134139
this.Order = order;
135140
this.ShopperConversionId = shopperConversionId;
141+
this.ShopperEmail = shopperEmail;
142+
this.ShopperIP = shopperIP;
136143
this.ShopperLocale = shopperLocale;
137144
this.ShopperReference = shopperReference;
138145
this.SplitCardFundingSources = splitCardFundingSources;
139146
this.Store = store;
140147
this.StoreFiltrationMode = storeFiltrationMode;
148+
this.TelephoneNumber = telephoneNumber;
141149
}
142150

143151
/// <summary>
@@ -167,6 +175,12 @@ protected PaymentMethodsRequest() { }
167175
[DataMember(Name = "blockedPaymentMethods", EmitDefaultValue = false)]
168176
public List<string> BlockedPaymentMethods { get; set; }
169177

178+
/// <summary>
179+
/// Gets or Sets BrowserInfo
180+
/// </summary>
181+
[DataMember(Name = "browserInfo", EmitDefaultValue = false)]
182+
public BrowserInfo BrowserInfo { get; set; }
183+
170184
/// <summary>
171185
/// The shopper&#39;s country code.
172186
/// </summary>
@@ -194,6 +208,20 @@ protected PaymentMethodsRequest() { }
194208
[DataMember(Name = "shopperConversionId", EmitDefaultValue = false)]
195209
public string ShopperConversionId { get; set; }
196210

211+
/// <summary>
212+
/// The shopper&#39;s email address. We recommend that you provide this data, as it is used in velocity fraud checks. &gt; For 3D Secure 2 transactions, schemes require &#x60;shopperEmail&#x60; for all browser-based and mobile implementations.
213+
/// </summary>
214+
/// <value>The shopper&#39;s email address. We recommend that you provide this data, as it is used in velocity fraud checks. &gt; For 3D Secure 2 transactions, schemes require &#x60;shopperEmail&#x60; for all browser-based and mobile implementations.</value>
215+
[DataMember(Name = "shopperEmail", EmitDefaultValue = false)]
216+
public string ShopperEmail { get; set; }
217+
218+
/// <summary>
219+
/// The shopper&#39;s IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). &gt; For 3D Secure 2 transactions, schemes require &#x60;shopperIP&#x60; for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).
220+
/// </summary>
221+
/// <value>The shopper&#39;s IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). &gt; For 3D Secure 2 transactions, schemes require &#x60;shopperIP&#x60; for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).</value>
222+
[DataMember(Name = "shopperIP", EmitDefaultValue = false)]
223+
public string ShopperIP { get; set; }
224+
197225
/// <summary>
198226
/// The combination of a language code and a country code to specify the language to be used in the payment.
199227
/// </summary>
@@ -222,6 +250,13 @@ protected PaymentMethodsRequest() { }
222250
[DataMember(Name = "store", EmitDefaultValue = false)]
223251
public string Store { get; set; }
224252

253+
/// <summary>
254+
/// The shopper&#39;s telephone number.
255+
/// </summary>
256+
/// <value>The shopper&#39;s telephone number.</value>
257+
[DataMember(Name = "telephoneNumber", EmitDefaultValue = false)]
258+
public string TelephoneNumber { get; set; }
259+
225260
/// <summary>
226261
/// Returns the string presentation of the object
227262
/// </summary>
@@ -234,16 +269,20 @@ public override string ToString()
234269
sb.Append(" AllowedPaymentMethods: ").Append(AllowedPaymentMethods).Append("\n");
235270
sb.Append(" Amount: ").Append(Amount).Append("\n");
236271
sb.Append(" BlockedPaymentMethods: ").Append(BlockedPaymentMethods).Append("\n");
272+
sb.Append(" BrowserInfo: ").Append(BrowserInfo).Append("\n");
237273
sb.Append(" Channel: ").Append(Channel).Append("\n");
238274
sb.Append(" CountryCode: ").Append(CountryCode).Append("\n");
239275
sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n");
240276
sb.Append(" Order: ").Append(Order).Append("\n");
241277
sb.Append(" ShopperConversionId: ").Append(ShopperConversionId).Append("\n");
278+
sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n");
279+
sb.Append(" ShopperIP: ").Append(ShopperIP).Append("\n");
242280
sb.Append(" ShopperLocale: ").Append(ShopperLocale).Append("\n");
243281
sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n");
244282
sb.Append(" SplitCardFundingSources: ").Append(SplitCardFundingSources).Append("\n");
245283
sb.Append(" Store: ").Append(Store).Append("\n");
246284
sb.Append(" StoreFiltrationMode: ").Append(StoreFiltrationMode).Append("\n");
285+
sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n");
247286
sb.Append("}\n");
248287
return sb.ToString();
249288
}
@@ -302,6 +341,11 @@ public bool Equals(PaymentMethodsRequest input)
302341
input.BlockedPaymentMethods != null &&
303342
this.BlockedPaymentMethods.SequenceEqual(input.BlockedPaymentMethods)
304343
) &&
344+
(
345+
this.BrowserInfo == input.BrowserInfo ||
346+
(this.BrowserInfo != null &&
347+
this.BrowserInfo.Equals(input.BrowserInfo))
348+
) &&
305349
(
306350
this.Channel == input.Channel ||
307351
this.Channel.Equals(input.Channel)
@@ -326,6 +370,16 @@ public bool Equals(PaymentMethodsRequest input)
326370
(this.ShopperConversionId != null &&
327371
this.ShopperConversionId.Equals(input.ShopperConversionId))
328372
) &&
373+
(
374+
this.ShopperEmail == input.ShopperEmail ||
375+
(this.ShopperEmail != null &&
376+
this.ShopperEmail.Equals(input.ShopperEmail))
377+
) &&
378+
(
379+
this.ShopperIP == input.ShopperIP ||
380+
(this.ShopperIP != null &&
381+
this.ShopperIP.Equals(input.ShopperIP))
382+
) &&
329383
(
330384
this.ShopperLocale == input.ShopperLocale ||
331385
(this.ShopperLocale != null &&
@@ -348,6 +402,11 @@ public bool Equals(PaymentMethodsRequest input)
348402
(
349403
this.StoreFiltrationMode == input.StoreFiltrationMode ||
350404
this.StoreFiltrationMode.Equals(input.StoreFiltrationMode)
405+
) &&
406+
(
407+
this.TelephoneNumber == input.TelephoneNumber ||
408+
(this.TelephoneNumber != null &&
409+
this.TelephoneNumber.Equals(input.TelephoneNumber))
351410
);
352411
}
353412

@@ -376,6 +435,10 @@ public override int GetHashCode()
376435
{
377436
hashCode = (hashCode * 59) + this.BlockedPaymentMethods.GetHashCode();
378437
}
438+
if (this.BrowserInfo != null)
439+
{
440+
hashCode = (hashCode * 59) + this.BrowserInfo.GetHashCode();
441+
}
379442
hashCode = (hashCode * 59) + this.Channel.GetHashCode();
380443
if (this.CountryCode != null)
381444
{
@@ -393,6 +456,14 @@ public override int GetHashCode()
393456
{
394457
hashCode = (hashCode * 59) + this.ShopperConversionId.GetHashCode();
395458
}
459+
if (this.ShopperEmail != null)
460+
{
461+
hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode();
462+
}
463+
if (this.ShopperIP != null)
464+
{
465+
hashCode = (hashCode * 59) + this.ShopperIP.GetHashCode();
466+
}
396467
if (this.ShopperLocale != null)
397468
{
398469
hashCode = (hashCode * 59) + this.ShopperLocale.GetHashCode();
@@ -407,6 +478,10 @@ public override int GetHashCode()
407478
hashCode = (hashCode * 59) + this.Store.GetHashCode();
408479
}
409480
hashCode = (hashCode * 59) + this.StoreFiltrationMode.GetHashCode();
481+
if (this.TelephoneNumber != null)
482+
{
483+
hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode();
484+
}
410485
return hashCode;
411486
}
412487
}

0 commit comments

Comments
 (0)