/// <summary> /// Initializes a new instance of the <see cref="Body20" /> class. /// </summary> /// <param name="billingAddress">billingAddress (required).</param> /// <param name="bin">bin (required).</param> /// <param name="cardholderName">cardholderName (required).</param> /// <param name="expiryMonth">expiryMonth (required).</param> /// <param name="expiryYear">expiryYear (required).</param> /// <param name="issuer">issuer (required).</param> /// <param name="lastFour">lastFour (required).</param> /// <param name="threeDSecure">threeDSecure (required).</param> /// <param name="token">token (required).</param> public Body20(MethodAddress1 billingAddress = default(MethodAddress1), string bin = default(string), string cardholderName = default(string), ExpiryMonthEnum expiryMonth = default(ExpiryMonthEnum), ExpiryYearEnum expiryYear = default(ExpiryYearEnum), IssuerEnum issuer = default(IssuerEnum), string lastFour = default(string), bool?threeDSecure = default(bool?), string token = default(string)) { // to ensure "billingAddress" is required (not null) if (billingAddress == null) { throw new InvalidDataException("billingAddress is a required property for Body20 and cannot be null"); } else { this.BillingAddress = billingAddress; } // to ensure "bin" is required (not null) if (bin == null) { throw new InvalidDataException("bin is a required property for Body20 and cannot be null"); } else { this.Bin = bin; } // to ensure "cardholderName" is required (not null) if (cardholderName == null) { throw new InvalidDataException("cardholderName is a required property for Body20 and cannot be null"); } else { this.CardholderName = cardholderName; } // to ensure "expiryMonth" is required (not null) if (expiryMonth == null) { throw new InvalidDataException("expiryMonth is a required property for Body20 and cannot be null"); } else { this.ExpiryMonth = expiryMonth; } // to ensure "expiryYear" is required (not null) if (expiryYear == null) { throw new InvalidDataException("expiryYear is a required property for Body20 and cannot be null"); } else { this.ExpiryYear = expiryYear; } // to ensure "issuer" is required (not null) if (issuer == null) { throw new InvalidDataException("issuer is a required property for Body20 and cannot be null"); } else { this.Issuer = issuer; } // to ensure "lastFour" is required (not null) if (lastFour == null) { throw new InvalidDataException("lastFour is a required property for Body20 and cannot be null"); } else { this.LastFour = lastFour; } // to ensure "threeDSecure" is required (not null) if (threeDSecure == null) { throw new InvalidDataException("threeDSecure is a required property for Body20 and cannot be null"); } else { this.ThreeDSecure = threeDSecure; } // to ensure "token" is required (not null) if (token == null) { throw new InvalidDataException("token is a required property for Body20 and cannot be null"); } else { this.Token = token; } }
/// <summary> /// Initializes a new instance of the <see cref="WorldpayRegistrationIdDepositRequest" /> class. /// </summary> /// <param name="amount">amount (required).</param> /// <param name="billingAddress">billingAddress (required).</param> /// <param name="bin">bin (required).</param> /// <param name="cardholderName">cardholderName (required).</param> /// <param name="expiryMonth">expiryMonth (required).</param> /// <param name="expiryYear">expiryYear (required).</param> /// <param name="issuer">issuer (required).</param> /// <param name="lastFour">lastFour (required).</param> /// <param name="orderId">orderId (required).</param> /// <param name="registrationId">registrationId (required).</param> public WorldpayRegistrationIdDepositRequest(string amount = default(string), MethodAddress1 billingAddress = default(MethodAddress1), string bin = default(string), string cardholderName = default(string), ExpiryMonthEnum expiryMonth = default(ExpiryMonthEnum), ExpiryYearEnum expiryYear = default(ExpiryYearEnum), IssuerEnum issuer = default(IssuerEnum), string lastFour = default(string), string orderId = default(string), string registrationId = default(string)) { // to ensure "amount" is required (not null) if (amount == null) { throw new InvalidDataException("amount is a required property for WorldpayRegistrationIdDepositRequest and cannot be null"); } else { this.Amount = amount; } // to ensure "billingAddress" is required (not null) if (billingAddress == null) { throw new InvalidDataException("billingAddress is a required property for WorldpayRegistrationIdDepositRequest and cannot be null"); } else { this.BillingAddress = billingAddress; } // to ensure "bin" is required (not null) if (bin == null) { throw new InvalidDataException("bin is a required property for WorldpayRegistrationIdDepositRequest and cannot be null"); } else { this.Bin = bin; } // to ensure "cardholderName" is required (not null) if (cardholderName == null) { throw new InvalidDataException("cardholderName is a required property for WorldpayRegistrationIdDepositRequest and cannot be null"); } else { this.CardholderName = cardholderName; } // to ensure "expiryMonth" is required (not null) if (expiryMonth == null) { throw new InvalidDataException("expiryMonth is a required property for WorldpayRegistrationIdDepositRequest and cannot be null"); } else { this.ExpiryMonth = expiryMonth; } // to ensure "expiryYear" is required (not null) if (expiryYear == null) { throw new InvalidDataException("expiryYear is a required property for WorldpayRegistrationIdDepositRequest and cannot be null"); } else { this.ExpiryYear = expiryYear; } // to ensure "issuer" is required (not null) if (issuer == null) { throw new InvalidDataException("issuer is a required property for WorldpayRegistrationIdDepositRequest and cannot be null"); } else { this.Issuer = issuer; } // to ensure "lastFour" is required (not null) if (lastFour == null) { throw new InvalidDataException("lastFour is a required property for WorldpayRegistrationIdDepositRequest and cannot be null"); } else { this.LastFour = lastFour; } // to ensure "orderId" is required (not null) if (orderId == null) { throw new InvalidDataException("orderId is a required property for WorldpayRegistrationIdDepositRequest and cannot be null"); } else { this.OrderId = orderId; } // to ensure "registrationId" is required (not null) if (registrationId == null) { throw new InvalidDataException("registrationId is a required property for WorldpayRegistrationIdDepositRequest and cannot be null"); } else { this.RegistrationId = registrationId; } }