Table of Contents

Get own and child billing plans

Для получения списка, состоящего из своего и дочерних тарифных планов, используйте команду account/get_billing_plans:

svc=account/get_billing_plans&params={}

Response

{
	"plan":{		/* own billing plan */
	        "parent": <text>,			/* parent plan name */
	        "name": <text>,				/* billing plan name */
	        "servicesModCounter": <uint>,		/* services modification counter */
	        "historyPeriod": <int>,			/* period of time to store unit messages */
        	"flags": <uint>,			/* flags */
	        "denyBalance": <double>,		/* operatons block appears below this balance value */
	        "minDaysCounter": <int>,		/* block occurs below this number of days */
        	"blockBalance": <double>,		/* block occurs below this balance value */
	        "currencyFormat": <text>,		/* currency format */ 
	        "descr": <text>,			/* billing plan description */
	        "email": <text>,			/* email */
	        "hwTypes":{				/* hardware object */
				"<hw_id>":			/* hardware id */
					     { 		
				     	        "name": <text>		/* hardware name */
					     },
				...
		},
	        "personal":
	        	        {
	        	        	"services": <object>	/* services object (see below) */
	        	        },
	        "combined":
	        	        {
	        	        	"services": <object>	/* services object (see below) */
	        	        }
	},
	"subPlans":[		/* list of child billing plans */
		{
	    		"parent": <text>,			/* parent plan name */
		        "name": <text>,				/* billing plan name */
		        "servicesModCounter": <uint>,		/* services modification counter */
		        "historyPeriod": <int>,			/* period of time to store unit messages */
        		"flags": <uint>,			/* flags */
		        "denyBalance": <double>,		/* operatons block appears below this balance value */
		        "minDaysCounter": <int>,		/* block occurs below this number of days */
        		"blockBalance": <double>,		/* block occurs below this balance value */
		        "currencyFormat": <text>,		/* currency format */ 
		        "descr": <text>,			/* billing plan description */
	        	"email": <text>,			/* email */
		        "hwTypes":{				/* hardware object */
					"<hw_id>":			/* hardware id */
						     { 		
					     	        "name": <text>		/* hardware name */
						     },
					...
			},
	        	"personal":
		        	        {
		        	        	"services": <object>	/* services object (see below) */
	        		        },
		        "combined":
		        	        {
	        		        	"services": <object>	/* services object (see below) */
	        		        }
		},
		...
	]
}

Services

"services":{                          /* service object where keys are correct service names */
                "<service_name>":{                  /* put correct service name instead of <service_name> */
                                "type": <uint>,
                                "maxUsage": <int>,
                                "cost": <text>,
                                "interval": <uint>,
                                "descr": <text>,
                                "flags": <uint>
                },
                ...
}

Please go here to see services list.