AIM Web Services

<back to all web services

C2BPostContractRequest

C2BPostContract
Requires active-e Contracts Service.

The following routes are available for this service:
POST, GET/api/C2BPostContract
import Foundation
import ServiceStack

/**
* C2BPostContractRequires active-e Contracts Service.
*/
// @DataContract
public class C2BPostContractRequest : BaseSecureRequest
{
    /**
    * ID of the teacher to associate the contract with.
    */
    // @DataMember
    // @ApiMember(DataType="integer", Description="ID of the teacher to associate the contract with.", Format="int64", Name="TeacherId", ParameterType="body")
    public var teacherId:Int?

    /**
    * Used to associate the contract with a school by school name.
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Used to associate the contract with a school by school name.", Name="SchoolName", ParameterType="body")
    public var schoolName:String

    /**
    * Used to associate the contract with a school by the AIM School ID
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Used to associate the contract with a school by the AIM School ID", Name="AIMSchoolId", ParameterType="body")
    public var aimSchoolId:Int?

    /**
    * Used to associate the contract with a location by location code.
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Used to associate the contract with a location by location code.", Name="Stloc", ParameterType="body")
    public var stloc:String

    /**
    * ID of the instrument to associate the contract with.
    */
    // @DataMember
    // @ApiMember(DataType="integer", Description="ID of the instrument to associate the contract with.", Format="int64", Name="InstrumentId", ParameterType="body")
    public var instrumentId:Int?

    /**
    * SKU to associate the contract with. Don't send if you send InstrumentId.
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="SKU to associate the contract with. Don't send if you send InstrumentId.", Name="Sku", ParameterType="body")
    public var sku:String

    /**
    * Description to associate the contract with if a SKU is sent. Don't send if you send InstrumentId.
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Description to associate the contract with if a SKU is sent. Don't send if you send InstrumentId.", Name="Desc", ParameterType="body")
    public var desc:String

    /**
    * The ID from the C2BGradeGeneric object
    */
    // @DataMember
    // @ApiMember(DataType="integer", Description="The ID from the C2BGradeGeneric object", Format="int64", Name="RateId", ParameterType="body")
    public var rateId:Int?

    /**
    * Rate object if you're not sending RateId. Don't send both.
    */
    // @DataMember
    // @ApiMember(DataType="object", Description="Rate object if you're not sending RateId. Don't send both.", Name="Rate", ParameterType="body")
    public var rate:Rate

    /**
    * List of Accessory/Delivery/Maintenance IDs.
    */
    // @DataMember
    // @ApiMember(DataType="array", Description="List of Accessory/Delivery/Maintenance IDs.", Name="AccessoryIdList", ParameterType="body")
    public var accessoryIdList:[Int] = []

    /**
    * List of Accessory/Delivery/Maintenance objects. This is for items not defined in AIM.
    */
    // @DataMember
    // @ApiMember(DataType="array", Description="List of Accessory/Delivery/Maintenance objects. This is for items not defined in AIM.", Name="AccessoryList", ParameterType="body")
    public var accessoryList:[Accessory] = []

    /**
    * List of Key/Value pairs containing additional information about the customer. If the Key matches an attribute tag within AIM it will populate that attribute. The following Keys are also handled specially: RENTALNOTES, ONLINESIGNATURE, ATTENTION, EMPLOYER, SOCIALSECURITY, WORKPHONE, EXTENSION, EXTENSION2, CELLPHONE, FAX, BANKROUTINGNUMBER, BANKACCOUNTNUMBER, BANKTRANSACTIONTYPE, DRIVERSLICENSENUMBER, DRIVERSLICENSESTATE, BIRTHDAY, SIGCAPTURE, WORKPHONE_EXT, CELLPHONE_EXT, FAX_EXT, CREDITCHECKNAMEOVERRIDE, DELIVERYDATE
    */
    // @DataMember
    // @ApiMember(DataType="array", Description="List of Key/Value pairs containing additional information about the customer. If the Key matches an attribute tag within AIM it will populate that attribute. The following Keys are also handled specially: RENTALNOTES, ONLINESIGNATURE, ATTENTION, EMPLOYER, SOCIALSECURITY, WORKPHONE, EXTENSION, EXTENSION2, CELLPHONE, FAX, BANKROUTINGNUMBER, BANKACCOUNTNUMBER, BANKTRANSACTIONTYPE, DRIVERSLICENSENUMBER, DRIVERSLICENSESTATE, BIRTHDAY, SIGCAPTURE, WORKPHONE_EXT, CELLPHONE_EXT, FAX_EXT, CREDITCHECKNAMEOVERRIDE, DELIVERYDATE", Name="FormInputList", ParameterType="body")
    public var formInputList:[FormInput] = []

