Beispiel #1
0
        public CollectionModel GetStoredBalanceSetsList([FromUri] string accountsChartUID)
        {
            using (var usecases = BalanceStorageUseCases.UseCaseInteractor()) {
                FixedList <StoredBalanceSetDto> list = usecases.BalanceSetsList(accountsChartUID);

                return(new CollectionModel(this.Request, list));
            }
        }
Beispiel #2
0
        public SingleObjectModel CalculateStoredBalanceSet([FromUri] string accountsChartUID,
                                                           [FromUri] string balanceSetUID)
        {
            using (var usecases = BalanceStorageUseCases.UseCaseInteractor()) {
                StoredBalanceSetDto balanceSet = usecases.CalculateBalanceSet(accountsChartUID, balanceSetUID);

                return(new SingleObjectModel(this.Request, balanceSet));
            }
        }
Beispiel #3
0
        public SingleObjectModel CreateOrGetStoredBalanceSet([FromUri] string accountsChartUID,
                                                             [FromBody] BalanceStorageCommand command)
        {
            base.RequireBody(command);

            using (var usecases = BalanceStorageUseCases.UseCaseInteractor()) {
                StoredBalanceSetDto balanceSet = usecases.CreateOrGetBalanceSet(accountsChartUID, command);

                return(new SingleObjectModel(this.Request, balanceSet));
            }
        }
Beispiel #4
0
        public BalanceStorageUseCasesTests()
        {
            CommonMethods.Authenticate();

            _usecases = BalanceStorageUseCases.UseCaseInteractor();
        }