コード例 #1
0
        public async Task <ActionResult <ApiResponse <ShippingMethod> > > Update(string shippingMethodId, ShippingMethod shippingMethod)
        {
            try
            {
                var updatedShippingMethod = await _shippingMethodService.UpdateById(shippingMethodId, shippingMethod);

                return(updatedShippingMethod.CreateSuccessResponse("Shipping method updated successfully!"));
            }
            catch (Exception exception)
            {
                return(BadRequest(exception.CreateErrorResponse()));
            }
        }