    /**
    * Credit Card Information
    */
    // @DataMember
    // @ApiMember(DataType="object", Description="Credit Card Information", Name="CcInfo", ParameterType="body")
    public var ccInfo:CcInfo

    /**
    * Customer Information if the a CusAcct is not being passed in.
    */
    // @DataMember
    // @ApiMember(DataType="object", Description="Customer Information if the a CusAcct is not being passed in.", Name="CustomerInfo", ParameterType="body")
    public var customerInfo:CustomerInfo

    /**
    * AIM Customer Acct# to be linked to this contract. Do not pass in CustomerInfo if using CusAcct.
    */
    // @DataMember
    // @ApiMember(DataType="integer", Description="AIM Customer Acct# to be linked to this contract. Do not pass in CustomerInfo if using CusAcct.", Format="int32", Name="CusAcct", ParameterType="body")
    public var cusAcct:Int?

    /**
    * Used to associate a contract with a Cat/Sub rather then a SKU. Don't send if you send InstrumentId or SKU.
    */
    // @DataMember
    // @ApiMember(DataType="int", Description="Used to associate a contract with a Cat/Sub rather then a SKU. Don't send if you send InstrumentId or SKU.", Name="Cat", ParameterType="body")
    public var cat:Int?

    /**
    * Used to associate a contract with a Cat/Sub rather then a SKU. Don't send if you send InstrumentId or SKU.
    */
    // @DataMember
    // @ApiMember(DataType="int", Description="Used to associate a contract with a Cat/Sub rather then a SKU. Don't send if you send InstrumentId or SKU.", Name="Sub", ParameterType="body")
    public var sub:Int?

    /**
    * If TRUE is sent, a Topic will be returned with information from AIM. Usually not used.
    */
    // @DataMember
    // @ApiMember(DataType="bool", Description="If TRUE is sent, a Topic will be returned with information from AIM. Usually not used.", Name="ReturnTopic", ParameterType="body")
    public var returnTopic:Bool?

    /**
    * If sent, the Contract will have the specified status in AIM upon creation. Use ContractStatusListing to get the desired Id. Usually not used.
    */
    // @DataMember
    // @ApiMember(DataType="int", Description="If sent, the Contract will have the specified status in AIM upon creation. Use ContractStatusListing to get the desired Id. Usually not used.", Name="StatusId", ParameterType="body")
    public var statusId:Int?

