import com.messagebird.MessageBirdClient;
import com.messagebird.MessageBirdService;
import com.messagebird.MessageBirdServiceImpl;
import com.messagebird.exceptions.GeneralException;
import com.messagebird.exceptions.NotFoundException;
import com.messagebird.exceptions.UnauthorizedException;
import com.messagebird.objects.PhoneNumberFeature;
import com.messagebird.objects.PhoneNumberType;
import com.messagebird.objects.PurchasedNumbersFilter;

public class ExampleListPurchasedNumbers {
    public static void main(String[] args) {
        if (args.length < 1) {
            System.out.println("Please specify your access key.");
            return;
        }
        // First create your service object
        final MessageBirdService wsr = new MessageBirdServiceImpl(args[0], "https://numbers.messagebird.com");

        // Add the service to the client
        final MessageBirdClient messageBirdClient = new MessageBirdClient(wsr);

        PurchasedNumbersFilter filter = new PurchasedNumbersFilter();

        filter.addFeature(PhoneNumberFeature.SMS);
        filter.setType(PhoneNumberType.MOBILE);

        filter.setLimit(25);

        try {
            System.out.println(messageBirdClient.listPurchasedNumbers(filter));
        } catch (UnauthorizedException | NotFoundException | GeneralException exception) {
            if (exception.getErrors() != null) {
                System.out.println(exception.getErrors().toString());
            }
            exception.printStackTrace();
        }
    }
}
@@ -342,56 +342,8 @@
 re;%0A
-import com.messagebird.objects.PhoneNumberType;%0A
 impo
@@ -393,16 +393,16 @@
 Filter;%0A
+
 %0Apublic 
@@ -731,43 +731,8 @@
 s%5B0%5D
-, %22https://numbers.messagebird.com%22
 );%0A%0A
@@ -849,24 +849,24 @@
 ient(wsr);%0A%0A
+
         Purc
@@ -927,109 +927,8 @@
 ();%0A
-%0A        filter.addFeature(PhoneNumberFeature.SMS);%0A        filter.setType(PhoneNumberType.MOBILE);%0A%0A
     

remove filters