wxc_sdk.person_settings.caller_id module
- class wxc_sdk.person_settings.caller_id.CallerIdApi(*, session: RestSession, workspaces: bool = False, locations: bool = False)[source]
Bases:
PersonSettingsApiChildAPI for person’s caller id settings
- feature = 'callerId'
- read(person_id: str, org_id: str | None = None) CallerId[source]
Retrieve a Person’s Caller ID Settings
Caller ID settings control how a person’s information is displayed when making outgoing calls.
This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read or a user auth token with spark:people_read scope can be used by a person to read their settings.
- Parameters:
person_id (str) – Unique identifier for the person.
org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.
- configure(person_id: str, org_id: str | None = None, selected: CallerIdSelectedType | None = None, custom_number: str | None = None, first_name: str | None = None, last_name: str | None = None, external_caller_id_name_policy: ExternalCallerIdNamePolicy | None = None, custom_external_caller_id_name: str | None = None)[source]
Configure a Person’s Caller ID Settings
Caller ID settings control how a person’s information is displayed when making outgoing calls.
This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their own settings.
- Parameters:
person_id (str) – Unique identifier for the person.
org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.
selected (CallerIdSelectedType) – Which type of outgoing Caller ID will be used.
custom_number (str) – This value must be an assigned number from the person’s location.
first_name (str) – Person’s Caller ID first name. Characters of %, +, `, ” and Unicode characters are not allowed.
last_name (str) – Person’s Caller ID last name. Characters of %, +, `, ” and Unicode characters are not allowed.
external_caller_id_name_policy (ExternalCallerIdNamePolicy) – Designates which type of External Caller ID Name policy is used. Default is DIRECT_LINE.
custom_external_caller_id_name (str) – Custom External Caller Name, which will be shown if External Caller ID Name is OTHER.
- base = ''
- session: RestSession
REST session
- class wxc_sdk.person_settings.caller_id.CallerId(*, types: list[wxc_sdk.person_settings.caller_id.CallerIdSelectedType] | None = None, selected: CallerIdSelectedType, directNumber: str | None = None, extensionNumber: str | None = None, locationNumber: str | None = None, tollFreeLocationNumber: bool | None = None, mobileNumber: str | None = None, customNumber: str | None = None, firstName: str | None = None, lastName: str | None = None, blockInForwardCallsEnabled: bool | None = None, externalCallerIdNamePolicy: ExternalCallerIdNamePolicy | None = None, customExternalCallerIdName: str | None = None, locationExternalCallerIdName: str | None = None)[source]
Bases:
ApiModelCaller id settings of a user
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- caller_id_types: list[wxc_sdk.person_settings.caller_id.CallerIdSelectedType] | None
Allowed types for the selected field.
- selected: CallerIdSelectedType
Which type of outgoing Caller ID will be used.
- direct_number: str | None
Direct number which will be shown if DIRECT_LINE is selected.
- extension_number: str | None
Extension number which will be shown if DIRECT_LINE is selected.
- location_number: str | None
Location number which will be shown if LOCATION_NUMBER is selected.
- toll_free_location_number: bool | None
True id the location number is toll free
- mobile_number: str | None
Mobile number which will be shown if MOBILE_NUMBER is selected.
- custom_number: str | None
This value must be an assigned number from the person’s location.
- first_name: str | None
Person’s Caller ID first name. Characters of %, +, `, " and Unicode characters are not allowed.
- last_name: str | None
Person’s Caller ID last name. Characters of %, +, `, " and Unicode characters are not allowed.
- block_in_forward_calls_enabled: bool | None
block caller id in forwarded calls
- external_caller_id_name_policy: ExternalCallerIdNamePolicy | None
Designates which type of External Caller ID Name policy is used. Default is DIRECT_LINE.
- custom_external_caller_id_name: str | None
Custom External Caller Name, which will be shown if External Caller ID Name is OTHER.
- location_external_caller_id_name: str | None
location external caller ID name
- configure_params() dict[source]
Get a dict with values that can be used to configure the caller id settings
- Returns:
dict
- Return type:
dict
Example:
caller_id = wx_api.person_settings.caller_id.read(person_id=...) caller_id.first_name = 'Bob' wx_api.person_settings.caller_id.configure(person_id=..., **caller_id.configure_params())
- class wxc_sdk.person_settings.caller_id.ExternalCallerIdNamePolicy(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumDesignates which type of External Caller ID Name policy is used. Default is DIRECT_LINE.
- direct_line = 'DIRECT_LINE'
Outgoing caller ID will show the caller’s direct line name
- location = 'LOCATION'
Outgoing caller ID will show the Site Name for the location.
- other = 'OTHER'
Outgoing caller ID will show the value from the custom_external_caller_id_name field.
- class wxc_sdk.person_settings.caller_id.CallerIdSelectedType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumAllowed types for the selected field.
- direct_line = 'DIRECT_LINE'
Outgoing caller ID will show the caller’s direct line number and/or extension.
- location_number = 'LOCATION_NUMBER'
Outgoing caller ID will show the main number for the location.
- mobile_number = 'MOBILE_NUMBER'
Outgoing caller ID will show the mobile number for this person.
- custom = 'CUSTOM'
Outgoing caller ID will show the value from the customNumber field.