Trendsic Platform Service

<back to all web services

PmCatalogRequest

Requires Authentication
The following routes are available for this service:
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()),
});

Dart PmCatalogRequest DTOs

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

HTTP + XML

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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PmCatalogResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Crew>
    <PmCatalogItem>
      <Amount>0</Amount>
      <Id>0</Id>
      <Name>String</Name>
    </PmCatalogItem>
  </Crew>
  <Crews>
    <PmCatalogCrew>
      <Id>0</Id>
      <MemberIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>0</d4p1:int>
      </MemberIds>
      <Name>String</Name>
    </PmCatalogCrew>
  </Crews>
  <Equipment>
    <PmCatalogItem>
      <Amount>0</Amount>
      <Id>0</Id>
      <Name>String</Name>
    </PmCatalogItem>
  </Equipment>
  <Materials>
    <PmCatalogItem>
      <Amount>0</Amount>
      <Id>0</Id>
      <Name>String</Name>
    </PmCatalogItem>
  </Materials>
  <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>
  <Statuses>
    <PmCatalogItem>
      <Amount>0</Amount>
      <Id>0</Id>
      <Name>String</Name>
    </PmCatalogItem>
  </Statuses>
</PmCatalogResponse>