    /**
    * Internal Use Only. Do not use.
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Internal Use Only. Do not use.", Name="CardTerminalId", ParameterType="body")
    public var cardTerminalId:String

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case teacherId
        case schoolName
        case aimSchoolId
        case stloc
        case instrumentId
        case sku
        case desc
        case rateId
        case rate
        case accessoryIdList
        case accessoryList
        case formInputList
        case ccInfo
        case customerInfo
        case cusAcct
        case cat
        case sub
        case returnTopic
        case statusId
        case cardTerminalId
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        teacherId = try container.decodeIfPresent(Int.self, forKey: .teacherId)
        schoolName = try container.decodeIfPresent(String.self, forKey: .schoolName)
        aimSchoolId = try container.decodeIfPresent(Int.self, forKey: .aimSchoolId)
        stloc = try container.decodeIfPresent(String.self, forKey: .stloc)
        instrumentId = try container.decodeIfPresent(Int.self, forKey: .instrumentId)
        sku = try container.decodeIfPresent(String.self, forKey: .sku)
        desc = try container.decodeIfPresent(String.self, forKey: .desc)
        rateId = try container.decodeIfPresent(Int.self, forKey: .rateId)
        rate = try container.decodeIfPresent(Rate.self, forKey: .rate)
        accessoryIdList = try container.decodeIfPresent([Int].self, forKey: .accessoryIdList) ?? []
        accessoryList = try container.decodeIfPresent([Accessory].self, forKey: .accessoryList) ?? []
        formInputList = try container.decodeIfPresent([FormInput].self, forKey: .formInputList) ?? []
        ccInfo = try container.decodeIfPresent(CcInfo.self, forKey: .ccInfo)
        customerInfo = try container.decodeIfPresent(CustomerInfo.self, forKey: .customerInfo)
        cusAcct = try container.decodeIfPresent(Int.self, forKey: .cusAcct)
        cat = try container.decodeIfPresent(Int.self, forKey: .cat)
        sub = try container.decodeIfPresent(Int.self, forKey: .sub)
        returnTopic = try container.decodeIfPresent(Bool.self, forKey: .returnTopic)
        statusId = try container.decodeIfPresent(Int.self, forKey: .statusId)
        cardTerminalId = try container.decodeIfPresent(String.self, forKey: .cardTerminalId)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if teacherId != nil { try container.encode(teacherId, forKey: .teacherId) }
        if schoolName != nil { try container.encode(schoolName, forKey: .schoolName) }
        if aimSchoolId != nil { try container.encode(aimSchoolId, forKey: .aimSchoolId) }
        if stloc != nil { try container.encode(stloc, forKey: .stloc) }
        if instrumentId != nil { try container.encode(instrumentId, forKey: .instrumentId) }
        if sku != nil { try container.encode(sku, forKey: .sku) }
        if desc != nil { try container.encode(desc, forKey: .desc) }
        if rateId != nil { try container.encode(rateId, forKey: .rateId) }
        if rate != nil { try container.encode(rate, forKey: .rate) }
        if accessoryIdList.count > 0 { try container.encode(accessoryIdList, forKey: .accessoryIdList) }
        if accessoryList.count > 0 { try container.encode(accessoryList, forKey: .accessoryList) }
        if formInputList.count > 0 { try container.encode(formInputList, forKey: .formInputList) }
        if ccInfo != nil { try container.encode(ccInfo, forKey: .ccInfo) }
        if customerInfo != nil { try container.encode(customerInfo, forKey: .customerInfo) }
        if cusAcct != nil { try container.encode(cusAcct, forKey: .cusAcct) }
        if cat != nil { try container.encode(cat, forKey: .cat) }
        if sub != nil { try container.encode(sub, forKey: .sub) }
        if returnTopic != nil { try container.encode(returnTopic, forKey: .returnTopic) }
        if statusId != nil { try container.encode(statusId, forKey: .statusId) }
        if cardTerminalId != nil { try container.encode(cardTerminalId, forKey: .cardTerminalId) }
    }
}

// @DataContract
public class BaseSecureRequest : BaseRequest
{
    /**
    * The Login Token return by the Security API. Required for secured calls.
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="The Login Token return by the Security API. Required for secured calls.", Name="Token", ParameterType="Header")
    public var token:String

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case token
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        token = try container.decodeIfPresent(String.self, forKey: .token)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if token != nil { try container.encode(token, forKey: .token) }
    }
}

// @DataContract
public class BaseRequest : Codable
{
    /**
    * This is your AIM API Key provided by Tri-Tech
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="Header")
    public var apiKey:String

    /**
    * The OAuthToken token return by AeServices30
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="The OAuthToken token return by AeServices30", IsRequired=true, Name="OAuthToken", ParameterType="Header")
    public var oAuthToken:String

    /**
    * The Device ID of the Mobile Device. Not used for non-mobile devices.
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="The Device ID of the Mobile Device. Not used for non-mobile devices.", Name="DeviceId", ParameterType="Header")
    public var deviceId:String

    /**
    * An identifier for your integration
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="An identifier for your integration", IsRequired=true, Name="AppId", ParameterType="Header")
    public var appId:String

    required public init(){}
}

// @DataContract(Name="Rate")
public class Rate : Codable
{
    /**
    * Plan Code to be used for the contract
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Plan Code to be used for the contract", Name="PlanCode", ParameterType="body")
    public var planCode:String

    /**
    * Level to be used for the contract
    */
    // @DataMember
    // @ApiMember(DataType="int", Description="Level to be used for the contract", Name="Level", ParameterType="body")
    public var level:Int?

