public void EditDeliveryAddressForAPI(DeliveryAddressView deliveryAddressView, string customerID) { DeliveryAddressModifyRequest request = new DeliveryAddressModifyRequest(); request.Address = deliveryAddressView; request.CustomerIdentityToken = customerID; _customerService.ModifyDeliveryAddress(request); }
public void EditDeliveryAddress(string customerId) { Task <string> content = this.Request.Content.ReadAsStringAsync(); DeliveryAddressView deliveryAddressView = JsonConvert.DeserializeObject <DeliveryAddressView>(content.Result); this.customerController.EditDeliveryAddressForAPI(deliveryAddressView, customerId); return; }
private void UpdateDeliveryAddressFrom(DeliveryAddressView deliveryAddressSource, DeliveryAddress deliveryAddressToUpdate) { deliveryAddressToUpdate.Name = deliveryAddressSource.Name; deliveryAddressToUpdate.AddressLine1 = deliveryAddressSource.AddressLine1; deliveryAddressToUpdate.AddressLine2 = deliveryAddressSource.AddressLine2; deliveryAddressToUpdate.City = deliveryAddressSource.City; deliveryAddressToUpdate.State = deliveryAddressSource.State; deliveryAddressToUpdate.Country = deliveryAddressSource.Country; deliveryAddressToUpdate.ZipCode = deliveryAddressSource.ZipCode; }
private void UpdateDeliveryAddressFrom(DeliveryAddressView deliveryAddressSource, DeliveryAddress deliveryAddressToUpdate) { deliveryAddressToUpdate.Name = deliveryAddressSource.Name; deliveryAddressToUpdate.AddressLine = deliveryAddressSource.AddressLine; deliveryAddressToUpdate.City = deliveryAddressSource.City; deliveryAddressToUpdate.State = deliveryAddressSource.State; deliveryAddressToUpdate.Country = deliveryAddressSource.Country; deliveryAddressToUpdate.ZipCode = deliveryAddressSource.ZipCode; deliveryAddressToUpdate.ThrowExceptionIfInvalid(); }
public async Task <IActionResult> AddDeliveryAddress(DeliveryAddressView deliveryAddressView) { DeliveryAddressAddRequest request = new DeliveryAddressAddRequest(); request.Address = deliveryAddressView; request.CustomerEmail = _cookieAuthentication.GetAuthenticationToken(); _customerService.AddDeliveryAddress(request); return(await DeliveryAddresses()); }
public ActionResult AddDeliveryAddress(DeliveryAddressView deliveryAddressView) { DeliveryAddressAddRequest request = new DeliveryAddressAddRequest(); request.Address = deliveryAddressView; request.CustomerIdentityToken = _formsAuthentication.GetAuthenticationToken(); _customerService.AddDeliveryAddress(request); return(DeliveryAddresses()); }
public ActionResult AddDeliveryAddress(DeliveryAddressView deliveryAddressView) { var request = new DeliveryAddressAddRequest(); request.Address = deliveryAddressView; request.CustomerIdentityToken = _formsAuthentication.GetAuthenticationToken(HttpContext.User); _customerService.AddDeliveryAddress(request); return(Checkout().Result); }
public ActionResult EditDeliveryAddress(DeliveryAddressView deliveryAddressView) { var request = new DeliveryAddressModifyRequest(); request.Address = deliveryAddressView; request.CustomerIdentityToken = _formsAuthentication.GetAuthenticationToken(HttpContext.User); _customerService.ModifyDeliveryAddress(request); return(DeliveryAddresses().Result); }
private Address ConvertToAddress(DeliveryAddressView deliveryAddressSource) { var newAddress = new Address(deliveryAddressSource.AddressAddressLine1, deliveryAddressSource.AddressAddressLine2, deliveryAddressSource.AddressCity, deliveryAddressSource.AddressState, deliveryAddressSource.AddressCountry, deliveryAddressSource.AddressZipCode); return(newAddress); }
public IActionResult AddDeliveryAddress() { DeliveryAddressView deliveryAddressView = new DeliveryAddressView(); return(View("AddDeliveryAddress", deliveryAddressView)); }