bandwidthcom/java-bandwidth — pull request #14 by wtcross (2014-10-31 18:33:12+00:00)
Title: Fix PhoneNumber.create return

The intent of this PR is to make the ```PhoneNumber.create``` method behave as expected. Currently, the ```PhoneNumber.create``` method assumes that for a request like this:
```
POST /v1/users/{userId}/phoneNumbers
{
"number": "{number}",
"name": "home phone"
"fallbackNumber": "{fallback_number}"
}
```

that the response will be something like:

```
{
"id": "{numberId}",
"application": "https://catapult.inetwork.com/v1/users/users/u-ly123/applications/a-j321"
"number":"{number}",
"nationalNumber":"{national_number}",
"name": "home phone",
"createdTime": "2013-02-13T17:46:08.374Z",
"state": "NC",
"price": "0.60",
"numberState": "enabled"
}
```

[Here](https://catapult.inetwork.com/docs/api-docs/phonenumbers/#POST-/v1/users/{userId}/phoneNumbers) is the actual behavior of ```/v1/users/{userId}/phoneNumbers```:
```
POST /v1/users/{userId}/phoneNumbers
{
"number": "{number}",
"name": "home phone"
"fallbackNumber": "{fallback_number}"
}
HTTP/1.1 201 Created
Location: /v1/users/{userId}/phoneNumbers/{numberId}
```

After the creation of a phone number its information is retrieved via an additional GET request. The response from this request is used to instantiate the PhoneNumber.