keyValueConfiguration.svc .js 1.63 KB
Newer Older
eddie.woo's avatar
eddie.woo committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
// web service proxy for standard account
webservices.factory('KeyValueConfigService', ['$http', 'apiConfig', 'httpCacheService', function ($http, apiConfig, httpCacheService) {
    'use strict';
    return {
        getAll: function () {
            return $http.get('/keyValueConfig', apiConfig.create());
        },
        getFinacialReference: function (id) {
            return $http.get('/keyValueConfig/getFinacialReference/'+id, apiConfig.create());
        },
        getTaxReference: function (id) {
            return $http.get('/keyValueConfig/getTaxReference/'+id, apiConfig.create());
        },
        getModelReference: function (id) {
            return $http.get('/keyValueConfig/getModelReference/'+id, apiConfig.create());
        },
        remove: function (id) {
            return $http.delete('/keyValueConfig?keyValueID=' + id, apiConfig.create());
        },
        addNewKeyValueConifg: function (newKeyValueConfig) {
            return $http.post('/keyValueConfig/add', newKeyValueConfig, apiConfig.create());
        },
        updateNewKeyValueConifg: function (updatedKeyValueConfig) {
            return $http.post('/keyValueConfig/update', updatedKeyValueConfig, apiConfig.create());
        },
        getByOrgID: function (id) {
            return $http.get('/keyValueConfig/getByOrgID/' + id, apiConfig.create());
        },
        mappingDataSource: function (formula) {
            return $http.get('/keyValueConfig/mappingDataSource/' + formula, apiConfig.create());
        },
        getAllDataSource: function () {
            return $http.get('/keyValueConfig/dataSource', apiConfig.create());
        }
    };
}]);