Methods to manage Minute Plan data
All applications below support trusted mode, i_customer should be supplied in that mode.
createMinutePlan()
Available since version Softswitch 2025 and FreightSwitch 2025.
Adds a minute plan to a service plan.
Parameters:
- i_billing_plan - Identifier of the service plan to add the minute plan to. Integer. Required.
- description - Minute plan name/description. String. Required.
- destinations - Space-separated prefix patterns; use ^ to exclude (for example, "1 ^1900" includes everything starting with 1 except 1900). String. Required.
- price - Minute plan price. Numeric. Required.
- seconds_total - Included seconds; -1 for unlimited. Integer. Required.
- interval_1 - The first billing interval, in seconds (default 0). Integer. Optional.
- interval_n - Subsequent billing interval, in seconds (default 1). Integer. Optional.
- grace_period_enable - enable the grace period (default true). Boolean. Optional.
Returns:
- result - OK means that the minute plan has been created. String.
- i_service_plan - the identifier assigned to the new minute plan. Integer.
Faults:
- 400 - Service plan not found.
- 401 - A required parameter is missing or invalid.
- 402 - The Service Plan is assigned to an Account; a minute plan cannot be added.
listMinutePlans()
Available since version Softswitch 2025 and FreightSwitch 2025.
Retrieves all minute plans belonging to a service plan.
Parameters:
- i_billing_plan - Identifier of the service plan whose minute plans are listed. Integer. Required.
Returns:
- result - OK means that the minute plans were retrieved successfully. String.
- assigned - whether the service plan is assigned to at least one account. Boolean.
- list - list of minute plan structures ordered by identifier:
- i_service_plan - minute plan identifier. Integer.
- description - minute plan name/description. String.
- price - minute plan price. Numeric.
- seconds_total - included seconds; -1 for unlimited. Integer.
- interval_1 - first billing interval, in seconds. Integer.
- interval_n - subsequent billing interval, in seconds. Integer.
- grace_period_enable - whether the grace period is enabled. Boolean.
- included_prefixes - number of included destination prefixes. Integer.
- excluded_prefixes - number of excluded destination prefixes. Integer.
Faults:
- 400 - Service plan not found.
- 401 - missing/invalid i_billing_plan.
getMinutePlanInfo()
Allows retrieving attributes of a single minute plan. The minute plan must belong to the authenticated customer, unless trusted mode is used.
Parameters:
- i_service_plan - Minute plan identifier. Integer. Required.
Returns:
- result - OK means that the minute plan has been found. String.
- minute_plan - minute plan structure:
- i_service_plan - minute plan identifier. Integer.
- description - minute plan name/description. String.
- destinations - space-separated prefix patterns; ^ excludes. String.
- price - minute plan price. Numeric.
- seconds_total - included seconds; -1 for unlimited. Integer.
- interval_1 - first billing interval, in seconds. Integer.
- interval_n - subsequent billing interval, in seconds. Integer.
- grace_period_enable - whether the grace period is enabled. Boolean.
Faults:
- 400 - Minute plan was not found.
- 401 - Wrong i_service_plan parameter.
updateMinutePlan()
Available since version Softswitch 2025 and FreightSwitch 2025.
Updates an existing minute plan. Only the supplied fields are changed; at least one editable field must be provided.
Parameters:
- i_service_plan - Identifier of the minute plan to update. Integer. Required.
- description - New name/description. String. Optional.
- destinations - New space-separated prefix patterns. String. Optional.
- price - New minute plan price. Numeric. Optional.
- seconds_total - New included seconds; -1 for unlimited. Integer. Optional.
- interval_1 - New first billing interval, in seconds. Integer. Optional.
- interval_n - New subsequent billing interval, in seconds. Integer. Optional.
- grace_period_enable - New grace period flag. Boolean. Optional.
Returns:
- result - OK means that the minute plan has been updated. String.
Faults:
400 - No editable field was supplied (nothing to update), or the minute plan was not found.
401 - Wrong parameter (non-integer i_service_plan, or invalid seconds_total/price/interval).
402 - The Service Plan is assigned to an Account; seconds_total and price cannot be changed. Re-sending the current values is allowed.
deleteMinutePlan()
Available since version Softswitch 2025 and FreightSwitch 2025.
Deletes a minute plan.
Parameters:
- i_service_plan - Identifier of the minute plan to delete. Integer. Required.
Returns:
- result - OK means that the minute plan has been deleted. String.
Faults:
- 400 - Minute plan was not found.
- 401 - Wrong i_service_plan parameter (a non-integer value was supplied).
- 402 - The Service Plan is assigned to an Account; the minute plan cannot be deleted.