ClubReady Api

<back to all web services

BookingStatusUpdateRequest

The following routes are available for this service:
POST/scheduling/booking-status-updateUpdate 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: 'www.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 .xml suffix or ?format=xml

HTTP + XML

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: www.clubready.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<BookingStatusUpdateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Scheduling.Model">
  <ApiKey xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</ApiKey>
  <ChainId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ChainId>
  <StoreId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</StoreId>
  <BookingId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Scheduling.Models.Dto.Requests">0</BookingId>
  <StatusId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Scheduling.Models.Dto.Requests">0</StatusId>
  <UserId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Scheduling.Models.Dto.Requests">0</UserId>
</BookingStatusUpdateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<BookingStatusUpdateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Scheduling.Model">
  <Message xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Scheduling.Models.Dto.Responses">String</Message>
  <Success xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Scheduling.Models.Dto.Responses">false</Success>
</BookingStatusUpdateResponse>