public static Domain create ( final BandwidthClient client , final Map < String , Object > params ) throws AppPlatformException , ParseException , Exception { assert ( client != null && params != null ) ; final String domainsUri = client . getUserResourceUri ( BandwidthConstants . DOMAINS_URI_PATH ) ; final RestResponse response = client . post ( domainsUri , params ) ; final JSONObject callObj = toJSONObject ( client . get ( response . getLocation ( ) , null ) ) ; return new Domain ( client , callObj ) ; }
Convenience factory method to create a Domain .