forked from NdoleStudio/httpsms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModels.kt
More file actions
72 lines (54 loc) · 1.42 KB
/
Models.kt
File metadata and controls
72 lines (54 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package com.httpsms
import com.beust.klaxon.Json
import com.beust.klaxon.Klaxon
data class ResponseMessage (
val data: Message,
val message: String,
val status: String
) {
companion object {
fun fromJson(json: String) = Klaxon().parse<ResponseMessage>(json)
}
}
data class ResponsePhone (
val data: Phone,
val message: String,
val status: String,
) {
companion object {
fun fromJson(json: String) = Klaxon().parse<ResponsePhone>(json)
}
}
data class Phone (
val id: String,
@Json(name = "user_id")
val userID: String,
)
data class Message (
val contact: String,
val content: String,
val sim: String,
@Json(name = "created_at")
val createdAt: String,
@Json(name = "failure_reason")
val failureReason: String?,
val id: String,
@Json(name = "last_attempted_at")
val lastAttemptedAt: String?,
@Json(name = "order_timestamp")
val orderTimestamp: String,
val owner: String,
@Json(name = "received_at")
val receivedAt: String?,
val encrypted: Boolean,
@Json(name = "request_received_at")
val requestReceivedAt: String,
@Json(name = "send_time")
val sendTime: Long?,
@Json(name = "sent_at")
val sentAt: String?,
val status: String,
val type: String,
@Json(name = "updated_at")
val updatedAt: String
)