public class AccountCall extends AbstractCall<AccountDataType> implements BulkProcessable<AccountDataType>
| Constructor and Description |
|---|
AccountCall(ClearCheckBookConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
bulkProcess(List<AccountDataType> dataTypeList)
Helper wrapper function to iterate over a list of items to
insert/edit/delete calling the relevant method on each.
|
boolean |
delete(ParsedNameValuePair idParameter)
Deletes a specific account
Method: delete Call: account |
boolean |
edit(AccountDataType input)
Edit the details of an account
Method: put Call: account |
AccountDataType |
get(ParsedNameValuePair id)
Returns an array of information for a single account
Method: get Call: account |
List<AccountDataType> |
getAll()
Returns an array of all accounts and account balances for this user.
|
protected String |
getUrlSuffix() |
String |
insert(AccountDataType input)
Adds an account to the site
Method: post Call: account |
String |
process(AccountDataType dataType)
|
get, getAll, getConnection, getPluralUrlpublic static final String TYPE
public AccountCall(ClearCheckBookConnection connection)
protected String getUrlSuffix()
getUrlSuffix in class AbstractCall<AccountDataType>public List<String> bulkProcess(List<AccountDataType> dataTypeList) throws ClearcheckbookException
AbstractCallbulkProcess in interface BulkProcessable<AccountDataType>bulkProcess in class AbstractCall<AccountDataType>List<String>ClearcheckbookExceptionpublic String process(AccountDataType dataType) throws ClearcheckbookException
BulkProcessableprocess in interface BulkProcessable<AccountDataType>process in class AbstractCall<AccountDataType>ClearcheckbookExceptionpublic List<AccountDataType> getAll() throws ClearcheckbookException
Example:
https://username:password@www.clearcheckbook.com/api/accounts/
Parameters:
Parameter Required Description
is_overview Optional Should be set to "true" if you want to return all
accounts that just have a balance (Including transactions not assigned to
an account)
Returned Values:
Value Description
id The account id
name the name of the account
type_id the type of account (1= Cash, 2= Checking Account, 3= Savings
Account, 4= Credit Card, 5= Investment)
deposit the float value containing the amount of deposits in this
account.
jive_deposit the float value containing the amount of jived deposits in
this account.
withdrawal the float value containing the amount of withdrawals in this
account.
jive_withdrawal the float value containing the amount of jived
withdrawals in this account.
getAll in class AbstractCall<AccountDataType>ClearcheckbookExceptionpublic AccountDataType get(ParsedNameValuePair id) throws ClearcheckbookException
Example:
https://username:password@www.clearcheckbook.com/api/account/
Parameters: vParameter Required Description
id Required the id of the account you're getting information for
Returned Values:
Value Description
id The account id
name the name of the account
type_id the type of account (1= Cash, 2= Checking Account, 3= Savings
Account, 4= Credit Card, 5= Investment)
deposit the float value containing the amount of deposits in this
account.
jive_deposit the float value containing the amount of jived deposits in
this account.
withdrawal the float value containing the amount of withdrawals in this
account.
jive_withdrawal the float value containing the amount of jived
withdrawals in this account.
get in class AbstractCall<AccountDataType>ParsedNameValuePair - idClearcheckbookExceptionpublic String insert(AccountDataType input) throws ClearcheckbookException
Example:
https://username:password@www.clearcheckbook.com/api/account/
Parameters:
Parameter Required Description
name Required The name of the account
type_id Required the type of account (1= Cash, 2= Checking Account, 3=
Savings Account, 4= Credit Card, 5= Investment)
initial_balance Optional A float value identifying the existing balance
in this account (if negative, put a '-' symbol before the number...
-100.00)
Returned Values:
Value Description
Multiple Responses* The newly created id for the account on success or
false/null on fail.
insert in class AbstractCall<AccountDataType>AccountDataType - inputClearcheckbookExceptionpublic boolean edit(AccountDataType input) throws ClearcheckbookException
Example:
https://username:password@www.clearcheckbook.com/api/account/
Parameters:
Parameter Required Description
id Required the id of the account being edited
name Required the new name of the account
type_id Required the new type_id of the account (1= Cash, 2= Checking
Account, 3= Savings Account, 4= Credit Card, 5= Investment)
Returned Values:
Value Description
true/false returns true on a successful edit or false on fail.
edit in class AbstractCall<AccountDataType>AccountDataType - inputClearcheckbookExceptionpublic boolean delete(ParsedNameValuePair idParameter) throws ClearcheckbookException
Example:
https://username:password@www.clearcheckbook.com/api/account/
Parameters:
Parameter Required Description
id Required the id of the account being deleted
Returned Values:
Value Description
true / false returns true upon successfull delete or false/null on fail
delete in class AbstractCall<AccountDataType>ParsedNameValuePair - idParameterClearcheckbookExceptionCopyright © 2014 Leonard UK Ltd. All rights reserved.