예제 #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;
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CardPaymentResponse" /> class.
 /// </summary>
 /// <param name="merchantAccountRef">The merchant account reference of the payment.</param>
 /// <param name="responseCode">The response code of the service.</param>
 /// <param name="complementaryResponseCode">The complementary code for more details.</param>
 /// <param name="schedules">All schedules data.</param>
 /// <param name="storedCard">storedCard.</param>
 /// <param name="responseMessage">The global response message.</param>
 public CardPaymentResponse(string merchantAccountRef = default(string), ResponseCodeEnum?responseCode = default(ResponseCodeEnum?), ComplementaryResponseCodeEnum?complementaryResponseCode = default(ComplementaryResponseCodeEnum?), List <ScheduleLight> schedules = default(List <ScheduleLight>), StoredCard storedCard = default(StoredCard), string responseMessage = default(string))
 {
     this.MerchantAccountRef        = merchantAccountRef;
     this.ResponseCode              = responseCode;
     this.ComplementaryResponseCode = complementaryResponseCode;
     this.Schedules       = schedules;
     this.StoredCard      = storedCard;
     this.ResponseMessage = responseMessage;
 }