{"size": 607, "ext": "js", "max_stars_repo_path": "src/app/services/Generatecoupon.js", "max_stars_repo_name": "pinalmdave/refer99_admin", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/app/services/Generatecoupon.js", "max_issues_repo_name": "pinalmdave/refer99_admin", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/app/services/Generatecoupon.js", "max_forks_repo_name": "pinalmdave/refer99_admin", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.5806451613, "max_line_length": 61, "alphanum_fraction": 0.5420098847}
(function() {
  'use strict';

  angular
    .module('angularSeedApp')
    .service('Generatecoupon', Generatecoupon);

  /** @ngInject */
  function Generatecoupon(Restangular, Storage, $rootScope) {
    var thisVar = this;
    this.generateCoupon = function(data, next) {
      Restangular
       .one('coupons')
        .all('generate_camp_coupon')
        .post(data)
        .then(function(data) {
          // do on success
          return next(null, data.plain());
        }, function(error) {
          // do on failure
          return next(error, null);
        });
    };
    


    

  }

})();