title: Map Retrofit Response in Custom Model Kotlin
body: <p>onSuccess() of retrofit  </p>
  
  <pre><code>override fun onSuccess(call: Call&lt;Any?&gt;?, response: Response&lt;Any?&gt;, tag: Any?) {
          when (tag) {
              RequestCodes.API.LOGIN -&gt; {
                  val apiResponse = response.body() as? ModelAPIResponse
  
              val toast = Toast.makeText(
                  MainApplication.applicationContext(),
                  "Api Success=${apiResponse?.message}",
                  Toast.LENGTH_SHORT
              )
              toast.show()}}}
  </code></pre>
  
  <p>Image of database body</p>
  
  <p><a href="https://i.stack.imgur.com/aYIXR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aYIXR.png" alt="enter image description here"></a></p>
  
  <p>Model For Api Response</p>
  
  <pre><code>@SerializedName("statusCode")
  var statusCode: String? = null
  @SerializedName("message")
  var message: String? = null
  </code></pre>