UNPKG

@magic.batua/points

Version:

The Points module powers the loyalty points features of the Magic Batua platform.

421 lines (145 loc) 6.17 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Points - Postman Documentation</title> <script src="scripts/prettify/prettify.js"></script> <script src="scripts/prettify/lang-css.js"></script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/ionicons.min.css"> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <input type="checkbox" id="nav-trigger" class="nav-trigger" /> <label for="nav-trigger" class="navicon-button x"> <div class="navicon"></div> </label> <label for="nav-trigger" class="overlay"></label> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Ledger.html">Ledger</a><ul class='methods'><li data-type='method'><a href="Ledger.html#count">count</a></li><li data-type='method'><a href="Ledger.html#Issue">Issue</a></li><li data-type='method'><a href="Ledger.html#MakeReferralsRedeemable">MakeReferralsRedeemable</a></li><li data-type='method'><a href="Ledger.html#MakeSignupRedeemable">MakeSignupRedeemable</a></li><li data-type='method'><a href="Ledger.html#Redeem">Redeem</a></li></ul></li><li><a href="Transaction.html">Transaction</a></li></ul><h3>Modules</h3><ul><li><a href="module-Points.html">Points</a><ul class='methods'><li data-type='method'><a href="module-Points.html#~ToReferrerFor">ToReferrerFor</a></li><li data-type='method'><a href="module-Points.html#~ToSelfFor">ToSelfFor</a></li></ul></li></ul> </nav> <div id="main"> <h1 class="page-title">Points</h1> <section> <header> </header> <article> <div class="container-overview"> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="~ToReferrerFor"><span class="type-signature">(inner) </span>ToReferrerFor<span class="signature">(service)</span><span class="type-signature"> &rarr; {number}</span></h4> <div class="description"> <p>Returns the number of points that must be awarded to the referrer of the account that is carrying out the transaction for the <code>service</code>.</p> <p> A <code>service</code> is one of the transaction categories supported by the Magic Batua platform. At the time of writing, points were only awarded for the following three services:</p> <ul> <li>Signup</li> <li>College Fees</li> <li>Mobile Prepaid</li> </ul> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>service</code></td> <td class="type"> <span class="param-type">service</span> </td> <td class="description last"><p>Name of the service used</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Source_Points.js.html">Source/Points.js</a>, <a href="Source_Points.js.html#line60">line 60</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>Number of points that must be credited to the transaction maker's referrer.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">number</span> </dd> </dl> <h4 class="name" id="~ToSelfFor"><span class="type-signature">(inner) </span>ToSelfFor<span class="signature">(service)</span><span class="type-signature"> &rarr; {number}</span></h4> <div class="description"> <p>Returns the number of points that must be awarded to the account carrying out the transaction for the <code>service</code>.</p> <p> A <code>service</code> is one of the transaction categories supported by the Magic Batua platform. At the time of writing, points were only awarded for the following three services:</p> <ul> <li>Signup</li> <li>College Fees</li> <li>Mobile Prepaid</li> </ul> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>service</code></td> <td class="type"> <span class="param-type">service</span> </td> <td class="description last"><p>Name of the service used</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Source_Points.js.html">Source/Points.js</a>, <a href="Source_Points.js.html#line30">line 30</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>Number of points that must be credited to the transaction maker's account.</p> </div> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type">number</span> </dd> </dl> </article> </section> </div> <br class="clear"> <footer> Documentation generated at Tue Mar 20 2018 02:33:08 GMT+0530 (IST) </footer> <script>prettyPrint();</script> <script src="scripts/linenumber.js"></script> </body> </html>