| Requires any of the roles: | Client, Admin, Partner |
| PUT | /segments/{Id} |
|---|
import 'package:servicestack/servicestack.dart';
class SegmentsEditResponse implements IConvertible
{
// @DataMember(Order=1)
int? Id;
// @DataMember(Order=2)
int? TenantsId;
// @DataMember(Order=3)
String? Name;
// @DataMember(Order=4)
bool? IsCustom;
// @DataMember(Order=6)
ResponseStatus? ResponseStatus;
SegmentsEditResponse({this.Id,this.TenantsId,this.Name,this.IsCustom,this.ResponseStatus});
SegmentsEditResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
TenantsId = json['TenantsId'];
Name = json['Name'];
IsCustom = json['IsCustom'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'TenantsId': TenantsId,
'Name': Name,
'IsCustom': IsCustom,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "SegmentsEditResponse";
TypeContext? context = _ctx;
}
// @DataContract
class SegmentsEdit implements IConvertible
{
// @DataMember(Order=1)
// @Validate(Validator="NotNull")
int? Id;
// @DataMember(Order=2)
// @Validate(Validator="NotNull")
int? TenantsId;
// @DataMember(Order=3)
// @Validate(Validator="NotNull")
String? Name;
// @DataMember(Order=4)
bool? IsCustom;
SegmentsEdit({this.Id,this.TenantsId,this.Name,this.IsCustom});
SegmentsEdit.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
TenantsId = json['TenantsId'];
Name = json['Name'];
IsCustom = json['IsCustom'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'TenantsId': TenantsId,
'Name': Name,
'IsCustom': IsCustom
};
getTypeName() => "SegmentsEdit";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'duengageapi.uat.scadsoftware.com', types: <String, TypeInfo> {
'SegmentsEditResponse': TypeInfo(TypeOf.Class, create:() => SegmentsEditResponse()),
'SegmentsEdit': TypeInfo(TypeOf.Class, create:() => SegmentsEdit()),
});
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 /segments/{Id} HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Id: 0,
TenantsId: 0,
Name: String,
IsCustom: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Id: 0,
TenantsId: 0,
Name: String,
IsCustom: False,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}