ClubReady Api

<back to all web services

CreateZipWhipMessageRequest

The following routes are available for this service:
POST/users/{UserId}/zipwhipmessage/createAdd a ZipWhip message to a user account.
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 CreateZipWhipMessageRequestDto extends ApiDtoBase implements IConvertible
{
    int? UserId;
    String? Subject;
    String? Text;
    int? PostedBy;

    CreateZipWhipMessageRequestDto({this.UserId,this.Subject,this.Text,this.PostedBy});
    CreateZipWhipMessageRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        UserId = json['UserId'];
        Subject = json['Subject'];
        Text = json['Text'];
        PostedBy = json['PostedBy'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'UserId': UserId,
        'Subject': Subject,
        'Text': Text,
        'PostedBy': PostedBy
    });

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

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

class CreateZipWhipMessageRequest extends CreateZipWhipMessageRequestDto 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;

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

    /**
    * Create note for this ClubReady User ID
    */
    // @ApiMember(DataType="integer", Description="Create note for this ClubReady User ID", IsRequired=true, Name="UserId", ParameterType="query")
    int? UserId;

    /**
    * Subject of the message (Up to 255 characters)
    */
    // @ApiMember(DataType="string", Description="Subject of the message (Up to 255 characters)", IsRequired=true, Name="Subject", ParameterType="query")
    String? Subject;

    /**
    * Text body of the message (Up to 2000 characters)
    */
    // @ApiMember(DataType="string", Description="Text body of the message (Up to 2000 characters)", IsRequired=true, Name="Text", ParameterType="query")
    String? Text;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

    CreateZipWhipMessageRequest({this.ApiKey,this.StoreId,this.UserId,this.Subject,this.Text,this.RestrictedId,this.RestrictedResourceType});
    CreateZipWhipMessageRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        ApiKey = json['ApiKey'];
        StoreId = json['StoreId'];
        UserId = json['UserId'];
        Subject = json['Subject'];
        Text = json['Text'];
        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,
        'Subject': Subject,
        'Text': Text,
        'RestrictedId': RestrictedId,
        'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
    });

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

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

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

class CreateZipWhipMessageResponseDto extends ApiResponseBase implements IConvertible
{
    int? NoteId;
    int? ContactLogId;
    int? TaskId;

    CreateZipWhipMessageResponseDto({this.NoteId,this.ContactLogId,this.TaskId});
    CreateZipWhipMessageResponseDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        NoteId = json['NoteId'];
        ContactLogId = json['ContactLogId'];
        TaskId = json['TaskId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'NoteId': NoteId,
        'ContactLogId': ContactLogId,
        'TaskId': TaskId
    });

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

class CreateZipWhipMessageResponse extends CreateZipWhipMessageResponseDto implements IConvertible
{
    bool? Success;
    String? Message;
    int? NoteId;
    int? ContactLogId;
    int? TaskId;

    CreateZipWhipMessageResponse({this.Success,this.Message,this.NoteId,this.ContactLogId,this.TaskId});
    CreateZipWhipMessageResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Success = json['Success'];
        Message = json['Message'];
        NoteId = json['NoteId'];
        ContactLogId = json['ContactLogId'];
        TaskId = json['TaskId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Success': Success,
        'Message': Message,
        'NoteId': NoteId,
        'ContactLogId': ContactLogId,
        'TaskId': TaskId
    });

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

TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
    'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
    'CreateZipWhipMessageRequestDto': TypeInfo(TypeOf.Class, create:() => CreateZipWhipMessageRequestDto()),
    'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
    'CreateZipWhipMessageRequest': TypeInfo(TypeOf.Class, create:() => CreateZipWhipMessageRequest()),
    'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()),
    'CreateZipWhipMessageResponseDto': TypeInfo(TypeOf.Class, create:() => CreateZipWhipMessageResponseDto()),
    'CreateZipWhipMessageResponse': TypeInfo(TypeOf.Class, create:() => CreateZipWhipMessageResponse()),
});

Dart CreateZipWhipMessageRequest DTOs

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

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /users/{UserId}/zipwhipmessage/create HTTP/1.1 
Host: clubready.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"ApiKey":"String","StoreId":0,"UserId":0,"Subject":"String","Text":"String","RestrictedId":0,"RestrictedResourceType":"Store","PostedBy":0,"ChainId":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Success":false,"Message":"String","NoteId":0,"ContactLogId":0,"TaskId":0}