Trendsic Platform Service

<back to all web services

PursuitCreateRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/pursuits
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 PursuitCreateRequest implements IConvertible
{
    String? Name;
    String? ClientOwner;
    String? WorkType;
    String? Solicitation;
    String? Location;
    String? Scope;
    double? BidValue;
    double? EstCost;
    double? WinProbability;
    double? CostOfPursuit;
    DateTime? DueDate;
    String? EstimatorRfpRef;

    PursuitCreateRequest({this.Name,this.ClientOwner,this.WorkType,this.Solicitation,this.Location,this.Scope,this.BidValue,this.EstCost,this.WinProbability,this.CostOfPursuit,this.DueDate,this.EstimatorRfpRef});
    PursuitCreateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        ClientOwner = json['ClientOwner'];
        WorkType = json['WorkType'];
        Solicitation = json['Solicitation'];
        Location = json['Location'];
        Scope = json['Scope'];
        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'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'ClientOwner': ClientOwner,
        'WorkType': WorkType,
        'Solicitation': Solicitation,
        'Location': Location,
        'Scope': Scope,
        'BidValue': BidValue,
        'EstCost': EstCost,
        'WinProbability': WinProbability,
        'CostOfPursuit': CostOfPursuit,
        'DueDate': JsonConverters.toJson(DueDate,'DateTime',context!),
        'EstimatorRfpRef': EstimatorRfpRef
    };

    getTypeName() => "PursuitCreateRequest";
    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()),
    'PursuitCreateRequest': TypeInfo(TypeOf.Class, create:() => PursuitCreateRequest()),
});

Dart PursuitCreateRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/pursuits HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Name: String,
	ClientOwner: String,
	WorkType: String,
	Solicitation: String,
	Location: String,
	Scope: String,
	BidValue: 0,
	EstCost: 0,
	WinProbability: 0,
	CostOfPursuit: 0,
	DueDate: 0001-01-01,
	EstimatorRfpRef: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Pursuit: 
	{
		PursuitID: 0,
		PursuitUID: 00000000000000000000000000000000,
		PursuitNumber: String,
		Name: String,
		ClientOwner: String,
		WorkType: String,
		Solicitation: String,
		Location: String,
		Scope: String,
		Stage: String,
		Outcome: String,
		BidValue: 0,
		EstCost: 0,
		WinProbability: 0,
		CostOfPursuit: 0,
		DueDate: 0001-01-01,
		EstimatorRfpRef: String,
		AwardedProjectID: 0,
		OpenedAt: 0001-01-01,
		SubmittedAt: 0001-01-01,
		DecidedAt: 0001-01-01,
		CreatedBy: String,
		CreatedAt: 0001-01-01,
		UpdatedAt: 0001-01-01,
		DaysOpen: 0,
		WeightedValue: 0,
		Activity: 
		[
			{
				PursuitActivityID: 0,
				PursuitID: 0,
				Kind: String,
				Label: String,
				Detail: String,
				Actor: String,
				CreatedAt: 0001-01-01
			}
		]
	},
	AwardedProjectID: 0
}