GetAccountHistoryById module

Get host account history by host account id

Sample response (may differ slightly in your environment)

<Q2API HqVersion="4.2.3.4215A" HqAssemblyVersion="4.2.6185.31252" ServerDateTime="2017-11-29T14:26:41.9020088-06:00">
    <Result>
        <ErrorCode ErrorType="Success">0</ErrorCode>
        <ErrorDescription/>
        <HydraErrorReturnCode>0</HydraErrorReturnCode>
    </Result>
    <Data>
        <AllHostTransactions>
            <Transactions>
                <!--AllTransactionType indicates type of transaction (0 = Posted, 1 = Memo, 2 = Insufficient Funds -->
                <AllTransactionType>0</AllTransactionType>
                <TransactionID>1</TransactionID>
                <HostAccountID>5000</HostAccountID>
                <PostDate>2017-04-25T11:12:17-05:00</PostDate>
                <TxnAmount>-1323.2500</TxnAmount>
                <Description>Check</Description>
                <HostTranNumber>01</HostTranNumber>
                <DorC>D</DorC>
                <ShowImage>true</ShowImage>
                <HostTranCodeID>5</HostTranCodeID>
                <OfxTrnType>CHECK</OfxTrnType>
                <OfxCheckNumHandling>0</OfxCheckNumHandling>
                <RunningBalance>8676.7500</RunningBalance>
                <ShowTransactionItemDetail>true</ShowTransactionItemDetail>
                <SignedTxnAmount>1323.2500</SignedTxnAmount>
                <StatementDescription>Check</StatementDescription>
            </Transactions>
        </AllHostTransactions>
    </Data>
</Q2API>
class q2_sdk.hq.hq_api.q2_api.GetAccountHistoryById.ParamsObj(logger, host_account_id, optional_filter=None, hq_credentials=None)[source]

Bases: Q2ApiParamsObj

Parameters definition for GetAccountHistoryById

Parameters:
  • logger (TypeAliasType) – Reference to calling request’s logger (self.logger in your extension)

  • host_account_id (int) – Q2_HostAccount.HostAccountID

  • optional_filter (Optional[str])

  • hq_credentials (Optional[HqCredentials]) – Defaults to settings.HQ_CREDENTIALS

class q2_sdk.hq.hq_api.q2_api.GetAccountHistoryById.Transactions(AllTransactionType, Description, DorC, HostAccountID, HostTranCodeID, HostTranNumber, OfxCheckNumHandling, OfxTrnType, PostDate, RunningBalance, ShowImage, ShowTransactionItemDetail, SignedTxnAmount, StatementDescription, TransactionID, TxnAmount)[source]

Bases: object

Transactions(AllTransactionType: lxml.objectify.IntElement, Description: lxml.objectify.StringElement, DorC: lxml.objectify.StringElement, HostAccountID: lxml.objectify.IntElement, HostTranCodeID: lxml.objectify.IntElement, HostTranNumber: lxml.objectify.StringElement, OfxCheckNumHandling: lxml.objectify.IntElement, OfxTrnType: lxml.objectify.StringElement, PostDate: lxml.objectify.StringElement, RunningBalance: lxml.objectify.FloatElement, ShowImage: lxml.objectify.BoolElement, ShowTransactionItemDetail: lxml.objectify.BoolElement, SignedTxnAmount: lxml.objectify.FloatElement, StatementDescription: lxml.objectify.StringElement, TransactionID: lxml.objectify.IntElement, TxnAmount: lxml.objectify.FloatElement)

AllTransactionType: IntElement
Description: StringElement
DorC: StringElement
HostAccountID: IntElement
HostTranCodeID: IntElement
HostTranNumber: StringElement
OfxCheckNumHandling: IntElement
OfxTrnType: StringElement
PostDate: StringElement
RunningBalance: FloatElement
ShowImage: BoolElement
ShowTransactionItemDetail: BoolElement
SignedTxnAmount: FloatElement
StatementDescription: StringElement
TransactionID: IntElement
TxnAmount: FloatElement
class q2_sdk.hq.hq_api.q2_api.GetAccountHistoryById.AllHostTransactions(Transactions)[source]

Bases: object

AllHostTransactions(Transactions: Union[q2_sdk.hq.hq_api.q2_api.GetAccountHistoryById.Transactions, List[q2_sdk.hq.hq_api.q2_api.GetAccountHistoryById.Transactions]])

Transactions: Union[Transactions, List[Transactions]]
class q2_sdk.hq.hq_api.q2_api.GetAccountHistoryById.Data(AllHostTransactions)[source]

Bases: object

Data(AllHostTransactions: Union[q2_sdk.hq.hq_api.q2_api.GetAccountHistoryById.AllHostTransactions, List[q2_sdk.hq.hq_api.q2_api.GetAccountHistoryById.AllHostTransactions]])

AllHostTransactions: Union[AllHostTransactions, List[AllHostTransactions]]
class q2_sdk.hq.hq_api.q2_api.GetAccountHistoryById.ResultNode[source]

Bases: object

class q2_sdk.hq.hq_api.q2_api.GetAccountHistoryById.HqResponse(raw_response)[source]

Bases: HqResponse

Parameters:

response – Body of HQ response

async q2_sdk.hq.hq_api.q2_api.GetAccountHistoryById.execute(params_obj, use_json=False, **kwargs)[source]

This is the default way to submit the request to HQ. In theory, both json and soap payloads are equally accepted by HQ, though several variables may affect that (HQ version, Q2SDK implementation bugs, etc). This should not affect anything about the way your code deals with the data. In fact, the only difference to consuming extensions is the logging. Basically, call this with default parameters unless you find a compelling reason not to.

Parameters:
  • params_obj (ParamsObj) – Object containing everything necessary to call this HQ endpoint

  • use_json – If True, will call HQ’s .ashx (json) endpoint instead of .asmx (soap)

Return type:

HqResponse

async q2_sdk.hq.hq_api.q2_api.GetAccountHistoryById.get_soap(params_obj, **kwargs)[source]

Deprecated. Please use execute instead

Return type:

HqResponse

async q2_sdk.hq.hq_api.q2_api.GetAccountHistoryById.get_json(params_obj, **kwargs)[source]

Deprecated. Please use execute instead

Return type:

HqResponse

q2_sdk.hq.hq_api.q2_api.GetAccountHistoryById.build_json(params_obj)[source]
q2_sdk.hq.hq_api.q2_api.GetAccountHistoryById.build_soap(params_obj)[source]