CurrencyExchangeRate

class q2_sdk.hq.db.currency_exchange_rate.RateRequest(StartDate, ExpireDate, SourceAuthority, SourceCurrency, ExchangeRate, ExchangeCurrency)[source]

Bases: object

RateRequest(StartDate: str, ExpireDate: str, SourceAuthority: str, SourceCurrency: str, ExchangeRate: str | float, ExchangeCurrency: str)

StartDate: str
ExpireDate: str
SourceAuthority: str
SourceCurrency: str
ExchangeRate: str | float
ExchangeCurrency: str
class q2_sdk.hq.db.currency_exchange_rate.ImportRates(rates)[source]

Bases: object

ImportRates(rates: List[q2_sdk.hq.db.currency_exchange_rate.RateRequest])

rates: List[RateRequest]
class q2_sdk.hq.db.currency_exchange_rate.ExchangeRateResponse(success, error_messages)[source]

Bases: object

ExchangeRateResponse(success: bool, error_messages: List[str])

success: bool
error_messages: List[str]
class q2_sdk.hq.db.currency_exchange_rate.CurrencyExchangeRateRow[source]

Bases: RepresentationRowBase

StartDate: StringElement = 'StartDate'
ExpireDate: StringElement = 'ExpireDate'
SourceAuthority: StringElement = 'SourceAuthority'
SourceCurrency: StringElement = 'SourceCurrency'
ExchangeRate: StringElement = 'ExchangeRate'
ExchangeCurrency: StringElement = 'ExchangeCurrency'
class q2_sdk.hq.db.currency_exchange_rate.CurrencyExchangeRate(logger=None, hq_credentials=None, ret_table_obj=None)[source]

Bases: DbObject

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)

NAME = 'CurrencyExchangeRate'
REPRESENTATION_ROW_CLASS

alias of CurrencyExchangeRateRow

async get(source='', destination='')[source]
async create(rate_data)[source]
Return type:

List[CurrencyExchangeRateRow]