agrosner
10/22/2017, 12:45 PMitsJoseph
10/22/2017, 12:53 PMedwardwongtl
10/22/2017, 12:59 PMkingsley
10/22/2017, 1:21 PM// Java
public interface SomeService {
@GET(...)
Call<Foo> fetchFoo(@Query(...) String someParam);
}
//Kotlin
interface SomeService {
@GET(...)
fun fetchFoo(@Query(...) someParam: String): Call<Foo>
}
Feel free to look up Kotlin’s online reference: https://kotlinlang.org/docs/reference/basic-syntax.htmlitsJoseph
10/23/2017, 5:28 AMkingsley
10/23/2017, 8:02 AM@Element
into something like @get:Element
or @set:Element
depending on whether it should be on the getter/setter accordingly. In fact. Looking at your code again. You could reduce it to something like this:
@(...)
class ActivationWSReq(
@(...) var activationHeader: ActivationHeader? = null, //Perhaps change @Element here to @get:Element
@(...) var activationRequest: ActivationRequest? = null
)
@(...)
class ActivationHeader
@(...)
class ActivationRequest(
@(...) var activationMethod: ActivationMethod? = null
)
itsJoseph
10/23/2017, 10:07 AM