public StopSubscriptionResponseDto StopSubscription(StoppedSubscriptionParametersDto parameters) { var responseBuilder = _responseBuildersFactory.ForStopSubscriptionResponse(); var subscriptionStopCommand = _commandFactory.CreateFrom(parameters, responseBuilder); subscriptionStopCommand.Invoke(); return(responseBuilder.Build()); }
public Command CreateFrom(StoppedSubscriptionParametersDto parameters, SubscriptionStopResponseBuilder responseBuilder) { return (new ExceptionLoggedCommand(_log, new AdapterFromSubscriptionCommandToCommand( new SubscriptionStopCommandFromApi( parameters, responseBuilder, _subscriptions, _dataCorrectnessCriteria, _authorizationStructure)))); }
public SubscriptionStopCommandFromApi( StoppedSubscriptionParametersDto parameters, SubscriptionStopResponseBuilder responseBuilder, SubscriptionsModifyOperations subscriptions, SubscriptionDataCorrectnessCriteria correctnessCriteria, UserAuthorization userAuthorization) { _parameters = parameters; _responseBuilder = responseBuilder; _subscriptions = subscriptions; _correctnessCriteria = correctnessCriteria; _userAuthorization = userAuthorization; }