UNPKG

backendless-console-sdk

Version:

Backendless Console SDK for Node.js and browser

55 lines (54 loc) 2.47 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.billingLimitsAPI = billingLimitsAPI; var _routes = require("./routes"); function billingLimitsAPI(req) { return { getAppPlanComponentsData: function getAppPlanComponentsData(appId, planId, billingPeriod) { return req.billing.get(_routes.routes.appPlanComponentsData(appId, planId, billingPeriod)); }, getAppCurrentPlanComponentData: function getAppCurrentPlanComponentData(appId) { return req.billing.get(_routes.routes.appPlanComponentsData(appId, 'current', 'current')); }, getAutomationPlanComponentsData: function getAutomationPlanComponentsData(appId, planId, billingPeriod) { return req.billing.get(_routes.routes.automationPlanComponentsData(appId, planId, billingPeriod)); }, getAutomationCurrentPlanComponentData: function getAutomationCurrentPlanComponentData(appId) { return req.billing.get(_routes.routes.automationPlanComponentsData(appId, 'current', 'current')); }, getComponentLimit: function getComponentLimit(appId, componentId) { return req.billing.get(_routes.routes.componentLimit(appId, componentId)); }, apiCallsBlocked: function apiCallsBlocked(appId) { return req.billing.get(_routes.routes.apiCallsBlocked(appId)); }, loadHiveUsage: function loadHiveUsage(appId) { var cached = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; return req.billing.get(_routes.routes.hiveUsage(appId)).query({ cached: cached }); }, loadHiveLimit: function loadHiveLimit(appId) { return req.billing.get(_routes.routes.hiveLimits(appId)); }, scalePlanePricingEstimate: function scalePlanePricingEstimate(appId, query) { return req.billing.get(_routes.routes.tiersFloatPriceEstimation(appId)).query(query); }, scaleFixedPlanePricingEstimate: function scaleFixedPlanePricingEstimate(appId, tierId, query) { return req.billing.get(_routes.routes.tiersFixedPriceEstimation(appId, tierId)).query(query); }, getMaxTier: function getMaxTier(appId) { return req.billing.get(_routes.routes.maxTier(appId)); }, setMaxTier: function setMaxTier(appId, tierId) { return req.billing.put(_routes.routes.maxTier(appId), { tierId: tierId }); }, getTiersList: function getTiersList(appId) { return req.billing.get(_routes.routes.tiers(appId)); } }; }