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.

subscriptionmanager.js 42KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  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 Bizgaze;
  11. (function (Bizgaze) {
  12. let Apps;
  13. (function (Apps) {
  14. let Transact;
  15. (function (Transact) {
  16. let Managers;
  17. (function (Managers) {
  18. let Subscriptions;
  19. (function (Subscriptions) {
  20. class SubscriptionManager extends Unibase.Platform.Core.BaseManager {
  21. WithoutPurchaseAddonsItems(organizationid, itemid, tenureid) {
  22. return __awaiter(this, void 0, void 0, function* () {
  23. const url = 'apis/v4/bizgaze/transact/subscriptions/withoutpurchaseaddonitem/organizationid/' + organizationid + '/itemid/' + itemid + '/tenureid/' + tenureid;
  24. return yield this.dataHelper().getAsync(url).then(function (response) {
  25. if (response.result !== null)
  26. response.result = JSON.parse(response.result);
  27. return response;
  28. });
  29. });
  30. }
  31. getAddonsItems(itemid, tenureid) {
  32. return __awaiter(this, void 0, void 0, function* () {
  33. const url = 'apis/v4/bizgaze/transact/subscriptions/getaddonsitemsdata/itemid/' + itemid + '/tenureid/' + tenureid;
  34. return yield this.dataHelper().getAsync(url).then(function (response) {
  35. if (response.result !== null)
  36. response.result = JSON.parse(response.result);
  37. return response;
  38. });
  39. });
  40. }
  41. getOfferItems(itemid) {
  42. return __awaiter(this, void 0, void 0, function* () {
  43. const url = 'apis/v4/bizgaze/transact/subscriptions/getofferitems/itemid/' + itemid;
  44. return yield this.dataHelper().getAsync(url).then(function (response) {
  45. if (response.result !== null)
  46. response.result = JSON.parse(response.result);
  47. return response;
  48. });
  49. });
  50. }
  51. getPlanItem(token, mail) {
  52. return __awaiter(this, void 0, void 0, function* () {
  53. const url = 'apis/v4/bizgaze/transact/subscriptions/getplanitemslist/token/' + token + '/mail/' + mail;
  54. return yield this.dataHelper().getAsync(url).then(function (response) {
  55. if (response.result !== null)
  56. response.result = JSON.parse(response.result);
  57. return response;
  58. });
  59. });
  60. }
  61. createCustomer(postdata) {
  62. return __awaiter(this, void 0, void 0, function* () {
  63. const url = 'apis/v4/bizgaze/integrations/subscription/createcustomer';
  64. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  65. if (response.result !== null)
  66. response.result = JSON.parse(response.result);
  67. return response;
  68. });
  69. });
  70. }
  71. createInvoice(postdata) {
  72. return __awaiter(this, void 0, void 0, function* () {
  73. const url = 'apis/v4/bizgaze/transact/invoice/createinvoicefromorder';
  74. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  75. if (response.result !== null)
  76. response.result = JSON.parse(response.result);
  77. return response;
  78. });
  79. });
  80. }
  81. createGateWayOrder(postdata) {
  82. return __awaiter(this, void 0, void 0, function* () {
  83. const url = 'apis/v4/bizgaze/integrations/paymentgateway/createorder';
  84. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  85. if (response.result !== null)
  86. response.result = JSON.parse(response.result);
  87. return response;
  88. });
  89. });
  90. }
  91. getSuperAdmin() {
  92. return __awaiter(this, void 0, void 0, function* () {
  93. const url = 'apis/v4/bizgaze/crm/employees/getadminforsubscription';
  94. return yield this.dataHelper().getAsync(url).then(function (response) {
  95. if (response.result !== null)
  96. response.result = JSON.parse(response.result);
  97. return response;
  98. });
  99. });
  100. }
  101. getCustomerDetails(orgId) {
  102. return __awaiter(this, void 0, void 0, function* () {
  103. const url = 'apis/v4/bizgaze/crm/organization/getorganization/organizationid/' + orgId;
  104. return yield this.dataHelper().getAsync(url).then(function (response) {
  105. if (response.result !== null)
  106. response.result = JSON.parse(response.result);
  107. return response;
  108. });
  109. });
  110. }
  111. getUserbyPhoneorMail(phonenumber, emailaddress) {
  112. return __awaiter(this, void 0, void 0, function* () {
  113. const url = 'account/getuserbyphoneormail/' + phonenumber + '/' + emailaddress;
  114. return yield this.dataHelper().getAsync(url).then(function (response) {
  115. if (response.result !== null)
  116. response.result = JSON.parse(response.result);
  117. return response;
  118. });
  119. });
  120. }
  121. createNewTenant(postdata) {
  122. return __awaiter(this, void 0, void 0, function* () {
  123. const url = 'account/registertenant';
  124. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  125. if (response.result !== null)
  126. response.result = JSON.parse(response.result);
  127. return response;
  128. });
  129. });
  130. }
  131. savePaymentbyInvoiceData(postdata) {
  132. return __awaiter(this, void 0, void 0, function* () {
  133. const url = 'apis/v4/bizgaze/transact/payments/savepaymentbyinvoicedata';
  134. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  135. if (response.result !== null)
  136. response.result = JSON.parse(response.result);
  137. return response;
  138. });
  139. });
  140. }
  141. getLoBbyItem(ItemId) {
  142. return __awaiter(this, void 0, void 0, function* () {
  143. const url = 'apis/v4/bizgaze/transact/subscriptions/getlobbyitem/itemid/' + ItemId;
  144. return yield this.dataHelper().getAsync(url).then(function (response) {
  145. if (response.result !== null)
  146. response.result = JSON.parse(response.result);
  147. return response;
  148. });
  149. });
  150. }
  151. SaveSubcribedAddons(postdata) {
  152. return __awaiter(this, void 0, void 0, function* () {
  153. const url = 'apis/v4/bizgaze/transact/subscriptions/savesubcribedaddonsdata/List';
  154. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  155. if (response.result !== null)
  156. response.result = JSON.parse(response.result);
  157. return response;
  158. });
  159. });
  160. }
  161. saveSubscriptionOrderData(postdata) {
  162. return __awaiter(this, void 0, void 0, function* () {
  163. const url = 'apis/v4/bizgaze/transact/subscriptions/savesubscripuionorderdata';
  164. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  165. if (response.result !== null)
  166. response.result = JSON.parse(response.result);
  167. return response;
  168. });
  169. });
  170. }
  171. saveSubscriptionPaymentData(postdata) {
  172. return __awaiter(this, void 0, void 0, function* () {
  173. const url = 'apis/v4/bizgaze/transact/subscriptions/savesubscriptionpaymentdata';
  174. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  175. if (response.result !== null)
  176. response.result = JSON.parse(response.result);
  177. return response;
  178. });
  179. });
  180. }
  181. getSubscriptionPaymentData(OrderId) {
  182. return __awaiter(this, void 0, void 0, function* () {
  183. const url = 'apis/v4/bizgaze/transact/subscriptions/getsubscripuionpaymentdata/orderid/' + OrderId;
  184. return yield this.dataHelper().getAsync(url).then(function (response) {
  185. if (response.result !== null)
  186. response.result = JSON.parse(response.result);
  187. return response;
  188. });
  189. });
  190. }
  191. GetSubscripuionPaymentInfo(OrderId) {
  192. return __awaiter(this, void 0, void 0, function* () {
  193. const url = 'apis/v4/bizgaze/transact/subscriptions/getsubscripuionpaymentinfo/orderid/' + OrderId;
  194. return yield this.dataHelper().getAsync(url).then(function (response) {
  195. if (response.result !== null)
  196. response.result = JSON.parse(response.result);
  197. return response;
  198. });
  199. });
  200. }
  201. getSubscribedPlanItemId(OrganizationId) {
  202. return __awaiter(this, void 0, void 0, function* () {
  203. const url = 'apis/v4/bizgaze/transact/subscriptions/getsubscripuionorderdata/organizationid/' + OrganizationId;
  204. return yield this.dataHelper().getAsync(url).then(function (response) {
  205. if (response.result !== null)
  206. response.result = JSON.parse(response.result);
  207. return response;
  208. });
  209. });
  210. }
  211. getSubscriptionOrderData(OrderId) {
  212. return __awaiter(this, void 0, void 0, function* () {
  213. const url = 'apis/v4/bizgaze/transact/subscriptions/getsubscripuionorderdata/orderid/' + OrderId;
  214. return yield this.dataHelper().getAsync(url).then(function (response) {
  215. if (response.result !== null)
  216. response.result = JSON.parse(response.result);
  217. return response;
  218. });
  219. });
  220. }
  221. getPaymentDetailsbyOrderId(OrderId) {
  222. return __awaiter(this, void 0, void 0, function* () {
  223. const url = 'apis/v4/bizgaze/integrations/paymentgateway/getpaymentdetails/orderid/'
  224. + OrderId;
  225. return yield this.dataHelper().getAsync(url).then(function (response) {
  226. if (response.result !== null)
  227. response.result = JSON.parse(response.result);
  228. return response;
  229. });
  230. });
  231. }
  232. getSubscriptionOrderItems(BizOrderId) {
  233. return __awaiter(this, void 0, void 0, function* () {
  234. const url = 'apis/v4/bizgaze/transact/orders/getorderitems/orderid/'
  235. + BizOrderId;
  236. return yield this.dataHelper().getAsync(url).then(function (response) {
  237. if (response.result !== null)
  238. response.result = JSON.parse(response.result);
  239. return response;
  240. });
  241. });
  242. }
  243. sendRegistrationMail(emailaddress, ismail) {
  244. return __awaiter(this, void 0, void 0, function* () {
  245. const url = 'apis/v4/bizgaze/transact/subscriptions/sendemailtoregisteruser/toemail/' + emailaddress + '/ismail/' + ismail;
  246. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  247. if (response.result !== null)
  248. response.result = JSON.parse(response.result);
  249. return response;
  250. });
  251. });
  252. }
  253. VerifyOtp(otpid, UserOtp) {
  254. return __awaiter(this, void 0, void 0, function* () {
  255. const url = 'apis/v4/bizgaze/transact/subscriptions/validateotpuser/otpid/' + otpid + '/userotp/' + UserOtp;
  256. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  257. if (response.result !== null)
  258. response.result = JSON.parse(response.result);
  259. return response;
  260. });
  261. });
  262. }
  263. getItemsList(SubscriptionItemType) {
  264. return __awaiter(this, void 0, void 0, function* () {
  265. const url = 'apis/v4/bizgaze/transact/subscriptions/getplanitemsdata/subscriptionitemtype/'
  266. + SubscriptionItemType;
  267. return yield this.dataHelper().getAsync(url).then(function (response) {
  268. if (response.result !== null)
  269. response.result = JSON.parse(response.result);
  270. return response;
  271. });
  272. });
  273. }
  274. GetPlanInfo(planId) {
  275. return __awaiter(this, void 0, void 0, function* () {
  276. const url = 'apis/v4/bizgaze/transact/subscriptions/getplanitemsbyid/itemid/'
  277. + planId;
  278. return yield this.dataHelper().getAsync(url).then(function (response) {
  279. if (response.result !== null)
  280. response.result = JSON.parse(response.result);
  281. return response;
  282. });
  283. });
  284. }
  285. saveCartItems(postdata) {
  286. return __awaiter(this, void 0, void 0, function* () {
  287. const url = 'apis/v4/bizgaze/transact/subscriptions/savecartitemsdatadata/List';
  288. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  289. if (response.result !== null)
  290. response.result = JSON.parse(response.result);
  291. return response;
  292. });
  293. });
  294. }
  295. getItemsbyMail(mail) {
  296. return __awaiter(this, void 0, void 0, function* () {
  297. const url = 'apis/v4/bizgaze/transact/subscriptions/getitemsbymail/mail/' + mail;
  298. return yield this.dataHelper().getAsync(url).then(function (response) {
  299. if (response.result !== null)
  300. response.result = JSON.parse(response.result);
  301. return response;
  302. });
  303. });
  304. }
  305. getItem(ItemId, tenureid) {
  306. return __awaiter(this, void 0, void 0, function* () {
  307. const url = 'apis/v4/bizgaze/transact/subscriptions/getplanitemdata/itemid/'
  308. + ItemId + '/tenureid/' + tenureid;
  309. return yield this.dataHelper().getAsync(url).then(function (response) {
  310. if (response.result !== null)
  311. response.result = JSON.parse(response.result);
  312. return response;
  313. });
  314. });
  315. }
  316. getbomitems(ItemId) {
  317. return __awaiter(this, void 0, void 0, function* () {
  318. const url = 'apis/v4/bizgaze/transact/subscriptions/getbomitemsinfo/parentitemid/'
  319. + ItemId;
  320. return yield this.dataHelper().getAsync(url).then(function (response) {
  321. if (response.result !== null)
  322. response.result = JSON.parse(response.result);
  323. return response;
  324. });
  325. });
  326. }
  327. getTenures(ItemId) {
  328. return __awaiter(this, void 0, void 0, function* () {
  329. const url = 'apis/v4/bizgaze/transact/subscriptions/gettenuresbyitemid/itemid/'
  330. + ItemId;
  331. return yield this.dataHelper().getAsync(url).then(function (response) {
  332. if (response.result !== null)
  333. response.result = JSON.parse(response.result);
  334. return response;
  335. });
  336. });
  337. }
  338. getTenurePrice(ItemId, tenureid) {
  339. return __awaiter(this, void 0, void 0, function* () {
  340. const url = 'apis/v4/bizgaze/transact/subscriptions/gettenurefromitemidtenureid/itemid/'
  341. + ItemId + '/tenure/' + tenureid;
  342. return yield this.dataHelper().getAsync(url).then(function (response) {
  343. if (response.result !== null)
  344. response.result = JSON.parse(response.result);
  345. return response;
  346. });
  347. });
  348. }
  349. getGeneratedPassWord() {
  350. return __awaiter(this, void 0, void 0, function* () {
  351. const url = 'apis/v4/bizgaze/transact/subscriptions/getgeneratedpassword/np';
  352. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  353. if (response.result !== null)
  354. response.result = JSON.parse(response.result);
  355. return response;
  356. });
  357. });
  358. }
  359. getInvoiceDetails(invoiceid) {
  360. return __awaiter(this, void 0, void 0, function* () {
  361. const url = 'apis/v4/bizgaze/transact/invoices/getinvoice/invoiceid/' + invoiceid;
  362. return yield this.dataHelper().getAsync(url).then(function (response) {
  363. if (response.result !== null)
  364. response.result = JSON.parse(response.result);
  365. return response;
  366. });
  367. });
  368. }
  369. updateInvoiceStage(versionguid, orderId) {
  370. return __awaiter(this, void 0, void 0, function* () {
  371. const url = 'apis/v4/bizgaze/transact/subscriptions/updateinvoicestage/versionguid/' + versionguid + '/orderid/' + orderId;
  372. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  373. if (response.result !== null)
  374. response.result = JSON.parse(response.result);
  375. return response;
  376. });
  377. });
  378. }
  379. updateOrdersStage(orderId, OrderStatusId) {
  380. return __awaiter(this, void 0, void 0, function* () {
  381. const url = 'apis/v4/bizgaze/transact/subscriptions/updateorderstage/orderid/' + orderId + '/orderstatusid/' + OrderStatusId;
  382. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  383. if (response.result !== null)
  384. response.result = JSON.parse(response.result);
  385. return response;
  386. });
  387. });
  388. }
  389. sendEmailandPasswordtoRegisteruser(emailaddress, password) {
  390. return __awaiter(this, void 0, void 0, function* () {
  391. const url = 'apis/v4/bizgaze/transact/subscriptions/sendemailandpasswordtoregisteruser/toemail/' + emailaddress + '/password/' + password;
  392. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  393. if (response.result !== null)
  394. response.result = JSON.parse(response.result);
  395. return response;
  396. });
  397. });
  398. }
  399. gettenure(organizationid) {
  400. return __awaiter(this, void 0, void 0, function* () {
  401. const url = 'apis/v4/bizgaze/transact/subscriptions/gettenuredata/organizationid/' + organizationid;
  402. return yield this.dataHelper().getAsync(url).then(function (response) {
  403. if (response.result !== null)
  404. response.result = JSON.parse(response.result);
  405. return response;
  406. });
  407. });
  408. }
  409. paymentOrderItem(organizationid) {
  410. return __awaiter(this, void 0, void 0, function* () {
  411. const url = 'apis/v4/bizgaze/transact/subscriptions/paymentorderitemdata/organizationid/' + organizationid;
  412. return yield this.dataHelper().getAsync(url).then(function (response) {
  413. if (response.result !== null)
  414. response.result = JSON.parse(response.result);
  415. return response;
  416. });
  417. });
  418. }
  419. updateAppsStatusInChildTenant(organizationid) {
  420. return __awaiter(this, void 0, void 0, function* () {
  421. const url = 'apis/v4/bizgaze/transact/subscriptions/updateappsstatusinchildtenant/organizationid/' + organizationid;
  422. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  423. if (response.result !== null)
  424. response.result = JSON.parse(response.result);
  425. return response;
  426. });
  427. });
  428. }
  429. updateSubcribedUser(organizationid) {
  430. return __awaiter(this, void 0, void 0, function* () {
  431. const url = 'apis/v4/bizgaze/transact/subscriptions/savesubscribeduser/organizationid/' + organizationid;
  432. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  433. if (response.result !== null)
  434. response.result = JSON.parse(response.result);
  435. return response;
  436. });
  437. });
  438. }
  439. getOrgnaizationInfo(OrgName) {
  440. return __awaiter(this, void 0, void 0, function* () {
  441. const url = 'apis/v4/bizgaze/transact/subscriptions/getorganizationinfo/orgname/' + OrgName;
  442. return yield this.dataHelper().getAsync(url).then(function (response) {
  443. if (response.result !== null)
  444. response.result = JSON.parse(response.result);
  445. return response;
  446. });
  447. });
  448. }
  449. getOrgnaizationIdByName(OrgName) {
  450. return __awaiter(this, void 0, void 0, function* () {
  451. const url = 'apis/v4/bizgaze/transact/subscriptions/getorganizationidbyname/orgnizationname/' + OrgName;
  452. return yield this.dataHelper().getAsync(url).then(function (response) {
  453. if (response.result !== null)
  454. response.result = JSON.parse(response.result);
  455. return response;
  456. });
  457. });
  458. }
  459. UpdatePaymentDeatils(postdata) {
  460. return __awaiter(this, void 0, void 0, function* () {
  461. const url = 'apis/v4/bizgaze/transact/subscriptions/updatepaymentdeatils';
  462. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  463. if (response.result !== null)
  464. response.result = JSON.parse(response.result);
  465. return response;
  466. });
  467. });
  468. }
  469. UpdatedPaymentStage(InvoiceId, PaymentStatus) {
  470. return __awaiter(this, void 0, void 0, function* () {
  471. const url = 'apis/v4/bizgaze/transact/subscriptions/updatepaymentstage/invoiceid/' + InvoiceId + '/paymentstatus/' + PaymentStatus;
  472. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  473. if (response.result !== null)
  474. response.result = JSON.parse(response.result);
  475. return response;
  476. });
  477. });
  478. }
  479. getSubcribtionssettingInfo(SettingType) {
  480. return __awaiter(this, void 0, void 0, function* () {
  481. const url = 'apis/v4/bizgaze/transact/subscriptions/getsubscribtionsettingsinfo/settingtype/' + SettingType;
  482. return yield this.dataHelper().getAsync(url).then(function (response) {
  483. if (response.result !== null)
  484. response.result = JSON.parse(response.result);
  485. return response;
  486. });
  487. });
  488. }
  489. getTryUserInfo(leadId) {
  490. return __awaiter(this, void 0, void 0, function* () {
  491. const url = 'apis/v4/bizgaze/transact/subscriptions/gettryuserinfo/leadid/' + leadId;
  492. return yield this.dataHelper().getAsync(url).then(function (response) {
  493. if (response.result !== null)
  494. response.result = JSON.parse(response.result);
  495. return response;
  496. });
  497. });
  498. }
  499. getUserInfoByContactNo(ContactNumber) {
  500. return __awaiter(this, void 0, void 0, function* () {
  501. const url = 'apis/v4/bizgaze/transact/subscriptions/getsubscribtionuserinfobycontactno/contactnumber/' + ContactNumber;
  502. return yield this.dataHelper().getAsync(url).then(function (response) {
  503. if (response.result)
  504. response.result = JSON.parse(response.result);
  505. return response;
  506. });
  507. });
  508. }
  509. getContactnumuberdetails(phonenumner) {
  510. return __awaiter(this, void 0, void 0, function* () {
  511. const url = 'apis/v4/bizgaze/crm/contacts/getcontactnumberbynumber/' + phonenumner;
  512. return yield this.dataHelper().getAsync(url).then(function (response) {
  513. if (response.result !== null && response.result != "")
  514. response.result = JSON.parse(response.result);
  515. return response;
  516. });
  517. });
  518. }
  519. SaveSubscriptionsUserInfo(postdata) {
  520. return __awaiter(this, void 0, void 0, function* () {
  521. const url = 'apis/v4/bizgaze/transact/subscriptions/savesubcriptionuserinfo';
  522. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  523. if (response.result !== null)
  524. response.result = JSON.parse(response.result);
  525. return response;
  526. });
  527. });
  528. }
  529. SubcriptionsBackgroundProcess(orderid, subscriptionEndDate, Loginurl) {
  530. return __awaiter(this, void 0, void 0, function* () {
  531. const url = 'apis/v4/bizgaze/transact/subscriptions/subcriptionsbackgroundprocessallapi/orderid/' + orderid + '/duedate/' + subscriptionEndDate + '/loginurl/' + Loginurl;
  532. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  533. if (response.result !== null)
  534. response.result = JSON.parse(response.result);
  535. return response;
  536. });
  537. });
  538. }
  539. SaveSucriptionPayementDetails(postdata) {
  540. return __awaiter(this, void 0, void 0, function* () {
  541. const url = 'apis/v4/bizgaze/transact/subscriptions/savesubscriptionPaymentgetwaydeatils';
  542. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  543. if (response.result !== null)
  544. response.result = JSON.parse(response.result);
  545. return response;
  546. });
  547. });
  548. }
  549. GetSubscripuionUserPlanInfoByOrderId(OrderId) {
  550. return __awaiter(this, void 0, void 0, function* () {
  551. const url = 'apis/v4/bizgaze/transact/subscriptions/getsubscribtionuserplaninfobyorderid/orderid/' + OrderId;
  552. return yield this.dataHelper().getAsync(url).then(function (response) {
  553. if (response.result !== null)
  554. response.result = JSON.parse(response.result);
  555. return response;
  556. });
  557. });
  558. }
  559. GetUserInfoByOrderId(OrderId) {
  560. return __awaiter(this, void 0, void 0, function* () {
  561. const url = 'apis/v4/bizgaze/transact/subscriptions/getuserinfobyorderid/orderid/' + OrderId;
  562. return yield this.dataHelper().getAsync(url).then(function (response) {
  563. if (response.result !== null)
  564. response.result = JSON.parse(response.result);
  565. return response;
  566. });
  567. });
  568. }
  569. getCityName() {
  570. return __awaiter(this, void 0, void 0, function* () {
  571. const url = 'apis/v4/bizgaze/cities/crm/cityautocomplete';
  572. return yield this.dataHelper().getAsync(url).then(function (response) {
  573. if (response.result != null) {
  574. response.result = JSON.parse(response.result);
  575. }
  576. return response;
  577. });
  578. });
  579. }
  580. getTenureList(itemid, tenure) {
  581. return __awaiter(this, void 0, void 0, function* () {
  582. const url = 'apis/v4/bizgaze/transact/subscriptions/gettenurelist/itemid/' + itemid + '/tenure/' + tenure;
  583. return yield this.dataHelper().getAsync(url).then(function (response) {
  584. if (response.result !== null)
  585. response.result = JSON.parse(response.result);
  586. return response;
  587. });
  588. });
  589. }
  590. getTenurePeriodAndPrice(itemid, tenure, tenureperiod) {
  591. return __awaiter(this, void 0, void 0, function* () {
  592. const url = 'apis/v4/bizgaze/transact/subscriptions/gettenureperiodandprice/itemid/' + itemid + '/tenure/' + tenure + '/tenureperiod/' + tenureperiod;
  593. return yield this.dataHelper().getAsync(url).then(function (response) {
  594. if (response.result !== null)
  595. response.result = JSON.parse(response.result);
  596. return response;
  597. });
  598. });
  599. }
  600. SubscriptionsRepay(orderid) {
  601. return __awaiter(this, void 0, void 0, function* () {
  602. const url = 'apis/v4/bizgaze/transact/subscriptions/subscribeuserrepayementprocess/orderid/' + orderid;
  603. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  604. if (response.result !== null)
  605. response.result = JSON.parse(response.result);
  606. return response;
  607. });
  608. });
  609. }
  610. getSubscripuionOrderByBizorderId(BizOrderId) {
  611. return __awaiter(this, void 0, void 0, function* () {
  612. const url = 'apis/v4/bizgaze/transact/subscriptions/getsubscripuionorderbybizorderid/bizorderid/' + BizOrderId;
  613. return yield this.dataHelper().getAsync(url).then(function (response) {
  614. if (response.result !== null)
  615. response.result = JSON.parse(response.result);
  616. return response;
  617. });
  618. });
  619. }
  620. SubscriptionsUserValidationInfo(postdata) {
  621. return __awaiter(this, void 0, void 0, function* () {
  622. const url = 'apis/v4/bizgaze/transact/subscriptions/validationuserinfo';
  623. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  624. if (response.result !== null)
  625. response.result = JSON.parse(response.result);
  626. return response;
  627. });
  628. });
  629. }
  630. static Instance() {
  631. if (this._instance === undefined)
  632. this._instance = new SubscriptionManager();
  633. return this._instance;
  634. }
  635. }
  636. Subscriptions.SubscriptionManager = SubscriptionManager;
  637. })(Subscriptions = Managers.Subscriptions || (Managers.Subscriptions = {}));
  638. })(Managers = Transact.Managers || (Transact.Managers = {}));
  639. })(Transact = Apps.Transact || (Apps.Transact = {}));
  640. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  641. })(Bizgaze || (Bizgaze = {}));