| POST,OPTIONS | /v1/pursuits/{PursuitID}/award |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class PursuitActivity implements IConvertible
{
int? PursuitActivityID;
int? PursuitID;
String? Kind;
String? Label;
String? Detail;
String? Actor;
DateTime? CreatedAt;
PursuitActivity({this.PursuitActivityID,this.PursuitID,this.Kind,this.Label,this.Detail,this.Actor,this.CreatedAt});
PursuitActivity.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
PursuitActivityID = json['PursuitActivityID'];
PursuitID = json['PursuitID'];
Kind = json['Kind'];
Label = json['Label'];
Detail = json['Detail'];
Actor = json['Actor'];
CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'PursuitActivityID': PursuitActivityID,
'PursuitID': PursuitID,
'Kind': Kind,
'Label': Label,
'Detail': Detail,
'Actor': Actor,
'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!)
};
getTypeName() => "PursuitActivity";
TypeContext? context = _ctx;
}
class Pursuit implements IConvertible
{
int? PursuitID;
String? PursuitUID;
String? PursuitNumber;
String? Name;
String? ClientOwner;
String? WorkType;
String? Solicitation;
String? Location;
String? Scope;
String? Stage;
String? Outcome;
double? BidValue;
double? EstCost;
double? WinProbability;
double? CostOfPursuit;
DateTime? DueDate;
String? EstimatorRfpRef;
int? AwardedProjectID;
DateTime? OpenedAt;
DateTime? SubmittedAt;
DateTime? DecidedAt;
String? CreatedBy;
DateTime? CreatedAt;
DateTime? UpdatedAt;
int? DaysOpen;
double? WeightedValue;
List<PursuitActivity>? Activity = [];
Pursuit({this.PursuitID,this.PursuitUID,this.PursuitNumber,this.Name,this.ClientOwner,this.WorkType,this.Solicitation,this.Location,this.Scope,this.Stage,this.Outcome,this.BidValue,this.EstCost,this.WinProbability,this.CostOfPursuit,this.DueDate,this.EstimatorRfpRef,this.AwardedProjectID,this.OpenedAt,this.SubmittedAt,this.DecidedAt,this.CreatedBy,this.CreatedAt,this.UpdatedAt,this.DaysOpen,this.WeightedValue,this.Activity});
Pursuit.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
PursuitID = json['PursuitID'];
PursuitUID = json['PursuitUID'];
PursuitNumber = json['PursuitNumber'];
Name = json['Name'];
ClientOwner = json['ClientOwner'];
WorkType = json['WorkType'];
Solicitation = json['Solicitation'];
Location = json['Location'];
Scope = json['Scope'];
Stage = json['Stage'];
Outcome = json['Outcome'];
BidValue = JsonConverters.toDouble(json['BidValue']);
EstCost = JsonConverters.toDouble(json['EstCost']);
WinProbability = JsonConverters.toDouble(json['WinProbability']);
CostOfPursuit = JsonConverters.toDouble(json['CostOfPursuit']);
DueDate = JsonConverters.fromJson(json['DueDate'],'DateTime',context!);
EstimatorRfpRef = json['EstimatorRfpRef'];
AwardedProjectID = json['AwardedProjectID'];
OpenedAt = JsonConverters.fromJson(json['OpenedAt'],'DateTime',context!);
SubmittedAt = JsonConverters.fromJson(json['SubmittedAt'],'DateTime',context!);
DecidedAt = JsonConverters.fromJson(json['DecidedAt'],'DateTime',context!);
CreatedBy = json['CreatedBy'];
CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!);
DaysOpen = json['DaysOpen'];
WeightedValue = JsonConverters.toDouble(json['WeightedValue']);
Activity = JsonConverters.fromJson(json['Activity'],'List<PursuitActivity>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'PursuitID': PursuitID,
'PursuitUID': PursuitUID,
'PursuitNumber': PursuitNumber,
'Name': Name,
'ClientOwner': ClientOwner,
'WorkType': WorkType,
'Solicitation': Solicitation,
'Location': Location,
'Scope': Scope,
'Stage': Stage,
'Outcome': Outcome,
'BidValue': BidValue,
'EstCost': EstCost,
'WinProbability': WinProbability,
'CostOfPursuit': CostOfPursuit,
'DueDate': JsonConverters.toJson(DueDate,'DateTime',context!),
'EstimatorRfpRef': EstimatorRfpRef,
'AwardedProjectID': AwardedProjectID,
'OpenedAt': JsonConverters.toJson(OpenedAt,'DateTime',context!),
'SubmittedAt': JsonConverters.toJson(SubmittedAt,'DateTime',context!),
'DecidedAt': JsonConverters.toJson(DecidedAt,'DateTime',context!),
'CreatedBy': CreatedBy,
'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!),
'DaysOpen': DaysOpen,
'WeightedValue': WeightedValue,
'Activity': JsonConverters.toJson(Activity,'List<PursuitActivity>',context!)
};
getTypeName() => "Pursuit";
TypeContext? context = _ctx;
}
class PursuitResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
Pursuit? Pursuit;
int? AwardedProjectID;
PursuitResponse({this.ResponseStatus,this.Pursuit,this.AwardedProjectID});
PursuitResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Pursuit = JsonConverters.fromJson(json['Pursuit'],'Pursuit',context!);
AwardedProjectID = json['AwardedProjectID'];
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Pursuit': JsonConverters.toJson(Pursuit,'Pursuit',context!),
'AwardedProjectID': AwardedProjectID
};
getTypeName() => "PursuitResponse";
TypeContext? context = _ctx;
}
class PursuitAwardRequest implements IConvertible
{
int? PursuitID;
PursuitAwardRequest({this.PursuitID});
PursuitAwardRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
PursuitID = json['PursuitID'];
return this;
}
Map<String, dynamic> toJson() => {
'PursuitID': PursuitID
};
getTypeName() => "PursuitAwardRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'PursuitActivity': TypeInfo(TypeOf.Class, create:() => PursuitActivity()),
'Pursuit': TypeInfo(TypeOf.Class, create:() => Pursuit()),
'List<PursuitActivity>': TypeInfo(TypeOf.Class, create:() => <PursuitActivity>[]),
'PursuitResponse': TypeInfo(TypeOf.Class, create:() => PursuitResponse()),
'PursuitAwardRequest': TypeInfo(TypeOf.Class, create:() => PursuitAwardRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/pursuits/{PursuitID}/award HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<PursuitAwardRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<PursuitID>0</PursuitID>
</PursuitAwardRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PursuitResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<AwardedProjectID>0</AwardedProjectID>
<Pursuit>
<Activity>
<PursuitActivity>
<Actor>String</Actor>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<Detail>String</Detail>
<Kind>String</Kind>
<Label>String</Label>
<PursuitActivityID>0</PursuitActivityID>
<PursuitID>0</PursuitID>
</PursuitActivity>
</Activity>
<AwardedProjectID>0</AwardedProjectID>
<BidValue>0</BidValue>
<ClientOwner>String</ClientOwner>
<CostOfPursuit>0</CostOfPursuit>
<CreatedAt>0001-01-01T00:00:00</CreatedAt>
<CreatedBy>String</CreatedBy>
<DaysOpen>0</DaysOpen>
<DecidedAt>0001-01-01T00:00:00</DecidedAt>
<DueDate>0001-01-01T00:00:00</DueDate>
<EstCost>0</EstCost>
<EstimatorRfpRef>String</EstimatorRfpRef>
<Location>String</Location>
<Name>String</Name>
<OpenedAt>0001-01-01T00:00:00</OpenedAt>
<Outcome>String</Outcome>
<PursuitID>0</PursuitID>
<PursuitNumber>String</PursuitNumber>
<PursuitUID>00000000-0000-0000-0000-000000000000</PursuitUID>
<Scope>String</Scope>
<Solicitation>String</Solicitation>
<Stage>String</Stage>
<SubmittedAt>0001-01-01T00:00:00</SubmittedAt>
<UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
<WeightedValue>0</WeightedValue>
<WinProbability>0</WinProbability>
<WorkType>String</WorkType>
</Pursuit>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
</PursuitResponse>