ClubReady Api

<back to all web services

GetProspectTypesRequest

The following routes are available for this service:
GET/club/lead-typesList of prospect types.
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;
}

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

class GetProspectTypesRequest extends ApiDtoBase 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;

    /**
    * Either StoreId or ChainId is required
    */
    // @ApiMember(DataType="integer", Description="Either StoreId or ChainId is required", Name="ChainId", ParameterType="query")
    int? ChainId;

    /**
    * Either StoreId or ChainId is required
    */
    // @ApiMember(DataType="integer", Description="Either StoreId or ChainId is required", Name="StoreId", ParameterType="query")
    int? StoreId;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

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

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

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

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

class ApiGenericType implements IConvertible
{
    int? Id;
    String? Name;
    int? StoreId;
    int? ChainId;

    ApiGenericType({this.Id,this.Name,this.StoreId,this.ChainId});
    ApiGenericType.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        StoreId = json['StoreId'];
        ChainId = json['ChainId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'StoreId': StoreId,
        'ChainId': ChainId
    };

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

class GetProspectTypesResponseDto implements IConvertible
{
    List<ApiGenericType>? LeadTypes;

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

    fromMap(Map<String, dynamic> json) {
        LeadTypes = JsonConverters.fromJson(json['LeadTypes'],'List<ApiGenericType>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'LeadTypes': JsonConverters.toJson(LeadTypes,'List<ApiGenericType>',context!)
    };

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

class GetProspectTypesResponse extends GetProspectTypesResponseDto implements IConvertible
{
    List<ApiGenericType>? LeadTypes;

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

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        LeadTypes = JsonConverters.fromJson(json['LeadTypes'],'List<ApiGenericType>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'LeadTypes': JsonConverters.toJson(LeadTypes,'List<ApiGenericType>',context!)
    });

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

TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
    'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
    'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
    'GetProspectTypesRequest': TypeInfo(TypeOf.Class, create:() => GetProspectTypesRequest()),
    'ApiGenericType': TypeInfo(TypeOf.Class, create:() => ApiGenericType()),
    'GetProspectTypesResponseDto': TypeInfo(TypeOf.Class, create:() => GetProspectTypesResponseDto()),
    'List<ApiGenericType>': TypeInfo(TypeOf.Class, create:() => <ApiGenericType>[]),
    'GetProspectTypesResponse': TypeInfo(TypeOf.Class, create:() => GetProspectTypesResponse()),
});

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

GET /club/lead-types HTTP/1.1 
Host: clubready.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetProspectTypesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Club.Models">
  <LeadTypes xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">
    <ApiGenericType>
      <ChainId>0</ChainId>
      <Id>0</Id>
      <Name>String</Name>
      <StoreId>0</StoreId>
    </ApiGenericType>
  </LeadTypes>
</GetProspectTypesResponse>