/* Options: Date: 2025-04-12 21:40:04 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //Package: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CurrencyQuery.* //ExcludeTypes: //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,net.servicestack.client.*,com.google.gson.annotations.*,com.google.gson.reflect.* */ import java.math.* import java.util.* import net.servicestack.client.* import com.google.gson.annotations.* import com.google.gson.reflect.* @Route(Path="/currencies", Verbs="GET") open class CurrencyQuery : QueryDb<Currency, CurrencyQueryResponse>(), IReturn<QueryResponse<CurrencyQueryResponse>> { /** * Id of the currency */ @ApiMember(Description="Id of the currency") var Id:String? = null /** * Only active currencies */ @ApiMember(Description="Only active currencies") var Active:Boolean? = null companion object { private val responseType = object : TypeToken<QueryResponse<CurrencyQueryResponse>>(){}.type } override fun getResponseType(): Any? = CurrencyQuery.responseType } @DataContract open class QueryResponse<CurrencyQueryResponse> { @DataMember(Order=1) var Offset:Int? = null @DataMember(Order=2) var Total:Int? = null @DataMember(Order=3) var Results:ArrayList<CurrencyQueryResponse> = ArrayList<CurrencyQueryResponse>() @DataMember(Order=4) var Meta:HashMap<String,String> = HashMap<String,String>() @DataMember(Order=5) var ResponseStatus:ResponseStatus? = null } open class QueryDb<From, Into> : QueryBase() { } open class Currency : BaseModel() { @Required() var Name:String? = null @Required() var CurrencySign:String? = null @Required() var Active:Boolean? = null var ModifiedDate:Date? = null @Required() var Id:String? = null } open class CurrencyQueryResponse { var Id:String? = null var Name:String? = null var Description:String? = null var CurrencySign:String? = null var Active:Boolean? = null var ResponseStatus:ResponseStatus? = null } @DataContract open class QueryBase { /** * Skip over a given number of elements in a sequence and then return the remainder. Use this when you need paging.<br/><br/><strong>Example:</strong><br/><code>?skip=10&orderBy=Id</code> */ @DataMember(Order=1) var Skip:Int? = null /** * Return a given number of elements in a sequence and then skip over the remainder. Use this when you need paging.<br/><br/><strong>Example:</strong><br/><code>?take=20</code> */ @DataMember(Order=2) var Take:Int? = null /** * Comma separated list of fields to order by. Prefix the field name with a minus if you wan't to invert the sort for that field.<br/><br/><strong>Example:</strong><br/><code>?orderBy=Id,-Age,FirstName</code> */ @DataMember(Order=3) var OrderBy:String? = null /** * Comma separated list of fields to order by in descending order. Prefix the field name with a minus if you wan't to invert the sort for that field.<br/><br/><strong>Example:</strong><br/><code>?orderByDesc=Id,-Age,FirstName</code> */ @DataMember(Order=4) var OrderByDesc:String? = null /** * Include any of the aggregates <code>AVG, COUNT, FIRST, LAST, MAX, MIN, SUM</code> in your result set. The results will be returned in the meta field.<br/><br/><strong>Example:</strong><br/><code>?include=COUNT(*) as Total</code><br/><br/>or multiple fields with<br/><code>?include=Count(*) Total, Min(Age), AVG(Age) AverageAge</code><br/></br>or unique with<br/><code>?include=COUNT(DISTINCT LivingStatus) as UniqueStatus</code> */ @DataMember(Order=5) var Include:String? = null @DataMember(Order=6) var Fields:String? = null @DataMember(Order=7) var Meta:HashMap<String,String> = HashMap<String,String>() } enum class Currency(val value:Int) { Sek(1), Eur(2), }