IPWorks OFX 2020 Python Edition

Questions / Feedback?

OFXBatch Class

Properties   Methods   Events   Configuration Settings   Errors  

Enables sending of multiple requests to an OFX server through a single connection.

Syntax

class ipworksofx.OFXBatch

Remarks

The OFXBatch class allows your application to download account information, bank, credit card, investment, loan statements, make intrabank and/or interbank transfers, and/or download your FI profile in one single request submitted to the FI's OFX server. This class provides for applying a single authentication context to multiple requests in order to reduce the overhead of user authentication.

All downloads are batched into a single secure HTTPS connection to the financial institution. To use the OFXBatch class first identify the financial institution by setting the fi_id, fi_organization and fi_url,properties. Next identify the OFX user and application by setting the ofx_user, ofx_password, ofx_app_id and ofx_app_version properties. The same signon information will be used for the entire batch.

To build the request, depending on each request type, the corresponding IPWorks OFX components should be used. So, if account information, bank, credit card, investment, loan statement, bank transfer, and FI profile are part of this multiple request, then instances of Account, BankStatement, CCStatement, InvStatement, LoanStatement, BankTransfer, and FIProfile (corresponding to the each request type) should be used. The individual components that generate the OFX request aggregate will not need the sign on data to generate their request.

Set properties of each corresponding component (excluding the SignOn part which is already set), as you would do when using these components to send single requests to the server. Please refer to each class help files for details on how to build each individual OFX request .

Once you have finished setting the properties that describe each individual request, set the ofx_batch_item_request in OFXBatch to the OFXRequest of each corresponding component. For example:


OFXBatch.OFXBatchItems[0].Request = BankStatement.OFXRequest;
OFXBatch.OFXBatchItems[1].Request = CCStatement.OFXRequest;
OFXBatch.OFXBatchItems[2].Request = FIProfile.OFXRequest;

Then, use the post_request method to build and transmit the request automatically.

Message sets will/must appear in the following order in the request: Signon, Signup, Bank statement, Intrabank funds transfers, Credit card statements, Loan statements, Investment statements, Interbank funds transfers, and FI Profile, regardless of their order while populating the ofx_batch_items. In the server response, the message sets will be returned in the server response in the same order.

Upon successful response, the ofx_batch_item_response array property will be populated automatically, which will contain several blocks of information consisting of a server response for each request. To parse this response, the ofx_batch_item_response at the same index should be passed as OFXResponse of the corresponding component using the same order as submitted in the request.


BankStatement.OFXResponse = OFXBatch.OFXBatchItems[0].Response;
CCStatement.OFXResponse = OFXBatch.OFXBatchItems[1].Response;
FIProfile.OFXResponse = OFXBatch.OFXBatchItems[2].Response;

Properties of each class are now populated and ready for retrieval.

Note: If signon data is different across components, then they cannot be used in the same batch, otherwise an error will be thrown.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

fi_idFinancial institution identifier.
fi_organizationFinancial institution organization name.
firewall_auto_detectThis property tells the class whether or not to automatically detect and use firewall system settings, if available.
firewall_typeThis property determines the type of firewall to connect through.
firewall_hostThis property contains the name or IP address of firewall (optional).
firewall_passwordThis property contains a password if authentication is to be used when connecting through the firewall.
firewall_portThis property contains the TCP port for the firewall Host .
firewall_userThis property contains a user name if authentication is to be used connecting through a firewall.
fi_urlFinancial institution URL.
ofx_app_idOFX application identifier.
ofx_app_versionOFX application version.
ofx_batch_item_countThe number of records in the OFXBatchItem arrays.
ofx_batch_item_requestOFX request aggregate.
ofx_batch_item_request_typeThe type of OFX request included in the batch.
ofx_batch_item_request_uidThe current batch item's unique transaction ID.
ofx_batch_item_responseThe OFX response aggregate.
ofx_passwordUser's password.
ofx_userUser's id.
proxy_auth_schemeThis property is used to tell the class which type of authorization to perform when connecting to the proxy.
proxy_auto_detectThis property tells the class whether or not to automatically detect and use proxy system settings, if available.
proxy_passwordThis property contains a password if authentication is to be used for the proxy.
proxy_portThis property contains the TCP port for the proxy Server (default 80).
proxy_serverIf a proxy Server is given, then the HTTP request is sent to the proxy instead of the server otherwise specified.
proxy_sslThis property determines when to use SSL for the connection to the proxy.
proxy_userThis property contains a user name, if authentication is to be used for the proxy.
ssl_accept_server_cert_encodedThe certificate (PEM/base64 encoded).
ssl_cert_encodedThe certificate (PEM/base64 encoded).
ssl_cert_storeThe name of the certificate store for the client certificate.
ssl_cert_store_passwordIf the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store.
ssl_cert_store_typeThe type of certificate store for this certificate.
ssl_cert_subjectThe subject of the certificate used for client authentication.
ssl_server_cert_encodedThe certificate (PEM/base64 encoded).
timeoutA timeout for the class.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

configSets or retrieves a configuration setting.
post_requestSubmits a batch of requests to an OFX server through a single connection.
read_ofx_data_fileReads an OFX response from a file.
resetReset the internal state of the class and all properties to their default values.
write_ofx_data_fileWrites the OFX response sent by the server to a file.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

on_connection_statusFired to indicate changes in connection state.
on_errorInformation about errors during data delivery.
on_ssl_server_authenticationFired after the server presents its certificate to the client.
on_ssl_statusShows the progress of the secure connection.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

CacheContentIf true, the original XML is saved in a buffer.
ErrorOnEmptyAttrIf true, passing an invalid attribute to the Attr method will throw an exception.
IgnoreBadAttributePrefixesIf true, bad (unknown) attribute prefixes are ignored.
IgnoreBadElementPrefixesIf true, bad (unknown) element prefixes are ignored.
PreserveWhitespaceIf true, leading and trailing whitespace in element text is preserved.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
ProcessIdleEventsWhether the class uses its internal event loop to process events when the main thread is idle.
SelectWaitMillisThe length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks OFX 2020 Python Edition - Version 20.0 [Build 7941]