Agentivity API

<back to all web services

GetHotelSegmentCountsPerConsultantByVendor

The following routes are available for this service:
GET/HotelSegmentCountsPerConsultantByVendor
import 'package:servicestack/servicestack.dart';

// @DataContract(Name="Metadata", Namespace="schemas.agentivity.com/types")
class PagingMetadata implements IConvertible
{
    /**
    * Starting Record
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Starting Record", Name="Offset", ParameterType="query")
    String? Offset;

    /**
    * Number of records to return (PageSize)
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Number of records to return (PageSize)", Name="Limit", ParameterType="query")
    String? Limit;

    /**
    * Total Number of Records in a Full Reponse (if no paging)
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Total Number of Records in a Full Reponse (if no paging)", Name="TotalRecords", ParameterType="query")
    int? TotalRecords;

    /**
    * Total Number of Records in this Reponse (on this page)
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Total Number of Records in this Reponse (on this page)", Name="ResponseRecords", ParameterType="query")
    int? ResponseRecords;

    PagingMetadata({this.Offset,this.Limit,this.TotalRecords,this.ResponseRecords});
    PagingMetadata.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Offset = json['Offset'];
        Limit = json['Limit'];
        TotalRecords = json['TotalRecords'];
        ResponseRecords = json['ResponseRecords'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Offset': Offset,
        'Limit': Limit,
        'TotalRecords': TotalRecords,
        'ResponseRecords': ResponseRecords
    };

    getTypeName() => "PagingMetadata";
    TypeContext? context = _ctx;
}

// @DataContract(Namespace="schemas.agentivity.com/types")
abstract class CompanyLevelRequestBase extends PagingMetadata implements IMemberUsername, IMemberOwningCompanyCode
{
    /**
    * Comma Delimited List of Owning Company Codes
    */
    // @DataMember
    List<String>? OwningCompanyCode;

    /**
    * UserName in form of an email address
    */
    // @DataMember
    String? UserName;

    CompanyLevelRequestBase({this.OwningCompanyCode,this.UserName});
    CompanyLevelRequestBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        OwningCompanyCode = JsonConverters.fromJson(json['OwningCompanyCode'],'List<String>',context!);
        UserName = json['UserName'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'OwningCompanyCode': JsonConverters.toJson(OwningCompanyCode,'List<String>',context!),
        'UserName': UserName
    });

    getTypeName() => "CompanyLevelRequestBase";
    TypeContext? context = _ctx;
}

// @DataContract(Name="HotelSegmentCountPerConsultantByVendor", Namespace="schemas.agentivity.com/types")
class HotelSegmentCountPerConsultantByVendor implements IConvertible
{
    // @DataMember(Order=10)
    String? OwningConsultant;

    // @DataMember(Order=20)
    String? OwningConsultantID;

    // @DataMember(Order=30)
    String? OwningAgencyLocation;

    // @DataMember(Order=40)
    int? TotalSegments;

    // @DataMember(Order=50)
    int? TotalNights;

    HotelSegmentCountPerConsultantByVendor({this.OwningConsultant,this.OwningConsultantID,this.OwningAgencyLocation,this.TotalSegments,this.TotalNights});
    HotelSegmentCountPerConsultantByVendor.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        OwningConsultant = json['OwningConsultant'];
        OwningConsultantID = json['OwningConsultantID'];
        OwningAgencyLocation = json['OwningAgencyLocation'];
        TotalSegments = json['TotalSegments'];
        TotalNights = json['TotalNights'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'OwningConsultant': OwningConsultant,
        'OwningConsultantID': OwningConsultantID,
        'OwningAgencyLocation': OwningAgencyLocation,
        'TotalSegments': TotalSegments,
        'TotalNights': TotalNights
    };

    getTypeName() => "HotelSegmentCountPerConsultantByVendor";
    TypeContext? context = _ctx;
}

// @DataContract(Namespace="schemas.agentivity.com/types")
class Report<TItemResponse,TItem> implements IConvertible
{
    // @DataMember(Order=1, EmitDefaultValue=false)
    TItem? Item;

    Report({this.Item});
    Report.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Item = JsonConverters.fromJson(json['Item'],'TItem',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Item': JsonConverters.toJson(Item,'TItem',context!)
    };

    getTypeName() => "Report<$TItemResponse,$TItem>";
    TypeContext? context = _ctx;
}

// @DataContract(Name="HotelSegmentCountPerConsultantByVendor", Namespace="schemas.agentivity.com/types")
class HotelSegmentCountsPerConsultantByVendorResponseReport extends Report<HotelSegmentCountsPerConsultantByVendorItemResponse,HotelSegmentCountPerConsultantByVendor> implements IConvertible
{
    HotelSegmentCountsPerConsultantByVendorResponseReport();
    HotelSegmentCountsPerConsultantByVendorResponseReport.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "HotelSegmentCountsPerConsultantByVendorResponseReport";
    TypeContext? context = _ctx;
}

