Hello,
according to docs the inactive param set to true should return both active and inactive entity records:
# retrieves all active or inactive employees
qbo_api.all(:employees, inactive: true).each do |e|
p "#{e['Id']} #{e['DisplayName']}"
end
Current default is inactive = false. Which kind of indicates that it will return only active records.
Currently both active and inactive records are returned when the inactive param is set to false (tested on TaxCode). Which looks little bit like a change in default QBO behavior.
def build_all_query(entity, select: nil, inactive: false)
select ||= "SELECT * FROM #{singular(entity)}"
select += join_or_start_where_clause!(select: select) + 'Active IN ( true, false )' if inactive
select
end
If the inactive param should behave as expected it should always add condition e.g.:
def build_all_query(entity, select: nil, inactive: false)
select ||= "SELECT * FROM #{singular(entity)}"
active_condition = inactive ? 'Active IN ( true, false )' : 'Active = true'
select += join_or_start_where_clause!(select: select) + active_condition
select
end
Thank you.
Hello,
according to docs the inactive param set to true should return both active and inactive entity records:
Current default is
inactive = false. Which kind of indicates that it will return only active records.Currently both active and inactive records are returned when the inactive param is set to false (tested on TaxCode). Which looks little bit like a change in default QBO behavior.
If the inactive param should behave as expected it should always add condition e.g.:
Thank you.