    /**
    * Grade to be used for the contract
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Grade to be used for the contract", Name="Grade", ParameterType="body")
    public var grade:String

    /**
    * Down Payment to be collected. Does not include maintenance or lease fees.
    */
    // @DataMember
    // @ApiMember(DataType="decimal", Description="Down Payment to be collected. Does not include maintenance or lease fees.", Name="DownPay", ParameterType="body")
    public var downPay:Double?

    /**
    * Monthly amount to be collected for the contract. Does not include maintenance or lease fees.
    */
    // @DataMember
    // @ApiMember(DataType="decimal", Description="Monthly amount to be collected for the contract. Does not include maintenance or lease fees.", Name="MoPay", ParameterType="body")
    public var moPay:Double?

    /**
    * Down Payment to be collected for maintenance.
    */
    // @DataMember
    // @ApiMember(DataType="decimal", Description="Down Payment to be collected for maintenance.", Name="DownMaint", ParameterType="body")
    public var downMaint:Double?

    /**
    * Monthly amount to be collected for the maintenance.
    */
    // @DataMember
    // @ApiMember(DataType="decimal", Description="Monthly amount to be collected for the maintenance.", Name="MoMaint", ParameterType="body")
    public var moMaint:Double?

    /**
    * If sent, the first Contract Default with this rental type will be used. Not used if ContractDefaultId is sent. Valid values are EW: Extended Warranty, RO: Rent to Rent, RF: Rent to Own, SF: Sales Contract, RV: Simple Intrst: Rent, SV: Simple Intrst: Sales
    */
    // @DataMember
    // @ApiMember(DataType="int64", Description="If sent, the first Contract Default with this rental type will be used. Not used if ContractDefaultId is sent. Valid values are EW: Extended Warranty, RO: Rent to Rent, RF: Rent to Own, SF: Sales Contract, RV: Simple Intrst: Rent, SV: Simple Intrst: Sales", Name="RdfType", ParameterType="body")
    public var rdfType:String

    /**
    * The ID of the contract default to be used for this contract.
    */
    // @DataMember
    // @ApiMember(DataType="int64", Description="The ID of the contract default to be used for this contract.", Name="ContractDefaultId", ParameterType="body")
    public var contractDefaultId:Int?

    /**
    * The Number of Months covered by the downpayment
    */
    // @DataMember
    // @ApiMember(DataType="int", Description="The Number of Months covered by the downpayment", Name="Months", ParameterType="body")
    public var months:Int?

    /**
    * Down Payment to be collected for Lease Fees.
    */
    // @DataMember
    // @ApiMember(DataType="decimal", Description="Down Payment to be collected for Lease Fees.", Name="DownMaint", ParameterType="body")
    public var downLease:Double?

    /**
    * Monthly amount to be collected for lease fees.
    */
    // @DataMember
    // @ApiMember(DataType="decimal", Description="Monthly amount to be collected for lease fees.", Name="MoLease", ParameterType="body")
    public var moLease:Double?

    required public init(){}
}

