Package org.killbill.billing.account.api
Interface AccountUserApi
-
- All Superinterfaces:
KillbillApi
public interface AccountUserApi extends KillbillApi
The interfaceAccountUserApioffers APIs related to account operations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddEmail(UUID accountId, AccountEmail email, CallContext context)AccountcreateAccount(AccountData data, CallContext context)AccountgetAccountById(UUID accountId, TenantContext context)AccountgetAccountByKey(String key, TenantContext context)Retrieves an account by specifying its external key.Pagination<Account>getAccounts(Long offset, Long limit, TenantContext context)List<AuditLogWithHistory>getAuditLogsWithHistoryForId(UUID accountId, AuditLevel auditLevel, TenantContext context)Get all the audit entries with history for a given account.List<Account>getChildrenAccounts(UUID parentAccountId, TenantContext context)List<AuditLogWithHistory>getEmailAuditLogsWithHistoryForId(UUID accountEmailId, AuditLevel auditLevel, TenantContext context)Get all the audit entries with history for a given account email.List<AccountEmail>getEmails(UUID accountId, TenantContext context)UUIDgetIdFromKey(String externalKey, TenantContext context)voidremoveEmail(UUID accountId, AccountEmail email, CallContext context)Pagination<Account>searchAccounts(String searchKey, Long offset, Long limit, TenantContext context)Find all accounts having their name, email, external_key or company_name matching the search keyvoidupdateAccount(String key, AccountData accountData, CallContext context)Updates the account by specifying theAccountDataobjectvoidupdateAccount(UUID accountId, AccountData accountData, CallContext context)Updates the account by specifying theAccountDataobjectvoidupdateAccount(Account account, CallContext context)Updates the account by specifying the destinationAccountobject
-
-
-
Method Detail
-
createAccount
Account createAccount(AccountData data, CallContext context) throws AccountApiException
- Parameters:
data- the account datacontext- the user context- Returns:
- the created Account
- Throws:
AccountApiException
-
updateAccount
void updateAccount(Account account, CallContext context) throws AccountApiException
Updates the account by specifying the destinationAccountobject- Parameters:
account- account to be updatedcontext- contains specific information about the call- Throws:
AccountApiException- if a failure occurs
-
updateAccount
void updateAccount(String key, AccountData accountData, CallContext context) throws AccountApiException
Updates the account by specifying theAccountDataobject- Parameters:
key- account external keycontext- contains specific information about the call- Throws:
AccountApiException- if a failure occurs
-
updateAccount
void updateAccount(UUID accountId, AccountData accountData, CallContext context) throws AccountApiException
Updates the account by specifying theAccountDataobject- Parameters:
accountId- account unique idcontext- contains specific information about the call- Throws:
AccountApiException- if a failure occurs
-
getAccountByKey
Account getAccountByKey(String key, TenantContext context) throws AccountApiException
Retrieves an account by specifying its external key. Note that the system will enforce that only one account for a given external key exists in the system- Parameters:
key- the externalKey for the accountcontext- the user context- Returns:
- the account
- Throws:
AccountApiException- if there is no such account
-
getAccountById
Account getAccountById(UUID accountId, TenantContext context) throws AccountApiException
- Parameters:
accountId- the unique id for the accountcontext- the user context- Returns:
- the account
- Throws:
AccountApiException- if there is no such account
-
searchAccounts
Pagination<Account> searchAccounts(String searchKey, Long offset, Long limit, TenantContext context)
Find all accounts having their name, email, external_key or company_name matching the search key- Parameters:
searchKey- the search keyoffset- the offset of the first resultlimit- the maximum number of results to retrievecontext- the user context- Returns:
- the list of accounts matching this search key for that tenant
-
getAccounts
Pagination<Account> getAccounts(Long offset, Long limit, TenantContext context)
- Parameters:
context- the user contextoffset- the offset of the first resultlimit- the maximum number of results to retrieve- Returns:
- the list of accounts for that tenant
-
getIdFromKey
UUID getIdFromKey(String externalKey, TenantContext context) throws AccountApiException
- Parameters:
externalKey- the externalKey for the accountcontext- the user context- Returns:
- the unique id for that account
- Throws:
AccountApiException- if there is no such account
-
getEmails
List<AccountEmail> getEmails(UUID accountId, TenantContext context)
- Parameters:
accountId- the account unique idcontext- the user context- Returns:
- the list of emails configured for that account
-
addEmail
void addEmail(UUID accountId, AccountEmail email, CallContext context) throws AccountApiException
- Parameters:
accountId- the account unique idemail- the email to be addedcontext- the user context- Throws:
AccountApiException
-
removeEmail
void removeEmail(UUID accountId, AccountEmail email, CallContext context)
- Parameters:
accountId- the account unique idemail- the email to be removedcontext- the user context
-
getChildrenAccounts
List<Account> getChildrenAccounts(UUID parentAccountId, TenantContext context) throws AccountApiException
- Parameters:
parentAccountId- the parent account unique idcontext- the user context- Returns:
- the list of children accounts for that parent account id
- Throws:
AccountApiException
-
getAuditLogsWithHistoryForId
List<AuditLogWithHistory> getAuditLogsWithHistoryForId(UUID accountId, AuditLevel auditLevel, TenantContext context) throws AccountApiException
Get all the audit entries with history for a given account.- Parameters:
accountId- the account idauditLevel- audit level (verbosity)context- the tenant context- Returns:
- all audit entries with history for an account
- Throws:
AccountApiException
-
getEmailAuditLogsWithHistoryForId
List<AuditLogWithHistory> getEmailAuditLogsWithHistoryForId(UUID accountEmailId, AuditLevel auditLevel, TenantContext context) throws AccountApiException
Get all the audit entries with history for a given account email.- Parameters:
accountEmailId- the account email idauditLevel- audit level (verbosity)context- the tenant context- Returns:
- all audit entries with history for an account email
- Throws:
AccountApiException
-
-