public class CategoryCall extends AbstractCall<CategoryDataType>
| Constructor and Description |
|---|
CategoryCall(ClearCheckBookConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
delete(ParsedNameValuePair id)
Deletes a specific category for the current user
Method: delete Call: category |
boolean |
edit(CategoryDataType input)
Edit a specific category for the current user.
|
List<CategoryDataType> |
getAll()
Gets all of the current users categories
Method: get Call: categories |
protected String |
getPluralUrl() |
protected String |
getUrlSuffix() |
String |
insert(CategoryDataType input)
Adds a category to the current users accout.
|
bulkProcess, get, get, getAll, getConnection, processpublic static final String TYPE
public CategoryCall(ClearCheckBookConnection connection)
protected String getUrlSuffix()
getUrlSuffix in class AbstractCall<CategoryDataType>protected String getPluralUrl()
getPluralUrl in class AbstractCall<CategoryDataType>public boolean delete(ParsedNameValuePair id) throws ClearcheckbookException
Example:
https://username:password@www.clearcheckbook.com/api/category/
Parameters: Parameter Required Description
id Required The id of the category being deleted
Returned Values:
Value Description
true / false Returns true upon removal of the category or false/null on
fail
delete in class AbstractCall<CategoryDataType>ClearcheckbookExceptionpublic boolean edit(CategoryDataType input) throws ClearcheckbookException
Example:
https://username:password@www.clearcheckbook.com/api/category/
Parameters:
Parameter Required Description
id Required The id of the category being edited
name Required The new name for the category
parent Required The new parent id for the category
Returned Values:
Value Description
true / false Returns true on a successful edit or false/null on fail.
edit in class AbstractCall<CategoryDataType>ClearcheckbookExceptionpublic List<CategoryDataType> getAll() throws ClearcheckbookException
Example:
https://username:password@www.clearcheckbook.com/api/categories/
Parameters:
Parameter Required Description
None
Returned Values:
Value Description
id The id of the category
name The name of the category
parent The id of this category's parent. 0 if there is no parent.
getAll in class AbstractCall<CategoryDataType>ClearcheckbookExceptionpublic String insert(CategoryDataType input) throws ClearcheckbookException
Example:
https://username:password@www.clearcheckbook.com/api/category/
Parameters:
Parameter Required Description
name Required The name of the new category
parent Optional The id of this category's parent.
Returned Values:
Value Description
id / false The id of the newly created category or false/null on fail.
insert in class AbstractCall<CategoryDataType>ClearcheckbookExceptionCopyright © 2014 Leonard UK Ltd. All rights reserved.