QuickBooks Integrator 2020 Python Edition

Questions / Feedback?

on_get_last_error Event

Fires when QuickBooks Web Connector checks for error information.

Syntax

class QBWCServerGetLastErrorEventParams(object):
  @property
  def session_ticket() -> str: ...
  @property
  def pause() -> bool: ...
  @pause.setter
  def pause(value) -> None: ...
  @property
  def interactive_mode() -> bool: ...
  @interactive_mode.setter
  def interactive_mode(value) -> None: ...
  @property
  def error_message() -> str: ...
  @error_message.setter
  def error_message(value) -> None: ...

# In class QBWCServer:
@property
def on_get_last_error() -> Callable[[QBWCServerGetLastErrorEventParams], None]: ...
@on_get_last_error.setter
def on_get_last_error(event_hook: Callable[[QBWCServerGetLastErrorEventParams], None]) -> None: ...

Remarks

This event allows you to report an error to QuickBooks Web Connector. It will be fired whenever QuickBooks Web Connector detects an error condition and asks your application for details. The parameters are as follows:

SessionTicket identifies the session.

Pause may be set to True to introduce a brief delay, after which QuickBooks Web Connector will retry the previous operation. For instance, the following sequence of events may occur:

  • QuickBooks Web Connector makes a call and on_send_request fires.
  • You set the Request parameter inside on_send_request to empty string.
  • QuickBooks Web Connector determines the empty request as an error and makes a call which fires the on_get_last_error event.
  • You set the Pause parameter inside this event to True.
  • QuickBooks Web Connector reads the response and waits 5 seconds.
  • QuickBooks Web Connector retries the previous operation and makes a call which fires on_send_request again.

InteractiveMode may be set to request interactive mode. When set to True the QuickBooks Web Connector will prompt the user to accept an interactive session. If the user agrees, QuickBooks Web Connector will make a call and the on_get_interactive_url event will fire. If the user declines, QuickBooks Web Connector will report this and the on_interactive_rejected event will fire.

ErrorMessage may be set to any string which will be reported to the QuickBooks Web Connector.

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