ClubManager.Api

<back to all web services

FindMembershipType

Requires Authentication
Required role:API
The following routes are available for this service:
All Verbs/api/Query/MembershipType
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


@AutoQueryViewer(Description="", IconUrl="octicon:database", Title="MembershipType")
open class FindMembershipType : QueryDb<MembershipTypeInstance>()
{
}

open class QueryDb<T> : QueryBase()
{
}

@DataContract
open class QueryBase
{
    @DataMember(Order=1)
    var Skip:Int? = null

    @DataMember(Order=2)
    var Take:Int? = null

    @DataMember(Order=3)
    var OrderBy:String? = null

    @DataMember(Order=4)
    var OrderByDesc:String? = null

    @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>()
}

open class MembershipTypeInstance
{
    var MembershipTypeId:Int? = null
    var Name:String? = null
    var Description:String? = null
    var Definition:String? = null
    var Schedule:ScheduleInstance? = null
    @References(ScheduleInstance.class)
    var ScheduleId:Int? = null

    var Deleted:Boolean? = null
    var Demo:Boolean? = null
    var Public:Boolean? = null
    var SessionsRemaining:Int? = null
    var ClassesRemaining:Int? = null
    var SortOrder:Int? = null
    var Special:Boolean? = null
    var MultiSiteAccess:Boolean? = null
    var MemberLimit:Int? = null
    var PromotionCode:String? = null
    var PromotionStart:Date? = null
    var PromotionEnd:Date? = null
    var LicensesRemaining:Int? = null
    var BookingAccessOnly:Boolean? = null
    var SessionsPeriod:Int? = null
    var SessionsFrequency:Int? = null
    var StartsOn:Date? = null
    var AllowSelectionAfterStartsOn:Boolean? = null
}

open class ScheduleInstance
{
    var ScheduleId:Int? = null
    var Name:String? = null
    var Description:String? = null
    var MondayFrom:TimeSpan? = null
    var MondayTo:TimeSpan? = null
    var TuesdayFrom:TimeSpan? = null
    var TuesdayTo:TimeSpan? = null
    var WednesdayFrom:TimeSpan? = null
    var WednesdayTo:TimeSpan? = null
    var ThursdayFrom:TimeSpan? = null
    var ThursdayTo:TimeSpan? = null
    var FridayFrom:TimeSpan? = null
    var FridayTo:TimeSpan? = null
    var SaturdayFrom:TimeSpan? = null
    var SaturdayTo:TimeSpan? = null
    var SundayFrom:TimeSpan? = null
    var SundayTo:TimeSpan? = null
    var ScheduleType:Int? = null
    var Deleted:Boolean? = null
    var Demo:Boolean? = null
}

@DataContract
open class QueryResponse<T>
{
    @DataMember(Order=1)
    var Offset:Int? = null

    @DataMember(Order=2)
    var Total:Int? = null

    @DataMember(Order=3)
    var Results:ArrayList<T> = ArrayList<T>()

    @DataMember(Order=4)
    var Meta:HashMap<String,String> = HashMap<String,String>()

    @DataMember(Order=5)
    var ResponseStatus:ResponseStatus? = null
}

Kotlin FindMembershipType DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/Query/MembershipType HTTP/1.1 
Host: api.clubmanagercentral.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Skip: 0,
	Take: 0,
	OrderBy: String,
	OrderByDesc: String,
	Include: String,
	Fields: String,
	Meta: 
	{
		String: String
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Offset: 0,
	Total: 0,
	Results: 
	[
		{
			MembershipTypeId: 0,
			Name: String,
			Description: String,
			Definition: String,
			Schedule: 
			{
				ScheduleId: 0,
				Name: String,
				Description: String,
				MondayFrom: PT0S,
				MondayTo: PT0S,
				TuesdayFrom: PT0S,
				TuesdayTo: PT0S,
				WednesdayFrom: PT0S,
				WednesdayTo: PT0S,
				ThursdayFrom: PT0S,
				ThursdayTo: PT0S,
				FridayFrom: PT0S,
				FridayTo: PT0S,
				SaturdayFrom: PT0S,
				SaturdayTo: PT0S,
				SundayFrom: PT0S,
				SundayTo: PT0S,
				ScheduleType: 0,
				Deleted: False,
				Demo: False
			},
			ScheduleId: 0,
			Deleted: False,
			Demo: False,
			Public: False,
			SessionsRemaining: 0,
			ClassesRemaining: 0,
			SortOrder: 0,
			Special: False,
			MultiSiteAccess: False,
			MemberLimit: 0,
			PromotionCode: String,
			PromotionStart: 0001-01-01,
			PromotionEnd: 0001-01-01,
			LicensesRemaining: 0,
			BookingAccessOnly: False,
			SessionsPeriod: 0,
			SessionsFrequency: 0,
			StartsOn: 0001-01-01,
			AllowSelectionAfterStartsOn: False
		}
	],
	Meta: 
	{
		String: String
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}