diff --git a/Adyen.Test/Adyen.Test.csproj b/Adyen.Test/Adyen.Test.csproj
index 069137ae5..edc098ab4 100644
--- a/Adyen.Test/Adyen.Test.csproj
+++ b/Adyen.Test/Adyen.Test.csproj
@@ -5,12 +5,12 @@
false
- 7.3.0
+ 8.0.0
- 7.3.0
+ 8.0.0
+
+ 8.0.0
- 7.3.0
-
7.2
diff --git a/Adyen.Test/CheckoutTest.cs b/Adyen.Test/CheckoutTest.cs
index adad28d8b..31be9c673 100644
--- a/Adyen.Test/CheckoutTest.cs
+++ b/Adyen.Test/CheckoutTest.cs
@@ -651,6 +651,7 @@ public void FraudResultParsingTest()
Assert.AreEqual(0, fraudResults[1].FraudCheckResult.AccountScore);
Assert.AreEqual(3, fraudResults[1].FraudCheckResult.CheckId);
}
+
///
/// Test if the fraud result are properly deseriazed
/// POST /payments
@@ -666,5 +667,29 @@ public void ThreeDS2Test()
Assert.AreEqual(ResultCodeEnum.IdentifyShopper, paymentResponse.ResultCode);
Assert.AreEqual("threeDS2", paymentResponseThreeDs2Action.Type);
}
+
+ ///
+ /// Test success sessions
+ /// POST /sessions
+ ///
+ [TestMethod]
+ public void CheckoutSessionSuccessTest()
+ {
+ var checkoutSessionRequest = new CreateCheckoutSessionRequest
+ {
+ merchantAccount = "TestMerchant",
+ reference = "TestReference",
+ returnUrl = "http://test-url.com",
+ amount = new Amount("EUR", 10000L)
+ };
+ var client = CreateMockTestClientApiKeyBasedRequest("Mocks/checkout/sessions-success.json");
+ var checkout = new Checkout(client);
+ var checkoutSessionResponse = checkout.Sessions(checkoutSessionRequest);
+ Assert.AreEqual("TestMerchant", checkoutSessionResponse.merchantAccount);
+ Assert.AreEqual("TestReference", checkoutSessionResponse.reference);
+ Assert.AreEqual("http://test-url.com", checkoutSessionResponse.returnUrl);
+ Assert.AreEqual("EUR", checkoutSessionResponse.amount.Currency);
+ Assert.AreEqual("1000", checkoutSessionResponse.amount.Value.ToString());
+ }
}
}
\ No newline at end of file
diff --git a/Adyen.Test/Mocks/checkout/sessions-success.json b/Adyen.Test/Mocks/checkout/sessions-success.json
new file mode 100644
index 000000000..21a559ab3
--- /dev/null
+++ b/Adyen.Test/Mocks/checkout/sessions-success.json
@@ -0,0 +1,11 @@
+{
+ "id": "session-test-id",
+ "amount": {
+ "currency": "EUR",
+ "value": 1000
+ },
+ "reference": "TestReference",
+ "returnUrl": "http://test-url.com",
+ "expiresAt": "2021-09-30T06:45:06Z",
+ "merchantAccount": "TestMerchant"
+}
\ No newline at end of file
diff --git a/Adyen/Adyen.csproj b/Adyen/Adyen.csproj
index 26ab70e96..71b845789 100644
--- a/Adyen/Adyen.csproj
+++ b/Adyen/Adyen.csproj
@@ -4,15 +4,15 @@
netstandard2.0
false
Adyen
- 7.3.0
- 7.3.0
- 7.3.0
+ 8.0.0
+ 8.0.0
+ 8.0.0
true
The Adyen API Library for .net core enables you to work with Adyen APIs, Hosted Payment Pages and terminal api with any .net application.
https://github.com/Adyen/adyen-dotnet-api-library
https://github.com/Adyen/adyen-dotnet-api-library
git
- 7.3.0
+ 8.0.0
MIT
Adyen
Adyen
diff --git a/Adyen/Constants/ClientConfig.cs b/Adyen/Constants/ClientConfig.cs
index d9677302f..b294067df 100644
--- a/Adyen/Constants/ClientConfig.cs
+++ b/Adyen/Constants/ClientConfig.cs
@@ -1,24 +1,24 @@
#region License
-// /*
-// * ######
-// * ######
-// * ############ ####( ###### #####. ###### ############ ############
-// * ############# #####( ###### #####. ###### ############# #############
-// * ###### #####( ###### #####. ###### ##### ###### ##### ######
-// * ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
-// * ###### ###### #####( ###### #####. ###### ##### ##### ######
-// * ############# ############# ############# ############# ##### ######
-// * ############ ############ ############# ############ ##### ######
-// * ######
-// * #############
-// * ############
-// *
-// * Adyen Dotnet API Library
-// *
-// * Copyright (c) 2020 Adyen B.V.
-// * This file is open source and available under the MIT license.
-// * See the LICENSE file for more info.
-// */
+/*
+ * ######
+ * ######
+ * ############ ####( ###### #####. ###### ############ ############
+ * ############# #####( ###### #####. ###### ############# #############
+ * ###### #####( ###### #####. ###### ##### ###### ##### ######
+ * ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
+ * ###### ###### #####( ###### #####. ###### ##### ##### ######
+ * ############# ############# ############# ############# ##### ######
+ * ############ ############ ############# ############ ##### ######
+ * ######
+ * #############
+ * ############
+ *
+ * Adyen Dotnet API Library
+ *
+ * Copyright (c) 2021 Adyen B.V.
+ * This file is open source and available under the MIT license.
+ * See the LICENSE file for more info.
+ */
#endregion
namespace Adyen.Constants
@@ -49,7 +49,7 @@ public class ClientConfig
public static string RecurringApiVersion = "v49";
public static string ApiVersion = "v51";
public static string PayoutApiVersion = "v51";
- public static string CheckoutApiVersion = "v67";
+ public static string CheckoutApiVersion = "v68";
public static string PosTerminalManagementVersion = "v1";
public static string UserAgentSuffix = "adyen-dotnet-api-library/";
public static string EndpointProtocol = "https://";
@@ -58,6 +58,6 @@ public class ClientConfig
public static string BinLookupApiVersion = "v50";
public static string LibName = "adyen-dotnet-api-library";
- public static string LibVersion = "7.3.0";
+ public static string LibVersion = "8.0.0";
}
}
diff --git a/Adyen/Model/Checkout/CreateCheckoutSessionRequest.cs b/Adyen/Model/Checkout/CreateCheckoutSessionRequest.cs
new file mode 100644
index 000000000..e0a135c02
--- /dev/null
+++ b/Adyen/Model/Checkout/CreateCheckoutSessionRequest.cs
@@ -0,0 +1,1026 @@
+#region Licence
+
+//
+// ######
+// ######
+// ############ ####( ###### #####. ###### ############ ############
+// ############# #####( ###### #####. ###### ############# #############
+// ###### #####( ###### #####. ###### ##### ###### ##### ######
+// ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
+// ###### ###### #####( ###### #####. ###### ##### ##### ######
+// ############# ############# ############# ############# ##### ######
+// ############ ############ ############# ############ ##### ######
+// ######
+// #############
+// ############
+//
+// Adyen Dotnet API Library
+//
+// Copyright (c) 2021 Adyen B.V.
+// This file is open source and available under the MIT license.
+// See the LICENSE file for more info.
+
+#endregion
+
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using Adyen.Model.ApplicationInformation;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using System.ComponentModel.DataAnnotations;
+using Adyen.Util;
+
+namespace Adyen.Model.Checkout
+{
+ ///
+ /// CreateCheckoutSessionRequest
+ ///
+ [DataContract]
+ public partial class CreateCheckoutSessionRequest : IEquatable, IValidatableObject
+ {
+ ///
+ /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web
+ ///
+ /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum ChannelEnum
+ {
+ ///
+ /// Enum IOS for value: iOS
+ ///
+ [EnumMember(Value = "iOS")]
+ IOS = 1,
+
+ ///
+ /// Enum Android for value: Android
+ ///
+ [EnumMember(Value = "Android")]
+ Android = 2,
+
+ ///
+ /// Enum Web for value: Web
+ ///
+ [EnumMember(Value = "Web")]
+ Web = 3
+
+ }
+
+ ///
+ /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web
+ ///
+ /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web
+ [DataMember(Name = "channel", EmitDefaultValue = false)]
+ public ChannelEnum? channel { get; set; }
+ ///
+ /// Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount.
+ ///
+ /// Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount.
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum RecurringProcessingModelEnum
+ {
+ ///
+ /// Enum CardOnFile for value: CardOnFile
+ ///
+ [EnumMember(Value = "CardOnFile")]
+ CardOnFile = 1,
+
+ ///
+ /// Enum Subscription for value: Subscription
+ ///
+ [EnumMember(Value = "Subscription")]
+ Subscription = 2,
+
+ ///
+ /// Enum UnscheduledCardOnFile for value: UnscheduledCardOnFile
+ ///
+ [EnumMember(Value = "UnscheduledCardOnFile")]
+ UnscheduledCardOnFile = 3
+
+ }
+
+ ///
+ /// Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount.
+ ///
+ /// Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount.
+ [DataMember(Name = "recurringProcessingModel", EmitDefaultValue = false)]
+ public RecurringProcessingModelEnum? recurringProcessingModel { get; set; }
+ ///
+ /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.
+ ///
+ /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum ShopperInteractionEnum
+ {
+ ///
+ /// Enum Ecommerce for value: Ecommerce
+ ///
+ [EnumMember(Value = "Ecommerce")]
+ Ecommerce = 1,
+
+ ///
+ /// Enum ContAuth for value: ContAuth
+ ///
+ [EnumMember(Value = "ContAuth")]
+ ContAuth = 2,
+
+ ///
+ /// Enum Moto for value: Moto
+ ///
+ [EnumMember(Value = "Moto")]
+ Moto = 3,
+
+ ///
+ /// Enum POS for value: POS
+ ///
+ [EnumMember(Value = "POS")]
+ POS = 4
+
+ }
+
+ ///
+ /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.
+ ///
+ /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.
+ [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)]
+ public ShopperInteractionEnum? shopperInteraction { get; set; }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ [JsonConstructorAttribute]
+ protected CreateCheckoutSessionRequest() { }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// accountInfo.
+ /// additionalAmount.
+ /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value..
+ /// List of payment methods to be presented to the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]`.
+ /// amount (required).
+ /// applicationInfo.
+ /// billingAddress.
+ /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]`.
+ /// The delay between the authorisation and scheduled auto-capture, specified in hours..
+ /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web.
+ /// company.
+ /// The shopper's two-letter country code..
+ /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD.
+ /// deliveryAddress.
+ /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments..
+ /// When true and `shopperReference` is provided, the payment details will be tokenized for payouts..
+ /// When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments..
+ /// The date the session expires in ISO8601 format. When not specified, it defaults to 1h after creation..
+ /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Zip..
+ /// mandate.
+ /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant..
+ /// The merchant account identifier, with which you want to process the transaction. (required).
+ /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`..
+ /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request.* Maximum 20 characters per key. * Maximum 80 characters per value. .
+ /// mpiData.
+ /// Date after which no further authorisations shall be performed. Only for 3D Secure 2..
+ /// Minimum number of days between authorisations. Only for 3D Secure 2..
+ /// Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. .
+ /// Specifies the redirect method (GET or POST) when redirecting back from the issuer..
+ /// Specifies the redirect method (GET or POST) when redirecting to the issuer..
+ /// The reference to uniquely identify a payment. (required).
+ /// The URL to return to when a redirect payment is completed. (required).
+ /// riskData.
+ /// The shopper's email address..
+ /// The shopper'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). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new)..
+ /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal..
+ /// The combination of a language code and a country code to specify the language to be used in the payment..
+ /// shopperName.
+ /// Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address..
+ /// The text to be shown on the shopper's bank statement. To enable this field, contact our [Support Team](https://support.adyen.com/hc/en-us/requests/new). We recommend sending a maximum of 22 characters, otherwise banks might truncate the string..
+ /// The shopper's social security number..
+ /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. (default to false).
+ /// An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split)..
+ /// When this is set to **true** and the `shopperReference` is provided, the payment details will be stored..
+ /// The shopper's telephone number..
+ /// If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. (default to false).
+ /// Set to true if the payment should be routed to a trusted MID..
+ public CreateCheckoutSessionRequest(AccountInfo accountInfo = default(AccountInfo), Amount additionalAmount = default(Amount), Dictionary additionalData = default(Dictionary), List allowedPaymentMethods = default(List), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), Address billingAddress = default(Address), List blockedPaymentMethods = default(List), int captureDelayHours = default(int), ChannelEnum? channel = default(ChannelEnum?), Company company = default(Company), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), Address deliveryAddress = default(Address), bool enableOneClick = default(bool), bool enablePayOut = default(bool), bool enableRecurring = default(bool), DateTime expiresAt = default(DateTime), List lineItems = default(List), Mandate mandate = default(Mandate), string mcc = default(string), string merchantAccount = default(string), string merchantOrderReference = default(string), Dictionary metadata = default(Dictionary), ThreeDSecureData mpiData = default(ThreeDSecureData), string recurringExpiry = default(string), string recurringFrequency = default(string), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string redirectFromIssuerMethod = default(string), string redirectToIssuerMethod = default(string), string reference = default(string), string returnUrl = default(string), RiskData riskData = default(RiskData), string shopperEmail = default(string), string shopperIP = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string shopperLocale = default(string), Name shopperName = default(Name), string shopperReference = default(string), string shopperStatement = default(string), string socialSecurityNumber = default(string), bool splitCardFundingSources = false, List splits = default(List), bool storePaymentMethod = default(bool), string telephoneNumber = default(string), bool threeDSAuthenticationOnly = false, bool trustedShopper = default(bool))
+ {
+ this.amount = amount;
+ this.merchantAccount = merchantAccount;
+ this.reference = reference;
+ this.returnUrl = returnUrl;
+ this.accountInfo = accountInfo;
+ this.additionalAmount = additionalAmount;
+ this.additionalData = additionalData;
+ this.allowedPaymentMethods = allowedPaymentMethods;
+ this.applicationInfo = applicationInfo;
+ this.billingAddress = billingAddress;
+ this.blockedPaymentMethods = blockedPaymentMethods;
+ this.captureDelayHours = captureDelayHours;
+ this.channel = channel;
+ this.company = company;
+ this.countryCode = countryCode;
+ this.dateOfBirth = dateOfBirth;
+ this.deliveryAddress = deliveryAddress;
+ this.enableOneClick = enableOneClick;
+ this.enablePayOut = enablePayOut;
+ this.enableRecurring = enableRecurring;
+ this.expiresAt = expiresAt;
+ this.lineItems = lineItems;
+ this.mandate = mandate;
+ this.mcc = mcc;
+ this.merchantOrderReference = merchantOrderReference;
+ this.metadata = metadata;
+ this.mpiData = mpiData;
+ this.recurringExpiry = recurringExpiry;
+ this.recurringFrequency = recurringFrequency;
+ this.recurringProcessingModel = recurringProcessingModel;
+ this.redirectFromIssuerMethod = redirectFromIssuerMethod;
+ this.redirectToIssuerMethod = redirectToIssuerMethod;
+ this.riskData = riskData;
+ this.shopperEmail = shopperEmail;
+ this.shopperIP = shopperIP;
+ this.shopperInteraction = shopperInteraction;
+ this.shopperLocale = shopperLocale;
+ this.shopperName = shopperName;
+ this.shopperReference = shopperReference;
+ this.shopperStatement = shopperStatement;
+ this.socialSecurityNumber = socialSecurityNumber;
+ // use default value if no "splitCardFundingSources" provided
+ if (splitCardFundingSources == null)
+ {
+ this.splitCardFundingSources = false;
+ }
+ else
+ {
+ this.splitCardFundingSources = splitCardFundingSources;
+ }
+ this.splits = splits;
+ this.storePaymentMethod = storePaymentMethod;
+ this.telephoneNumber = telephoneNumber;
+ // use default value if no "threeDSAuthenticationOnly" provided
+ if (threeDSAuthenticationOnly == null)
+ {
+ this.threeDSAuthenticationOnly = false;
+ }
+ else
+ {
+ this.threeDSAuthenticationOnly = threeDSAuthenticationOnly;
+ }
+ this.trustedShopper = trustedShopper;
+ }
+
+ ///
+ /// Gets or Sets accountInfo
+ ///
+ [DataMember(Name = "accountInfo", EmitDefaultValue = false)]
+ public AccountInfo accountInfo { get; set; }
+
+ ///
+ /// Gets or Sets additionalAmount
+ ///
+ [DataMember(Name = "additionalAmount", EmitDefaultValue = false)]
+ public Amount additionalAmount { get; set; }
+
+ ///
+ /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value.
+ ///
+ /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value.
+ [DataMember(Name = "additionalData", EmitDefaultValue = false)]
+ public Dictionary additionalData { get; set; }
+
+ ///
+ /// List of payment methods to be presented to the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]`
+ ///
+ /// List of payment methods to be presented to the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]`
+ [DataMember(Name = "allowedPaymentMethods", EmitDefaultValue = false)]
+ public List allowedPaymentMethods { get; set; }
+
+ ///
+ /// Gets or Sets amount
+ ///
+ [DataMember(Name = "amount", EmitDefaultValue = true)]
+ public Amount amount { get; set; }
+
+ ///
+ /// Gets or Sets applicationInfo
+ ///
+ [DataMember(Name = "applicationInfo", EmitDefaultValue = false)]
+ public ApplicationInformation.ApplicationInfo applicationInfo { get; set; }
+
+ ///
+ /// Gets or Sets billingAddress
+ ///
+ [DataMember(Name = "billingAddress", EmitDefaultValue = false)]
+ public Address billingAddress { get; set; }
+
+ ///
+ /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]`
+ ///
+ /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]`
+ [DataMember(Name = "blockedPaymentMethods", EmitDefaultValue = false)]
+ public List blockedPaymentMethods { get; set; }
+
+ ///
+ /// The delay between the authorisation and scheduled auto-capture, specified in hours.
+ ///
+ /// The delay between the authorisation and scheduled auto-capture, specified in hours.
+ [DataMember(Name = "captureDelayHours", EmitDefaultValue = false)]
+ public int captureDelayHours { get; set; }
+
+
+ ///
+ /// Gets or Sets company
+ ///
+ [DataMember(Name = "company", EmitDefaultValue = false)]
+ public Company company { get; set; }
+
+ ///
+ /// The shopper's two-letter country code.
+ ///
+ /// The shopper's two-letter country code.
+ [DataMember(Name = "countryCode", EmitDefaultValue = false)]
+ public string countryCode { get; set; }
+
+ ///
+ /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD
+ ///
+ /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD
+ [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)]
+ public DateTime dateOfBirth { get; set; }
+
+ ///
+ /// Gets or Sets deliveryAddress
+ ///
+ [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)]
+ public Address deliveryAddress { get; set; }
+
+ ///
+ /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments.
+ ///
+ /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments.
+ [DataMember(Name = "enableOneClick", EmitDefaultValue = false)]
+ public bool enableOneClick { get; set; }
+
+ ///
+ /// When true and `shopperReference` is provided, the payment details will be tokenized for payouts.
+ ///
+ /// When true and `shopperReference` is provided, the payment details will be tokenized for payouts.
+ [DataMember(Name = "enablePayOut", EmitDefaultValue = false)]
+ public bool enablePayOut { get; set; }
+
+ ///
+ /// When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments.
+ ///
+ /// When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments.
+ [DataMember(Name = "enableRecurring", EmitDefaultValue = false)]
+ public bool enableRecurring { get; set; }
+
+ ///
+ /// The date the session expires in ISO8601 format. When not specified, it defaults to 1h after creation.
+ ///
+ /// The date the session expires in ISO8601 format. When not specified, it defaults to 1h after creation.
+ [DataMember(Name = "expiresAt", EmitDefaultValue = false)]
+ public DateTime expiresAt { get; set; }
+
+ ///
+ /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Zip.
+ ///
+ /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Zip.
+ [DataMember(Name = "lineItems", EmitDefaultValue = false)]
+ public List lineItems { get; set; }
+
+ ///
+ /// Gets or Sets mandate
+ ///
+ [DataMember(Name = "mandate", EmitDefaultValue = false)]
+ public Mandate mandate { get; set; }
+
+ ///
+ /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant.
+ ///
+ /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant.
+ [DataMember(Name = "mcc", EmitDefaultValue = false)]
+ public string mcc { get; set; }
+
+ ///
+ /// The merchant account identifier, with which you want to process the transaction.
+ ///
+ /// The merchant account identifier, with which you want to process the transaction.
+ [DataMember(Name = "merchantAccount", EmitDefaultValue = true)]
+ public string merchantAccount { get; set; }
+
+ ///
+ /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`.
+ ///
+ /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`.
+ [DataMember(Name = "merchantOrderReference", EmitDefaultValue = false)]
+ public string merchantOrderReference { get; set; }
+
+ ///
+ /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request.* Maximum 20 characters per key. * Maximum 80 characters per value.
+ ///
+ /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request.* Maximum 20 characters per key. * Maximum 80 characters per value.
+ [DataMember(Name = "metadata", EmitDefaultValue = false)]
+ public Dictionary metadata { get; set; }
+
+ ///
+ /// Gets or Sets mpiData
+ ///
+ [DataMember(Name = "mpiData", EmitDefaultValue = false)]
+ public ThreeDSecureData mpiData { get; set; }
+
+ ///
+ /// Date after which no further authorisations shall be performed. Only for 3D Secure 2.
+ ///
+ /// Date after which no further authorisations shall be performed. Only for 3D Secure 2.
+ [DataMember(Name = "recurringExpiry", EmitDefaultValue = false)]
+ public string recurringExpiry { get; set; }
+
+ ///
+ /// Minimum number of days between authorisations. Only for 3D Secure 2.
+ ///
+ /// Minimum number of days between authorisations. Only for 3D Secure 2.
+ [DataMember(Name = "recurringFrequency", EmitDefaultValue = false)]
+ public string recurringFrequency { get; set; }
+
+
+ ///
+ /// Specifies the redirect method (GET or POST) when redirecting back from the issuer.
+ ///
+ /// Specifies the redirect method (GET or POST) when redirecting back from the issuer.
+ [DataMember(Name = "redirectFromIssuerMethod", EmitDefaultValue = false)]
+ public string redirectFromIssuerMethod { get; set; }
+
+ ///
+ /// Specifies the redirect method (GET or POST) when redirecting to the issuer.
+ ///
+ /// Specifies the redirect method (GET or POST) when redirecting to the issuer.
+ [DataMember(Name = "redirectToIssuerMethod", EmitDefaultValue = false)]
+ public string redirectToIssuerMethod { get; set; }
+
+ ///
+ /// The reference to uniquely identify a payment.
+ ///
+ /// The reference to uniquely identify a payment.
+ [DataMember(Name = "reference", EmitDefaultValue = true)]
+ public string reference { get; set; }
+
+ ///
+ /// The URL to return to when a redirect payment is completed.
+ ///
+ /// The URL to return to when a redirect payment is completed.
+ [DataMember(Name = "returnUrl", EmitDefaultValue = true)]
+ public string returnUrl { get; set; }
+
+ ///
+ /// Gets or Sets riskData
+ ///
+ [DataMember(Name = "riskData", EmitDefaultValue = false)]
+ public RiskData riskData { get; set; }
+
+ ///
+ /// The shopper's email address.
+ ///
+ /// The shopper's email address.
+ [DataMember(Name = "shopperEmail", EmitDefaultValue = false)]
+ public string shopperEmail { get; set; }
+
+ ///
+ /// The shopper'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). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new).
+ ///
+ /// The shopper'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). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new).
+ [DataMember(Name = "shopperIP", EmitDefaultValue = false)]
+ public string shopperIP { get; set; }
+
+
+ ///
+ /// The combination of a language code and a country code to specify the language to be used in the payment.
+ ///
+ /// The combination of a language code and a country code to specify the language to be used in the payment.
+ [DataMember(Name = "shopperLocale", EmitDefaultValue = false)]
+ public string shopperLocale { get; set; }
+
+ ///
+ /// Gets or Sets shopperName
+ ///
+ [DataMember(Name = "shopperName", EmitDefaultValue = false)]
+ public Name shopperName { get; set; }
+
+ ///
+ /// Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address.
+ ///
+ /// Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address.
+ [DataMember(Name = "shopperReference", EmitDefaultValue = false)]
+ public string shopperReference { get; set; }
+
+ ///
+ /// The text to be shown on the shopper's bank statement. To enable this field, contact our [Support Team](https://support.adyen.com/hc/en-us/requests/new). We recommend sending a maximum of 22 characters, otherwise banks might truncate the string.
+ ///
+ /// The text to be shown on the shopper's bank statement. To enable this field, contact our [Support Team](https://support.adyen.com/hc/en-us/requests/new). We recommend sending a maximum of 22 characters, otherwise banks might truncate the string.
+ [DataMember(Name = "shopperStatement", EmitDefaultValue = false)]
+ public string shopperStatement { get; set; }
+
+ ///
+ /// The shopper's social security number.
+ ///
+ /// The shopper's social security number.
+ [DataMember(Name = "socialSecurityNumber", EmitDefaultValue = false)]
+ public string socialSecurityNumber { get; set; }
+
+ ///
+ /// Boolean value indicating whether the card payment method should be split into separate debit and credit options.
+ ///
+ /// Boolean value indicating whether the card payment method should be split into separate debit and credit options.
+ [DataMember(Name = "splitCardFundingSources", EmitDefaultValue = false)]
+ public bool splitCardFundingSources { get; set; }
+
+ ///
+ /// An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split).
+ ///
+ /// An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split).
+ [DataMember(Name = "splits", EmitDefaultValue = false)]
+ public List splits { get; set; }
+
+ ///
+ /// When this is set to **true** and the `shopperReference` is provided, the payment details will be stored.
+ ///
+ /// When this is set to **true** and the `shopperReference` is provided, the payment details will be stored.
+ [DataMember(Name = "storePaymentMethod", EmitDefaultValue = false)]
+ public bool storePaymentMethod { get; set; }
+
+ ///
+ /// The shopper's telephone number.
+ ///
+ /// The shopper's telephone number.
+ [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)]
+ public string telephoneNumber { get; set; }
+
+ ///
+ /// If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation.
+ ///
+ /// If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation.
+ [DataMember(Name = "threeDSAuthenticationOnly", EmitDefaultValue = false)]
+ public bool threeDSAuthenticationOnly { get; set; }
+
+ ///
+ /// Set to true if the payment should be routed to a trusted MID.
+ ///
+ /// Set to true if the payment should be routed to a trusted MID.
+ [DataMember(Name = "trustedShopper", EmitDefaultValue = false)]
+ public bool trustedShopper { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+ sb.Append("class CreateCheckoutSessionRequest {\n");
+ sb.Append(" accountInfo: ").Append(accountInfo).Append("\n");
+ sb.Append(" additionalAmount: ").Append(additionalAmount).Append("\n");
+ sb.Append(" additionalData: ").Append(additionalData.ToCollectionsString()).Append("\n");
+ sb.Append(" allowedPaymentMethods: ").Append(allowedPaymentMethods).Append("\n");
+ sb.Append(" amount: ").Append(amount).Append("\n");
+ sb.Append(" applicationInfo: ").Append(applicationInfo).Append("\n");
+ sb.Append(" billingAddress: ").Append(billingAddress).Append("\n");
+ sb.Append(" blockedPaymentMethods: ").Append(blockedPaymentMethods).Append("\n");
+ sb.Append(" captureDelayHours: ").Append(captureDelayHours).Append("\n");
+ sb.Append(" channel: ").Append(channel).Append("\n");
+ sb.Append(" company: ").Append(company).Append("\n");
+ sb.Append(" countryCode: ").Append(countryCode).Append("\n");
+ sb.Append(" dateOfBirth: ").Append(dateOfBirth).Append("\n");
+ sb.Append(" deliveryAddress: ").Append(deliveryAddress).Append("\n");
+ sb.Append(" enableOneClick: ").Append(enableOneClick).Append("\n");
+ sb.Append(" enablePayOut: ").Append(enablePayOut).Append("\n");
+ sb.Append(" enableRecurring: ").Append(enableRecurring).Append("\n");
+ sb.Append(" expiresAt: ").Append(expiresAt).Append("\n");
+ sb.Append(" lineItems: ").Append(lineItems).Append("\n");
+ sb.Append(" mandate: ").Append(mandate).Append("\n");
+ sb.Append(" mcc: ").Append(mcc).Append("\n");
+ sb.Append(" merchantAccount: ").Append(merchantAccount).Append("\n");
+ sb.Append(" merchantOrderReference: ").Append(merchantOrderReference).Append("\n");
+ sb.Append(" metadata: ").Append(metadata).Append("\n");
+ sb.Append(" mpiData: ").Append(mpiData).Append("\n");
+ sb.Append(" recurringExpiry: ").Append(recurringExpiry).Append("\n");
+ sb.Append(" recurringFrequency: ").Append(recurringFrequency).Append("\n");
+ sb.Append(" recurringProcessingModel: ").Append(recurringProcessingModel).Append("\n");
+ sb.Append(" redirectFromIssuerMethod: ").Append(redirectFromIssuerMethod).Append("\n");
+ sb.Append(" redirectToIssuerMethod: ").Append(redirectToIssuerMethod).Append("\n");
+ sb.Append(" reference: ").Append(reference).Append("\n");
+ sb.Append(" returnUrl: ").Append(returnUrl).Append("\n");
+ sb.Append(" riskData: ").Append(riskData).Append("\n");
+ sb.Append(" shopperEmail: ").Append(shopperEmail).Append("\n");
+ sb.Append(" shopperIP: ").Append(shopperIP).Append("\n");
+ sb.Append(" shopperInteraction: ").Append(shopperInteraction).Append("\n");
+ sb.Append(" shopperLocale: ").Append(shopperLocale).Append("\n");
+ sb.Append(" shopperName: ").Append(shopperName).Append("\n");
+ sb.Append(" shopperReference: ").Append(shopperReference).Append("\n");
+ sb.Append(" shopperStatement: ").Append(shopperStatement).Append("\n");
+ sb.Append(" socialSecurityNumber: ").Append(socialSecurityNumber).Append("\n");
+ sb.Append(" splitCardFundingSources: ").Append(splitCardFundingSources).Append("\n");
+ sb.Append(" splits: ").Append(splits).Append("\n");
+ sb.Append(" storePaymentMethod: ").Append(storePaymentMethod).Append("\n");
+ sb.Append(" telephoneNumber: ").Append(telephoneNumber).Append("\n");
+ sb.Append(" threeDSAuthenticationOnly: ").Append(threeDSAuthenticationOnly).Append("\n");
+ sb.Append(" trustedShopper: ").Append(trustedShopper).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object input)
+ {
+ return this.Equals(input as CreateCheckoutSessionRequest);
+ }
+
+ ///
+ /// Returns true if CreateCheckoutSessionRequest instances are equal
+ ///
+ /// Instance of CreateCheckoutSessionRequest to be compared
+ /// Boolean
+ public bool Equals(CreateCheckoutSessionRequest input)
+ {
+ if (input == null)
+ return false;
+
+ return
+ (
+ this.accountInfo == input.accountInfo ||
+ (this.accountInfo != null &&
+ this.accountInfo.Equals(input.accountInfo))
+ ) &&
+ (
+ this.additionalAmount == input.additionalAmount ||
+ (this.additionalAmount != null &&
+ this.additionalAmount.Equals(input.additionalAmount))
+ ) &&
+ (
+ this.additionalData == input.additionalData ||
+ this.additionalData != null &&
+ input.additionalData != null &&
+ this.additionalData.SequenceEqual(input.additionalData)
+ ) &&
+ (
+ this.allowedPaymentMethods == input.allowedPaymentMethods ||
+ this.allowedPaymentMethods != null &&
+ input.allowedPaymentMethods != null &&
+ this.allowedPaymentMethods.SequenceEqual(input.allowedPaymentMethods)
+ ) &&
+ (
+ this.amount == input.amount ||
+ (this.amount != null &&
+ this.amount.Equals(input.amount))
+ ) &&
+ (
+ this.applicationInfo == input.applicationInfo ||
+ (this.applicationInfo != null &&
+ this.applicationInfo.Equals(input.applicationInfo))
+ ) &&
+ (
+ this.billingAddress == input.billingAddress ||
+ (this.billingAddress != null &&
+ this.billingAddress.Equals(input.billingAddress))
+ ) &&
+ (
+ this.blockedPaymentMethods == input.blockedPaymentMethods ||
+ this.blockedPaymentMethods != null &&
+ input.blockedPaymentMethods != null &&
+ this.blockedPaymentMethods.SequenceEqual(input.blockedPaymentMethods)
+ ) &&
+ (
+ this.captureDelayHours == input.captureDelayHours ||
+ (this.captureDelayHours != null &&
+ this.captureDelayHours.Equals(input.captureDelayHours))
+ ) &&
+ (
+ this.channel == input.channel ||
+ (this.channel != null &&
+ this.channel.Equals(input.channel))
+ ) &&
+ (
+ this.company == input.company ||
+ (this.company != null &&
+ this.company.Equals(input.company))
+ ) &&
+ (
+ this.countryCode == input.countryCode ||
+ (this.countryCode != null &&
+ this.countryCode.Equals(input.countryCode))
+ ) &&
+ (
+ this.dateOfBirth == input.dateOfBirth ||
+ (this.dateOfBirth != null &&
+ this.dateOfBirth.Equals(input.dateOfBirth))
+ ) &&
+ (
+ this.deliveryAddress == input.deliveryAddress ||
+ (this.deliveryAddress != null &&
+ this.deliveryAddress.Equals(input.deliveryAddress))
+ ) &&
+ (
+ this.enableOneClick == input.enableOneClick ||
+ (this.enableOneClick != null &&
+ this.enableOneClick.Equals(input.enableOneClick))
+ ) &&
+ (
+ this.enablePayOut == input.enablePayOut ||
+ (this.enablePayOut != null &&
+ this.enablePayOut.Equals(input.enablePayOut))
+ ) &&
+ (
+ this.enableRecurring == input.enableRecurring ||
+ (this.enableRecurring != null &&
+ this.enableRecurring.Equals(input.enableRecurring))
+ ) &&
+ (
+ this.expiresAt == input.expiresAt ||
+ (this.expiresAt != null &&
+ this.expiresAt.Equals(input.expiresAt))
+ ) &&
+ (
+ this.lineItems == input.lineItems ||
+ this.lineItems != null &&
+ input.lineItems != null &&
+ this.lineItems.SequenceEqual(input.lineItems)
+ ) &&
+ (
+ this.mandate == input.mandate ||
+ (this.mandate != null &&
+ this.mandate.Equals(input.mandate))
+ ) &&
+ (
+ this.mcc == input.mcc ||
+ (this.mcc != null &&
+ this.mcc.Equals(input.mcc))
+ ) &&
+ (
+ this.merchantAccount == input.merchantAccount ||
+ (this.merchantAccount != null &&
+ this.merchantAccount.Equals(input.merchantAccount))
+ ) &&
+ (
+ this.merchantOrderReference == input.merchantOrderReference ||
+ (this.merchantOrderReference != null &&
+ this.merchantOrderReference.Equals(input.merchantOrderReference))
+ ) &&
+ (
+ this.metadata == input.metadata ||
+ this.metadata != null &&
+ input.metadata != null &&
+ this.metadata.SequenceEqual(input.metadata)
+ ) &&
+ (
+ this.mpiData == input.mpiData ||
+ (this.mpiData != null &&
+ this.mpiData.Equals(input.mpiData))
+ ) &&
+ (
+ this.recurringExpiry == input.recurringExpiry ||
+ (this.recurringExpiry != null &&
+ this.recurringExpiry.Equals(input.recurringExpiry))
+ ) &&
+ (
+ this.recurringFrequency == input.recurringFrequency ||
+ (this.recurringFrequency != null &&
+ this.recurringFrequency.Equals(input.recurringFrequency))
+ ) &&
+ (
+ this.recurringProcessingModel == input.recurringProcessingModel ||
+ (this.recurringProcessingModel != null &&
+ this.recurringProcessingModel.Equals(input.recurringProcessingModel))
+ ) &&
+ (
+ this.redirectFromIssuerMethod == input.redirectFromIssuerMethod ||
+ (this.redirectFromIssuerMethod != null &&
+ this.redirectFromIssuerMethod.Equals(input.redirectFromIssuerMethod))
+ ) &&
+ (
+ this.redirectToIssuerMethod == input.redirectToIssuerMethod ||
+ (this.redirectToIssuerMethod != null &&
+ this.redirectToIssuerMethod.Equals(input.redirectToIssuerMethod))
+ ) &&
+ (
+ this.reference == input.reference ||
+ (this.reference != null &&
+ this.reference.Equals(input.reference))
+ ) &&
+ (
+ this.returnUrl == input.returnUrl ||
+ (this.returnUrl != null &&
+ this.returnUrl.Equals(input.returnUrl))
+ ) &&
+ (
+ this.riskData == input.riskData ||
+ (this.riskData != null &&
+ this.riskData.Equals(input.riskData))
+ ) &&
+ (
+ this.shopperEmail == input.shopperEmail ||
+ (this.shopperEmail != null &&
+ this.shopperEmail.Equals(input.shopperEmail))
+ ) &&
+ (
+ this.shopperIP == input.shopperIP ||
+ (this.shopperIP != null &&
+ this.shopperIP.Equals(input.shopperIP))
+ ) &&
+ (
+ this.shopperInteraction == input.shopperInteraction ||
+ (this.shopperInteraction != null &&
+ this.shopperInteraction.Equals(input.shopperInteraction))
+ ) &&
+ (
+ this.shopperLocale == input.shopperLocale ||
+ (this.shopperLocale != null &&
+ this.shopperLocale.Equals(input.shopperLocale))
+ ) &&
+ (
+ this.shopperName == input.shopperName ||
+ (this.shopperName != null &&
+ this.shopperName.Equals(input.shopperName))
+ ) &&
+ (
+ this.shopperReference == input.shopperReference ||
+ (this.shopperReference != null &&
+ this.shopperReference.Equals(input.shopperReference))
+ ) &&
+ (
+ this.shopperStatement == input.shopperStatement ||
+ (this.shopperStatement != null &&
+ this.shopperStatement.Equals(input.shopperStatement))
+ ) &&
+ (
+ this.socialSecurityNumber == input.socialSecurityNumber ||
+ (this.socialSecurityNumber != null &&
+ this.socialSecurityNumber.Equals(input.socialSecurityNumber))
+ ) &&
+ (
+ this.splitCardFundingSources == input.splitCardFundingSources ||
+ (this.splitCardFundingSources != null &&
+ this.splitCardFundingSources.Equals(input.splitCardFundingSources))
+ ) &&
+ (
+ this.splits == input.splits ||
+ this.splits != null &&
+ input.splits != null &&
+ this.splits.SequenceEqual(input.splits)
+ ) &&
+ (
+ this.storePaymentMethod == input.storePaymentMethod ||
+ (this.storePaymentMethod != null &&
+ this.storePaymentMethod.Equals(input.storePaymentMethod))
+ ) &&
+ (
+ this.telephoneNumber == input.telephoneNumber ||
+ (this.telephoneNumber != null &&
+ this.telephoneNumber.Equals(input.telephoneNumber))
+ ) &&
+ (
+ this.threeDSAuthenticationOnly == input.threeDSAuthenticationOnly ||
+ (this.threeDSAuthenticationOnly != null &&
+ this.threeDSAuthenticationOnly.Equals(input.threeDSAuthenticationOnly))
+ ) &&
+ (
+ this.trustedShopper == input.trustedShopper ||
+ (this.trustedShopper != null &&
+ this.trustedShopper.Equals(input.trustedShopper))
+ );
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (this.accountInfo != null)
+ hashCode = hashCode * 59 + this.accountInfo.GetHashCode();
+ if (this.additionalAmount != null)
+ hashCode = hashCode * 59 + this.additionalAmount.GetHashCode();
+ if (this.additionalData != null)
+ hashCode = hashCode * 59 + this.additionalData.GetHashCode();
+ if (this.allowedPaymentMethods != null)
+ hashCode = hashCode * 59 + this.allowedPaymentMethods.GetHashCode();
+ if (this.amount != null)
+ hashCode = hashCode * 59 + this.amount.GetHashCode();
+ if (this.applicationInfo != null)
+ hashCode = hashCode * 59 + this.applicationInfo.GetHashCode();
+ if (this.billingAddress != null)
+ hashCode = hashCode * 59 + this.billingAddress.GetHashCode();
+ if (this.blockedPaymentMethods != null)
+ hashCode = hashCode * 59 + this.blockedPaymentMethods.GetHashCode();
+ if (this.captureDelayHours != null)
+ hashCode = hashCode * 59 + this.captureDelayHours.GetHashCode();
+ if (this.channel != null)
+ hashCode = hashCode * 59 + this.channel.GetHashCode();
+ if (this.company != null)
+ hashCode = hashCode * 59 + this.company.GetHashCode();
+ if (this.countryCode != null)
+ hashCode = hashCode * 59 + this.countryCode.GetHashCode();
+ if (this.dateOfBirth != null)
+ hashCode = hashCode * 59 + this.dateOfBirth.GetHashCode();
+ if (this.deliveryAddress != null)
+ hashCode = hashCode * 59 + this.deliveryAddress.GetHashCode();
+ if (this.enableOneClick != null)
+ hashCode = hashCode * 59 + this.enableOneClick.GetHashCode();
+ if (this.enablePayOut != null)
+ hashCode = hashCode * 59 + this.enablePayOut.GetHashCode();
+ if (this.enableRecurring != null)
+ hashCode = hashCode * 59 + this.enableRecurring.GetHashCode();
+ if (this.expiresAt != null)
+ hashCode = hashCode * 59 + this.expiresAt.GetHashCode();
+ if (this.lineItems != null)
+ hashCode = hashCode * 59 + this.lineItems.GetHashCode();
+ if (this.mandate != null)
+ hashCode = hashCode * 59 + this.mandate.GetHashCode();
+ if (this.mcc != null)
+ hashCode = hashCode * 59 + this.mcc.GetHashCode();
+ if (this.merchantAccount != null)
+ hashCode = hashCode * 59 + this.merchantAccount.GetHashCode();
+ if (this.merchantOrderReference != null)
+ hashCode = hashCode * 59 + this.merchantOrderReference.GetHashCode();
+ if (this.metadata != null)
+ hashCode = hashCode * 59 + this.metadata.GetHashCode();
+ if (this.mpiData != null)
+ hashCode = hashCode * 59 + this.mpiData.GetHashCode();
+ if (this.recurringExpiry != null)
+ hashCode = hashCode * 59 + this.recurringExpiry.GetHashCode();
+ if (this.recurringFrequency != null)
+ hashCode = hashCode * 59 + this.recurringFrequency.GetHashCode();
+ if (this.recurringProcessingModel != null)
+ hashCode = hashCode * 59 + this.recurringProcessingModel.GetHashCode();
+ if (this.redirectFromIssuerMethod != null)
+ hashCode = hashCode * 59 + this.redirectFromIssuerMethod.GetHashCode();
+ if (this.redirectToIssuerMethod != null)
+ hashCode = hashCode * 59 + this.redirectToIssuerMethod.GetHashCode();
+ if (this.reference != null)
+ hashCode = hashCode * 59 + this.reference.GetHashCode();
+ if (this.returnUrl != null)
+ hashCode = hashCode * 59 + this.returnUrl.GetHashCode();
+ if (this.riskData != null)
+ hashCode = hashCode * 59 + this.riskData.GetHashCode();
+ if (this.shopperEmail != null)
+ hashCode = hashCode * 59 + this.shopperEmail.GetHashCode();
+ if (this.shopperIP != null)
+ hashCode = hashCode * 59 + this.shopperIP.GetHashCode();
+ if (this.shopperInteraction != null)
+ hashCode = hashCode * 59 + this.shopperInteraction.GetHashCode();
+ if (this.shopperLocale != null)
+ hashCode = hashCode * 59 + this.shopperLocale.GetHashCode();
+ if (this.shopperName != null)
+ hashCode = hashCode * 59 + this.shopperName.GetHashCode();
+ if (this.shopperReference != null)
+ hashCode = hashCode * 59 + this.shopperReference.GetHashCode();
+ if (this.shopperStatement != null)
+ hashCode = hashCode * 59 + this.shopperStatement.GetHashCode();
+ if (this.socialSecurityNumber != null)
+ hashCode = hashCode * 59 + this.socialSecurityNumber.GetHashCode();
+ if (this.splitCardFundingSources != null)
+ hashCode = hashCode * 59 + this.splitCardFundingSources.GetHashCode();
+ if (this.splits != null)
+ hashCode = hashCode * 59 + this.splits.GetHashCode();
+ if (this.storePaymentMethod != null)
+ hashCode = hashCode * 59 + this.storePaymentMethod.GetHashCode();
+ if (this.telephoneNumber != null)
+ hashCode = hashCode * 59 + this.telephoneNumber.GetHashCode();
+ if (this.threeDSAuthenticationOnly != null)
+ hashCode = hashCode * 59 + this.threeDSAuthenticationOnly.GetHashCode();
+ if (this.trustedShopper != null)
+ hashCode = hashCode * 59 + this.trustedShopper.GetHashCode();
+ return hashCode;
+ }
+ }
+
+ ///
+ /// To validate all properties of the instance
+ ///
+ /// Validation context
+ /// Validation Result
+ IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
+ }
+
+}
diff --git a/Adyen/Model/Checkout/CreateCheckoutSessionResponse.cs b/Adyen/Model/Checkout/CreateCheckoutSessionResponse.cs
new file mode 100644
index 000000000..14b604372
--- /dev/null
+++ b/Adyen/Model/Checkout/CreateCheckoutSessionResponse.cs
@@ -0,0 +1,1097 @@
+#region Licence
+//
+// ######
+// ######
+// ############ ####( ###### #####. ###### ############ ############
+// ############# #####( ###### #####. ###### ############# #############
+// ###### #####( ###### #####. ###### ##### ###### ##### ######
+// ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
+// ###### ###### #####( ###### #####. ###### ##### ##### ######
+// ############# ############# ############# ############# ##### ######
+// ############ ############ ############# ############ ##### ######
+// ######
+// #############
+// ############
+//
+// Adyen Dotnet API Library
+//
+// Copyright (c) 2021 Adyen B.V.
+// This file is open source and available under the MIT license.
+// See the LICENSE file for more info.
+#endregion
+
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Text;
+using System.Collections.Generic;
+using Adyen.Model.ApplicationInformation;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using System.ComponentModel.DataAnnotations;
+using Adyen.Util;
+
+namespace Adyen.Model.Checkout
+{
+ ///
+ /// CreateCheckoutSessionResponse
+ ///
+ [DataContract]
+ public partial class CreateCheckoutSessionResponse : IEquatable, IValidatableObject
+ {
+ ///
+ /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web
+ ///
+ /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum ChannelEnum
+ {
+ ///
+ /// Enum IOS for value: iOS
+ ///
+ [EnumMember(Value = "iOS")]
+ IOS = 1,
+
+ ///
+ /// Enum Android for value: Android
+ ///
+ [EnumMember(Value = "Android")]
+ Android = 2,
+
+ ///
+ /// Enum Web for value: Web
+ ///
+ [EnumMember(Value = "Web")]
+ Web = 3
+
+ }
+
+ ///
+ /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web
+ ///
+ /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web
+ [DataMember(Name = "channel", EmitDefaultValue = false)]
+ public ChannelEnum? channel { get; set; }
+ ///
+ /// Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount.
+ ///
+ /// Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount.
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum RecurringProcessingModelEnum
+ {
+ ///
+ /// Enum CardOnFile for value: CardOnFile
+ ///
+ [EnumMember(Value = "CardOnFile")]
+ CardOnFile = 1,
+
+ ///
+ /// Enum Subscription for value: Subscription
+ ///
+ [EnumMember(Value = "Subscription")]
+ Subscription = 2,
+
+ ///
+ /// Enum UnscheduledCardOnFile for value: UnscheduledCardOnFile
+ ///
+ [EnumMember(Value = "UnscheduledCardOnFile")]
+ UnscheduledCardOnFile = 3
+
+ }
+
+ ///
+ /// Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount.
+ ///
+ /// Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount.
+ [DataMember(Name = "recurringProcessingModel", EmitDefaultValue = false)]
+ public RecurringProcessingModelEnum? recurringProcessingModel { get; set; }
+ ///
+ /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.
+ ///
+ /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum ShopperInteractionEnum
+ {
+ ///
+ /// Enum Ecommerce for value: Ecommerce
+ ///
+ [EnumMember(Value = "Ecommerce")]
+ Ecommerce = 1,
+
+ ///
+ /// Enum ContAuth for value: ContAuth
+ ///
+ [EnumMember(Value = "ContAuth")]
+ ContAuth = 2,
+
+ ///
+ /// Enum Moto for value: Moto
+ ///
+ [EnumMember(Value = "Moto")]
+ Moto = 3,
+
+ ///
+ /// Enum POS for value: POS
+ ///
+ [EnumMember(Value = "POS")]
+ POS = 4
+
+ }
+
+ ///
+ /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.
+ ///
+ /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.
+ [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)]
+ public ShopperInteractionEnum? shopperInteraction { get; set; }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ [JsonConstructorAttribute]
+ protected CreateCheckoutSessionResponse() { }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// accountInfo.
+ /// additionalAmount.
+ /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value..
+ /// List of payment methods to be presented to the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]`.
+ /// amount (required).
+ /// applicationInfo.
+ /// billingAddress.
+ /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]`.
+ /// The delay between the authorisation and scheduled auto-capture, specified in hours..
+ /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web.
+ /// company.
+ /// The shopper's two-letter country code..
+ /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD.
+ /// deliveryAddress.
+ /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments..
+ /// When true and `shopperReference` is provided, the payment details will be tokenized for payouts..
+ /// When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments..
+ /// The date the session expires in ISO8601 format. When not specified, it defaults to 1h after creation. (required).
+ /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Zip..
+ /// mandate.
+ /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant..
+ /// The merchant account identifier, with which you want to process the transaction. (required).
+ /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`..
+ /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request.* Maximum 20 characters per key. * Maximum 80 characters per value. .
+ /// mpiData.
+ /// Date after which no further authorisations shall be performed. Only for 3D Secure 2..
+ /// Minimum number of days between authorisations. Only for 3D Secure 2..
+ /// Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. .
+ /// Specifies the redirect method (GET or POST) when redirecting back from the issuer..
+ /// Specifies the redirect method (GET or POST) when redirecting to the issuer..
+ /// The reference to uniquely identify a payment. (required).
+ /// The URL to return to when a redirect payment is completed. (required).
+ /// riskData.
+ /// sessionData.
+ /// The shopper's email address..
+ /// The shopper'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). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new)..
+ /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal..
+ /// The combination of a language code and a country code to specify the language to be used in the payment..
+ /// shopperName.
+ /// Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address..
+ /// The text to be shown on the shopper's bank statement. To enable this field, contact our [Support Team](https://support.adyen.com/hc/en-us/requests/new). We recommend sending a maximum of 22 characters, otherwise banks might truncate the string..
+ /// The shopper's social security number..
+ /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. (default to false).
+ /// An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split)..
+ /// When this is set to **true** and the `shopperReference` is provided, the payment details will be stored..
+ /// The shopper's telephone number..
+ /// If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. (default to false).
+ /// Set to true if the payment should be routed to a trusted MID..
+ public CreateCheckoutSessionResponse(AccountInfo accountInfo = default(AccountInfo), Amount additionalAmount = default(Amount), Dictionary additionalData = default(Dictionary), List allowedPaymentMethods = default(List), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), Address billingAddress = default(Address), List blockedPaymentMethods = default(List), int captureDelayHours = default(int), ChannelEnum? channel = default(ChannelEnum?), Company company = default(Company), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), Address deliveryAddress = default(Address), bool enableOneClick = default(bool), bool enablePayOut = default(bool), bool enableRecurring = default(bool), DateTime expiresAt = default(DateTime), List lineItems = default(List), Mandate mandate = default(Mandate), string mcc = default(string), string merchantAccount = default(string), string merchantOrderReference = default(string), Dictionary metadata = default(Dictionary), ThreeDSecureData mpiData = default(ThreeDSecureData), string recurringExpiry = default(string), string recurringFrequency = default(string), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string redirectFromIssuerMethod = default(string), string redirectToIssuerMethod = default(string), string reference = default(string), string returnUrl = default(string), RiskData riskData = default(RiskData), string sessionData = default(string), string shopperEmail = default(string), string shopperIP = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string shopperLocale = default(string), Name shopperName = default(Name), string shopperReference = default(string), string shopperStatement = default(string), string socialSecurityNumber = default(string), bool splitCardFundingSources = false, List splits = default(List), bool storePaymentMethod = default(bool), string telephoneNumber = default(string), bool threeDSAuthenticationOnly = false, bool trustedShopper = default(bool))
+ {
+ // to ensure "amount" is required (not null)
+ if (amount == null)
+ {
+ throw new InvalidDataException("amount is a required property for CreateCheckoutSessionResponse and cannot be null");
+ }
+ else
+ {
+ this.amount = amount;
+ }
+
+ // to ensure "expiresAt" is required (not null)
+ if (expiresAt == null)
+ {
+ throw new InvalidDataException("expiresAt is a required property for CreateCheckoutSessionResponse and cannot be null");
+ }
+ else
+ {
+ this.expiresAt = expiresAt;
+ }
+
+ // to ensure "merchantAccount" is required (not null)
+ if (merchantAccount == null)
+ {
+ throw new InvalidDataException("merchantAccount is a required property for CreateCheckoutSessionResponse and cannot be null");
+ }
+ else
+ {
+ this.merchantAccount = merchantAccount;
+ }
+
+ // to ensure "reference" is required (not null)
+ if (reference == null)
+ {
+ throw new InvalidDataException("reference is a required property for CreateCheckoutSessionResponse and cannot be null");
+ }
+ else
+ {
+ this.reference = reference;
+ }
+
+ // to ensure "returnUrl" is required (not null)
+ if (returnUrl == null)
+ {
+ throw new InvalidDataException("returnUrl is a required property for CreateCheckoutSessionResponse and cannot be null");
+ }
+ else
+ {
+ this.returnUrl = returnUrl;
+ }
+
+ this.accountInfo = accountInfo;
+ this.additionalAmount = additionalAmount;
+ this.additionalData = additionalData;
+ this.allowedPaymentMethods = allowedPaymentMethods;
+ this.applicationInfo = applicationInfo;
+ this.billingAddress = billingAddress;
+ this.blockedPaymentMethods = blockedPaymentMethods;
+ this.captureDelayHours = captureDelayHours;
+ this.channel = channel;
+ this.company = company;
+ this.countryCode = countryCode;
+ this.dateOfBirth = dateOfBirth;
+ this.deliveryAddress = deliveryAddress;
+ this.enableOneClick = enableOneClick;
+ this.enablePayOut = enablePayOut;
+ this.enableRecurring = enableRecurring;
+ this.lineItems = lineItems;
+ this.mandate = mandate;
+ this.mcc = mcc;
+ this.merchantOrderReference = merchantOrderReference;
+ this.metadata = metadata;
+ this.mpiData = mpiData;
+ this.recurringExpiry = recurringExpiry;
+ this.recurringFrequency = recurringFrequency;
+ this.recurringProcessingModel = recurringProcessingModel;
+ this.redirectFromIssuerMethod = redirectFromIssuerMethod;
+ this.redirectToIssuerMethod = redirectToIssuerMethod;
+ this.riskData = riskData;
+ this.sessionData = sessionData;
+ this.shopperEmail = shopperEmail;
+ this.shopperIP = shopperIP;
+ this.shopperInteraction = shopperInteraction;
+ this.shopperLocale = shopperLocale;
+ this.shopperName = shopperName;
+ this.shopperReference = shopperReference;
+ this.shopperStatement = shopperStatement;
+ this.socialSecurityNumber = socialSecurityNumber;
+ // use default value if no "splitCardFundingSources" provided
+ if (splitCardFundingSources == null)
+ {
+ this.splitCardFundingSources = false;
+ }
+ else
+ {
+ this.splitCardFundingSources = splitCardFundingSources;
+ }
+ this.splits = splits;
+ this.storePaymentMethod = storePaymentMethod;
+ this.telephoneNumber = telephoneNumber;
+ // use default value if no "threeDSAuthenticationOnly" provided
+ if (threeDSAuthenticationOnly == null)
+ {
+ this.threeDSAuthenticationOnly = false;
+ }
+ else
+ {
+ this.threeDSAuthenticationOnly = threeDSAuthenticationOnly;
+ }
+ this.trustedShopper = trustedShopper;
+ }
+
+ ///
+ /// Gets or Sets accountInfo
+ ///
+ [DataMember(Name = "accountInfo", EmitDefaultValue = false)]
+ public AccountInfo accountInfo { get; set; }
+
+ ///
+ /// Gets or Sets additionalAmount
+ ///
+ [DataMember(Name = "additionalAmount", EmitDefaultValue = false)]
+ public Amount additionalAmount { get; set; }
+
+ ///
+ /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value.
+ ///
+ /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value.
+ [DataMember(Name = "additionalData", EmitDefaultValue = false)]
+ public Dictionary additionalData { get; set; }
+
+ ///
+ /// List of payment methods to be presented to the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]`
+ ///
+ /// List of payment methods to be presented to the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]`
+ [DataMember(Name = "allowedPaymentMethods", EmitDefaultValue = false)]
+ public List allowedPaymentMethods { get; set; }
+
+ ///
+ /// Gets or Sets amount
+ ///
+ [DataMember(Name = "amount", EmitDefaultValue = true)]
+ public Amount amount { get; set; }
+
+ ///
+ /// Gets or Sets applicationInfo
+ ///
+ [DataMember(Name = "applicationInfo", EmitDefaultValue = false)]
+ public ApplicationInfo applicationInfo { get; set; }
+
+ ///
+ /// Gets or Sets billingAddress
+ ///
+ [DataMember(Name = "billingAddress", EmitDefaultValue = false)]
+ public Address billingAddress { get; set; }
+
+ ///
+ /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]`
+ ///
+ /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their `paymentMethod.type`from [Payment methods overview](https://docs.adyen.com/payment-methods). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]`
+ [DataMember(Name = "blockedPaymentMethods", EmitDefaultValue = false)]
+ public List blockedPaymentMethods { get; set; }
+
+ ///
+ /// The delay between the authorisation and scheduled auto-capture, specified in hours.
+ ///
+ /// The delay between the authorisation and scheduled auto-capture, specified in hours.
+ [DataMember(Name = "captureDelayHours", EmitDefaultValue = false)]
+ public int captureDelayHours { get; set; }
+
+
+ ///
+ /// Gets or Sets company
+ ///
+ [DataMember(Name = "company", EmitDefaultValue = false)]
+ public Company company { get; set; }
+
+ ///
+ /// The shopper's two-letter country code.
+ ///
+ /// The shopper's two-letter country code.
+ [DataMember(Name = "countryCode", EmitDefaultValue = false)]
+ public string countryCode { get; set; }
+
+ ///
+ /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD
+ ///
+ /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD
+ [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)]
+ public DateTime dateOfBirth { get; set; }
+
+ ///
+ /// Gets or Sets deliveryAddress
+ ///
+ [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)]
+ public Address deliveryAddress { get; set; }
+
+ ///
+ /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments.
+ ///
+ /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments.
+ [DataMember(Name = "enableOneClick", EmitDefaultValue = false)]
+ public bool enableOneClick { get; set; }
+
+ ///
+ /// When true and `shopperReference` is provided, the payment details will be tokenized for payouts.
+ ///
+ /// When true and `shopperReference` is provided, the payment details will be tokenized for payouts.
+ [DataMember(Name = "enablePayOut", EmitDefaultValue = false)]
+ public bool enablePayOut { get; set; }
+
+ ///
+ /// When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments.
+ ///
+ /// When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments.
+ [DataMember(Name = "enableRecurring", EmitDefaultValue = false)]
+ public bool enableRecurring { get; set; }
+
+ ///
+ /// The date the session expires in ISO8601 format. When not specified, it defaults to 1h after creation.
+ ///
+ /// The date the session expires in ISO8601 format. When not specified, it defaults to 1h after creation.
+ [DataMember(Name = "expiresAt", EmitDefaultValue = true)]
+ public DateTime expiresAt { get; set; }
+
+ ///
+ /// A unique identifier of the session.
+ ///
+ /// A unique identifier of the session.
+ [DataMember(Name = "id", EmitDefaultValue = true)]
+ public string id { get; private set; }
+
+ ///
+ /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Zip.
+ ///
+ /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Zip.
+ [DataMember(Name = "lineItems", EmitDefaultValue = false)]
+ public List lineItems { get; set; }
+
+ ///
+ /// Gets or Sets mandate
+ ///
+ [DataMember(Name = "mandate", EmitDefaultValue = false)]
+ public Mandate mandate { get; set; }
+
+ ///
+ /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant.
+ ///
+ /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant.
+ [DataMember(Name = "mcc", EmitDefaultValue = false)]
+ public string mcc { get; set; }
+
+ ///
+ /// The merchant account identifier, with which you want to process the transaction.
+ ///
+ /// The merchant account identifier, with which you want to process the transaction.
+ [DataMember(Name = "merchantAccount", EmitDefaultValue = true)]
+ public string merchantAccount { get; set; }
+
+ ///
+ /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`.
+ ///
+ /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`.
+ [DataMember(Name = "merchantOrderReference", EmitDefaultValue = false)]
+ public string merchantOrderReference { get; set; }
+
+ ///
+ /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request.* Maximum 20 characters per key. * Maximum 80 characters per value.
+ ///
+ /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request.* Maximum 20 characters per key. * Maximum 80 characters per value.
+ [DataMember(Name = "metadata", EmitDefaultValue = false)]
+ public Dictionary metadata { get; set; }
+
+ ///
+ /// Gets or Sets mpiData
+ ///
+ [DataMember(Name = "mpiData", EmitDefaultValue = false)]
+ public ThreeDSecureData mpiData { get; set; }
+
+ ///
+ /// Date after which no further authorisations shall be performed. Only for 3D Secure 2.
+ ///
+ /// Date after which no further authorisations shall be performed. Only for 3D Secure 2.
+ [DataMember(Name = "recurringExpiry", EmitDefaultValue = false)]
+ public string recurringExpiry { get; set; }
+
+ ///
+ /// Minimum number of days between authorisations. Only for 3D Secure 2.
+ ///
+ /// Minimum number of days between authorisations. Only for 3D Secure 2.
+ [DataMember(Name = "recurringFrequency", EmitDefaultValue = false)]
+ public string recurringFrequency { get; set; }
+
+
+ ///
+ /// Specifies the redirect method (GET or POST) when redirecting back from the issuer.
+ ///
+ /// Specifies the redirect method (GET or POST) when redirecting back from the issuer.
+ [DataMember(Name = "redirectFromIssuerMethod", EmitDefaultValue = false)]
+ public string redirectFromIssuerMethod { get; set; }
+
+ ///
+ /// Specifies the redirect method (GET or POST) when redirecting to the issuer.
+ ///
+ /// Specifies the redirect method (GET or POST) when redirecting to the issuer.
+ [DataMember(Name = "redirectToIssuerMethod", EmitDefaultValue = false)]
+ public string redirectToIssuerMethod { get; set; }
+
+ ///
+ /// The reference to uniquely identify a payment.
+ ///
+ /// The reference to uniquely identify a payment.
+ [DataMember(Name = "reference", EmitDefaultValue = true)]
+ public string reference { get; set; }
+
+ ///
+ /// The URL to return to when a redirect payment is completed.
+ ///
+ /// The URL to return to when a redirect payment is completed.
+ [DataMember(Name = "returnUrl", EmitDefaultValue = true)]
+ public string returnUrl { get; set; }
+
+ ///
+ /// Gets or Sets riskData
+ ///
+ [DataMember(Name = "riskData", EmitDefaultValue = false)]
+ public RiskData riskData { get; set; }
+
+ ///
+ /// Gets or Sets sessionData
+ ///
+ [DataMember(Name = "sessionData", EmitDefaultValue = false)]
+ public string sessionData { get; set; }
+
+ ///
+ /// The shopper's email address.
+ ///
+ /// The shopper's email address.
+ [DataMember(Name = "shopperEmail", EmitDefaultValue = false)]
+ public string shopperEmail { get; set; }
+
+ ///
+ /// The shopper'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). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new).
+ ///
+ /// The shopper'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). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://support.adyen.com/hc/en-us/requests/new).
+ [DataMember(Name = "shopperIP", EmitDefaultValue = false)]
+ public string shopperIP { get; set; }
+
+
+ ///
+ /// The combination of a language code and a country code to specify the language to be used in the payment.
+ ///
+ /// The combination of a language code and a country code to specify the language to be used in the payment.
+ [DataMember(Name = "shopperLocale", EmitDefaultValue = false)]
+ public string shopperLocale { get; set; }
+
+ ///
+ /// Gets or Sets shopperName
+ ///
+ [DataMember(Name = "shopperName", EmitDefaultValue = false)]
+ public Name shopperName { get; set; }
+
+ ///
+ /// Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address.
+ ///
+ /// Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address.
+ [DataMember(Name = "shopperReference", EmitDefaultValue = false)]
+ public string shopperReference { get; set; }
+
+ ///
+ /// The text to be shown on the shopper's bank statement. To enable this field, contact our [Support Team](https://support.adyen.com/hc/en-us/requests/new). We recommend sending a maximum of 22 characters, otherwise banks might truncate the string.
+ ///
+ /// The text to be shown on the shopper's bank statement. To enable this field, contact our [Support Team](https://support.adyen.com/hc/en-us/requests/new). We recommend sending a maximum of 22 characters, otherwise banks might truncate the string.
+ [DataMember(Name = "shopperStatement", EmitDefaultValue = false)]
+ public string shopperStatement { get; set; }
+
+ ///
+ /// The shopper's social security number.
+ ///
+ /// The shopper's social security number.
+ [DataMember(Name = "socialSecurityNumber", EmitDefaultValue = false)]
+ public string socialSecurityNumber { get; set; }
+
+ ///
+ /// Boolean value indicating whether the card payment method should be split into separate debit and credit options.
+ ///
+ /// Boolean value indicating whether the card payment method should be split into separate debit and credit options.
+ [DataMember(Name = "splitCardFundingSources", EmitDefaultValue = false)]
+ public bool splitCardFundingSources { get; set; }
+
+ ///
+ /// An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split).
+ ///
+ /// An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split).
+ [DataMember(Name = "splits", EmitDefaultValue = false)]
+ public List splits { get; set; }
+
+ ///
+ /// When this is set to **true** and the `shopperReference` is provided, the payment details will be stored.
+ ///
+ /// When this is set to **true** and the `shopperReference` is provided, the payment details will be stored.
+ [DataMember(Name = "storePaymentMethod", EmitDefaultValue = false)]
+ public bool storePaymentMethod { get; set; }
+
+ ///
+ /// The shopper's telephone number.
+ ///
+ /// The shopper's telephone number.
+ [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)]
+ public string telephoneNumber { get; set; }
+
+ ///
+ /// If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation.
+ ///
+ /// If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation.
+ [DataMember(Name = "threeDSAuthenticationOnly", EmitDefaultValue = false)]
+ public bool threeDSAuthenticationOnly { get; set; }
+
+ ///
+ /// Set to true if the payment should be routed to a trusted MID.
+ ///
+ /// Set to true if the payment should be routed to a trusted MID.
+ [DataMember(Name = "trustedShopper", EmitDefaultValue = false)]
+ public bool trustedShopper { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+ sb.Append("class CreateCheckoutSessionResponse {\n");
+ sb.Append(" accountInfo: ").Append(accountInfo).Append("\n");
+ sb.Append(" additionalAmount: ").Append(additionalAmount).Append("\n");
+ sb.Append(" additionalData: ").Append(additionalData.ToCollectionsString()).Append("\n");
+ sb.Append(" allowedPaymentMethods: ").Append(allowedPaymentMethods).Append("\n");
+ sb.Append(" amount: ").Append(amount).Append("\n");
+ sb.Append(" applicationInfo: ").Append(applicationInfo).Append("\n");
+ sb.Append(" billingAddress: ").Append(billingAddress).Append("\n");
+ sb.Append(" blockedPaymentMethods: ").Append(blockedPaymentMethods).Append("\n");
+ sb.Append(" captureDelayHours: ").Append(captureDelayHours).Append("\n");
+ sb.Append(" channel: ").Append(channel).Append("\n");
+ sb.Append(" company: ").Append(company).Append("\n");
+ sb.Append(" countryCode: ").Append(countryCode).Append("\n");
+ sb.Append(" dateOfBirth: ").Append(dateOfBirth).Append("\n");
+ sb.Append(" deliveryAddress: ").Append(deliveryAddress).Append("\n");
+ sb.Append(" enableOneClick: ").Append(enableOneClick).Append("\n");
+ sb.Append(" enablePayOut: ").Append(enablePayOut).Append("\n");
+ sb.Append(" enableRecurring: ").Append(enableRecurring).Append("\n");
+ sb.Append(" expiresAt: ").Append(expiresAt).Append("\n");
+ sb.Append(" id: ").Append(id).Append("\n");
+ sb.Append(" lineItems: ").Append(lineItems).Append("\n");
+ sb.Append(" mandate: ").Append(mandate).Append("\n");
+ sb.Append(" mcc: ").Append(mcc).Append("\n");
+ sb.Append(" merchantAccount: ").Append(merchantAccount).Append("\n");
+ sb.Append(" merchantOrderReference: ").Append(merchantOrderReference).Append("\n");
+ sb.Append(" metadata: ").Append(metadata).Append("\n");
+ sb.Append(" mpiData: ").Append(mpiData).Append("\n");
+ sb.Append(" recurringExpiry: ").Append(recurringExpiry).Append("\n");
+ sb.Append(" recurringFrequency: ").Append(recurringFrequency).Append("\n");
+ sb.Append(" recurringProcessingModel: ").Append(recurringProcessingModel).Append("\n");
+ sb.Append(" redirectFromIssuerMethod: ").Append(redirectFromIssuerMethod).Append("\n");
+ sb.Append(" redirectToIssuerMethod: ").Append(redirectToIssuerMethod).Append("\n");
+ sb.Append(" reference: ").Append(reference).Append("\n");
+ sb.Append(" returnUrl: ").Append(returnUrl).Append("\n");
+ sb.Append(" riskData: ").Append(riskData).Append("\n");
+ sb.Append(" sessionData: ").Append(sessionData).Append("\n");
+ sb.Append(" shopperEmail: ").Append(shopperEmail).Append("\n");
+ sb.Append(" shopperIP: ").Append(shopperIP).Append("\n");
+ sb.Append(" shopperInteraction: ").Append(shopperInteraction).Append("\n");
+ sb.Append(" shopperLocale: ").Append(shopperLocale).Append("\n");
+ sb.Append(" shopperName: ").Append(shopperName).Append("\n");
+ sb.Append(" shopperReference: ").Append(shopperReference).Append("\n");
+ sb.Append(" shopperStatement: ").Append(shopperStatement).Append("\n");
+ sb.Append(" socialSecurityNumber: ").Append(socialSecurityNumber).Append("\n");
+ sb.Append(" splitCardFundingSources: ").Append(splitCardFundingSources).Append("\n");
+ sb.Append(" splits: ").Append(splits).Append("\n");
+ sb.Append(" storePaymentMethod: ").Append(storePaymentMethod).Append("\n");
+ sb.Append(" telephoneNumber: ").Append(telephoneNumber).Append("\n");
+ sb.Append(" threeDSAuthenticationOnly: ").Append(threeDSAuthenticationOnly).Append("\n");
+ sb.Append(" trustedShopper: ").Append(trustedShopper).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object input)
+ {
+ return this.Equals(input as CreateCheckoutSessionResponse);
+ }
+
+ ///
+ /// Returns true if CreateCheckoutSessionResponse instances are equal
+ ///
+ /// Instance of CreateCheckoutSessionResponse to be compared
+ /// Boolean
+ public bool Equals(CreateCheckoutSessionResponse input)
+ {
+ if (input == null)
+ return false;
+
+ return
+ (
+ this.accountInfo == input.accountInfo ||
+ (this.accountInfo != null &&
+ this.accountInfo.Equals(input.accountInfo))
+ ) &&
+ (
+ this.additionalAmount == input.additionalAmount ||
+ (this.additionalAmount != null &&
+ this.additionalAmount.Equals(input.additionalAmount))
+ ) &&
+ (
+ this.additionalData == input.additionalData ||
+ this.additionalData != null &&
+ input.additionalData != null &&
+ this.additionalData.SequenceEqual(input.additionalData)
+ ) &&
+ (
+ this.allowedPaymentMethods == input.allowedPaymentMethods ||
+ this.allowedPaymentMethods != null &&
+ input.allowedPaymentMethods != null &&
+ this.allowedPaymentMethods.SequenceEqual(input.allowedPaymentMethods)
+ ) &&
+ (
+ this.amount == input.amount ||
+ (this.amount != null &&
+ this.amount.Equals(input.amount))
+ ) &&
+ (
+ this.applicationInfo == input.applicationInfo ||
+ (this.applicationInfo != null &&
+ this.applicationInfo.Equals(input.applicationInfo))
+ ) &&
+ (
+ this.billingAddress == input.billingAddress ||
+ (this.billingAddress != null &&
+ this.billingAddress.Equals(input.billingAddress))
+ ) &&
+ (
+ this.blockedPaymentMethods == input.blockedPaymentMethods ||
+ this.blockedPaymentMethods != null &&
+ input.blockedPaymentMethods != null &&
+ this.blockedPaymentMethods.SequenceEqual(input.blockedPaymentMethods)
+ ) &&
+ (
+ this.captureDelayHours == input.captureDelayHours ||
+ (this.captureDelayHours != null &&
+ this.captureDelayHours.Equals(input.captureDelayHours))
+ ) &&
+ (
+ this.channel == input.channel ||
+ (this.channel != null &&
+ this.channel.Equals(input.channel))
+ ) &&
+ (
+ this.company == input.company ||
+ (this.company != null &&
+ this.company.Equals(input.company))
+ ) &&
+ (
+ this.countryCode == input.countryCode ||
+ (this.countryCode != null &&
+ this.countryCode.Equals(input.countryCode))
+ ) &&
+ (
+ this.dateOfBirth == input.dateOfBirth ||
+ (this.dateOfBirth != null &&
+ this.dateOfBirth.Equals(input.dateOfBirth))
+ ) &&
+ (
+ this.deliveryAddress == input.deliveryAddress ||
+ (this.deliveryAddress != null &&
+ this.deliveryAddress.Equals(input.deliveryAddress))
+ ) &&
+ (
+ this.enableOneClick == input.enableOneClick ||
+ (this.enableOneClick != null &&
+ this.enableOneClick.Equals(input.enableOneClick))
+ ) &&
+ (
+ this.enablePayOut == input.enablePayOut ||
+ (this.enablePayOut != null &&
+ this.enablePayOut.Equals(input.enablePayOut))
+ ) &&
+ (
+ this.enableRecurring == input.enableRecurring ||
+ (this.enableRecurring != null &&
+ this.enableRecurring.Equals(input.enableRecurring))
+ ) &&
+ (
+ this.expiresAt == input.expiresAt ||
+ (this.expiresAt != null &&
+ this.expiresAt.Equals(input.expiresAt))
+ ) &&
+ (
+ this.id == input.id ||
+ (this.id != null &&
+ this.id.Equals(input.id))
+ ) &&
+ (
+ this.lineItems == input.lineItems ||
+ this.lineItems != null &&
+ input.lineItems != null &&
+ this.lineItems.SequenceEqual(input.lineItems)
+ ) &&
+ (
+ this.mandate == input.mandate ||
+ (this.mandate != null &&
+ this.mandate.Equals(input.mandate))
+ ) &&
+ (
+ this.mcc == input.mcc ||
+ (this.mcc != null &&
+ this.mcc.Equals(input.mcc))
+ ) &&
+ (
+ this.merchantAccount == input.merchantAccount ||
+ (this.merchantAccount != null &&
+ this.merchantAccount.Equals(input.merchantAccount))
+ ) &&
+ (
+ this.merchantOrderReference == input.merchantOrderReference ||
+ (this.merchantOrderReference != null &&
+ this.merchantOrderReference.Equals(input.merchantOrderReference))
+ ) &&
+ (
+ this.metadata == input.metadata ||
+ this.metadata != null &&
+ input.metadata != null &&
+ this.metadata.SequenceEqual(input.metadata)
+ ) &&
+ (
+ this.mpiData == input.mpiData ||
+ (this.mpiData != null &&
+ this.mpiData.Equals(input.mpiData))
+ ) &&
+ (
+ this.recurringExpiry == input.recurringExpiry ||
+ (this.recurringExpiry != null &&
+ this.recurringExpiry.Equals(input.recurringExpiry))
+ ) &&
+ (
+ this.recurringFrequency == input.recurringFrequency ||
+ (this.recurringFrequency != null &&
+ this.recurringFrequency.Equals(input.recurringFrequency))
+ ) &&
+ (
+ this.recurringProcessingModel == input.recurringProcessingModel ||
+ (this.recurringProcessingModel != null &&
+ this.recurringProcessingModel.Equals(input.recurringProcessingModel))
+ ) &&
+ (
+ this.redirectFromIssuerMethod == input.redirectFromIssuerMethod ||
+ (this.redirectFromIssuerMethod != null &&
+ this.redirectFromIssuerMethod.Equals(input.redirectFromIssuerMethod))
+ ) &&
+ (
+ this.redirectToIssuerMethod == input.redirectToIssuerMethod ||
+ (this.redirectToIssuerMethod != null &&
+ this.redirectToIssuerMethod.Equals(input.redirectToIssuerMethod))
+ ) &&
+ (
+ this.reference == input.reference ||
+ (this.reference != null &&
+ this.reference.Equals(input.reference))
+ ) &&
+ (
+ this.returnUrl == input.returnUrl ||
+ (this.returnUrl != null &&
+ this.returnUrl.Equals(input.returnUrl))
+ ) &&
+ (
+ this.riskData == input.riskData ||
+ (this.riskData != null &&
+ this.riskData.Equals(input.riskData))
+ ) &&
+ (
+ this.sessionData == input.sessionData ||
+ (this.sessionData != null &&
+ this.sessionData.Equals(input.sessionData))
+ ) &&
+ (
+ this.shopperEmail == input.shopperEmail ||
+ (this.shopperEmail != null &&
+ this.shopperEmail.Equals(input.shopperEmail))
+ ) &&
+ (
+ this.shopperIP == input.shopperIP ||
+ (this.shopperIP != null &&
+ this.shopperIP.Equals(input.shopperIP))
+ ) &&
+ (
+ this.shopperInteraction == input.shopperInteraction ||
+ (this.shopperInteraction != null &&
+ this.shopperInteraction.Equals(input.shopperInteraction))
+ ) &&
+ (
+ this.shopperLocale == input.shopperLocale ||
+ (this.shopperLocale != null &&
+ this.shopperLocale.Equals(input.shopperLocale))
+ ) &&
+ (
+ this.shopperName == input.shopperName ||
+ (this.shopperName != null &&
+ this.shopperName.Equals(input.shopperName))
+ ) &&
+ (
+ this.shopperReference == input.shopperReference ||
+ (this.shopperReference != null &&
+ this.shopperReference.Equals(input.shopperReference))
+ ) &&
+ (
+ this.shopperStatement == input.shopperStatement ||
+ (this.shopperStatement != null &&
+ this.shopperStatement.Equals(input.shopperStatement))
+ ) &&
+ (
+ this.socialSecurityNumber == input.socialSecurityNumber ||
+ (this.socialSecurityNumber != null &&
+ this.socialSecurityNumber.Equals(input.socialSecurityNumber))
+ ) &&
+ (
+ this.splitCardFundingSources == input.splitCardFundingSources ||
+ (this.splitCardFundingSources != null &&
+ this.splitCardFundingSources.Equals(input.splitCardFundingSources))
+ ) &&
+ (
+ this.splits == input.splits ||
+ this.splits != null &&
+ input.splits != null &&
+ this.splits.SequenceEqual(input.splits)
+ ) &&
+ (
+ this.storePaymentMethod == input.storePaymentMethod ||
+ (this.storePaymentMethod != null &&
+ this.storePaymentMethod.Equals(input.storePaymentMethod))
+ ) &&
+ (
+ this.telephoneNumber == input.telephoneNumber ||
+ (this.telephoneNumber != null &&
+ this.telephoneNumber.Equals(input.telephoneNumber))
+ ) &&
+ (
+ this.threeDSAuthenticationOnly == input.threeDSAuthenticationOnly ||
+ (this.threeDSAuthenticationOnly != null &&
+ this.threeDSAuthenticationOnly.Equals(input.threeDSAuthenticationOnly))
+ ) &&
+ (
+ this.trustedShopper == input.trustedShopper ||
+ (this.trustedShopper != null &&
+ this.trustedShopper.Equals(input.trustedShopper))
+ );
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (this.accountInfo != null)
+ hashCode = hashCode * 59 + this.accountInfo.GetHashCode();
+ if (this.additionalAmount != null)
+ hashCode = hashCode * 59 + this.additionalAmount.GetHashCode();
+ if (this.additionalData != null)
+ hashCode = hashCode * 59 + this.additionalData.GetHashCode();
+ if (this.allowedPaymentMethods != null)
+ hashCode = hashCode * 59 + this.allowedPaymentMethods.GetHashCode();
+ if (this.amount != null)
+ hashCode = hashCode * 59 + this.amount.GetHashCode();
+ if (this.applicationInfo != null)
+ hashCode = hashCode * 59 + this.applicationInfo.GetHashCode();
+ if (this.billingAddress != null)
+ hashCode = hashCode * 59 + this.billingAddress.GetHashCode();
+ if (this.blockedPaymentMethods != null)
+ hashCode = hashCode * 59 + this.blockedPaymentMethods.GetHashCode();
+ if (this.captureDelayHours != null)
+ hashCode = hashCode * 59 + this.captureDelayHours.GetHashCode();
+ if (this.channel != null)
+ hashCode = hashCode * 59 + this.channel.GetHashCode();
+ if (this.company != null)
+ hashCode = hashCode * 59 + this.company.GetHashCode();
+ if (this.countryCode != null)
+ hashCode = hashCode * 59 + this.countryCode.GetHashCode();
+ if (this.dateOfBirth != null)
+ hashCode = hashCode * 59 + this.dateOfBirth.GetHashCode();
+ if (this.deliveryAddress != null)
+ hashCode = hashCode * 59 + this.deliveryAddress.GetHashCode();
+ if (this.enableOneClick != null)
+ hashCode = hashCode * 59 + this.enableOneClick.GetHashCode();
+ if (this.enablePayOut != null)
+ hashCode = hashCode * 59 + this.enablePayOut.GetHashCode();
+ if (this.enableRecurring != null)
+ hashCode = hashCode * 59 + this.enableRecurring.GetHashCode();
+ if (this.expiresAt != null)
+ hashCode = hashCode * 59 + this.expiresAt.GetHashCode();
+ if (this.id != null)
+ hashCode = hashCode * 59 + this.id.GetHashCode();
+ if (this.lineItems != null)
+ hashCode = hashCode * 59 + this.lineItems.GetHashCode();
+ if (this.mandate != null)
+ hashCode = hashCode * 59 + this.mandate.GetHashCode();
+ if (this.mcc != null)
+ hashCode = hashCode * 59 + this.mcc.GetHashCode();
+ if (this.merchantAccount != null)
+ hashCode = hashCode * 59 + this.merchantAccount.GetHashCode();
+ if (this.merchantOrderReference != null)
+ hashCode = hashCode * 59 + this.merchantOrderReference.GetHashCode();
+ if (this.metadata != null)
+ hashCode = hashCode * 59 + this.metadata.GetHashCode();
+ if (this.mpiData != null)
+ hashCode = hashCode * 59 + this.mpiData.GetHashCode();
+ if (this.recurringExpiry != null)
+ hashCode = hashCode * 59 + this.recurringExpiry.GetHashCode();
+ if (this.recurringFrequency != null)
+ hashCode = hashCode * 59 + this.recurringFrequency.GetHashCode();
+ if (this.recurringProcessingModel != null)
+ hashCode = hashCode * 59 + this.recurringProcessingModel.GetHashCode();
+ if (this.redirectFromIssuerMethod != null)
+ hashCode = hashCode * 59 + this.redirectFromIssuerMethod.GetHashCode();
+ if (this.redirectToIssuerMethod != null)
+ hashCode = hashCode * 59 + this.redirectToIssuerMethod.GetHashCode();
+ if (this.reference != null)
+ hashCode = hashCode * 59 + this.reference.GetHashCode();
+ if (this.returnUrl != null)
+ hashCode = hashCode * 59 + this.returnUrl.GetHashCode();
+ if (this.riskData != null)
+ hashCode = hashCode * 59 + this.riskData.GetHashCode();
+ if (this.sessionData != null)
+ hashCode = hashCode * 59 + this.sessionData.GetHashCode();
+ if (this.shopperEmail != null)
+ hashCode = hashCode * 59 + this.shopperEmail.GetHashCode();
+ if (this.shopperIP != null)
+ hashCode = hashCode * 59 + this.shopperIP.GetHashCode();
+ if (this.shopperInteraction != null)
+ hashCode = hashCode * 59 + this.shopperInteraction.GetHashCode();
+ if (this.shopperLocale != null)
+ hashCode = hashCode * 59 + this.shopperLocale.GetHashCode();
+ if (this.shopperName != null)
+ hashCode = hashCode * 59 + this.shopperName.GetHashCode();
+ if (this.shopperReference != null)
+ hashCode = hashCode * 59 + this.shopperReference.GetHashCode();
+ if (this.shopperStatement != null)
+ hashCode = hashCode * 59 + this.shopperStatement.GetHashCode();
+ if (this.socialSecurityNumber != null)
+ hashCode = hashCode * 59 + this.socialSecurityNumber.GetHashCode();
+ if (this.splitCardFundingSources != null)
+ hashCode = hashCode * 59 + this.splitCardFundingSources.GetHashCode();
+ if (this.splits != null)
+ hashCode = hashCode * 59 + this.splits.GetHashCode();
+ if (this.storePaymentMethod != null)
+ hashCode = hashCode * 59 + this.storePaymentMethod.GetHashCode();
+ if (this.telephoneNumber != null)
+ hashCode = hashCode * 59 + this.telephoneNumber.GetHashCode();
+ if (this.threeDSAuthenticationOnly != null)
+ hashCode = hashCode * 59 + this.threeDSAuthenticationOnly.GetHashCode();
+ if (this.trustedShopper != null)
+ hashCode = hashCode * 59 + this.trustedShopper.GetHashCode();
+ return hashCode;
+ }
+ }
+
+ ///
+ /// To validate all properties of the instance
+ ///
+ /// Validation context
+ /// Validation Result
+ IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
+ }
+
+}
diff --git a/Adyen/Service/Checkout.cs b/Adyen/Service/Checkout.cs
index 392db42bb..fae3f6fe6 100644
--- a/Adyen/Service/Checkout.cs
+++ b/Adyen/Service/Checkout.cs
@@ -1,24 +1,24 @@
#region License
-// /*
-// * ######
-// * ######
-// * ############ ####( ###### #####. ###### ############ ############
-// * ############# #####( ###### #####. ###### ############# #############
-// * ###### #####( ###### #####. ###### ##### ###### ##### ######
-// * ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
-// * ###### ###### #####( ###### #####. ###### ##### ##### ######
-// * ############# ############# ############# ############# ##### ######
-// * ############ ############ ############# ############ ##### ######
-// * ######
-// * #############
-// * ############
-// *
-// * Adyen Dotnet API Library
-// *
-// * Copyright (c) 2020 Adyen B.V.
-// * This file is open source and available under the MIT license.
-// * See the LICENSE file for more info.
-// */
+/*
+ * ######
+ * ######
+ * ############ ####( ###### #####. ###### ############ ############
+ * ############# #####( ###### #####. ###### ############# #############
+ * ###### #####( ###### #####. ###### ##### ###### ##### ######
+ * ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
+ * ###### ###### #####( ###### #####. ###### ##### ##### ######
+ * ############# ############# ############# ############# ##### ######
+ * ############ ############ ############# ############ ##### ######
+ * ######
+ * #############
+ * ############
+ *
+ * Adyen Dotnet API Library
+ *
+ * Copyright (c) 2021 Adyen B.V.
+ * This file is open source and available under the MIT license.
+ * See the LICENSE file for more info.
+ */
#endregion
using System.Threading.Tasks;
@@ -39,6 +39,7 @@ public class Checkout : AbstractService
private PaymentSession _paymentSession;
private PaymentsResult _paymentsResult;
private PaymentLinks _paymentLinksResult;
+ private Sessions _sessions;
public Checkout(Client client) : base(client)
{
@@ -49,6 +50,7 @@ public Checkout(Client client) : base(client)
_paymentSession = new PaymentSession(this);
_paymentsResult = new PaymentsResult(this);
_paymentLinksResult = new PaymentLinks(this);
+ _sessions = new Sessions(this);
}
///
@@ -196,5 +198,29 @@ public async Task PaymentLinksAsync(CreatePaymentLinkReques
var jsonResponse = await _paymentLinksResult.RequestAsync(jsonRequest);
return JsonConvert.DeserializeObject(jsonResponse);
}
+
+ ///
+ /// POST /sessions API call
+ ///
+ ///
+ /// CreateCheckoutSessionResponse
+ public CreateCheckoutSessionResponse Sessions(CreateCheckoutSessionRequest createCheckoutSessionRequest)
+ {
+ var jsonRequest = Util.JsonOperation.SerializeRequest(createCheckoutSessionRequest);
+ var jsonResponse =_sessions.Request(jsonRequest);
+ return JsonConvert.DeserializeObject(jsonResponse);
+ }
+
+ ///
+ /// POST /sessions API call async
+ ///
+ ///
+ /// CreateCheckoutSessionResponse
+ public async Task SessionsAsync(CreateCheckoutSessionRequest createCheckoutSessionRequest)
+ {
+ var jsonRequest = Util.JsonOperation.SerializeRequest(createCheckoutSessionRequest);
+ var jsonResponse = await _sessions.RequestAsync(jsonRequest);
+ return JsonConvert.DeserializeObject(jsonResponse);
+ }
}
}
diff --git a/Adyen/Service/Resource/Checkout/Sessions.cs b/Adyen/Service/Resource/Checkout/Sessions.cs
new file mode 100644
index 000000000..ae464aff5
--- /dev/null
+++ b/Adyen/Service/Resource/Checkout/Sessions.cs
@@ -0,0 +1,36 @@
+#region License
+// /*
+// * ######
+// * ######
+// * ############ ####( ###### #####. ###### ############ ############
+// * ############# #####( ###### #####. ###### ############# #############
+// * ###### #####( ###### #####. ###### ##### ###### ##### ######
+// * ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
+// * ###### ###### #####( ###### #####. ###### ##### ##### ######
+// * ############# ############# ############# ############# ##### ######
+// * ############ ############ ############# ############ ##### ######
+// * ######
+// * #############
+// * ############
+// *
+// * Adyen Dotnet API Library
+// *
+// * Copyright (c) 2021 Adyen B.V.
+// * This file is open source and available under the MIT license.
+// * See the LICENSE file for more info.
+// */
+#endregion
+
+using Adyen.Constants;
+using System.Collections.Generic;
+
+namespace Adyen.Service.Resource.Checkout
+{
+ public class Sessions : ServiceResource
+ {
+ public Sessions(AbstractService abstractService)
+ : base(abstractService, abstractService.Client.Config.CheckoutEndpoint + "/" + ClientConfig.CheckoutApiVersion + "/sessions", new List { "amount", "reference", "returnUrl", "merchantAccount" })
+ {
+ }
+ }
+}
diff --git a/README.md b/README.md
index 8e3c60edd..209fd3a76 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ This is the officially supported dotnet library for using Adyen's APIs.
## Integration
The library supports all APIs under the following services:
-* [Checkout API](https://docs.adyen.com/api-explorer/#/CheckoutService/v67/overview): Our latest integration for accepting online payments. Current supported version: **v67**
+* [Checkout API](https://docs.adyen.com/api-explorer/#/CheckoutService/v68/overview): Our latest integration for accepting online payments. Current supported version: **v68**
* [Payments API](https://docs.adyen.com/api-explorer/#/Payment/v51/overview): Our classic integration for online payments. Current supported version: **v51**
* [Recurring API](https://docs.adyen.com/api-explorer/#/Recurring/v49/overview): Endpoints for managing saved payment details. Current supported version: **v49**
* [Payouts API](https://docs.adyen.com/api-explorer/#/Payout/v51/overview): Endpoints for sending funds to your customers. Current supported version: **v51**