/// <inheritdoc /> public async Task <IEnumerable <long> > PostPriorMoveIn(MoveInRequest request, long bp, string jwt) { var mcfMoveInRequest = new CreateMoveInRequest() { AccountID = bp.ToString(), CustomerRole = "", ProcessType = "PRIOR", ContractItemNav = await CreateContractItemNavList(request), ProdAttributes = new List <ProdAttribute>() }; var response = _mcfClient.PostMoveIn(mcfMoveInRequest, jwt); var newContractAccounts = response.ContractItemNav.Results.Select(item => long.Parse(item.BusinessAgreementID)).ToList(); return(newContractAccounts); }
/// <inheritdoc /> public async Task <CleanMoveInResponse> PostCleanMoveIn(CleanMoveInRequest request, string jwt) { var bpId = ParseBpFromString(request.tenantBPId); // var addressInfoResponse = await _customerLogic.GetMailingAddressesAsync(bpId, true, jwt); var addressInfo = addressInfoResponse.FirstOrDefault(); var accountRequest = new CreateAccountRequest() { Description = "New Move In" }; var accountResponse = await _accountApi.PostCreateContractAccount(accountRequest); var mcfMoveInRequest = new CreateMoveInRequest() { AccountID = request.tenantBPId, CustomerRole = "", ProcessType = "", ContractItemNav = await CreateCleanMoveInContractItemNavList(request, accountResponse.ContractAccountId.ToString()), ProdAttributes = CreateProdAttributeList(request.ProductEnrollments) }; var response = _mcfClient.PostMoveIn(mcfMoveInRequest, jwt); var depositByContractId = response.ContractItemNav.Results.ToDictionary(contractItem => contractItem.ContractID, contractItem => contractItem.SecDepositAmt); var notificationNumberByContractId = response.ContractItemNav.Results.ToDictionary( contractItem => contractItem.ContractID, contractItem => contractItem.NotificationNumber); var moveInResponse = new CleanMoveInResponse() { DepositsByContractId = depositByContractId, NotificationNumberByContractId = notificationNumberByContractId }; return(moveInResponse); }