Methods to manage Accessibility Surcharge data
Available since version Softswitch 2025 and FreightSwitch 2025.
All applications below support trusted mode, i_customer should be supplied in that mode.
createAccessibilitySurcharge()
Adds an accessibility surcharge to a service plan.
Parameters:
- i_billing_plan - Identifier of the service plan to add the surcharge to. Integer. Required.
- cld - Incoming DID/CLD; a number with an optional trailing * (Max 128 chars). String. Required.
- connect_fee - A fixed, one-time fee applied when the call connects, regardless of its duration (default 0). Numeric. Optional.
- free_seconds - A number of seconds at the start of the call that are always free (default 0). Integer. Optional.
- grace_period - An initial number of seconds during which the call is not charged if it ends within it (default 0). Integer. Optional.
- price_1 - First-interval price per minute (default 0). Numeric. Optional.
- price_n - Subsequent-interval price per minute (default 0). Numeric. Optional.
- interval_1 - First billing interval, in seconds (default 1). Integer. Optional.
- interval_n - Subsequent billing interval, in seconds (default 1). Integer. Optional.
Returns:
- result - OK means that the accessibility surcharge has been created. String.
- i_accessibility_surcharge - the identifier assigned to the new accessibility surcharge. Integer.
Faults:
- 400 - The service plan was not found; or another accessibility surcharge with a conflicting CLD already exists in the plan.
- 401 - A required parameter is missing or invalid.
listAccessibilitySurcharges()
Retrieves all accessibility surcharges belonging to a service plan.
Parameters:
- i_billing_plan - Identifier of the service plan whose surcharges are listed. Integer. Required.
Returns:
- result - OK means that the accessibility surcharges were retrieved successfully. String.
- assigned - whether the service plan is assigned to at least one account. Boolean.
- list - list of accessibility surcharge structures ordered by identifier:
- i_accessibility_surcharge - surcharge identifier. Integer.
- cld - incoming DID/CLD pattern. String.
- connect_fee - A fixed, one-time fee applied when the call connects, regardless of its duration. Numeric.
- free_seconds - A number of seconds at the start of the call that are always free. Integer.
- grace_period - An initial number of seconds during which the call is not charged if it ends within it. Integer.
- price_1 - first-interval price per minute. Numeric.
- price_n - subsequent-interval price per minute. Numeric.
- interval_1 - first billing interval, in seconds. Integer.
- interval_n - subsequent billing interval, in seconds. Integer.
Faults:
- 400 - Service plan not found.
- 401 - missing/invalid i_billing_plan.
updateAccessibilitySurcharge()
Updates an existing accessibility surcharge. Only the supplied fields are changed; at least one editable field must be provided.
Parameters:
- i_accessibility_surcharge - Identifier of the surcharge to update. Integer. Required.
- All other parameters as described for createAccessibilitySurcharge() are optional, except i_billing_plan, which cannot be changed.
Returns:
- result - OK means that the accessibility surcharge has been updated. String.
Faults:
- 400 - No editable field was supplied (nothing to update); the surcharge was not found; or the new cld conflicts with an existing one in the plan.
- 401 - Wrong parameter (non-integer i_accessibility_surcharge, or invalid numeric/interval value).
deleteAccessibilitySurcharge()
Deletes an accessibility surcharge.
Parameters:
- i_accessibility_surcharge - Identifier of the surcharge to delete. Integer. Required.
Returns:
- result - OK means that the accessibility surcharge has been deleted. String.
Faults:
- 400 - Accessibility surcharge was not found.
- 401 - Wrong i_accessibility_surcharge parameter (a non-integer value was supplied).
listAccessibilitySurchargeDIDs()
Retrieves the customer's DID numbers for accessibility surcharge selection, ordered by DID. This lists customer DIDs rather than the CLD patterns already configured in a service plan.
Parameters:
- no method-specific parameters; i_billing_plan is not required.
Returns:
- result - OK. String
- list - array of DID numbers. Each item is a String.
- 401 - Wrong i_accessibility_surcharge parameter (a non-integer value was supplied).