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()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
Content-Type: text/jsv
Content-Length: length
{
Status: NotStarted,
CheckOutThePageAfterPublish: False
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Status: NotStarted, CheckOutThePageAfterPublish: False }