public override int GetHashCode() { unchecked { var hashCode = Id.GetHashCode(); hashCode = (hashCode * 397) ^ (TransactionId != null ? TransactionId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ChargeStatus != null ? ChargeStatus.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PaymentProcessor != null ? PaymentProcessor.GetHashCode() : 0); hashCode = (hashCode * 397) ^ AddressIsActive.GetHashCode(); hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Type != null ? Type.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ChargeId.GetHashCode(); hashCode = (hashCode * 397) ^ AddressId.GetHashCode(); hashCode = (hashCode * 397) ^ (ShopifyId != null ? ShopifyId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ShopifyOrderId != null ? ShopifyOrderId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ShopifyOrderNumber.GetHashCode(); hashCode = (hashCode * 397) ^ (ShopifyCartToken != null ? ShopifyCartToken.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ShippingDate.GetHashCode(); hashCode = (hashCode * 397) ^ ScheduledAt.GetHashCode(); hashCode = (hashCode * 397) ^ ShippedDate.GetHashCode(); hashCode = (hashCode * 397) ^ ProcessedAt.GetHashCode(); hashCode = (hashCode * 397) ^ CustomerId.GetHashCode(); hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Hash != null ? Hash.GetHashCode() : 0); hashCode = (hashCode * 397) ^ IsPrepaid.GetHashCode(); hashCode = (hashCode * 397) ^ CreatedAt.GetHashCode(); hashCode = (hashCode * 397) ^ UpdatedAt.GetHashCode(); hashCode = (hashCode * 397) ^ (Email != null ? Email.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TotalPrice != null ? TotalPrice.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ShippingAddress != null ? ShippingAddress.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BillingAddress != null ? BillingAddress.GetHashCode() : 0); return(hashCode); } }
public GeneralResponse ChangeCharedStatus(ChargeStatus chargStatus, Guid fiscalID, Guid ModifiedEmployeeID) { GeneralResponse response = new GeneralResponse(); try { Fiscal fiscal = new Fiscal(); fiscal = _fiscalRepository.FindBy(fiscalID); fiscal.ChargeStatus = chargStatus; fiscal.ModifiedDate = PersianDateTime.Now; fiscal.ModifiedEmployee = _employeeRepository.FindBy(ModifiedEmployeeID); _fiscalRepository.Save(fiscal); _uow.Commit(); } catch (Exception ex) { response.ErrorMessages.Add(ex.Message); if (ex.InnerException != null) { response.ErrorMessages.Add(ex.InnerException.Message); } } return(response); }
public override bool CheckCond(GameEvent gameEvent) { ChargeStatus me = this.gameObject.GetComponent <ChargeStatus>(); ChargeStatus other = gameEvent.GetGameData <GameObject>().GetComponent <ChargeStatus>(); if (me != null && other != null) { if (!other.IsActive() || (me.IsActive() && other.GetTurnNumber() <= me.GetTurnNumber())) { return(true); } } return(false); }
public Charge(PaymentRange paymentRange, ChargeStatus status) { PaymentRange = (int)paymentRange; Status = ((int)status).ToString(); }
public Charge(ChargeStatus status) { Status = ((int)status).ToString(); }
public ChargeRecoveryState(GameEventListenerId listenerId) : base(listenerId) { this.chargeStatus = this.gameObject.GetComponent <ChargeStatus>(); this.chargeInActiveTimer = 2; }
public async Task Charge_Written_To_Db_With_Bank_Status(bool bankReturnStatus, ChargeStatus expectedStatus) { // Arrange var s = "bankChargeId"; _bank.Setup(o => o.TrySendAsync(It.IsAny <AcquiringBankRequest>(), out s)).ReturnsAsync(bankReturnStatus); var request = new CreateChargeRequest { IdempotentKey = "111", Amount = 1.0m, Currency = "USD", Description = null, CardNumber = "1234567890123452", Cvv = "111", ExpiryMonth = 1, ExpiryYear = 2020 }; var serialized = JsonSerializer.Serialize(request); using var content = new StringContent(serialized, Encoding.UTF8, "application/json"); // Act using var response = await _client.PostAsync("api/charges", content); // Assert Assert.IsNotNull(response); Assert.AreEqual(HttpStatusCode.Created, response.StatusCode); using var responseStream = await response.Content.ReadAsStreamAsync(); var responseCharge = await JsonSerializer.DeserializeAsync <GetChargeResponse>(responseStream); var dbCharge = await _db.Charges.FindAsync(responseCharge.Id); Assert.IsNotNull(dbCharge); Assert.AreEqual(request.IdempotentKey, dbCharge.IdempotentKey); Assert.AreEqual(request.Amount, dbCharge.Amount); Assert.AreEqual(request.Currency, dbCharge.Currency); Assert.AreEqual(request.Description, dbCharge.Description); Assert.AreEqual(request.CardNumber, dbCharge.CardNumber); Assert.AreEqual(request.Cvv, dbCharge.Cvv); Assert.AreEqual(request.ExpiryMonth, dbCharge.ExpiryMonth); Assert.AreEqual(request.ExpiryYear, dbCharge.ExpiryYear); Assert.AreEqual(expectedStatus, dbCharge.Status); Assert.AreEqual(s, dbCharge.BankChargeId); }
public CollisionLossState(GameEventListenerId listenerId) : base(listenerId) { this.player = this.gameObject.GetComponent <Player>(); this.chargeStatus = this.gameObject.GetComponent <ChargeStatus>(); }
public DashState(GameEventListenerId listenerId) : base(listenerId) { this.player = this.gameObject.GetComponent <Player>(); this.chargeStatus = this.gameObject.GetComponent <ChargeStatus>(); this.timer1 = GameSystem.GetGameData <Settings>("Settings").GetSetting("dashTimer"); }