예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Transaction" /> class.
 /// </summary>
 /// <param name="amount">The amount.</param>
 /// <param name="wasTest">The was test.</param>
 /// <param name="succeeded">The succeeded.</param>
 /// <param name="token">The token.</param>
 /// <param name="obfuscatedNumber">The obfuscated number.</param>
 /// <param name="errors">The errors.</param>
 internal Transaction(string amount, string wasTest, string succeeded, string token, string obfuscatedNumber, TransactionErrors errors)
 {
     this.Amount = decimal.Parse(string.IsNullOrWhiteSpace(amount) ? "0" : amount, CultureInfo.InvariantCulture);
     this.WasTest = string.Equals(wasTest, "true", StringComparison.InvariantCultureIgnoreCase);
     this.Succeeded = string.Equals(succeeded, "true", StringComparison.InvariantCultureIgnoreCase);
     this.Token = token;
     this.ObfuscatedNumber = obfuscatedNumber;
     this.Errors = errors;
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Transaction" /> class.
 /// </summary>
 /// <param name="wasTest">The was test.</param>
 /// <param name="errors">The errors.</param>
 public Transaction(bool wasTest, TransactionErrors errors)
 {
     this.Succeeded = false;
     this.WasTest = wasTest;
     this.Errors = errors;
 }