wxc_sdk.person_settings.preferred_answer module
API for person preferred answer endpoint operatins
- class wxc_sdk.person_settings.preferred_answer.PreferredAnswerResponse(*, preferredAnswerEndpointId: str | None = None, endpoints: list[PreferredAnswerEndpoint])[source]
Bases:
ApiModel
- preferred_answer_endpoint_id: str | None
Person’s preferred answer endpoint.
- endpoints: list[PreferredAnswerEndpoint]
Array of endpoints available to the person.
- class wxc_sdk.person_settings.preferred_answer.PreferredAnswerApi(*, session: RestSession, base: str | None = None)[source]
Bases:
ApiChild
- read(person_id: str, org_id: str | None = None) PreferredAnswerResponse [source]
Get Preferred Answer Endpoint Get the person’s preferred answer endpoint (if any) and the list of endpoints available for selection. These endpoints can be used by the following Call Control API’s that allow the person to specify an endpointId to use for the call:
/v1/telephony/calls/dial
/v1/telephony/calls/retrieve
/v1/telephony/calls/pickup
/v1/telephony/calls/barge-in
/v1/telephony/calls/answer
This API requires spark:telephony_config_read or spark-admin:telephony_config_read scope.
- Parameters:
person_id – A unique identifier for the person.
org_id – ID of the organization in which the person resides. 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.
- Returns:
person’s preferred answer endpoint settings
- Return type:
- modify(person_id: str, preferred_answer_endpoint_id: str, org_id: str | None = None)[source]
Modify Preferred Answer Endpoint Sets or clears the person’s preferred answer endpoint. To clear the preferred answer endpoint the p preferred_answer_endpoint_id parameter must be set to None. This API requires spark:telephony_config_write or spark-admin:telephony_config_write scope.
- Parameters:
person_id – A unique identifier for the person.
preferred_answer_endpoint_id – Person’s preferred answer endpoint.
org_id – ID of the organization in which the person resides. 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.
- base = 'telephony/config/people'
- class wxc_sdk.person_settings.preferred_answer.PreferredAnswerEndpointType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,SafeEnum
An enumeration.
- application = 'APPLICATION'
- device = 'DEVICE'
- class wxc_sdk.person_settings.preferred_answer.PreferredAnswerEndpoint(*, id: str, type: PreferredAnswerEndpointType, name: str)[source]
Bases:
ApiModel
- id: str
Unique identifier for the endpoint.
- type: PreferredAnswerEndpointType
Enumeration that indicates if the endpoint is of type DEVICE or APPLICATION.
- name: str
The name filed in the response is calculated using device tag. Admins have the ability to set tags for devices. If a name=<value> tag is set, for example “name=home phone“, then the <value> is included in the name field of the API response. In this example “home phone”.