// @DataContract(Name="CacheMetadata", Namespace="schemas.agentivity.com/types")
class CacheMetadata implements IConvertible
{
    // @DataMember(Order=1)
    DateTime? CachedAt;

    // @DataMember(Order=2)
    DateTime? CacheExpiresAt;

    // @DataMember(Order=0)
    bool? IsFromCache;

    CacheMetadata({this.CachedAt,this.CacheExpiresAt,this.IsFromCache});
    CacheMetadata.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CachedAt = JsonConverters.fromJson(json['CachedAt'],'DateTime',context!);
        CacheExpiresAt = JsonConverters.fromJson(json['CacheExpiresAt'],'DateTime',context!);
        IsFromCache = json['IsFromCache'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CachedAt': JsonConverters.toJson(CachedAt,'DateTime',context!),
        'CacheExpiresAt': JsonConverters.toJson(CacheExpiresAt,'DateTime',context!),
        'IsFromCache': IsFromCache
    };

    getTypeName() => "CacheMetadata";
    TypeContext? context = _ctx;
}

// @DataContract(Name="ResponseMetadata", Namespace="schemas.agentivity.com/types")
class ResponseMetadata implements IConvertible
{
    // @DataMember(Order=0)
    bool? Success;

    // @DataMember(Order=1)
    bool? HasCache;

    // @DataMember(Order=2)
    bool? HasPaging;

    // @DataMember(Order=3, EmitDefaultValue=false)
    CacheMetadata? CacheMetadata;

    // @DataMember(Order=4, EmitDefaultValue=false)
    PagingMetadata? PagingMetadata;

    ResponseMetadata({this.Success,this.HasCache,this.HasPaging,this.CacheMetadata,this.PagingMetadata});
    ResponseMetadata.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Success = json['Success'];
        HasCache = json['HasCache'];
        HasPaging = json['HasPaging'];
        CacheMetadata = JsonConverters.fromJson(json['CacheMetadata'],'CacheMetadata',context!);
        PagingMetadata = JsonConverters.fromJson(json['PagingMetadata'],'PagingMetadata',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Success': Success,
        'HasCache': HasCache,
        'HasPaging': HasPaging,
        'CacheMetadata': JsonConverters.toJson(CacheMetadata,'CacheMetadata',context!),
        'PagingMetadata': JsonConverters.toJson(PagingMetadata,'PagingMetadata',context!)
    };

    getTypeName() => "ResponseMetadata";
    TypeContext? context = _ctx;
}

// @DataContract(Name="ResponseMetadata", Namespace="schemas.agentivity.com/types")
class AgentivityError implements IConvertible
{
    // @DataMember
    String? ErrorCode;

    // @DataMember
    String? Message;

    // @DataMember
    String? StatusCode;

    // @DataMember
    String? VerboseMessage;

    AgentivityError({this.ErrorCode,this.Message,this.StatusCode,this.VerboseMessage});
    AgentivityError.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ErrorCode = json['ErrorCode'];
        Message = json['Message'];
        StatusCode = json['StatusCode'];
        VerboseMessage = json['VerboseMessage'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ErrorCode': ErrorCode,
        'Message': Message,
        'StatusCode': StatusCode,
        'VerboseMessage': VerboseMessage
    };

    getTypeName() => "AgentivityError";
    TypeContext? context = _ctx;
}

// @DataContract(Name="AgentivityResponse", Namespace="schemas.agentivity.com/types")
class ItemResponse<TItem,TReport> implements IConvertible
{
    // @DataMember(Order=1)
    ResponseMetadata? ResponseMetadata;

    // @DataMember(Order=2, EmitDefaultValue=false)
    TReport? ResponseReport;

    // @DataMember(Order=3, EmitDefaultValue=false)
    AgentivityError? ResponseError;

    ItemResponse({this.ResponseMetadata,this.ResponseReport,this.ResponseError});
    ItemResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseMetadata = JsonConverters.fromJson(json['ResponseMetadata'],'ResponseMetadata',context!);
        ResponseReport = JsonConverters.fromJson(json['ResponseReport'],'TReport',context!);
        ResponseError = JsonConverters.fromJson(json['ResponseError'],'AgentivityError',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseMetadata': JsonConverters.toJson(ResponseMetadata,'ResponseMetadata',context!),
        'ResponseReport': JsonConverters.toJson(ResponseReport,'TReport',context!),
        'ResponseError': JsonConverters.toJson(ResponseError,'AgentivityError',context!)
    };

