class Attio::List

def add_record(record_id, **opts)

Add a record to this list
def add_record(record_id, **opts)
  list_id = id.is_a?(Hash) ? id["list_id"] : id
  client = Attio.client(api_key: opts[:api_key])
  # The API expects parent_record_id, parent_object, and entry_values
  request_data = {
    data: {
      parent_record_id: record_id,
      parent_object: object, # Get the parent object from the list
      entry_values: {}
    }
  }
  response = client.post("lists/#{list_id}/entries", request_data)
  # Return the entry data
  response["data"] || response
end