Requires any of the roles: | Admin, TeamAdmin, MobileApp | Required permission: | Tickets.Add |
PUT | /Venue |
---|
import 'package:servicestack/servicestack.dart';
class Venue implements IConvertible
{
int? id;
String? name;
String? countryCode;
double? latitude;
double? longitude;
Venue({this.id,this.name,this.countryCode,this.latitude,this.longitude});
Venue.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
countryCode = json['countryCode'];
latitude = JsonConverters.toDouble(json['latitude']);
longitude = JsonConverters.toDouble(json['longitude']);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'countryCode': countryCode,
'latitude': latitude,
'longitude': longitude
};
getTypeName() => "Venue";
TypeContext? context = _ctx;
}
class VenueResult implements IConvertible
{
Venue? item;
int? statusCode;
String? message;
VenueResult({this.item,this.statusCode,this.message});
VenueResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
item = JsonConverters.fromJson(json['item'],'Venue',context!);
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'item': JsonConverters.toJson(item,'Venue',context!),
'statusCode': statusCode,
'message': message
};
getTypeName() => "VenueResult";
TypeContext? context = _ctx;
}
class VenueUpdateRequest implements IConvertible
{
Venue? item;
VenueUpdateRequest({this.item});
VenueUpdateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
item = JsonConverters.fromJson(json['item'],'Venue',context!);
return this;
}
Map<String, dynamic> toJson() => {
'item': JsonConverters.toJson(item,'Venue',context!)
};
getTypeName() => "VenueUpdateRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_autoupdates_live.smartnewapis.com', types: <String, TypeInfo> {
'Venue': TypeInfo(TypeOf.Class, create:() => Venue()),
'VenueResult': TypeInfo(TypeOf.Class, create:() => VenueResult()),
'VenueUpdateRequest': TypeInfo(TypeOf.Class, create:() => VenueUpdateRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /Venue HTTP/1.1
Host: stubbur-autoupdates-live.smartnewapis.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<VenueUpdateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Item xmlns:d2p1="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel.Types">
<d2p1:CountryCode>String</d2p1:CountryCode>
<d2p1:ID>0</d2p1:ID>
<d2p1:Latitude>0</d2p1:Latitude>
<d2p1:Longitude>0</d2p1:Longitude>
<d2p1:Name>String</d2p1:Name>
</Item>
</VenueUpdateRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <VenueResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel"> <Item xmlns:d2p1="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel.Types"> <d2p1:CountryCode>String</d2p1:CountryCode> <d2p1:ID>0</d2p1:ID> <d2p1:Latitude>0</d2p1:Latitude> <d2p1:Longitude>0</d2p1:Longitude> <d2p1:Name>String</d2p1:Name> </Item> <Message>String</Message> <StatusCode>0</StatusCode> </VenueResult>