Перейти к содержимому

Get service plan information

Это содержимое пока не доступно на вашем языке.

getServicePlanInfo returns the attributes of a service plan: its tariff, billing cycle, currency and billing type. The plan must belong to the authenticated customer. In trusted mode any plan of any customer can be read.

Name Type Required Description
i_billing_plan int yes ID of the service plan
Name Type Description
result string OK
(plan) struct The plan’s attributes, below. The response has one member besides result; read the plan from it as in the example
Field Type Description
i_billing_plan int ID of the plan
i_tariff int Tariff of the plan (Basic Tariff)
i_customer int Customer that owns the plan
name string Name of the plan (Plan Name)
description string Free text (Description)
suspend_all_calls boolean True: calls are suspended when all limits are used up
billing_cycle int Billing Cycle: 1 weekly, 2 bi-weekly, 3 monthly
iso_4217 string Currency of the plan, for example USD
prepaid boolean True for Pre-Paid, False for Post-Paid (Billing Type)
request
resp = call("getServicePlanInfo", {"i_billing_plan": 9})
plan = next(v for k, v in resp.items() if k != "result")
response
# plan
{
"i_billing_plan": 9,
"i_tariff": 12,
"i_customer": 1,
"name": "Unlimited UK 1000",
"description": "1000 minutes to UK landlines",
"suspend_all_calls": False,
"billing_cycle": 3,
"iso_4217": "USD",
"prepaid": True,
}