ClubReady Api

<back to all web services

AddUserWaiverRequest

The following routes are available for this service:
POST/users/{UserId}/add-waiverAdd a waiver for a user.
import 'package:servicestack/servicestack.dart';

enum RestrictedResourceType
{
    Store,
    Chain,
    User,
    Undefined,
}

class AddUserWaiverRequest 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;

    /**
    * Store ID
    */
    // @ApiMember(DataType="integer", Description="Store ID", IsRequired=true, Name="StoreId", ParameterType="query")
    int? StoreId;

    /**
    * ClubReady User ID
    */
    // @ApiMember(DataType="integer", Description="ClubReady User ID", IsRequired=true, Name="UserId", ParameterType="path")
    int? UserId;

    /**
    * Form ID
    */
    // @ApiMember(DataType="integer", Description="Form ID", Name="FormId", ParameterType="query")
    int? FormId;

    /**
    * Base64 encoded PDF string
    */
    // @ApiMember(DataType="string", Description="Base64 encoded PDF string", IsRequired=true, Name="WaiverPdf", ParameterType="form")
    String? WaiverPdf;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

    AddUserWaiverRequest({this.ApiKey,this.StoreId,this.UserId,this.FormId,this.WaiverPdf,this.RestrictedId,this.RestrictedResourceType});
    AddUserWaiverRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ApiKey = json['ApiKey'];
        StoreId = json['StoreId'];
        UserId = json['UserId'];
        FormId = json['FormId'];
        WaiverPdf = json['WaiverPdf'];
        RestrictedId = json['RestrictedId'];
        RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ApiKey': ApiKey,
        'StoreId': StoreId,
        'UserId': UserId,
        'FormId': FormId,
        'WaiverPdf': WaiverPdf,
        'RestrictedId': RestrictedId,
        'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
    };

    getTypeName() => "AddUserWaiverRequest";
    TypeContext? context = _ctx;
}

class AddUserWaiverResponse implements IConvertible
{
    bool? Success;
    String? Message;

    AddUserWaiverResponse({this.Success,this.Message});
    AddUserWaiverResponse.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() => "AddUserWaiverResponse";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'www.clubready.com', types: <String, TypeInfo> {
    'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
    'AddUserWaiverRequest': TypeInfo(TypeOf.Class, create:() => AddUserWaiverRequest()),
    'AddUserWaiverResponse': TypeInfo(TypeOf.Class, create:() => AddUserWaiverResponse()),
});

Dart AddUserWaiverRequest 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 /users/{UserId}/add-waiver HTTP/1.1 
Host: www.clubready.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<AddUserWaiverRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Members.Model">
  <ApiKey>String</ApiKey>
  <FormId>0</FormId>
  <StoreId>0</StoreId>
  <UserId>0</UserId>
  <WaiverPdf>String</WaiverPdf>
</AddUserWaiverRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AddUserWaiverResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Members.Model">
  <Message>String</Message>
  <Success>false</Success>
</AddUserWaiverResponse>