TicketUserServices

<back to all web services

StigSummaryRequest

Requires Authentication
Requires the role:AdminRequires the permission:ReadData
The following routes are available for this service:
GET/stig/summary
import 'package:servicestack/servicestack.dart';

class StigStreakView implements IConvertible
{
    int? currentWeeks;
    int? longestWeeks;
    int? totalScanWeeks;
    int? totalScans;
    String? currentWeekKey;
    String? lastScanWeekKey;
    DateTime? lastScanUtc;
    DateTime? currentStreakStartUtc;
    bool? scannedThisWeek;
    bool? atRisk;

    StigStreakView({this.currentWeeks,this.longestWeeks,this.totalScanWeeks,this.totalScans,this.currentWeekKey,this.lastScanWeekKey,this.lastScanUtc,this.currentStreakStartUtc,this.scannedThisWeek,this.atRisk});
    StigStreakView.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        currentWeeks = json['currentWeeks'];
        longestWeeks = json['longestWeeks'];
        totalScanWeeks = json['totalScanWeeks'];
        totalScans = json['totalScans'];
        currentWeekKey = json['currentWeekKey'];
        lastScanWeekKey = json['lastScanWeekKey'];
        lastScanUtc = JsonConverters.fromJson(json['lastScanUtc'],'DateTime',context!);
        currentStreakStartUtc = JsonConverters.fromJson(json['currentStreakStartUtc'],'DateTime',context!);
        scannedThisWeek = json['scannedThisWeek'];
        atRisk = json['atRisk'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'currentWeeks': currentWeeks,
        'longestWeeks': longestWeeks,
        'totalScanWeeks': totalScanWeeks,
        'totalScans': totalScans,
        'currentWeekKey': currentWeekKey,
        'lastScanWeekKey': lastScanWeekKey,
        'lastScanUtc': JsonConverters.toJson(lastScanUtc,'DateTime',context!),
        'currentStreakStartUtc': JsonConverters.toJson(currentStreakStartUtc,'DateTime',context!),
        'scannedThisWeek': scannedThisWeek,
        'atRisk': atRisk
    };

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

class StigLadderView implements IConvertible
{
    List<int>? rungs;
    int? rungsReached;
    int? nextRung;
    int? stigToNextRung;
    int? progressBasisPoints;

    StigLadderView({this.rungs,this.rungsReached,this.nextRung,this.stigToNextRung,this.progressBasisPoints});
    StigLadderView.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        rungs = JsonConverters.fromJson(json['rungs'],'List<int>',context!);
        rungsReached = json['rungsReached'];
        nextRung = json['nextRung'];
        stigToNextRung = json['stigToNextRung'];
        progressBasisPoints = json['progressBasisPoints'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'rungs': JsonConverters.toJson(rungs,'List<int>',context!),
        'rungsReached': rungsReached,
        'nextRung': nextRung,
        'stigToNextRung': stigToNextRung,
        'progressBasisPoints': progressBasisPoints
    };

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

class StigSummaryResult implements IConvertible
{
    String? fullPhoneNumber;
    bool? known;
    bool? excluded;
    int? balance;
    int? heldStig;
    int? available;
    int? lifetimeEarned;
    DateTime? updatedUtc;
    StigStreakView? streak;
    StigLadderView? ladder;
    int? statusCode;
    String? message;

    StigSummaryResult({this.fullPhoneNumber,this.known,this.excluded,this.balance,this.heldStig,this.available,this.lifetimeEarned,this.updatedUtc,this.streak,this.ladder,this.statusCode,this.message});
    StigSummaryResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        fullPhoneNumber = json['fullPhoneNumber'];
        known = json['known'];
        excluded = json['excluded'];
        balance = json['balance'];
        heldStig = json['heldStig'];
        available = json['available'];
        lifetimeEarned = json['lifetimeEarned'];
        updatedUtc = JsonConverters.fromJson(json['updatedUtc'],'DateTime',context!);
        streak = JsonConverters.fromJson(json['streak'],'StigStreakView',context!);
        ladder = JsonConverters.fromJson(json['ladder'],'StigLadderView',context!);
        statusCode = json['statusCode'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'fullPhoneNumber': fullPhoneNumber,
        'known': known,
        'excluded': excluded,
        'balance': balance,
        'heldStig': heldStig,
        'available': available,
        'lifetimeEarned': lifetimeEarned,
        'updatedUtc': JsonConverters.toJson(updatedUtc,'DateTime',context!),
        'streak': JsonConverters.toJson(streak,'StigStreakView',context!),
        'ladder': JsonConverters.toJson(ladder,'StigLadderView',context!),
        'statusCode': statusCode,
        'message': message
    };

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

class StigSummaryRequest implements IConvertible
{
    String? fullPhoneNumber;

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

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

    Map<String, dynamic> toJson() => {
        'fullPhoneNumber': fullPhoneNumber
    };

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

TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
    'StigStreakView': TypeInfo(TypeOf.Class, create:() => StigStreakView()),
    'StigLadderView': TypeInfo(TypeOf.Class, create:() => StigLadderView()),
    'StigSummaryResult': TypeInfo(TypeOf.Class, create:() => StigSummaryResult()),
    'StigSummaryRequest': TypeInfo(TypeOf.Class, create:() => StigSummaryRequest()),
});

Dart StigSummaryRequest 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 /stig/summary HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"fullPhoneNumber":"String","known":false,"excluded":false,"balance":0,"heldStig":0,"available":0,"lifetimeEarned":0,"updatedUtc":"0001-01-01T00:00:00.0000000","streak":{"currentWeeks":0,"longestWeeks":0,"totalScanWeeks":0,"totalScans":0,"currentWeekKey":"String","lastScanWeekKey":"String","lastScanUtc":"0001-01-01T00:00:00.0000000","currentStreakStartUtc":"0001-01-01T00:00:00.0000000","scannedThisWeek":false,"atRisk":false},"ladder":{"rungs":[0],"rungsReached":0,"nextRung":0,"stigToNextRung":0,"progressBasisPoints":0},"statusCode":0,"message":"String"}