@@ -0,0 +1,3455 @@
+import org.json.JSONObject;%0A%0Aimport java.util.HashMap;%0A%0A/**%0A * Created by Iyanu on 17/07/2016.%0A */%0Apublic class Pages %7B%0A%0A    public Pages()%7B%0A%0A    %7D%0A%0A    private ApiConnection apiConnection = null;%0A    private ApiQuery apiQuery = null;%0A%0A    /*%0A    The following set of methods aids the sending of API%0A    requests for the CREATION of pages%0A     */%0A%0A    public JSONObject createPage(HashMap%3CString, Object%3E queryMap)  %7B%0A        apiConnection = new ApiConnection(Definitions.PAYSTACK_PAGES_CREATE_PAGE);%0A        return apiConnection.connectAndQuery(queryMap);%0A    %7D%0A%0A    public JSONObject createPage(ApiQuery query)  %7B%0A        apiConnection = new ApiConnection(Definitions.PAYSTACK_PAGES_CREATE_PAGE);%0A        return apiConnection.connectAndQuery(query);%0A    %7D%0A%0A    public JSONObject createPage(String name, String description, String amount)  %7B%0A        apiConnection = new ApiConnection(Definitions.PAYSTACK_PAGES_CREATE_PAGE);%0A        apiQuery = new ApiQuery();%0A        apiQuery.putParams(%22name%22, name);%0A        apiQuery.putParams(%22description%22, description);%0A        apiQuery.putParams(%22amount%22, amount);%0A        return apiConnection.connectAndQuery(apiQuery);%0A    %7D%0A%0A    /*%0A    The following set of methods aids the sending of API%0A    requests for the LISTING of pages%0A     */%0A%0A    public JSONObject listPages(HashMap%3CString, Object%3E queryMap)  %7B%0A        apiConnection = new ApiConnection(Definitions.PAYSTACK_PAGES_LIST_PAGES);%0A        return apiConnection.connectAndQueryWithGet(queryMap);%0A    %7D%0A%0A    public JSONObject listPages(ApiQuery query)  %7B%0A        apiConnection = new ApiConnection(Definitions.PAYSTACK_PAGES_LIST_PAGES);%0A        return apiConnection.connectAndQueryWithGet(query);%0A    %7D%0A%0A    public JSONObject listPages(int perPage, int page)  %7B%0A        apiConnection = new ApiConnection(Definitions.PAYSTACK_PAGES_LIST_PAGES);%0A        apiQuery = new ApiQuery();%0A        apiQuery.putParams(%22perPage%22, perPage);%0A        apiQuery.putParams(%22page%22, page);%0A        return apiConnection.connectAndQueryWithGet(apiQuery);%0A    %7D%0A%0A    /*%0A    The following set of methods aids the sending of API%0A    requests for the FETCHING of pages%0A     */%0A%0A    public JSONObject fetchPage(String idOrSlug)  %7B%0A        apiConnection = new ApiConnection(Definitions.PAYSTACK_PAGES_FETCH_PAGE + idOrSlug);%0A        return apiConnection.connectAndQueryWithGet();%0A    %7D%0A%0A    /*%0A    The following set of methods aids the sending of API%0A    requests for the UPDATING of pages%0A     */%0A%0A    public JSONObject updatePage(String idOrSlug, HashMap%3CString, Object%3E queryMap)  %7B%0A        apiConnection = new ApiConnection(Definitions.PAYSTACK_PAGES_UPDATE_PAGE + idOrSlug);%0A        return apiConnection.connectAndQueryWithPut(queryMap);%0A    %7D%0A%0A    public JSONObject updatePage(String idOrSlug, ApiQuery query)  %7B%0A        apiConnection = new ApiConnection(Definitions.PAYSTACK_PAGES_UPDATE_PAGE + idOrSlug);%0A        return apiConnection.connectAndQueryWithPut(query);%0A    %7D%0A%0A    public JSONObject updatePage(String idOrSlug, String name, String description, String amount, boolean active)  %7B%0A        apiConnection = new ApiConnection(Definitions.PAYSTACK_PAGES_UPDATE_PAGE + idOrSlug);%0A        apiQuery = new ApiQuery();%0A        apiQuery.putParams(%22name%22, name);%0A        apiQuery.putParams(%22description%22, description);%0A        apiQuery.putParams(%22amount%22, amount);%0A        apiQuery.putParams(%22active%22, active);%0A        return apiConnection.connectAndQueryWithPut(apiQuery);%0A    %7D%0A%0A%7D%0A

Create Pages.java