toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  return {
    'name': 'SEARCH', // SEARCH is required
    'query': query,
    if(trigger != null && trigger != '') 'trigger': trigger,
    if(service != null && service != '') 'service': service,
    if(mode != null && mode != '') 'mode': mode,
    if(filters != null) 'filters': filters,
    if(ordering != null) 'ordering': ordering,
    'sessionId': sessionId,
    'userId': userId,
    'device': device,
    'os': os,
    'lang': lang,
  };
}