Required role: | API |
All Verbs | /api/Query/MembershipType |
---|
// @DataContract
export class QueryBase
{
// @DataMember(Order=1)
public Skip?: number;
// @DataMember(Order=2)
public Take?: number;
// @DataMember(Order=3)
public OrderBy?: string;
// @DataMember(Order=4)
public OrderByDesc?: string;
// @DataMember(Order=5)
public Include?: string;
// @DataMember(Order=6)
public Fields?: string;
// @DataMember(Order=7)
public Meta?: { [index: string]: string; };
public constructor(init?: Partial<QueryBase>) { (Object as any).assign(this, init); }
}
export class QueryDb<T> extends QueryBase
{
public constructor(init?: Partial<QueryDb<T>>) { super(init); (Object as any).assign(this, init); }
}
export class ScheduleInstance
{
public ScheduleId?: number;
public Name?: string;
public Description?: string;
public MondayFrom?: string;
public MondayTo?: string;
public TuesdayFrom?: string;
public TuesdayTo?: string;
public WednesdayFrom?: string;
public WednesdayTo?: string;
public ThursdayFrom?: string;
public ThursdayTo?: string;
public FridayFrom?: string;
public FridayTo?: string;
public SaturdayFrom?: string;
public SaturdayTo?: string;
public SundayFrom?: string;
public SundayTo?: string;
public ScheduleType?: number;
public Deleted?: boolean;
public Demo?: boolean;
public constructor(init?: Partial<ScheduleInstance>) { (Object as any).assign(this, init); }
}
export class MembershipTypeInstance
{
public MembershipTypeId?: number;
public Name?: string;
public Description?: string;
public Definition?: string;
public Schedule?: ScheduleInstance;
// @References("typeof(ClubManager.Api.Services.Query.ScheduleInstance)")
public ScheduleId?: number;
public Deleted?: boolean;
public Demo?: boolean;
public Public?: boolean;
public SessionsRemaining?: number;
public ClassesRemaining?: number;
public SortOrder?: number;
public Special?: boolean;
public MultiSiteAccess?: boolean;
public MemberLimit?: number;
public PromotionCode?: string;
public PromotionStart?: string;
public PromotionEnd?: string;
public LicensesRemaining?: number;
public BookingAccessOnly?: boolean;
public SessionsPeriod?: number;
public SessionsFrequency?: number;
public StartsOn?: string;
public AllowSelectionAfterStartsOn?: boolean;
public constructor(init?: Partial<MembershipTypeInstance>) { (Object as any).assign(this, init); }
}
// @AutoQueryViewer(Description="", IconUrl="octicon:database", Title="MembershipType")
export class FindMembershipType extends QueryDb<MembershipTypeInstance>
{
public constructor(init?: Partial<FindMembershipType>) { super(init); (Object as any).assign(this, init); }
}
// @DataContract
export class QueryResponse<T>
{
// @DataMember(Order=1)
public Offset?: number;
// @DataMember(Order=2)
public Total?: number;
// @DataMember(Order=3)
public Results?: T[];
// @DataMember(Order=4)
public Meta?: { [index: string]: string; };
// @DataMember(Order=5)
public ResponseStatus?: ResponseStatus;
public constructor(init?: Partial<QueryResponse<T>>) { (Object as any).assign(this, init); }
}
TypeScript FindMembershipType DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=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 } } }