Adapter Request Handlers

AuthToken (MFA)

class q2_sdk.core.http_handlers.auth_token_handler.Q2AuthTokenRequestHandler(application, request, **kwargs)[source]

Bases: Q2AdapterRequestHandler

Adapter type for Multi Factor Authentication (MFA) after logging in via username/password in UUX

async handle_token(secret, otp, otp2)[source]

Evaluate token here, and return true to validate this token request, or false if it is not valid. The parameters will be passed in from UUX.

Parameters:
  • secret (str) – The token secret configured in Q2 Central

  • otp (str) – The token submitted by the user

  • otp2 (str) – The second submitted user token, if applicable

Return type:

bool

Returns:

True if token is valid. False if not.

FxRates

class q2_sdk.core.http_handlers.fx_rate_handler.Q2FxRateRequestHandler(application, request, **kwargs)[source]

Bases: Q2AdapterRequestHandler

Adapter type for Foreign Currency Exchange (FOREX) rate calculation. Invoked when constructing an International Wire.

async get_fx_quote_usd_equivalent(currency_code, amount, group_id)[source]

Quote for FX Rate

Parameters:
  • currency_code (str) – The 3 letter currency code as found in the Q2_CurrencyCode table

  • amount (Decimal) – USD equivalent amount of the currency to be converted. Example: currency_code is CAD, amount is 100 USD, then the request is to send the Canadian Dollar equivalent of 100 USD.

  • group_id (int) – The online banking user’s group id

Return type:

FxRateQuoteReplyUSDEquivalent

Returns:

FxRateQuoteReply instance

async get_fx_quote(currency_code, amount, group_id)[source]

Quote for FX Rate

Parameters:
  • currency_code (str) – The 3 letter currency code as found in the Q2_CurrencyCode table

  • amount (Decimal) – The amount of the currency to be converted

  • group_id (int) – The online banking user’s group id

Return type:

FxRateQuoteReply

Returns:

FxRateQuoteReply instance

async book_fx_quote(currency_code, amount, group_id)[source]

Execution of the order

Parameters:
  • currency_code (str) – The 3 letter currency code as found in the Q2_CurrencyCode table

  • amount (Decimal) – The amount of the currency to be converted

  • group_id (int) – The online banking user’s group id

Return type:

FxRateExchangeDealReply

Returns:

FxRateExchangeDealReply instance

async book_fx_quote_usd_equivalent(currency_code, amount, group_id)[source]

Execution of the order

Parameters:
  • currency_code (str) – The 3 letter currency code as found in the Q2_CurrencyCode table

  • amount (Decimal) – USD equivalent amount of the currency to be converted. Example: currency_code is CAD, amount is 100 USD, then the request is to send the Canadian Dollar equivalent of 100 USD.

  • group_id (int) – The online banking user’s group id

Return type:

FxRateExchangeDealReplyUSDEquivalent

Returns:

FxRateExchangeDealReply instance

async cancel_fx_quote(currency_code, amount, group_id)[source]

Reversal of the order

Parameters:
  • currency_code (str) – The 3 letter currency code as found in the Q2_CurrencyCode table

  • amount (Decimal) – The amount of the currency to be converted

  • group_id (int) – The online banking user’s group id

Return type:

FxRateExchangeDealReply

Returns:

FxRateExchangeDealReply instance

async cancel_fx_quote_usd_equivalent(currency_code, amount, group_id)[source]

Reversal of the order

Parameters:
  • currency_code (str) – The 3 letter currency code as found in the Q2_CurrencyCode table

  • amount (Decimal) – USD equivalent amount of the currency to be converted. Example: currency_code is CAD, amount is 100 USD, then the request is to send the Canadian Dollar equivalent of 100 USD.

  • group_id (int) – The online banking user’s group id

Return type:

FxRateExchangeDealReplyUSDEquivalent

Returns:

FxRateExchangeDealReply instance

CheckImage

class q2_sdk.core.http_handlers.check_image_handler.Q2CheckImageRequestHandler(application, request, **kwargs)[source]

Bases: Q2AdapterRequestHandler

Adapter type for displaying check images. Invoked when navigating through an account history page and selecting a transaction with a check image icon.

async get_check_images(check_image_request)[source]

Using the information provided in check_image_request param, return a list of CheckImages

Return type:

list[CheckImage]

DomesticWire

class q2_sdk.core.http_handlers.domestic_wire_handler.Q2DomesticWireRequestHandler(application, request, **kwargs)[source]

Bases: Q2AdapterRequestHandler

Adapter type for Domestic wires invoked by commercial users through UUX

async handle_domestic_wire(domestic_wire, source_account)[source]

Perform your domestic wire transfer here. If you return true, a transaction will be generated and visible throughout the q2 platform– only return ‘true’ on a success.

Parameters:
  • domestic_wire (DomesticWireRequest) – Wire destination and details submitted by user

  • source_account (HostAccountRequest) – The account from which to source the transfer

Return type:

bool

Returns:

True if the transaction should be generated. False if not.

InternationalWire

class q2_sdk.core.http_handlers.international_wire_handler.Q2InternationalWireRequestHandler(application, request, **kwargs)[source]

Bases: Q2AdapterRequestHandler

Adapter type for International wires invoked by commercial users through UUX

async handle_international_wire(international_wire, source_account)[source]

Perform your international wire transfer here. If you return true, a transaction will be generated and visible throughout the q2 platform– only return ‘true’ on a success.

Parameters:
  • international_wire (InternationalWireRequest) – Wire destination and details submitted by user

  • source_account (HostAccountRequest) – The account from which to source the transfer

Return type:

bool

Returns:

True if the transaction should be generated. False if not.

RemoteDeposit

class q2_sdk.core.http_handlers.remote_deposit_handler.Q2RemoteDepositRequestHandler(application, request, **kwargs)[source]

Bases: Q2AdapterRequestHandler

Adapter type for Remote Deposit including mRDC. Invoked when a user interacts with mobile remote deposit interfaces

async get_rdc_transaction_list(transaction_list_request)[source]

Using the information provided in transaction_list_request param, return a list of RDCTransactionResponse objects

Return type:

list[RDCTransactionResponse]

async get_rdc_transaction_detail(transaction_detail_request)[source]

Using the information provided in transaction_detail_request param, return a RDCTransactionHistoryDetailResponse object

Return type:

RDCTransactionHistoryDetailResponse

async capture_rdc(remote_deposit_capture_request)[source]

Using the information provided in remote_deposit_capture_request param, return a list of RDCSubmitResponse objects

Return type:

RDCCaptureResponse

async get_validations(remote_deposit_validation_request)[source]

Using the information provided in remote_deposit_validation_request param, return a Validation object

Return type:

RDCValidation