POST | /scheduling/booking-status-update | Update a Booking Status |
---|
import 'package:servicestack/servicestack.dart';
class ApiDtoBase implements IConvertible
{
String? ApiKey;
int? StoreId;
int? ChainId;
ApiDtoBase({this.ApiKey,this.StoreId,this.ChainId});
ApiDtoBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ApiKey = json['ApiKey'];
StoreId = json['StoreId'];
ChainId = json['ChainId'];
return this;
}
Map<String, dynamic> toJson() => {
'ApiKey': ApiKey,
'StoreId': StoreId,
'ChainId': ChainId
};
getTypeName() => "ApiDtoBase";
TypeContext? context = _ctx;
}
class BookingStatusUpdateRequestDto extends ApiDtoBase implements IConvertible
{
int? UserId;
int? StatusId;
int? BookingId;
BookingStatusUpdateRequestDto({this.UserId,this.StatusId,this.BookingId});
BookingStatusUpdateRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
UserId = json['UserId'];
StatusId = json['StatusId'];
BookingId = json['BookingId'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'UserId': UserId,
'StatusId': StatusId,
'BookingId': BookingId
});
getTypeName() => "BookingStatusUpdateRequestDto";
TypeContext? context = _ctx;
}
enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
class BookingStatusUpdateRequest extends BookingStatusUpdateRequestDto implements IRestrictedApiRequest, IConvertible
{
/**
* Api Key - grants access to resources
*/
// @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
String? ApiKey;
/**
* StoreId
*/
// @ApiMember(DataType="string", Description="StoreId", IsRequired=true, Name="StoreId", ParameterType="query")
int? StoreId;
/**
* UserID
*/
// @ApiMember(DataType="string", Description="UserID", IsRequired=true, Name="UserId", ParameterType="query")
int? UserId;
/**
* Status ID
*/
// @ApiMember(DataType="integer", Description="Status ID", IsRequired=true, Name="StatusId", ParameterType="query")
int? StatusId;
/**
* Booking ID
*/
// @ApiMember(DataType="integer", Description="Booking ID", IsRequired=true, Name="BookingId", ParameterType="query")
int? BookingId;
int? RestrictedId;
RestrictedResourceType? RestrictedResourceType;
BookingStatusUpdateRequest({this.ApiKey,this.StoreId,this.UserId,this.StatusId,this.BookingId,this.RestrictedId,this.RestrictedResourceType});
BookingStatusUpdateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
ApiKey = json['ApiKey'];
StoreId = json['StoreId'];
UserId = json['UserId'];
StatusId = json['StatusId'];
BookingId = json['BookingId'];
RestrictedId = json['RestrictedId'];
RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'ApiKey': ApiKey,
'StoreId': StoreId,
'UserId': UserId,
'StatusId': StatusId,
'BookingId': BookingId,
'RestrictedId': RestrictedId,
'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
});
getTypeName() => "BookingStatusUpdateRequest";
TypeContext? context = _ctx;
}
class BookingStatusUpdateResponseDto implements IConvertible
{
bool? Success;
String? Message;
BookingStatusUpdateResponseDto({this.Success,this.Message});
BookingStatusUpdateResponseDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Success = json['Success'];
Message = json['Message'];
return this;
}
Map<String, dynamic> toJson() => {
'Success': Success,
'Message': Message
};
getTypeName() => "BookingStatusUpdateResponseDto";
TypeContext? context = _ctx;
}
class BookingStatusUpdateResponse extends BookingStatusUpdateResponseDto implements IConvertible
{
bool? Success;
String? Message;
BookingStatusUpdateResponse({this.Success,this.Message});
BookingStatusUpdateResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Success = json['Success'];
Message = json['Message'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Success': Success,
'Message': Message
});
getTypeName() => "BookingStatusUpdateResponse";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
'BookingStatusUpdateRequestDto': TypeInfo(TypeOf.Class, create:() => BookingStatusUpdateRequestDto()),
'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
'BookingStatusUpdateRequest': TypeInfo(TypeOf.Class, create:() => BookingStatusUpdateRequest()),
'BookingStatusUpdateResponseDto': TypeInfo(TypeOf.Class, create:() => BookingStatusUpdateResponseDto()),
'BookingStatusUpdateResponse': TypeInfo(TypeOf.Class, create:() => BookingStatusUpdateResponse()),
});
Dart BookingStatusUpdateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /scheduling/booking-status-update HTTP/1.1
Host: clubready.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"ApiKey":"String","StoreId":0,"UserId":0,"StatusId":0,"BookingId":0,"RestrictedId":0,"RestrictedResourceType":"Store","ChainId":0}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Success":false,"Message":"String"}