class Quickbooks::Model::ChangeDataCapture

def all_of_type(entity)

def all_of_type(entity)
  parse_block(xml.css(entity).first.parent, entity)
end

def all_types

def all_types
   data = {}
   TYPES.each do |entity|
     if xml.css(entity).first != nil
       data[entity] = all_of_type(entity)
     end
   end
   data
end

def parse_block(node, entity)

def parse_block(node, entity)
  model = "Quickbooks::Model::#{entity}".constantize
  models = []
  all_items = node.css(entity).map do |item|
    if item.attribute("status").try(:value) == "Deleted"
      Quickbooks::Model::ChangeModel.from_xml(item)
    else
      model.from_xml(item)
    end
  end
end

def time


more information @here - https://developer.intuit.com/app/developer/qbo/docs/develop/explore-the-quickbooks-online-api/change-data-capture#using-change-data-capture
time when refresh was requests from cdc/ endpoiint
def time
  attribute = xml.root.attribute('time')
  attribute.value if attribute
end