/// <summary>
 /// Validates this request as much as possible prior to sending it to the Zip API.
 /// </summary>
 /// <exception cref="System.ArgumentNullException">Thrown if any required properties are null.</exception>
 /// <exception cref="System.ArgumentException">Thrown if any of request properties are invalid.</exception>
 public override void Validate()
 {
     MerchantRefundReference.GuardNullOrWhiteSpace(nameof(MerchantRefundReference));
     OrderId.GuardNullOrWhiteSpace(nameof(OrderId));
     Amount.GuardZeroOrNegative(nameof(Amount));
     Operator.GuardNullOrWhiteSpace(nameof(Operator));
     TerminalId.GuardNullOrWhiteSpace(nameof(TerminalId));
 }
示例#2
0
 /// <summary>
 /// Validates this request as much as possible prior to sending it to the Zip API.
 /// </summary>
 /// <exception cref="System.ArgumentNullException">Thrown if <see cref="Order"/> or any of it's required sub-properties are null.</exception>
 /// <exception cref="System.ArgumentException">Thrown if any of the sub-properties of <see cref="Order"/> are determined to be invalid.</exception>
 public override void Validate()
 {
     TerminalId.GuardNullOrWhiteSpace(nameof(TerminalId));
     Order.GuardNull(nameof(Order));
     Order.CustomerApprovalCode.GuardNullOrWhiteSpace(nameof(Order), nameof(Order.CustomerApprovalCode));
     Order.MerchantReference.GuardNullOrWhiteSpace(nameof(Order), nameof(Order.MerchantReference));
     Order.Operator.GuardNullOrWhiteSpace(nameof(Order), nameof(Order.Operator));
     Order.PaymentFlow.GuardNullOrWhiteSpace(nameof(Order), nameof(Order.PaymentFlow));
     Order.Amount.GuardZeroOrNegative(nameof(Order), nameof(Order.Amount));
 }