@@ -94,6 +94,11 @@ data class ListMessagesQueryParams(
9494 */
9595 @Json(name = " search_query_native" )
9696 val searchQueryNative : String? = null ,
97+ /* *
98+ * Pass in your metadata key and value pair to search for metadata.
99+ */
100+ @Json(name = " metadata_pair" )
101+ val metadataPair : Map <String , String >? = null ,
97102) : IQueryParams {
98103 class Builder {
99104 private var limit: Int? = null
@@ -113,6 +118,7 @@ data class ListMessagesQueryParams(
113118 private var hasAttachment: Boolean? = null
114119 private var fields: MessageFields ? = null
115120 private var searchQueryNative: String? = null
121+ private var metadataPair: Map <String , String >? = null
116122
117123 /* *
118124 * Sets the maximum number of objects to return.
@@ -236,6 +242,13 @@ data class ListMessagesQueryParams(
236242 */
237243 fun searchQueryNative (searchQueryNative : String? ) = apply { this .searchQueryNative = searchQueryNative }
238244
245+ /* *
246+ * Set the metadata key and value pair to search for metadata.
247+ * @param metadataPair The metadata key and value pair to search for metadata.
248+ * @return The builder
249+ */
250+ fun metadataPair (metadataPair : Map <String , String >? ) = apply { this .metadataPair = metadataPair }
251+
239252 /* *
240253 * Builds the [ListMessagesQueryParams] object.
241254 * @return The [ListMessagesQueryParams] object.
@@ -258,6 +271,7 @@ data class ListMessagesQueryParams(
258271 hasAttachment = hasAttachment,
259272 fields = fields,
260273 searchQueryNative = searchQueryNative,
274+ metadataPair = metadataPair,
261275 )
262276 }
263277}
0 commit comments