Agentivity API

<back to all web services

AirSegmentsPerLocation

The following routes are available for this service:
GET/AirSegmentsPerLocation/user
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(Namespace="schemas.agentivity.com/types")
class AirSegmentsPerLocation extends CompanyLevelRequestBase implements IConvertible
{
    // @DataMember
    String? DateStart;

    // @DataMember
    String? DateEnd;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'api.agentivity.com', types: <String, TypeInfo> {
    'PagingMetadata': TypeInfo(TypeOf.Class, create:() => PagingMetadata()),
    'CompanyLevelRequestBase': TypeInfo(TypeOf.AbstractClass),
    'AirSegmentsPerLocation': TypeInfo(TypeOf.Class, create:() => AirSegmentsPerLocation()),
});

Dart AirSegmentsPerLocation DTOs

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

HTTP + OTHER

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

GET /AirSegmentsPerLocation/user HTTP/1.1 
Host: api.agentivity.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{Unable to show example output for type 'ICollection`1' using the custom 'other' filter}Cannot dynamically create an instance of type 'System.Collections.Generic.ICollection`1[AgentivityAPI.ServiceModel.Types.AirSegmentsPerCarrierItemResponse]'. Reason: Cannot create an instance of an interface.