''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get All Customer's name and level only. Returns List(Of Customer)
    ''' In case of error returns: new List(Of Customer)
    ''' </summary>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetCustomersNamesFromQB(Optional ByRef errorMsg As String = "") As List(Of Customer)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Customer Record Count. Returns number of records in QuickBooks
    ''' In case of error returns: will return -1
    ''' </summary>
    ''' <param name="MaxReturned">max number of records to get</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetCustomerRecordCount(Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As Integer

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get All Customer. Returns List(Of Customer)
    ''' In case of error returns: new List(Of Customer)
    ''' NOTE: IF YOU HAVE TOO MANY RECORDS GET Customer BY DATERANGE
    ''' </summary>
    ''' <param name="ActiveStatus">qbActiveStatus enum. Values (ActiveOnly [DEFAULT], InactiveOnly, All)</param>
    ''' <param name="MaxReturned">max number of records to get</param>
    ''' <param name="BalanceFilter">qbOperator enum. Values (None [DEFAULT], LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual)</param>
    ''' <param name="Balance">The monetary amount to which Operator refers.</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetAllCustomer(Optional ByVal ActiveStatus As qbActiveStatus = qbActiveStatus.All, Optional ByVal MaxReturned As Integer = 0, Optional ByVal BalanceFilter As qbOperator = qbOperator.None, Optional ByVal Balance As String = "", Optional ByRef errorMsg As String = "") As List(Of Customer)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Customer By ListIDs. Returns List(Of Customer)
    ''' In case of error returns: new List(Of Customer)
    ''' NOTE: IF YOU HAVE TOO MANY RECORDS GET Customer BY DATERANGE
    ''' </summary>
    ''' <param name="ListIDs">ListIDs of the Customer. If it is one ListIDs, just add one ListID to the List(Of String)</param>
    ''' <param name="MaxReturned">max number of records to get</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetCustomerByListIDs(ByVal ListIDs As List(Of String), Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Customer)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Customer By FullNames. Returns List(Of Customer)
    ''' In case of error returns: new List(Of Customer)
    ''' NOTE: IF YOU HAVE TOO MANY RECORDS GET Customer BY DATERANGE
    ''' </summary>
    ''' <param name="FullNames">FullNames of the Customer. If it is one FullNames, just add one FullNames to the List(Of String)</param>
    ''' <param name="MaxReturned">max number of records to get</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetCustomerByFullNames(ByVal FullNames As List(Of String), Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Customer)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Customers By DateRange. Returns List(Of Customer)
    ''' In case of error returns: new List(Of Customer)
    ''' </summary>
    ''' <param name="FromModifiedDate">FromDate</param>
    ''' <param name="ToModifiedDate">ToDate</param>
    ''' <param name="MaxReturned">max number of records to get</param>
    ''' <param name="BalanceFilter">qbOperator enum. Values (None [DEFAULT], LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual)</param>
    ''' <param name="Balance">The monetary amount to which Operator refers.</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetCustomersByDateRange(ByVal FromModifiedDate As DateTime, ByVal ToModifiedDate As DateTime, Optional ByVal MaxReturned As Integer = 0, Optional ByVal BalanceFilter As qbOperator = qbOperator.None, Optional ByVal Balance As String = "", Optional ByRef errorMsg As String = "") As List(Of Customer)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Customers By Name. Returns List(Of Customer)
    ''' In case of error returns: new List(Of Customer)
    ''' </summary>
    ''' <param name="Name">Customer Name</param>
    ''' <param name="MatchCriterion">qbMatchCriterion enum. Values(StartsWith, Contains, EndsWith)</param>
    ''' <param name="MaxReturned">max number of records to get</param>
    ''' <param name="BalanceFilter">qbOperator enum. Values (None [DEFAULT], LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual)</param>
    ''' <param name="Balance">The monetary amount to which Operator refers.</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetCustomerByName(ByVal Name As String, ByVal MatchCriterion As qbMatchCriterion, Optional ByVal MaxReturned As Integer = 0, Optional ByVal BalanceFilter As qbOperator = qbOperator.None, Optional ByVal Balance As String = "", Optional ByRef errorMsg As String = "") As List(Of Customer)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Customers By NameRange. Returns List(Of Customer)
    ''' In case of error returns: new List(Of Customer)
    ''' </summary>
    ''' <param name="FromName">FromName value</param>
    ''' <param name="ToName">ToName value.</param>
    ''' <param name="MaxReturned">max number of records to get</param>
    ''' <param name="BalanceFilter">qbOperator enum. Values (None [DEFAULT], LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual)</param>
    ''' <param name="Balance">The monetary amount to which Operator refers.</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetCustomerByNameRange(ByVal FromName As String, ByVal ToName As String, Optional ByVal MaxReturned As Integer = 0, Optional ByVal BalanceFilter As qbOperator = qbOperator.None, Optional ByVal Balance As String = "", Optional ByRef errorMsg As String = "") As List(Of Customer)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get CustomerBy Class ListIDs. Returns List(Of Customer)
    ''' In case of error returns: new List(Of Customer)
    ''' </summary>
    ''' <param name="ListIDs">Entities ListIDs</param>
    ''' <param name="MaxReturned">max number of records to get</param>
    '''  <param name="BalanceFilter">qbOperator enum. Values (None [DEFAULT], LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual)</param>
    '''  <param name="Balance">The monetary amount to which Operator refers.</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetCustomerByClassListIDs(ByVal ListIDs As List(Of String), Optional ByVal MaxReturned As Integer = 0, Optional ByVal BalanceFilter As qbOperator = qbOperator.None, Optional ByVal Balance As String = "", Optional ByRef errorMsg As String = "") As List(Of Customer)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get CustomerBy Class FullNames. Returns List(Of Customer)
    ''' In case of error returns: new List(Of Customer)
    ''' </summary>
    ''' <param name="FullNames">Entities FullNames</param>
    ''' <param name="MaxReturned">max number of records to get</param>
    ''' <param name="BalanceFilter">qbOperator enum. Values (None [DEFAULT], LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual)</param>
    ''' <param name="Balance">The monetary amount to which Operator refers.</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetCustomerByClassFullNames(ByVal FullNames As List(Of String), Optional ByVal MaxReturned As Integer = 0, Optional ByVal BalanceFilter As qbOperator = qbOperator.None, Optional ByVal Balance As String = "", Optional ByRef errorMsg As String = "") As List(Of Customer)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get CustomerBy Class ListIDWithChildren. Returns List(Of Customer)
    ''' In case of error returns: new List(Of Customer)
    ''' </summary>
    ''' <param name="ListIDWithChildren">Class ListIDWithChildren</param>
    ''' <param name="MaxReturned">max number of records to get</param>
    ''' <param name="BalanceFilter">qbOperator enum. Values (None [DEFAULT], LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual)</param>
    ''' <param name="Balance">The monetary amount to which Operator refers.</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetCustomerByClassListIDWithChildren(ByVal ListIDWithChildren As String, Optional ByVal MaxReturned As Integer = 0, Optional ByVal BalanceFilter As qbOperator = qbOperator.None, Optional ByVal Balance As String = "", Optional ByRef errorMsg As String = "") As List(Of Customer)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get CustomerBy Class FullNameWithChildren. Returns List(Of Customer)
    ''' In case of error returns: new List(Of Customer)
    ''' </summary>
    ''' <param name="FullNameWithChildren">Class FullNameWithChildren</param>
    ''' <param name="MaxReturned">max number of records to get</param>
    ''' <param name="BalanceFilter">qbOperator enum. Values (None [DEFAULT], LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual)</param>
    ''' <param name="Balance">The monetary amount to which Operator refers.</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetCustomerByClassFullNameWithChildren(ByVal FullNameWithChildren As String, Optional ByVal MaxReturned As Integer = 0, Optional ByVal BalanceFilter As qbOperator = qbOperator.None, Optional ByVal Balance As String = "", Optional ByRef errorMsg As String = "") As List(Of Customer)

    ''' <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 DeleteCustomerFromQuickBooksByListID(ByVal ListID As String, Optional ByRef errorMsg As String = "") As Boolean

    ''' <summary>
    ''' It will add a new Customer to CustomerList.
    ''' 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 AddToCustomerList(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 _ClassRef_ListID As String = "", Optional ByVal _ClassRef_FullName As String = "", Optional ByVal _ParentRef_ListID As String = "", Optional ByVal _ParentRef_FullName As String = "", Optional ByVal _Sublevel As String = "", Optional ByVal _CompanyName As String = "", Optional ByVal _Salutation As String = "", Optional ByVal _FirstName As String = "", Optional ByVal _MiddleName As String = "", Optional ByVal _LastName As String = "", Optional ByVal _Suffix As String = "", Optional ByVal _PrintAs As String = "", Optional ByVal _BillAddress_Addr1 As String = "", Optional ByVal _BillAddress_Addr2 As String = "", Optional ByVal _BillAddress_Addr3 As String = "", Optional ByVal _BillAddress_Addr4 As String = "", Optional ByVal _BillAddress_Addr5 As String = "", Optional ByVal _BillAddress_City As String = "", Optional ByVal _BillAddress_State As String = "", Optional ByVal _BillAddress_PostalCode As String = "", Optional ByVal _BillAddress_Country As String = "", Optional ByVal _BillAddress_Note As String = "", Optional ByVal _ShipAddress_Addr1 As String = "", Optional ByVal _ShipAddress_Addr2 As String = "", Optional ByVal _ShipAddress_Addr3 As String = "", Optional ByVal _ShipAddress_Addr4 As String = "", Optional ByVal _ShipAddress_Addr5 As String = "", Optional ByVal _ShipAddress_City As String = "", Optional ByVal _ShipAddress_State As String = "", Optional ByVal _ShipAddress_PostalCode As String = "", Optional ByVal _ShipAddress_Country As String = "", Optional ByVal _ShipAddress_Note As String = "", Optional ByVal _Phone As String = "", Optional ByVal _Mobile As String = "", Optional ByVal _Pager As String = "", Optional ByVal _AltPhone As String = "", Optional ByVal _Fax As String = "", Optional ByVal _Email As String = "", Optional ByVal _Contact As String = "", Optional ByVal _AltContact As String = "", Optional ByVal _CustomerTypeRef_ListID As String = "", Optional ByVal _CustomerTypeRef_FullName As String = "", Optional ByVal _TermsRef_ListID As String = "", Optional ByVal _TermsRef_FullName As String = "", Optional ByVal _SalesRepRef_ListID As String = "", Optional ByVal _SalesRepRef_FullName As String = "", Optional ByVal _Balance As String = "", Optional ByVal _OpenBalanceDate As String = "", Optional ByVal _TotalBalance As String = "", Optional ByVal _SalesTaxCodeRef_ListID As String = "", Optional ByVal _SalesTaxCodeRef_FullName As String = "", Optional ByVal _ItemSalesTaxRef_ListID As String = "", Optional ByVal _ItemSalesTaxRef_FullName As String = "", Optional ByVal _SalesTaxCountry As String = "", Optional ByVal _ResaleNumber As String = "", Optional ByVal _AccountNumber As String = "", Optional ByVal _CreditLimit As String = "", Optional ByVal _PFDPaymentMethodRef_ListID As String = "", Optional ByVal _PFDPaymentMethodRef_FullName As String = "", Optional ByVal _CreditCardNumber As String = "", Optional ByVal _ExpirationMonth As String = "", Optional ByVal _ExpirationYear As String = "", Optional ByVal _NameOnCard As String = "", Optional ByVal _CreditCardAddress As String = "", Optional ByVal _CreditCardPostalCode As String = "", Optional ByVal _JobStatus As String = "", Optional ByVal _JobStartDate As String = "", Optional ByVal _JobProjectedEndDate As String = "", Optional ByVal _JobEndDate As String = "", Optional ByVal _JobDesc As String = "", Optional ByVal _JobTypeRef_ListID As String = "", Optional ByVal _JobTypeRef_FullName As String = "", Optional ByVal _Notes As String = "", Optional ByVal _PriceLevelRef_ListID As String = "", Optional ByVal _PriceLevelRef_FullName As String = "", Optional ByVal _TaxRegistrationNumber As String = "", Optional ByVal _CurrencyRef_ListID As String = "", Optional ByVal _CurrencyRef_FullName As String = "", Optional ByVal _DeliveryMethod As String = "", Optional ByVal _JobTitle As String = "", Optional ByVal _Cc As String = "", Optional ByVal _PreferredDeliveryMethod As String = "", Optional ByVal _CustomField1 As String = "", Optional ByVal _CustomField2 As String = "", Optional ByVal _CustomField3 As String = "", Optional ByVal _CustomField4 As String = "", Optional ByVal _CustomField5 As String = "", Optional ByVal _CustomField6 As String = "", Optional ByVal _CustomField7 As String = "", Optional ByVal _CustomField8 As String = "", Optional ByVal _CustomField9 As String = "", Optional ByVal _CustomField10 As String = "", Optional ByVal _CustomField11 As String = "", Optional ByVal _CustomField12 As String = "", Optional ByVal _CustomField13 As String = "", Optional ByVal _CustomField14 As String = "", Optional ByVal _CustomField15 As String = "", Optional ByVal _ExternalGUID As String = "", Optional ByVal _UserData As String = "", Optional ByVal _Operation As String = "", Optional ByRef errorMsg As String = "") As Customer

Powered by BetterDocs