Interface AccountUserApi

  • All Superinterfaces:
    KillbillApi

    public interface AccountUserApi
    extends KillbillApi
    The interface AccountUserApi offers APIs related to account operations.
    • Method Detail

      • updateAccount

        void updateAccount​(Account account,
                           CallContext context)
                    throws AccountApiException
        Updates the account by specifying the destination Account object

        Parameters:
        account - account to be updated
        context - 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 the AccountData object

        Parameters:
        accountId - account unique id
        context - 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 account
        context - 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 key
        offset - the offset of the first result
        limit - the maximum number of results to retrieve
        context - 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 context
        offset - the offset of the first result
        limit - the maximum number of results to retrieve
        Returns:
        the list of accounts for that tenant
      • getEmails

        List<AccountEmail> getEmails​(UUID accountId,
                                     TenantContext context)
        Parameters:
        accountId - the account unique id
        context - the user context
        Returns:
        the list of emails configured for that account
      • removeEmail

        void removeEmail​(UUID accountId,
                         AccountEmail email,
                         CallContext context)
        Parameters:
        accountId - the account unique id
        email - the email to be removed
        context - the user context
      • 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 id
        auditLevel - audit level (verbosity)
        context - the tenant context
        Returns:
        all audit entries with history for an account email
        Throws:
        AccountApiException