ClubReady Api

<back to all web services

WalletTokenCreateEndpoint

The following routes are available for this service:
GET/sales/wallet/wallettokencreateCreates a Wallet Token for a user
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;
}

// @DataContract
enum OwnerType
{
    Unknown,
    User,
    ConvUser,
    TempCart,
    TempAgmt,
    Store,
    Chain,
    Division,
    District,
    AdminType,
    TempStUser,
    VaultApi,
    Company,
    BackOfficeStore,
    OrgUser,
    CartItem,
    Testing,
    System,
    Error,
}

enum WalletPage
{
    Uninitialized,
    Manage,
    Add,
    AddCard,
    AddBank,
    AddMini,
    AddCardMini,
    AddBankMini,
}

class WalletTokenCreateRequestDto extends ApiDtoBase implements IConvertible
{
    int? OwnerId;
    OwnerType? OwnerType;
    int? CreatorId;
    WalletPage? Page;
    String? Theme;
    bool? AllowDeleteProfile;
    bool? AllowDisableProfile;

    WalletTokenCreateRequestDto({this.OwnerId,this.OwnerType,this.CreatorId,this.Page,this.Theme,this.AllowDeleteProfile,this.AllowDisableProfile});
    WalletTokenCreateRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        OwnerId = json['OwnerId'];
        OwnerType = JsonConverters.fromJson(json['OwnerType'],'OwnerType',context!);
        CreatorId = json['CreatorId'];
        Page = JsonConverters.fromJson(json['Page'],'WalletPage',context!);
        Theme = json['Theme'];
        AllowDeleteProfile = json['AllowDeleteProfile'];
        AllowDisableProfile = json['AllowDisableProfile'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'OwnerId': OwnerId,
        'OwnerType': JsonConverters.toJson(OwnerType,'OwnerType',context!),
        'CreatorId': CreatorId,
        'Page': JsonConverters.toJson(Page,'WalletPage',context!),
        'Theme': Theme,
        'AllowDeleteProfile': AllowDeleteProfile,
        'AllowDisableProfile': AllowDisableProfile
    });

    getTypeName() => "WalletTokenCreateRequestDto";
    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 WalletTokenCreateResponseDto extends ApiResponseBase implements IConvertible
{
    String? WalletToken;
    String? WalletOrigin;
    String? WalletUrl;

    WalletTokenCreateResponseDto({this.WalletToken,this.WalletOrigin,this.WalletUrl});
    WalletTokenCreateResponseDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class WalletTokenCreateResponse extends WalletTokenCreateResponseDto implements IConvertible
{
    bool? Success;
    String? Message;
    String? WalletToken;
    String? WalletOrigin;
    String? WalletUrl;

    WalletTokenCreateResponse({this.Success,this.Message,this.WalletToken,this.WalletOrigin,this.WalletUrl});
    WalletTokenCreateResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Success = json['Success'];
        Message = json['Message'];
        WalletToken = json['WalletToken'];
        WalletOrigin = json['WalletOrigin'];
        WalletUrl = json['WalletUrl'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Success': Success,
        'Message': Message,
        'WalletToken': WalletToken,
        'WalletOrigin': WalletOrigin,
        'WalletUrl': WalletUrl
    });

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

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

class WalletTokenCreateEndpoint extends WalletTokenCreateRequestDto 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 the owner to create the URL for
    */
    // @ApiMember(DataType="integer", Description="ID # of the owner to create the URL for", IsRequired=true, Name="OwnerId", ParameterType="query")
    int? OwnerId;

    /**
    * Type of owner to create the URL for
    */
    // @ApiMember(Description="Type of owner to create the URL for", IsRequired=true, Name="OwnerType", ParameterType="query")
    OwnerType? OwnerType;

    /**
    * Person creating the profile.  Can be same as OwnerId.
    */
    // @ApiMember(Description="Person creating the profile.  Can be same as OwnerId.", IsRequired=true, Name="CreatorId", ParameterType="query")
    int? CreatorId;

    /**
    * Page to display when calling the Payment Profile iFrame
    */
    // @ApiMember(Description="Page to display when calling the Payment Profile iFrame", IsRequired=true, Name="Page", ParameterType="query")
    WalletPage? Page;

    /**
    * CSS Theme
    */
    // @ApiMember(Description="CSS Theme", ParameterType="query")
    String? Theme;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;
    /**
    * Allows for a payment profile to be deleted
    */
    // @ApiMember(Description="Allows for a payment profile to be deleted", Name="AllowDeleteProfile", ParameterType="query")
    bool? AllowDeleteProfile;

    /**
    * Allows for a payment profile to be disabled
    */
    // @ApiMember(Description="Allows for a payment profile to be disabled", Name="AllowDisableProfile", ParameterType="query")
    bool? AllowDisableProfile;

    WalletTokenCreateEndpoint({this.ApiKey,this.OwnerId,this.OwnerType,this.CreatorId,this.Page,this.Theme,this.RestrictedId,this.RestrictedResourceType,this.AllowDeleteProfile,this.AllowDisableProfile});
    WalletTokenCreateEndpoint.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        ApiKey = json['ApiKey'];
        OwnerId = json['OwnerId'];
        OwnerType = JsonConverters.fromJson(json['OwnerType'],'OwnerType',context!);
        CreatorId = json['CreatorId'];
        Page = JsonConverters.fromJson(json['Page'],'WalletPage',context!);
        Theme = json['Theme'];
        RestrictedId = json['RestrictedId'];
        RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!);
        AllowDeleteProfile = json['AllowDeleteProfile'];
        AllowDisableProfile = json['AllowDisableProfile'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ApiKey': ApiKey,
        'OwnerId': OwnerId,
        'OwnerType': JsonConverters.toJson(OwnerType,'OwnerType',context!),
        'CreatorId': CreatorId,
        'Page': JsonConverters.toJson(Page,'WalletPage',context!),
        'Theme': Theme,
        'RestrictedId': RestrictedId,
        'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!),
        'AllowDeleteProfile': AllowDeleteProfile,
        'AllowDisableProfile': AllowDisableProfile
    });

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

TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
    'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
    'OwnerType': TypeInfo(TypeOf.Enum, enumValues:OwnerType.values),
    'WalletPage': TypeInfo(TypeOf.Enum, enumValues:WalletPage.values),
    'WalletTokenCreateRequestDto': TypeInfo(TypeOf.Class, create:() => WalletTokenCreateRequestDto()),
    'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()),
    'WalletTokenCreateResponseDto': TypeInfo(TypeOf.Class, create:() => WalletTokenCreateResponseDto()),
    'WalletTokenCreateResponse': TypeInfo(TypeOf.Class, create:() => WalletTokenCreateResponse()),
    'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
    'WalletTokenCreateEndpoint': TypeInfo(TypeOf.Class, create:() => WalletTokenCreateEndpoint()),
});

Dart WalletTokenCreateEndpoint 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.

GET /sales/wallet/wallettokencreate HTTP/1.1 
Host: clubready.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Success":false,"Message":"String","WalletToken":"String","WalletOrigin":"String","WalletUrl":"String"}