// @DataContract(Name="Accessory")
public class Accessory : Codable
{
    /**
    * The description to be used for the Accessory
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="The description to be used for the Accessory", IsRequired=true, Name="Desc", ParameterType="body")
    public var desc:String

    /**
    * The price to be used for the Accessory
    */
    // @DataMember
    // @ApiMember(DataType="decimal", Description="The price to be used for the Accessory", Name="Price", ParameterType="body")
    public var price:Double

    /**
    * The type of Accessory. A is Accessory, D is Delivery Option, and M is Maintenance
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="The type of Accessory. A is Accessory, D is Delivery Option, and M is Maintenance", Name="Type", ParameterType="body")
    public var type:String

    /**
    * The category # in AIM to be linked to this accessory.
    */
    // @DataMember
    // @ApiMember(DataType="int", Description="The category # in AIM to be linked to this accessory.", Name="CatNum", ParameterType="body")
    public var catNum:Int

    /**
    * A SKU or Package Deal package SKU can be sent here to link the accessory to that SKU or package.
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="A SKU or Package Deal package SKU can be sent here to link the accessory to that SKU or package.", Name="Sku", ParameterType="body")
    public var sku:String

    /**
    * Internal Use Only
    */
    // @DataMember
    // @ApiMember(DataType="bool", Description="Internal Use Only", Name="Report", ParameterType="body")
    public var report:Bool?

    required public init(){}
}

// @DataContract(Name="FormInput")
public class FormInput : Codable
{
    /**
    * Field name of the Input Field. If linking to an Attribute, this should match the Tag value.
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Field name of the Input Field. If linking to an Attribute, this should match the Tag value.", IsRequired=true, Name="Key", ParameterType="body")
    public var key:String

    /**
    * Value of the Input Field.
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Value of the Input Field.", IsRequired=true, Name="Value", ParameterType="body")
    public var value:String

    /**
    * Whether or not the field is encryped with the C2B encryption key.
    */
    // @DataMember
    // @ApiMember(DataType="boolean", Description="Whether or not the field is encryped with the C2B encryption key.", Name="Encrypted", ParameterType="body")
    public var encrypted:Bool

    required public init(){}
}

// @DataContract(Name="CCInfo")
public class CcInfo : Codable
{
    /**
    * Token returned from processor
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Token returned from processor", IsRequired=true, Name="TokenStr", ParameterType="body")
    public var tokenStr:String

    /**
    * Card Type (VISA, MCARD, AMEX, DSCVR)
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Card Type (VISA, MCARD, AMEX, DSCVR)", IsRequired=true, Name="CardType", ParameterType="body")
    public var cardType:String

    /**
    * Last four of the card
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Last four of the card", IsRequired=true, Name="LastFour", ParameterType="body")
    public var lastFour:String

    /**
    * Expiration Date of the Card. (MM/YY)
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Expiration Date of the Card. (MM/YY)", Name="Expiration", ParameterType="body")
    public var expiration:String

    /**
    * Reason the card is on file.
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Reason the card is on file.", Name="ReasonOnFile", ParameterType="body")
    public var reasonOnFile:String

    /**
    * ID of the existing Token Record in AIM, if applicable
    */
    // @DataMember
    // @ApiMember(DataType="integer", Description="ID of the existing Token Record in AIM, if applicable", Format="int64", Name="TokenPk", ParameterType="body")
    public var tokenPk:Int?

    /**
    * Is this the customer's primary card? Defaults to false.
    */
    // @DataMember
    // @ApiMember(DataType="boolean", Description="Is this the customer's primary card? Defaults to false.", Name="Primary", ParameterType="body")
    public var primary:Bool?

    required public init(){}
}

// @DataContract(Name="CustomerInfo")
public class CustomerInfo : Codable
{
    /**
    * The WebId of the customer. Optional.
    */
    // @DataMember
    // @ApiMember(DataType="integer", Description="The WebId of the customer. Optional.", Format="int32", Name="WebId", ParameterType="body")
    public var webId:Int?

