public BalanceExtendedResponse BalanceExtended(BalanceExtendedRequest balanceExtendedRequest) { Log(Logger.LogMessageType.Info, "-> -------------------- Comienza la ejecución del método Sales.BalanceExtended", Logger.LoggingLevelType.Medium); LoginRequestInternal loginRequest = new LoginRequestInternal() { DeviceType = balanceExtendedRequest.Request.DeviceType, Password = balanceExtendedRequest.Request.Password, User = balanceExtendedRequest.Request.Username }; LoginResponseInternal loginResponse = AuthenticationProvider.LoginInternal(loginRequest); BalanceRequestInternal internalObject = new BalanceRequestInternal() { SessionID = loginResponse.SessionID, DeviceType = balanceExtendedRequest.Request.DeviceType }; BalanceResponseInternal internalResponse = BalanceProvider.BalanceInternal(internalObject); BalanceExtendedResponse response = new BalanceExtendedResponse(); BalanceExtendedResponseBody responseBody = new BalanceExtendedResponseBody() { ResponseCode = internalResponse.ResponseCode, ResponseMessage = internalResponse.ResponseMessage, TransactionID = internalResponse.TransactionID, Balance = internalResponse.StockBalance }; response.Response = responseBody; Log(Logger.LogMessageType.Info, "-> -------------------- Termina la ejecución del método Sales.BalanceExtended", Logger.LoggingLevelType.Medium); return(response); }
public BalanceResponse Balance(BalanceRequest externalRequest) { Log(Logger.LogMessageType.Info, "-> -------------------- Comienza la ejecución del método Sales.Balance", Logger.LoggingLevelType.Medium); BalanceRequestInternal internalRequest = new BalanceRequestInternal() { SessionID = externalRequest.Request.SessionID, DeviceType = externalRequest.Request.DeviceType }; BalanceResponseInternal internalResponse = BalanceProvider.BalanceInternal(internalRequest); BalanceResponse externalResponse = new BalanceResponse(); BalanceResponseBody externalResponseBody = new BalanceResponseBody() { ResponseCode = internalResponse.ResponseCode, ResponseMessage = internalResponse.ResponseMessage, TransactionID = internalResponse.TransactionID, Balance = internalResponse.StockBalance }; externalResponse.Response = externalResponseBody; Log(Logger.LogMessageType.Info, "-> -------------------- Termina la ejecución del método Sales.Balance", Logger.LoggingLevelType.Medium); return(externalResponse); }