1.0.1 • Published 4 years ago
hesabam v1.0.1
Hesabam
NodeJS Client for Hesabam service Powered by Apieco
Installation
$ npm install hesabam
Versions
####1.0.1 Payment class bug is fixed
How to use
const Hesabam = require('hesabam');
let hesabam = new Hesabam('username', 'password', 'apiecoKey', 'baseUrl');
hesabam.connect()
// to take action on Hesabam
const {
connect, // To connect to hesabam server
// Management
addNewUser, // To create new user as Hesabam service [ Consumer | Store | Hesabam main costumer ]
addNewTenant, // To create an account as [ Tenant | Provider of services | Seller ]
getTenantList,
addNewAccount, // To create an account as [ Costumer | Buyer | User of services]
getAccountList,
// Subscription Actions
createSubscription,
createSubscriptionWithAddOn,
getSubscription,
getSubscriptionList,
// Usage Actions
recordUsage,
getUsage,
getUsageByUnit,
getUsageDetail,
// Invoice Actions
getInvoiceByAccount,
getInvoiceByConsumer,
getInvoiceBySubscription,
getInvoiceByTenant,
getInvoiceById,
// Payment Actions
triggerPayment,
getPaymentById,
getPaymentListByAccount,
getPaymentListByConsumer,
getPaymentListByInvoice,
getPaymentListBySubscription,
getPaymentListByTenant,
// Catalog Actions
uploadNewCatalog,
getCatalog,
getCatalogMetadata,
getCatalogBasePlan,
getCatalogAvailablePlans,
addProduct,
addPlan,
removeProduct,
removePlan,
deleteCatalogs
} = hesabam;
// To creating and editing catalog's parts
// You can use these classes to create objects
// which Catalog's Actions need.
const {
CatalogDecorator, // Collecting full catalog data by using other classes
Plans,
Plan,
Usage,
UsageRaw,
UsageRawCell,
Products,
Product
} = Hesabam.catalogTools;