public static async Task RunAutoUpdateById(string id) { try { await ShipmentEntity.ValidateId(id); var shipment = await ShipmentUseCases.Get.ById(id); await ShipmentUseCases.UpdateShipmentWithBoundry(shipment); } catch (Exception e) { throw; } }
public static async Task CreateNewShipment(NewShipmentRequest request) { try { var package = PackageFactory.CreatePackage(request.PackageData); await PackageEntity.ValidateNew(package); var shipment = ShipmentFactory.CreateShipment(request); await ShipmentEntity.ValidateNew(shipment); await PackageUseCases.RegisterPackage.Execute(package); await ShipmentUseCases.RegisterShipment.Execute(shipment); await ShipmentUseCases.Set.PackageId(shipment.Id.ToString(), package.Id.ToString()); await ShipmentUseCases.UpdateShipmentWithBoundry(shipment); } catch (Exception e) { throw; } }
private async Task Update(Shipment shipment) { await ShipmentUseCases.UpdateShipmentWithBoundry(shipment); }