Agentivity API

<back to all web services

GetAirTktSegFlightCouponStatusGroups

import Foundation
import ServiceStack

// @DataContract(Namespace="schemas.agentivity.com/types")
public class GetAirTktSegFlightCouponStatusGroups : PagingMetadata
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}

// @DataContract(Name="Metadata", Namespace="schemas.agentivity.com/types")
public class PagingMetadata : Codable
{
    /**
    * Starting Record
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Starting Record", Name="Offset", ParameterType="query")
    public var offset:String

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

    /**
    * 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")
    public var totalRecords:Int

    /**
    * 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")
    public var responseRecords:Int

    required public init(){}
}

// @DataContract(Name="AgentivityResponse", Namespace="schemas.agentivity.com/types")
public class AirTktSegFlightCouponStatusGroupResponse : ItemResponse<AirTktSegFlightCouponStatusGroup, AirTktSegFlightCouponStatusGroupReport>
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}

// @DataContract(Name="AgentivityResponse", Namespace="schemas.agentivity.com/types")
public class ItemResponse<TItem : Codable, TReport : Codable> : Codable
{
    // @DataMember(Order=1)
    public var responseMetadata:ResponseMetadata

    // @DataMember(Order=2, EmitDefaultValue=false)
    public var responseReport:TReport

    // @DataMember(Order=3, EmitDefaultValue=false)
    public var responseError:AgentivityError

    required public init(){}
}

// @DataContract(Name="ResponseMetadata", Namespace="schemas.agentivity.com/types")
public class ResponseMetadata : Codable
{
    // @DataMember(Order=0)
    public var success:Bool

    // @DataMember(Order=1)
    public var hasCache:Bool

    // @DataMember(Order=2)
    public var hasPaging:Bool

    // @DataMember(Order=3, EmitDefaultValue=false)
    public var cacheMetadata:CacheMetadata

    // @DataMember(Order=4, EmitDefaultValue=false)
    public var pagingMetadata:PagingMetadata

    required public init(){}
}

// @DataContract(Name="CacheMetadata", Namespace="schemas.agentivity.com/types")
public class CacheMetadata : Codable
{
    // @DataMember(Order=1)
    public var cachedAt:Date

    // @DataMember(Order=2)
    public var cacheExpiresAt:Date

    // @DataMember(Order=0)
    public var isFromCache:Bool

    required public init(){}
}

// @DataContract(Name="ResponseMetadata", Namespace="schemas.agentivity.com/types")
public class AgentivityError : Codable
{
    // @DataMember
    public var errorCode:String

    // @DataMember
    public var message:String

    // @DataMember
    public var statusCode:String

    // @DataMember
    public var verboseMessage:String

    required public init(){}
}

// @DataContract(Namespace="schemas.agentivity.com/types")
public class AirTktSegFlightCouponStatusGroup : Codable
{
    /**
    * Ticket number
    */
    // @DataMember
    public var tktNumber:String

    /**
    * Status that you want to apply on the coupon eg MFRD, CVID, EXCH, USED, OPEN
    */
    // @DataMember
    public var coupons:[AirTktSegFlightCouponStatus] = []

    required public init(){}
}

// @DataContract(Namespace="schemas.agentivity.com/types")
public class AirTktSegFlightCouponStatus : Codable
{
    // @DataMember
    public var couponSequenceNbr:Int

    // @DataMember
    public var airTktSegId:Int

    // @DataMember
    public var flightCouponStatus:String

    required public init(){}
}

// @DataContract(Name="AirTktSegFlightCouponStatusGroup", Namespace="schemas.agentivity.com/types")
public class AirTktSegFlightCouponStatusGroupReport : Report<AirTktSegFlightCouponStatusGroupResponse, AirTktSegFlightCouponStatusGroup>
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}

// @DataContract(Namespace="schemas.agentivity.com/types")
public class Report<TItemResponse : Codable, TItem : Codable> : Codable
{
    // @DataMember(Order=1, EmitDefaultValue=false)
    public var item:TItem

    required public init(){}
}


Swift GetAirTktSegFlightCouponStatusGroups 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.

POST /xml/reply/GetAirTktSegFlightCouponStatusGroups HTTP/1.1 
Host: api.agentivity.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<GetAirTktSegFlightCouponStatusGroups xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="schemas.agentivity.com/types">
  <Limit>String</Limit>
  <Offset>String</Offset>
  <ResponseRecords>0</ResponseRecords>
  <TotalRecords>0</TotalRecords>
</GetAirTktSegFlightCouponStatusGroups>
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>
      <Coupons>
        <AirTktSegFlightCouponStatus>
          <AirTktSegId>0</AirTktSegId>
          <CouponSequenceNbr>0</CouponSequenceNbr>
          <FlightCouponStatus>String</FlightCouponStatus>
        </AirTktSegFlightCouponStatus>
      </Coupons>
      <TktNumber>String</TktNumber>
    </Item>
  </ResponseReport>
  <ResponseError>
    <ErrorCode>String</ErrorCode>
    <Message>String</Message>
    <StatusCode>String</StatusCode>
    <VerboseMessage>String</VerboseMessage>
  </ResponseError>
</AgentivityResponse>