Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ async def configure_number(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [202]:
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error)
Expand Down Expand Up @@ -582,7 +582,7 @@ async def unconfigure_number(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [202]:
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -873,8 +873,6 @@ class PstnConfiguration(msrest.serialization.Model):
:type callback_url: str
:param application_id: The application id of the application to which to configure.
:type application_id: str
:param azure_pstn_target_id: Routable TargetId for the ACS Number.
:type azure_pstn_target_id: str
"""

_validation = {
Expand All @@ -884,7 +882,6 @@ class PstnConfiguration(msrest.serialization.Model):
_attribute_map = {
'callback_url': {'key': 'callbackUrl', 'type': 'str'},
'application_id': {'key': 'applicationId', 'type': 'str'},
'azure_pstn_target_id': {'key': 'azurePstnTargetId', 'type': 'str'},
}

def __init__(
Expand All @@ -894,7 +891,6 @@ def __init__(
super(PstnConfiguration, self).__init__(**kwargs)
self.callback_url = kwargs['callback_url']
self.application_id = kwargs.get('application_id', None)
self.azure_pstn_target_id = kwargs.get('azure_pstn_target_id', None)


class RateInformation(msrest.serialization.Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -993,8 +993,6 @@ class PstnConfiguration(msrest.serialization.Model):
:type callback_url: str
:param application_id: The application id of the application to which to configure.
:type application_id: str
:param azure_pstn_target_id: Routable TargetId for the ACS Number.
:type azure_pstn_target_id: str
"""

_validation = {
Expand All @@ -1004,21 +1002,18 @@ class PstnConfiguration(msrest.serialization.Model):
_attribute_map = {
'callback_url': {'key': 'callbackUrl', 'type': 'str'},
'application_id': {'key': 'applicationId', 'type': 'str'},
'azure_pstn_target_id': {'key': 'azurePstnTargetId', 'type': 'str'},
}

def __init__(
self,
*,
callback_url: str,
application_id: Optional[str] = None,
azure_pstn_target_id: Optional[str] = None,
**kwargs
):
super(PstnConfiguration, self).__init__(**kwargs)
self.callback_url = callback_url
self.application_id = application_id
self.azure_pstn_target_id = azure_pstn_target_id


class RateInformation(msrest.serialization.Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ def configure_number(
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [202]:
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error)
Expand Down Expand Up @@ -594,7 +594,7 @@ def unconfigure_number(
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [202]:
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error)
Expand Down
Loading