Requires any of the roles: | Admin, TeamAdmin, MobileApp | Required permission: | Tickets.Add |
PUT | /Event |
---|
import 'package:servicestack/servicestack.dart';
class Event implements IConvertible
{
int? id;
String? name;
String? description;
String? externalReference;
DateTime? timeOfEvent;
int? eventLocationId;
int? eventSeriesId;
int? eventOwnerId;
bool? eventActive;
String? defaultValues;
String? externalReferenceType;
bool? postponedNoDate;
String? awayTeamExternalId;
String? sportGenderId;
bool? saleIsActive;
String? seatingImageUrl;
int? venueId;
int? awayTeamOwnerId;
String? detailedDescription;
String? imageUrl;
String? directAccessCode;
String? imageUrl2;
bool? hideEvent;
bool? ownerCardsNotAllowed;
DateTime? endOfEvent;
DateTime? endOfEventUTC;
String? timeZone;
DateTime? timeOfEventUTC;
Event({this.id,this.name,this.description,this.externalReference,this.timeOfEvent,this.eventLocationId,this.eventSeriesId,this.eventOwnerId,this.eventActive,this.defaultValues,this.externalReferenceType,this.postponedNoDate,this.awayTeamExternalId,this.sportGenderId,this.saleIsActive,this.seatingImageUrl,this.venueId,this.awayTeamOwnerId,this.detailedDescription,this.imageUrl,this.directAccessCode,this.imageUrl2,this.hideEvent,this.ownerCardsNotAllowed,this.endOfEvent,this.endOfEventUTC,this.timeZone,this.timeOfEventUTC});
Event.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
description = json['description'];
externalReference = json['externalReference'];
timeOfEvent = JsonConverters.fromJson(json['timeOfEvent'],'DateTime',context!);
eventLocationId = json['eventLocationId'];
eventSeriesId = json['eventSeriesId'];
eventOwnerId = json['eventOwnerId'];
eventActive = json['eventActive'];
defaultValues = json['defaultValues'];
externalReferenceType = json['externalReferenceType'];
postponedNoDate = json['postponedNoDate'];
awayTeamExternalId = json['awayTeamExternalId'];
sportGenderId = json['sportGenderId'];
saleIsActive = json['saleIsActive'];
seatingImageUrl = json['seatingImageUrl'];
venueId = json['venueId'];
awayTeamOwnerId = json['awayTeamOwnerId'];
detailedDescription = json['detailedDescription'];
imageUrl = json['imageUrl'];
directAccessCode = json['directAccessCode'];
imageUrl2 = json['imageUrl2'];
hideEvent = json['hideEvent'];
ownerCardsNotAllowed = json['ownerCardsNotAllowed'];
endOfEvent = JsonConverters.fromJson(json['endOfEvent'],'DateTime',context!);
endOfEventUTC = JsonConverters.fromJson(json['endOfEventUTC'],'DateTime',context!);
timeZone = json['timeZone'];
timeOfEventUTC = JsonConverters.fromJson(json['timeOfEventUTC'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'description': description,
'externalReference': externalReference,
'timeOfEvent': JsonConverters.toJson(timeOfEvent,'DateTime',context!),
'eventLocationId': eventLocationId,
'eventSeriesId': eventSeriesId,
'eventOwnerId': eventOwnerId,
'eventActive': eventActive,
'defaultValues': defaultValues,
'externalReferenceType': externalReferenceType,
'postponedNoDate': postponedNoDate,
'awayTeamExternalId': awayTeamExternalId,
'sportGenderId': sportGenderId,
'saleIsActive': saleIsActive,
'seatingImageUrl': seatingImageUrl,
'venueId': venueId,
'awayTeamOwnerId': awayTeamOwnerId,
'detailedDescription': detailedDescription,
'imageUrl': imageUrl,
'directAccessCode': directAccessCode,
'imageUrl2': imageUrl2,
'hideEvent': hideEvent,
'ownerCardsNotAllowed': ownerCardsNotAllowed,
'endOfEvent': JsonConverters.toJson(endOfEvent,'DateTime',context!),
'endOfEventUTC': JsonConverters.toJson(endOfEventUTC,'DateTime',context!),
'timeZone': timeZone,
'timeOfEventUTC': JsonConverters.toJson(timeOfEventUTC,'DateTime',context!)
};
getTypeName() => "Event";
TypeContext? context = _ctx;
}
class EventResult implements IConvertible
{
Event? item;
int? statusCode;
String? message;
EventResult({this.item,this.statusCode,this.message});
EventResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
item = JsonConverters.fromJson(json['item'],'Event',context!);
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'item': JsonConverters.toJson(item,'Event',context!),
'statusCode': statusCode,
'message': message
};
getTypeName() => "EventResult";
TypeContext? context = _ctx;
}
class EventUpdateRequest implements IConvertible
{
Event? item;
EventUpdateRequest({this.item});
EventUpdateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
item = JsonConverters.fromJson(json['item'],'Event',context!);
return this;
}
Map<String, dynamic> toJson() => {
'item': JsonConverters.toJson(item,'Event',context!)
};
getTypeName() => "EventUpdateRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_autoupdates_live.smartnewapis.com', types: <String, TypeInfo> {
'Event': TypeInfo(TypeOf.Class, create:() => Event()),
'EventResult': TypeInfo(TypeOf.Class, create:() => EventResult()),
'EventUpdateRequest': TypeInfo(TypeOf.Class, create:() => EventUpdateRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /Event HTTP/1.1
Host: stubbur-autoupdates-live.smartnewapis.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"item":{"id":0,"name":"String","description":"String","externalReference":"String","timeOfEvent":"0001-01-01T00:00:00.0000000","eventLocationId":0,"eventSeriesId":0,"eventOwnerId":0,"eventActive":false,"defaultValues":"String","externalReferenceType":"String","postponedNoDate":false,"awayTeamExternalId":"String","sportGenderId":"String","saleIsActive":false,"seatingImageUrl":"String","venueId":0,"awayTeamOwnerId":0,"detailedDescription":"String","imageUrl":"String","directAccessCode":"String","imageUrl2":"String","hideEvent":false,"ownerCardsNotAllowed":false,"endOfEvent":"0001-01-01T00:00:00.0000000","endOfEventUTC":"0001-01-01T00:00:00.0000000","timeZone":"String","timeOfEventUTC":"0001-01-01T00:00:00.0000000"}}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"item":{"id":0,"name":"String","description":"String","externalReference":"String","timeOfEvent":"0001-01-01T00:00:00.0000000","eventLocationId":0,"eventSeriesId":0,"eventOwnerId":0,"eventActive":false,"defaultValues":"String","externalReferenceType":"String","postponedNoDate":false,"awayTeamExternalId":"String","sportGenderId":"String","saleIsActive":false,"seatingImageUrl":"String","venueId":0,"awayTeamOwnerId":0,"detailedDescription":"String","imageUrl":"String","directAccessCode":"String","imageUrl2":"String","hideEvent":false,"ownerCardsNotAllowed":false,"endOfEvent":"0001-01-01T00:00:00.0000000","endOfEventUTC":"0001-01-01T00:00:00.0000000","timeZone":"String","timeOfEventUTC":"0001-01-01T00:00:00.0000000"},"statusCode":0,"message":"String"}