(function () {
    "use strict";

    angular.module('pos').factory('pinCodeService', factory);
    factory.$inject = ['$http', '$q'];

    function factory($http, $q) {

        var _ConsultaPinCode = function (args) {

            var deferred = $q.defer();
            $http.post('/PinCode/ConsultaPinCode', args)
                 .success(function (data) {
                     deferred.resolve(data);
                 })
                 .error(function (data, status, headers, config) {
                     deferred.reject(data);
                 });

            return deferred.promise;
        };
        return {
            ConsultaPinCode: _ConsultaPinCode
        };
    };



})();