public static PhoneNumber get(final BandwidthClient client, final String phoneNumberId) throws Exception {
        assert(client != null && phoneNumberId != null);
        final String phoneNumberUri = client.getUserResourceInstanceUri(BandwidthConstants.PHONE_NUMBER_URI_PATH, phoneNumberId);
        final JSONObject phoneNumberObj = toJSONObject(client.get(phoneNumberUri, null));
        final PhoneNumber number = new PhoneNumber(client, phoneNumberObj);
        return number;
    }
public static PhoneNumber get ( final BandwidthClient client , final String phoneNumberId ) throws Exception { assert ( client != null && phoneNumberId != null ) ; final String phoneNumberUri = client . getUserResourceInstanceUri ( BandwidthConstants . PHONE_NUMBER_URI_PATH , phoneNumberId ) ; final JSONObject phoneNumberObj = toJSONObject ( client . get ( phoneNumberUri , null ) ) ; final PhoneNumber number = new PhoneNumber ( client , phoneNumberObj ) ; return number ; }
Factory method for PhoneNumber. Returns PhoneNumber object
@param client the client
@param phoneNumberId the phone number id
@return the PhoneNumber
@throws IOException unexpected error.