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