public static InstallationCreateCommand FromResponse(GetInstallationsNearestResponse response)
 => InstallationCreateCommand.Create(
     response.Id,
     response.Airly,
     LocationAdapter.FromResponse(response),
     AddressAdapter.FromResponse(response.Address),
     SponsorAdapter.FromResponse(response.Sponsor));
Exemple #2
0
 public Either <InstallationError, InstallationDto> CreateInstallation(InstallationCreateCommand command)
 {
     return(TracedOperation.CallSync
            (
                _logger,
                InstallationOperationType.CreateInstallation,
                command,
                () => _repository.TrySave(command.ToDomain())
                .Map(InstallationDto.FromDomain)
                .ToEither(InstallationError.DuplicateExternalId(command.ExternalId))
            ));
 }
Exemple #3
0
 public Either <InstallationError, InstallationDto> CreateInstallation(InstallationCreateCommand command)
 => _RunIntegration(_installationCore.CreateInstallation(command));
 public Either <InstallationError, InstallationDto> CreateInstallation(InstallationCreateCommand command)
 => _core.CreateInstallation(command);