| GET,OPTIONS | /v1/pm/catalog |
|---|
import 'package:servicestack/servicestack.dart';
class PmCatalogItem implements IConvertible
{
int? Id;
String? Name;
double? Amount;
PmCatalogItem({this.Id,this.Name,this.Amount});
PmCatalogItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
Amount = JsonConverters.toDouble(json['Amount']);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'Amount': Amount
};
getTypeName() => "PmCatalogItem";
TypeContext? context = _ctx;
}
class PmCatalogCrew implements IConvertible
{
int? Id;
String? Name;
List<int>? MemberIds = [];
PmCatalogCrew({this.Id,this.Name,this.MemberIds});
PmCatalogCrew.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
MemberIds = JsonConverters.fromJson(json['MemberIds'],'List<int>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'MemberIds': JsonConverters.toJson(MemberIds,'List<int>',context!)
};
getTypeName() => "PmCatalogCrew";
TypeContext? context = _ctx;
}
class PmCatalogResponse implements IConvertible
{
List<PmCatalogItem>? Statuses = [];
List<PmCatalogItem>? Crew = [];
List<PmCatalogCrew>? Crews = [];
List<PmCatalogItem>? Equipment = [];
List<PmCatalogItem>? Materials = [];
ResponseStatus? ResponseStatus;
PmCatalogResponse({this.Statuses,this.Crew,this.Crews,this.Equipment,this.Materials,this.ResponseStatus});
PmCatalogResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Statuses = JsonConverters.fromJson(json['Statuses'],'List<PmCatalogItem>',context!);
Crew = JsonConverters.fromJson(json['Crew'],'List<PmCatalogItem>',context!);
Crews = JsonConverters.fromJson(json['Crews'],'List<PmCatalogCrew>',context!);
Equipment = JsonConverters.fromJson(json['Equipment'],'List<PmCatalogItem>',context!);
Materials = JsonConverters.fromJson(json['Materials'],'List<PmCatalogItem>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Statuses': JsonConverters.toJson(Statuses,'List<PmCatalogItem>',context!),
'Crew': JsonConverters.toJson(Crew,'List<PmCatalogItem>',context!),
'Crews': JsonConverters.toJson(Crews,'List<PmCatalogCrew>',context!),
'Equipment': JsonConverters.toJson(Equipment,'List<PmCatalogItem>',context!),
'Materials': JsonConverters.toJson(Materials,'List<PmCatalogItem>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "PmCatalogResponse";
TypeContext? context = _ctx;
}
class PmCatalogRequest implements IConvertible
{
PmCatalogRequest();
PmCatalogRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "PmCatalogRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'PmCatalogItem': TypeInfo(TypeOf.Class, create:() => PmCatalogItem()),
'PmCatalogCrew': TypeInfo(TypeOf.Class, create:() => PmCatalogCrew()),
'PmCatalogResponse': TypeInfo(TypeOf.Class, create:() => PmCatalogResponse()),
'List<PmCatalogItem>': TypeInfo(TypeOf.Class, create:() => <PmCatalogItem>[]),
'List<PmCatalogCrew>': TypeInfo(TypeOf.Class, create:() => <PmCatalogCrew>[]),
'PmCatalogRequest': TypeInfo(TypeOf.Class, create:() => PmCatalogRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/pm/catalog HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Statuses":[{"Id":0,"Name":"String","Amount":0}],"Crew":[{"Id":0,"Name":"String","Amount":0}],"Crews":[{"Id":0,"Name":"String","MemberIds":[0]}],"Equipment":[{"Id":0,"Name":"String","Amount":0}],"Materials":[{"Id":0,"Name":"String","Amount":0}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}