File tree 2 files changed +11
-1
lines changed
commonMain/kotlin/com/adsbynimbus/openrtb/request
commonTest/kotlin/com.adsbynimbus.openrtb.request
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -70,9 +70,17 @@ public class User(
70
70
@Serializable
71
71
public class EID (
72
72
@JvmField @SerialName(" source" ) public val source : String ,
73
- @JvmField @SerialName(" uids" ) public var uids : Set <Segment >,
73
+ @JvmField @SerialName(" uids" ) public var uids : Set <UID >,
74
74
) {
75
75
override fun equals (other : Any? ): Boolean = other is EID && other.source == source
76
76
77
77
override fun hashCode (): Int = source.hashCode()
78
78
}
79
+
80
+ /* * Object representing the extended ID UID */
81
+ @Serializable
82
+ public class UID (
83
+ @JvmField @SerialName(" id" ) public var id : String ,
84
+ @JvmField @SerialName(" atype" ) public var atype : Int = 0 ,
85
+ @JvmField @SerialName(" ext" ) public var ext : Map <String , String > = mutableMapOf()
86
+ )
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ const val testJson = """
160
160
"uids": [
161
161
{
162
162
"id": "6bca7f6b-a98a-46c0-be05-6020f7604598",
163
+ "atype": 1,
163
164
"ext": {
164
165
"rtiPartner": "TDID"
165
166
}
@@ -246,6 +247,7 @@ class DeserializationTest : StringSpec({
246
247
247
248
val eid2 = first { it.source == " adserver.org" }.uids.first()
248
249
eid2.id shouldBe " 6bca7f6b-a98a-46c0-be05-6020f7604598"
250
+ eid2.atype shouldBe 1
249
251
eid2.ext.shouldContain("rtiPartner", "TDID ")
250
252
}
251
253
}
You can’t perform that action at this time.
0 commit comments