ClubReady Api

<back to all web services

CheckForPaymentProfile

The following routes are available for this service:
GET/sales/member/{MemberId}/profile/checkCheck a customer for payment profile(s)
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 CheckForPaymentProfileDto extends ApiDtoBase implements IConvertible
{
    int? MemberId;

    CheckForPaymentProfileDto({this.MemberId});
    CheckForPaymentProfileDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

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

class CheckForPaymentProfile extends CheckForPaymentProfileDto 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;

    /**
    * ID # of store member belongs to
    */
    // @ApiMember(DataType="integer", Description="ID # of store member belongs to", IsRequired=true, Name="StoreId", ParameterType="query")
    int? StoreId;

    /**
    * ID # of user to check
    */
    // @ApiMember(DataType="integer", Description="ID # of user to check", IsRequired=true, Name="MemberId", ParameterType="path")
    int? MemberId;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

    CheckForPaymentProfile({this.ApiKey,this.StoreId,this.MemberId,this.RestrictedId,this.RestrictedResourceType});
    CheckForPaymentProfile.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ApiKey': ApiKey,
        'StoreId': StoreId,
        'MemberId': MemberId,
        'RestrictedId': RestrictedId,
        'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
    });

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

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

Dart CheckForPaymentProfile DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

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

GET /sales/member/{MemberId}/profile/check HTTP/1.1 
Host: clubready.com 
Accept: text/jsv