Exemple #1
0
        public async Task <dto.GetOrganizationResponse> GetAgency(dto.GetOrganizationRequestData requestData)
        {
            var signature = !string.IsNullOrEmpty(await _sessionBag.Signature())
                    ? await _sessionBag.Signature()
                    : await _userSessionService.GetAnonymousSharedSignature();

            GetOrganizationResponse response = await _agentClient.GetOrganizationAsync(new GetOrganizationRequest
            {
                ContractVersion        = _navApiContractVer,
                MessageContractVersion = _navMsgContractVer,
                Signature = signature,
                EnableExceptionStackTrace = false,
                GetOrganizationReqData    = new GetOrganizationRequestData
                {
                    OrganizationCode = requestData.OrganizationCode.ToUpper()
                }
            });

            return(new dto.GetOrganizationResponse
            {
                Organization = Mapper.Map <dto.Organization>(response.Organization)
            });
        }