예제 #1
0
        public ContactCreateClientResponse CreateContact(ContactCreateClientRequest request)
        {
            var payLoad = new ContactCreateWebServiceRequest(request);
            var backup  = new BackupLogEntry(payLoad, nameof(CreateContact));

            LogRequest(payLoad, nameof(CreateContact));
            var result = ExecuteCall <ContactCreateWebServiceResponse>(_erpRestSettings.BaseUrl, _erpRestSettings.GetContactCreateRequest, payLoad);

            backup.AddResponse(result);
            _repository.InsertOne(backup);
            LogResponse(result);
            return(result.ToResponse());
        }
예제 #2
0
        public ActionResult <ContactCreateClientResponse> Partners([FromBody] ContactCreateClientRequest payload)
        {
            payload.SalesAreaInfo = new SalesArea(payload.SalesOrg);
            var phone = new PhoneNumber {
                Number = payload.PhoneNumber, Qualifier = "DayPhone"
            };

            payload.PhoneNumbers = new List <PhoneNumber> {
                phone
            };

            ContactCreateClientResponse createContentResponse = _accountService.CreateContact(payload);

            if (createContentResponse == null)
            {
                Log(InfoMessage.ERROR_MSG_UNABLE_TO_GET_CREATE_CONTENT_RESPONSE);
                return(NotFound(InfoMessage.ERROR_MSG_UNABLE_TO_GET_CREATE_CONTENT_RESPONSE));
            }

            return(Ok(createContentResponse));
        }
예제 #3
0
 public ContactCreateClientResponse CreateContact(ContactCreateClientRequest request)
 {
     return(_erpRestGateway.CreateContact(request));
 }
 public ContactCreateWebServiceRequest(ContactCreateClientRequest clientRequest)
 {
     ContactCreateRequest = new ContactCreateRequest(clientRequest);
 }
예제 #5
0
 /// <summary>
 /// This method takes a client partner request model and converts, makes calls and converts response
 /// back to client side model
 /// </summary>
 /// <param name="partnerRequest"></param>
 /// <returns></returns>
 public ContactCreateClientResponse CreateContact(ContactCreateClientRequest contactCreateRequest)
 {
     return(_webMethodClient.CreateContact(contactCreateRequest));
 }