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'
-
HasUserProperties:
BoolElement
= 'HasUserProperties'
-
BalanceHadeSystemProperty:
StringElement
= 'BalanceHadeSystemProperty'
-
VendorID:
- 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 ifFalse
or TableRow objects from DB calls ifTrue
(Defaults to settings file)
- GET_BY_NAME_KEY = 'VendorName'
- NAME = 'Vendor'
- 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.VendorNamevendor_id (
Optional
[int
]) – Q2_Vendor.VendorIDshow_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 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:
- 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