Built files from Bizgaze WebServer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

couponmanager.js 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
  2. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  3. return new (P || (P = Promise))(function (resolve, reject) {
  4. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  5. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  6. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  7. step((generator = generator.apply(thisArg, _arguments || [])).next());
  8. });
  9. };
  10. var Unibase;
  11. (function (Unibase) {
  12. let Apps;
  13. (function (Apps) {
  14. let Transact;
  15. (function (Transact) {
  16. let Managers;
  17. (function (Managers) {
  18. class CouponManager extends Unibase.Platform.Core.BaseManager {
  19. couponDelete(couponid) {
  20. return __awaiter(this, void 0, void 0, function* () {
  21. const url = 'apis/v4/unibase/transact/coupons/deletecoupon/couponid/' + couponid;
  22. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  23. if (response.result != null) {
  24. response.result = JSON.parse(response.result);
  25. }
  26. return response;
  27. });
  28. });
  29. }
  30. static Instance() {
  31. if (this.instance === undefined) {
  32. this.instance = new CouponManager();
  33. }
  34. return this.instance;
  35. }
  36. }
  37. Managers.CouponManager = CouponManager;
  38. })(Managers = Transact.Managers || (Transact.Managers = {}));
  39. })(Transact = Apps.Transact || (Apps.Transact = {}));
  40. })(Apps = Unibase.Apps || (Unibase.Apps = {}));
  41. })(Unibase || (Unibase = {}));