Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CardPaymentRequest" /> class.
        /// </summary>
        /// <param name="context">context (required).</param>
        /// <param name="options">options.</param>
        /// <param name="order">order (required).</param>
        /// <param name="card">card.</param>
        /// <param name="storedCard">storedCard.</param>
        /// <param name="validationMode">validationMode.</param>
        /// <param name="notificationUrl">Url for the notification of the payment.</param>
        public CardPaymentRequest(CardPaymentContextData context = default(CardPaymentContextData), Options options = default(Options), Order order = default(Order), CardData card = default(CardData), StoredCard storedCard = default(StoredCard), ValidationModeOverride validationMode = default(ValidationModeOverride), string notificationUrl = default(string))
        {
            // to ensure "context" is required (not null)
            if (context == null)
            {
                throw new InvalidDataException("context is a required property for CardPaymentRequest and cannot be null");
            }
            else
            {
                this.Context = context;
            }

            // to ensure "order" is required (not null)
            if (order == null)
            {
                throw new InvalidDataException("order is a required property for CardPaymentRequest and cannot be null");
            }
            else
            {
                this.Order = order;
            }

            this.Options         = options;
            this.Card            = card;
            this.StoredCard      = storedCard;
            this.ValidationMode  = validationMode;
            this.NotificationUrl = notificationUrl;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="Card3DsAuthorizeWithAuthDataRequest" /> class.
        /// </summary>
        /// <param name="context">context (required).</param>
        /// <param name="options">options.</param>
        /// <param name="order">order (required).</param>
        /// <param name="authenticationData">All authentication data, as a dictionary of multiple key/value pairs. (required).</param>
        /// <param name="validationMode">validationMode.</param>
        /// <param name="notificationUrl">Url for the notification of the payment.</param>
        public Card3DsAuthorizeWithAuthDataRequest(CardPaymentContextData context = default(CardPaymentContextData), Options options = default(Options), Order order = default(Order), Dictionary <string, string> authenticationData = default(Dictionary <string, string>), ValidationModeOverride validationMode = default(ValidationModeOverride), string notificationUrl = default(string))
        {
            // to ensure "context" is required (not null)
            if (context == null)
            {
                throw new InvalidDataException("context is a required property for Card3DsAuthorizeWithAuthDataRequest and cannot be null");
            }
            else
            {
                this.Context = context;
            }

            // to ensure "order" is required (not null)
            if (order == null)
            {
                throw new InvalidDataException("order is a required property for Card3DsAuthorizeWithAuthDataRequest and cannot be null");
            }
            else
            {
                this.Order = order;
            }

            // to ensure "authenticationData" is required (not null)
            if (authenticationData == null)
            {
                throw new InvalidDataException("authenticationData is a required property for Card3DsAuthorizeWithAuthDataRequest and cannot be null");
            }
            else
            {
                this.AuthenticationData = authenticationData;
            }

            this.Options         = options;
            this.ValidationMode  = validationMode;
            this.NotificationUrl = notificationUrl;
        }