Vendor

class q2_sdk.hq.db.vendor.VendorRow[source]

Bases: BaseFormRow

VendorID: IntElement = 'VendorID'
VendorName: StringElement = 'VendorName'
ActionID: IntElement = 'ActionID'
PropertyID: IntElement = 'PropertyID'
PropertyName: StringElement = 'PropertyName'
ParametersBitflag: IntElement = 'ParametersBitflag'
VendorAddressID: IntElement = 'VendorAddressID'
PurgeAcctListOnSuccess: BoolElement = 'PurgeAcctListOnSuccess'
PayloadStoredProc: StringElement = 'PayloadStoredProc'
Address: StringElement = 'Address'
Description: StringElement = 'Description'
TextValue: StringElement = 'TextValue'
NavigationNodeID: IntElement = 'NavigationNodeID'
HasUserProperties: BoolElement = 'HasUserProperties'
BalanceHadeSystemProperty: StringElement = 'BalanceHadeSystemProperty'
class q2_sdk.hq.db.vendor.Vendor(logger, hq_credentials=None, ret_table_obj=None)[source]

Bases: InstallerObj

Programmatic access to the Q2 database. Not as flexible as a true ORM, but takes the guesswork out of database schemas and ensures safety in the transactions.

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

  • hq_credentials (Optional[HqCredentials]) – HQ Connectivity Information (Defaults to settings file)

  • ret_table_obj (Optional[bool]) – Flag to return list of LXML elements if False or TableRow objects from DB calls if True (Defaults to settings file)

GET_BY_NAME_KEY = 'VendorName'
NAME = 'Vendor'
REPRESENTATION_ROW_CLASS

alias of VendorRow

add_arguments(parser)[source]

Hook for subclassed DbObjects to add custom arguments.

async get(serialize_for_cli=False, short_name=None, vendor_id=None, show_all=False, with_groups=False)[source]
Parameters:
  • serialize_for_cli – Used when running from the command line

  • short_name (Optional[str]) – Q2_Vendor.VendorName

  • vendor_id (Optional[int]) – Q2_Vendor.VendorID

  • show_all – By default we only show SSO Vendor entries.

  • with_groups – Include group associations (can be costly for large payloads)

Return type:

List[VendorRow]

Returns:

async get_by_name(name, **kwargs)[source]
Return type:

VendorRow

async create(vendor_name, vendor_address_id=None, audit_action_id=None, parameter_bit_flag=None, purge_account_list=False, payload_stored_proc=None, property_name=None, balance_hade_system_property=None)[source]
Return type:

VendorRow

async delete(vendor_name)[source]
async update(vendor_id, vendor_name=<DEFAULT_DB_PARAM>, parameters_bit_flag=<DEFAULT_DB_PARAM>, audit_action_id=<DEFAULT_DB_PARAM>, property_id=<DEFAULT_DB_PARAM>, payload_stored_proc=<DEFAULT_DB_PARAM>, purge_account_list=<DEFAULT_DB_PARAM>, balance_hade_system_property=None, serialize_for_cli=False)[source]

Updates Q2_Vendors. Any value that is not passed takes the existing value in the db as default value