public void AddTransaction(ApiTransactionResponseModel item) { if (!this.Transactions.Any(x => x.Id == item.Id)) { this.Transactions.Add(item); } }
public virtual ApiTransactionRequestModel MapResponseToRequest( ApiTransactionResponseModel response) { var request = new ApiTransactionRequestModel(); request.SetProperties( response.Amount, response.GatewayConfirmationNumber, response.TransactionStatusId); return(request); }
public virtual ApiTransactionResponseModel MapRequestToResponse( int id, ApiTransactionRequestModel request) { var response = new ApiTransactionResponseModel(); response.SetProperties(id, request.Amount, request.GatewayConfirmationNumber, request.TransactionStatusId); return(response); }