''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Vendor 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 GetVendorRecordCount(Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As Integer

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get All Vendor. Active and Inactive ones. Returns List(Of Vendor)
    ''' In case of error returns: new List(Of Vendor)
    ''' </summary>
    ''' <param name="ActiveStatus">qbActiveStatus enum. Values (ActiveOnly [DEFAULT], InactiveOnly, All[set])</param>
    ''' <param name="MaxReturned">max number of records to get</param>
    ''' <param name="MaxReturned">max number of records to get</param>
    '''  <param name="BalanceFilter">qbOperator enum. Values (None [DEFAULT], LessThan, 
    ''' <param name="errorMsg">returned error message</param>
Public Function GetAllVendor(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 Vendor)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Vendor By ListIDs. Returns List(Of Vendor)
    ''' In case of error returns: new List(Of Vendor)
    ''' NOTE: IF YOU HAVE TOO MANY RECORDS GET Vendor BY DATERANGE
    ''' </summary>
    ''' <param name="ListIDs">ListIDs of the Vendor. If it is one ListIDs, just add one TxnID 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 GetVendorByListIDs(ByVal ListIDs As List(Of String), Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Vendor)


    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Vendor By FullNames. Returns List(Of Vendor)
    ''' In case of error returns: new List(Of Vendor)
    ''' NOTE: IF YOU HAVE TOO MANY RECORDS GET Vendor BY DATERANGE
    ''' </summary>
    ''' <param name="FullNames">FullNames of the Vendor. 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 GetVendorByFullNames(ByVal FullNames As List(Of String), Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Vendor)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Vendor By DateRange. Returns List(Of Vendor)
    ''' In case of error returns: new List(Of Vendor)
    ''' </summary>
    ''' <param name="FromModifiedDate">FromDate</param>
    ''' <param name="ToModifiedDate">ToDate</param>
    ''' <param name="MaxReturned">max number of records to get</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetVendorsByDateRange(ByVal FromModifiedDate As DateTime, ByVal ToModifiedDate As DateTime, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Vendor)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Vendors By Name. Returns List(Of Vendor)
    ''' In case of error returns: new List(Of Vendor)
    ''' </summary>
    ''' <param name="Name">Vendor Name</param>
    ''' <param name="MatchCriterion">qbMatchCriterion enum. Values(StartsWith, Contains, EndsWith)</param>
    ''' <param name="MaxReturned">max number of records to get</param>
    ''' <param name="errorMsg">returned error message</param>
Public Function GetVendorByName(ByVal Name As String, ByVal MatchCriterion As qbMatchCriterion, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Vendor)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Vendors By NameRange. Returns List(Of Vendor)
    ''' In case of error returns: new List(Of Vendor)
    ''' </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="errorMsg">returned error message</param>
Public Function GetVendorByNameRange(ByVal FromName As String, ByVal ToName As String, Optional ByVal MaxReturned As Integer = 0, Optional ByRef errorMsg As String = "") As List(Of Vendor)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get Vendor By Class ListIDs. Returns List(Of Vendor)
    ''' In case of error returns: new List(Of Vendor)
    ''' </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 GetVendorByClassListIDs(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 Vendor)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get VendorBy Class FullNames. Returns List(Of Vendor)
    ''' In case of error returns: new List(Of Vendor)
    ''' </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 GetVendorByClassFullNames(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 Vendor)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get VendorBy Class ListIDWithChildren. Returns List(Of Vendor)
    ''' In case of error returns: new List(Of Vendor)
    ''' </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 GetVendorByClassListIDWithChildren(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 Vendor)

    ''' <summary>
    ''' QuickBooks connection needs to be open first.
    ''' Get VendorBy Class FullNameWithChildren. Returns List(Of Vendor)
    ''' In case of error returns: new List(Of Vendor)
    ''' </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 GetVendorByClassFullNameWithChildren(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 Vendor)

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

    ''' <summary>
    ''' It will add a new Vendor to VendorList.
    ''' 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 AddToVendorList(ByVal _ListID As String, _Name As String, Optional ByVal _TimeCreated As String = "", Optional ByVal _TimeModified As String = "", Optional ByVal _EditSequence As String = "", Optional ByVal _IsActive 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 _VendorAddress_Addr1 As String = "", Optional ByVal _VendorAddress_Addr2 As String = "", Optional ByVal _VendorAddress_Addr3 As String = "", Optional ByVal _VendorAddress_Addr4 As String = "", Optional ByVal _VendorAddress_Addr5 As String = "", Optional ByVal _VendorAddress_City As String = "", Optional ByVal _VendorAddress_State As String = "", Optional ByVal _VendorAddress_PostalCode As String = "", Optional ByVal _VendorAddress_Country As String = "", Optional ByVal _VendorAddress_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 _Cc As String = "", Optional ByVal _Contact As String = "", Optional ByVal _AltContact As String = "", Optional ByVal _NameOnCheck As String = "", Optional ByVal _Notes As String = "", Optional ByVal _AccountNumber As String = "", Optional ByVal _VendorTypeRef_ListID As String = "", Optional ByVal _VendorTypeRef_FullName As String = "", Optional ByVal _TermsRef_ListID As String = "", Optional ByVal _TermsRef_FullName As String = "", Optional ByVal _CreditLimit As String = "", Optional ByVal _VendorTaxIdent As String = "", Optional ByVal _IsVendorEligibleFor1099 As String = "", Optional ByVal _Balance As String = "", Optional ByVal _OpenBalanceDate As String = "", Optional ByVal _CurrencyRef_ListID As String = "", Optional ByVal _CurrencyRef_FullName As String = "", Optional ByVal _BillingRateRef_ListID As String = "", Optional ByVal _BillingRateRef_FullName As String = "", Optional ByVal _SalesTaxCodeRef_ListID As String = "", Optional ByVal _SalesTaxCodeRef_FullName As String = "", Optional ByVal _SalesTaxCountry As String = "", Optional ByVal _IsSalesTaxAgency As String = "", Optional ByVal _SalesTaxReturnRef_ListID As String = "", Optional ByVal _SalesTaxReturnRef_FullName As String = "", Optional ByVal _TaxRegistrationNumber As String = "", Optional ByVal _ReportingPeriod As String = "", Optional ByVal _IsTaxTrackedOnPurchases As String = "", Optional ByVal _TaxOnPurchasesAccountRef_ListID As String = "", Optional ByVal _TaxOnPurchasesAccountRef_FullName As String = "", Optional ByVal _IsTaxTrackedOnSales As String = "", Optional ByVal _TaxOnSalesAccountRef_ListID As String = "", Optional ByVal _TaxOnSalesAccountRef_FullName As String = "", Optional ByVal _IsTaxOnTax As String = "", Optional ByVal _ClassRef_ListID As String = "", Optional ByVal _ClassRef_FullName As String = "", Optional ByVal _IsTaxAgency As String = "", Optional ByVal _JobTitle 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 _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 Vendor

Powered by BetterDocs