View Categories

Accounts

3 min read

	''' <summary>
	''' QuickBooks connection needs to be open first.
	''' Get All Accounts. Active and Inactive ones. Returns List(Of Account)
	''' In case of error returns: new List(Of Account)
	''' </summary>
	''' <param name="ActiveStatus">qbActiveStatus enum. Values (ActiveOnly [DEFAULT], InactiveOnly, All)</param>
	''' <param name="errorMsg">returned error message</param>
Public Function GetAllAccounts(Optional ByVal ActiveStatus As qbActiveStatus = qbActiveStatus.All, Optional ByRef errorMsg As String = "") As List(Of Account)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Accounts By ListIDs. Returns List(Of Account)
    ''' In case of error returns: new List(Of Account)
    ''' </summary>
    ''' <param name="ListIDs">ListIDs of the accounts. If it is one ListID, just add one ListID to the List(Of String)</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetAccountsByListIDs(ByVal ListIDs As List(Of String), Optional ByRef errorMsg As String = "") As List(Of Account)
	
    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Accounts By FullNames. Returns List(Of Account)
    ''' In case of error returns: new List(Of Account)
    ''' </summary>
    ''' <param name="FullNames">FullNames of the accounts. If it one FullName, just add one FullName to the List(Of String)</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetAccountsByFullNames(ByVal FullNames As List(Of String), Optional ByRef errorMsg As String = "") As List(Of Account)	
	
    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Accounts By DateRange. Returns List(Of Account)
    ''' In case of error returns: new List(Of Account)
    ''' </summary>
    ''' <param name="FromModifiedDate">FromDate</param>
    ''' <param name="ToModifiedDate">ToDate</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetAccountsByDateRange(ByVal FromModifiedDate As DateTime, ByVal ToModifiedDate As DateTime, Optional ByRef errorMsg As String = "") As List(Of Account)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Accounts By Name. Returns List(Of Account)
    ''' In case of error returns: new List(Of Account)
    ''' </summary>
    ''' <param name="Name">Account Name</param>
    ''' <param name="MatchCriterion">qbMatchCriterion enum. Values(StartsWith, Contains, EndsWith)</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetAccountByName(ByVal Name As String, ByVal MatchCriterion As qbMatchCriterion, Optional ByRef errorMsg As String = "") As List(Of Account)


    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Accounts By NameRange. Returns List(Of Account)
    ''' In case of error returns: new List(Of Account)
    ''' </summary>
    ''' <param name="FromName">FromName value</param>
    ''' <param name="ToName">ToName value.</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetAccountByNameRange(ByVal FromName As String, ByVal ToName As String, Optional ByRef errorMsg As String = "") As List(Of Account)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Accounts By AccountType. Returns List(Of Account)
    ''' In case of error returns: new List(Of Account)
    ''' </summary>
    ''' <param name="AccountType">List(Of qbAccountType) enum. Values(AccountsPayable, AccountsReceivable, Bank, CostOfGoodsSold, CreditCard, Equity, Expense, FixedAsset, Income, LongTermLiability, NonPosting, OtherAsset, OtherCurrentAsset, OtherCurrentLiability, OtherExpense, OtherIncom)</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetAccountByAccountType(ByVal AccountType As List(Of qbAccountType), Optional ByRef errorMsg As String = "") As List(Of Account)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Profit And Lost Accounts. Returns List(Of Account)
    ''' In case of error returns: new List(Of Account)
    ''' </summary>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetProfitAndLostAccounts(Optional ByRef errorMsg As String = "") As List(Of Account)

    ''' <summary>
    ''' It will delete the record from QuickBooks.
    ''' Once deleted, there is no way to retrieve
    ''' </summary>
    ''' <param name="ListID">to add new records to QB set ListID to a temporal one</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function DeleteAccountFromQuickBooksByListID(ByVal ListID As String, Optional ByRef errorMsg As String = "") As Boolean

    ''' <summary>
    ''' It will add a new Account to AccountList.
    ''' CustomField1-CustomField15: Fotmat[CustomFieldName:CustomFieldValue]
    ''' </summary>
    ''' <param name="_ListID">to add new records to QB set ListID to a temporal one</param>
    ''' <param name="_Operation">set to empty, update, add, or delete</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function AddToAccountList(ByVal _ListID As String, ByVal _Name As String, Optional ByVal _TimeCreated As String = "", Optional ByVal _TimeModified As String = "", Optional ByVal _EditSequence As String = "", Optional ByVal _FullName As String = "", Optional ByVal _IsActive As String = "", Optional ByVal _ParentRef_ListID As String = "", Optional ByVal _ParentRef_FullName As String = "", Optional ByVal _Sublevel As String = "", Optional ByVal _AccountType As String = "", Optional ByVal _IsTaxAccount As String = "", Optional ByVal _SpecialAccountType As String = "", Optional ByVal _AccountNumber As String = "", Optional ByVal _BankNumber As String = "", Optional ByVal _Desc As String = "", Optional ByVal _Balance As String = "", Optional ByVal _TotalBalance As String = "", Optional ByVal _OpenBalance As String = "", Optional ByVal _OpenBalanceDate As String = "", Optional ByVal _CashFlowClassification As String = "", Optional ByVal _SalesTaxCodeRef_ListID As String = "", Optional ByVal _SalesTaxCodeRef_FullName As String = "", Optional ByVal _TaxLineID As String = "", Optional ByVal _TaxLineName As String = "", Optional ByVal _CurrencyRef_ListID As String = "", Optional ByVal _CurrencyRef_FullName As String = "", Optional ByVal _UserData As String = "", Optional ByVal _Operation As String = "", Optional ByRef errorMsg As String = "") As Account

Powered by BetterDocs