<back to all web services

ChangeABTestStatus

The following routes are available for this service:
PUT/RestApi/ab-testing/change-status/{id}
import 'package:servicestack/servicestack.dart';

enum ABTestStatus
{
    NotStarted,
    Scheduled,
    Active,
    Stopped,
    Ended,
}

class ChangeABTestStatus implements IConvertible
{
    String? Id;
    ABTestStatus? Status;
    bool? CheckOutThePageAfterPublish;

    ChangeABTestStatus({this.Id,this.Status,this.CheckOutThePageAfterPublish});
    ChangeABTestStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Status = JsonConverters.fromJson(json['Status'],'ABTestStatus',context!);
        CheckOutThePageAfterPublish = json['CheckOutThePageAfterPublish'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Status': JsonConverters.toJson(Status,'ABTestStatus',context!),
        'CheckOutThePageAfterPublish': CheckOutThePageAfterPublish
    };

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

TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
    'ABTestStatus': TypeInfo(TypeOf.Enum, enumValues:ABTestStatus.values),
    'ChangeABTestStatus': TypeInfo(TypeOf.Class, create:() => ChangeABTestStatus()),
});

Dart ChangeABTestStatus DTOs

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

HTTP + CSV

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

PUT /RestApi/ab-testing/change-status/{id} HTTP/1.1 
Host: www.asg.com.au 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"Status":"NotStarted","CheckOutThePageAfterPublish":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Status":"NotStarted","CheckOutThePageAfterPublish":false}