public IHttpActionResult FeeLookup(FeeLookupRequest req) { req.MgiSessionType = SessionType.SEND; var resp = _commonBusiness.FeeLookup(req); return(Ok(resp)); }
public AcApiResponse <FeeLookupResponse, ApiData> FeeLookup(FeeLookupRequest req) { // If Transactional limit is exceeded, throw an exception var transactionalLimits = AuthIntegration.GetTransactionalLimits(); decimal?limit = null; switch (req.MgiSessionType) { case SessionType.SEND: limit = transactionalLimits.MaxSendAmount; break; case SessionType.BP: limit = transactionalLimits.MaxBillPayAmount; break; } if (limit != null && req.Item > limit) { throw new TransactionalLimitsException(); } // AgentConnect FeeLookup call for SEND var resp = agentConnectIntegration.FeeLookup(req); var apiResp = new AcApiResponse <FeeLookupResponse, ApiData> { BusinessMetadata = MapperHelper.SetResponseProperties(resp.Payload?.Flags, DataSource.AgentConnect), ResponseData = resp }; return(apiResp); }
public IHttpActionResult FeeLookup([FromBody] FeeLookupRequest req) { req.MgiSessionType = SessionType.BP; req.ProductVariant = req.ProductVariant ?? ProductVariantType.EP; var resp = _commonBusiness.FeeLookup(req); return(Ok(resp)); }
public FeeLookupResponse FeeLookup(FeeLookupRequest feeLookupRequest) { var agent = AuthIntegration.GetAgent(); var response = _agentConnect.FeeLookup(agent, feeLookupRequest); CheckFlagsForDataChange(response.Payload?.Flags, agent); return(response); }
public FeeLookupResponse FeeLookup(FeeLookupRequest req) { var agent = _agents.GetAgent(req.AgentID, req.AgentSequence); _agentConnectConfig.DecorateRequest(req); var response = _testRunner.AgentConnect.FeeLookup(agent, req); return(response); }
public virtual async Task <FeeLookupResponse> FeeLookupAsync(Agent agent, FeeLookupRequest feeLookupRequest) { return(await AgentConnect.FeeLookupAsync(agent, feeLookupRequest)); }
public virtual FeeLookupResponse FeeLookup(Agent agent, FeeLookupRequest feeLookupRequest) { return(AgentConnect.FeeLookup(agent, feeLookupRequest)); }
public void Set(FeeLookupRequest feeLookupRequest) { FeeLookupReq = feeLookupRequest; SetExecutionOrder(nameof(FeeLookupReq)); }
public static SendValidationRequest FromFeeLookupRequest(this SendValidationRequest sendValReq, FeeLookupRequest feeLookupRequest, List <string> requestedInfoKeys) { if (!requestedInfoKeys.Any() || !requestedInfoKeys.Contains("destination_Country_SubdivisionCode")) { return(sendValReq); } // Check if it exists, dont want to keep re-adding on each subsequent request. if (sendValReq.FieldValues.Any(x => x.InfoKey == "destination_Country_SubdivisionCode")) { return(sendValReq); } if (string.IsNullOrWhiteSpace(feeLookupRequest.DestinationCountrySubdivisionCode)) { return(sendValReq); } // Explicitly added sendValReq.FieldValues.Add(new KeyValuePairType { InfoKey = "destination_Country_SubdivisionCode", Value = feeLookupRequest.DestinationCountrySubdivisionCode }); return(sendValReq); }