    /**
    * Name of the customer.
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Name of the customer.", IsRequired=true, Name="Name", ParameterType="body")
    public var name:String

    /**
    * Address line 1 of the customer
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Address line 1 of the customer", Name="Addr1", ParameterType="body")
    public var addr1:String

    /**
    * Address line 2 of the customer
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Address line 2 of the customer", Name="Addr2", ParameterType="body")
    public var addr2:String

    /**
    * City of the customer
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="City of the customer", Name="City", ParameterType="body")
    public var city:String

    /**
    * State/Province of the customer
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="State/Province of the customer", Name="St", ParameterType="body")
    public var st:String

    /**
    * Zip code of the customer
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Zip code of the customer", Name="Zip", ParameterType="body")
    public var zip:String

    /**
    * Country of the customer
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Country of the customer", Name="Country", ParameterType="body")
    public var country:String

    /**
    * Phone number of the customer
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Phone number of the customer", Name="Phone", ParameterType="body")
    public var phone:String

    /**
    * Email address of the customer. Required.
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="Email address of the customer. Required.", IsRequired=true, Name="Email", ParameterType="body")
    public var email:String

    required public init(){}
}

// @DataContract
public class C2BPostContractResponse : BaseResponse
{
    // @DataMember
    public var paymentRequired:Bool

    // @DataMember
    public var topic:String

    // @DataMember
    public var webRef:String

    // @DataMember
    public var baseUrl:String

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case paymentRequired
        case topic
        case webRef
        case baseUrl
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        paymentRequired = try container.decodeIfPresent(Bool.self, forKey: .paymentRequired)
        topic = try container.decodeIfPresent(String.self, forKey: .topic)
        webRef = try container.decodeIfPresent(String.self, forKey: .webRef)
        baseUrl = try container.decodeIfPresent(String.self, forKey: .baseUrl)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if paymentRequired != nil { try container.encode(paymentRequired, forKey: .paymentRequired) }
        if topic != nil { try container.encode(topic, forKey: .topic) }
        if webRef != nil { try container.encode(webRef, forKey: .webRef) }
        if baseUrl != nil { try container.encode(baseUrl, forKey: .baseUrl) }
    }
}

// @DataContract
public class BaseResponse : Codable
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
    public var status:BaseResponseResult

    required public init(){}
}

// @DataContract
public class BaseResponseResult : Codable
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
    public var statusCode:String

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
    public var login:String

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
    public var errorCode:String

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
    public var errorDisplayText:String

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
    public var errorMessage:String

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
    public var domainName:String

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
    public var ipAddress:String

    required public init(){}
}


Swift C2BPostContractRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /api/C2BPostContract HTTP/1.1 
Host: active-ewebservice.biz 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"TeacherId":0,"SchoolName":"String","AIMSchoolId":0,"Stloc":"String","InstrumentId":0,"Sku":"String","Desc":"String","RateId":0,"Rate":{"PlanCode":"String","Level":0,"Grade":"String","DownPay":0,"MoPay":0,"DownMaint":0,"MoMaint":0,"RdfType":"String","ContractDefaultId":0,"Months":0,"DownLease":0,"MoLease":0},"AccessoryIdList":[0],"AccessoryList":[{"Desc":"String","Price":0,"Type":"String","CatNum":0,"Sku":"String","Report":false}],"FormInputList":[{"Key":"String","Value":"String","Encrypted":false}],"CcInfo":{"TokenStr":"String","CardType":"String","LastFour":"String","Expiration":"String","ReasonOnFile":"String","TokenPk":0,"Primary":false},"CustomerInfo":{"WebId":0,"Name":"String","Addr1":"String","Addr2":"String","City":"String","St":"String","Zip":"String","Country":"String","Phone":"String","Email":"String"},"CusAcct":0,"Cat":0,"Sub":0,"ReturnTopic":false,"StatusId":0,"CardTerminalId":"String","Token":"String","ApiKey":"String","OAuthToken":"String","DeviceId":"String","AppId":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"PaymentRequired":false,"Topic":"String","WebRef":"String","BaseUrl":"String","Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}