    getTypeName() => "ItemResponse<$TItem,$TReport>";
    TypeContext? context = _ctx;
}

// @DataContract(Name="AgentivityResponse", Namespace="schemas.agentivity.com/types")
class HotelSegmentCountsPerConsultantByVendorItemResponse extends ItemResponse<HotelSegmentCountPerConsultantByVendor,HotelSegmentCountsPerConsultantByVendorResponseReport> implements IConvertible
{
    HotelSegmentCountsPerConsultantByVendorItemResponse();
    HotelSegmentCountsPerConsultantByVendorItemResponse.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "HotelSegmentCountsPerConsultantByVendorItemResponse";
    TypeContext? context = _ctx;
}

// @DataContract(Namespace="schemas.agentivity.com/types")
class GetHotelSegmentCountsPerConsultantByVendor extends CompanyLevelRequestBase implements IConvertible
{
    /**
    * Date in format YYYYMMDD
    */
    // @DataMember
    String? DateStart;

    /**
    * Date in format YYYYMMDD
    */
    // @DataMember
    String? DateEnd;

    /**
    * Vendor code
    */
    // @DataMember
    String? VendorCode;

    GetHotelSegmentCountsPerConsultantByVendor({this.DateStart,this.DateEnd,this.VendorCode});
    GetHotelSegmentCountsPerConsultantByVendor.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        DateStart = json['DateStart'];
        DateEnd = json['DateEnd'];
        VendorCode = json['VendorCode'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'DateStart': DateStart,
        'DateEnd': DateEnd,
        'VendorCode': VendorCode
    });

    getTypeName() => "GetHotelSegmentCountsPerConsultantByVendor";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.agentivity.com', types: <String, TypeInfo> {
    'PagingMetadata': TypeInfo(TypeOf.Class, create:() => PagingMetadata()),
    'CompanyLevelRequestBase': TypeInfo(TypeOf.AbstractClass),
    'HotelSegmentCountPerConsultantByVendor': TypeInfo(TypeOf.Class, create:() => HotelSegmentCountPerConsultantByVendor()),
    'Report<TItemResponse,TItem>': TypeInfo(TypeOf.GenericDef,create:() => Report()),
    'HotelSegmentCountsPerConsultantByVendorResponseReport': TypeInfo(TypeOf.Class, create:() => HotelSegmentCountsPerConsultantByVendorResponseReport()),
    'CacheMetadata': TypeInfo(TypeOf.Class, create:() => CacheMetadata()),
    'ResponseMetadata': TypeInfo(TypeOf.Class, create:() => ResponseMetadata()),
    'AgentivityError': TypeInfo(TypeOf.Class, create:() => AgentivityError()),
    'ItemResponse<TItem,TReport>': TypeInfo(TypeOf.GenericDef,create:() => ItemResponse()),
    'HotelSegmentCountsPerConsultantByVendorItemResponse': TypeInfo(TypeOf.Class, create:() => HotelSegmentCountsPerConsultantByVendorItemResponse()),
    'GetHotelSegmentCountsPerConsultantByVendor': TypeInfo(TypeOf.Class, create:() => GetHotelSegmentCountsPerConsultantByVendor()),
});

Dart GetHotelSegmentCountsPerConsultantByVendor 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 /HotelSegmentCountsPerConsultantByVendor HTTP/1.1 
Host: api.agentivity.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AgentivityResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="schemas.agentivity.com/types">
  <ResponseMetadata>
    <Success>false</Success>
    <HasCache>false</HasCache>
    <HasPaging>false</HasPaging>
    <CacheMetadata>
      <IsFromCache>false</IsFromCache>
      <CachedAt>0001-01-01T00:00:00</CachedAt>
      <CacheExpiresAt>0001-01-01T00:00:00</CacheExpiresAt>
    </CacheMetadata>
    <PagingMetadata>
      <Limit>String</Limit>
      <Offset>String</Offset>
      <ResponseRecords>0</ResponseRecords>
      <TotalRecords>0</TotalRecords>
    </PagingMetadata>
  </ResponseMetadata>
  <ResponseReport>
    <Item>
      <OwningConsultant>String</OwningConsultant>
      <OwningConsultantID>String</OwningConsultantID>
      <OwningAgencyLocation>String</OwningAgencyLocation>
      <TotalSegments>0</TotalSegments>
      <TotalNights>0</TotalNights>
    </Item>
  </ResponseReport>
  <ResponseError>
    <ErrorCode>String</ErrorCode>
    <Message>String</Message>
    <StatusCode>String</StatusCode>
    <VerboseMessage>String</VerboseMessage>
  </ResponseError>
</AgentivityResponse>