ClubReady Api

<back to all web services

GetSalesPackageRequest

The following routes are available for this service:
GET/sales/package/{PackageId}Get sales package details
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 GetSalesPackageRequestDto extends ApiDtoBase implements IConvertible
{
    int? PackageId;

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

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

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

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

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

class GetSalesPackageRequest extends GetSalesPackageRequestDto 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 to get package details for. <br//> Either StoreId or ChainId is required
    */
    // @ApiMember(DataType="string", Description="ID # of store to get package details for. <br//> Either StoreId or ChainId is required", Name="StoreId", ParameterType="query")
    int? StoreId;

    /**
    * ID # of chain to get package details for. <br//> Either StoreId or ChainId is required
    */
    // @ApiMember(DataType="string", Description="ID # of chain to get package details for. <br//> Either StoreId or ChainId is required", Name="ChainId", ParameterType="query")
    int? ChainId;

    /**
    * ID # of package to get details for
    */
    // @ApiMember(DataType="string", Description="ID # of package to get details for", IsRequired=true, Name="PackageId", ParameterType="path")
    int? PackageId;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

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

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

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

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

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

Dart GetSalesPackageRequest 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/package/{PackageId} HTTP/1.1 
Host: clubready.com 
Accept: application/json