Beispiel #1
0
        public EmbassyLetterResponse SendEmbassyLetter(EmbassyLetterRequest payload)
        {
            var    _client        = new RestActions(_contentRootPath);
            string url            = _configSettingManager.ArmBaseUrl + "/SelfService/EmbassyLetter";
            var    encryptedValue = new SecureCredentials();

            payload.ServiceUsername = encryptedValue.DecryptCredentials(_configSettingManager.ArmServiceUsername);
            payload.ServicePassword = encryptedValue.DecryptCredentials(_configSettingManager.ArmServicePassword);
            return(_client.CallRestAction <EmbassyLetterResponse, EmbassyLetterRequest>(payload, url));
        }
Beispiel #2
0
        public EmbassyLetterResponse SendEmbassyLetter(EmbassyLetterViewModel model,
                                                       AuthenticateResponse user)
        {
            var embassyLetter = new EmbassyLetterRequest
            {
                MembershipKey         = user.MembershipKey,
                FirstName             = user.FirstName,
                LastName              = user.LastName,
                PassPortNumber        = model.PassportNumber,
                AttentionName         = model.AttentionName,
                RecipientAddress      = model.RecipientAddress,
                AdditionalInstruction = model.AdditionalInstruction
            };

            var elResponse = _clientService.SendEmbassyLetter(embassyLetter);

            return(elResponse);
        }