/* Options: Date: 2026-05-25 03:06:48 SwiftVersion: 6.0 Version: 10.06 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://active-ewebservice.biz/aeservices30/api //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: PostServiceTicketRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * PostServiceTicketRequires active-e Service Tickets Service */ // @Route("/PostServiceTicket", "POST") // @DataContract public class PostServiceTicketRequest : BaseSecureRequest, IReturn { public typealias Return = PostServiceTicketResponse /** * Online reference number of this appointment */ // @DataMember // @ApiMember(DataType="string", Description="Online reference number of this appointment", Name="RefNumber", ParameterType="query") public var refNumber:String? /** * Serial number of the item to be serviced */ // @DataMember // @ApiMember(DataType="string", Description="Serial number of the item to be serviced", Name="SerialNumber", ParameterType="query") public var serialNumber:String? /** * The AIM customer account # of the customer. Optional. */ // @DataMember // @ApiMember(DataType="integer", Description="The AIM customer account # of the customer. Optional.", Format="int32", Name="CustomerAcct", ParameterType="query") public var customerAcct:Int? /** * Customer Information */ // @DataMember // @ApiMember(DataType="object", Description="Customer Information", Name="CustomerInfo", ParameterType="query") public var customerInfo:CustomerInfo? /** * Additional Customer or Appointment info */ // @DataMember // @ApiMember(DataType="array", Description="Additional Customer or Appointment info", Name="FormInputList", ParameterType="query") public var formInputList:[FormInput]? /** * Credit Card info of the customer for this appointment */ // @DataMember // @ApiMember(DataType="object", Description="Credit Card info of the customer for this appointment", Name="CcInfo", ParameterType="query") public var ccInfo:CcInfo? /** * Notes on this appointment */ // @DataMember // @ApiMember(DataType="string", Description="Notes on this appointment", Name="Notes", ParameterType="query") public var notes:String? // @DataMember public var voiceRecording:String? /** * Description of the item to be serviced */ // @DataMember // @ApiMember(DataType="string", Description="Description of the item to be serviced", Name="ItemDescription", ParameterType="query") public var itemDescription:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case refNumber case serialNumber case customerAcct case customerInfo case formInputList case ccInfo case notes case voiceRecording case itemDescription } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) refNumber = try container.decodeIfPresent(String.self, forKey: .refNumber) serialNumber = try container.decodeIfPresent(String.self, forKey: .serialNumber) customerAcct = try container.decodeIfPresent(Int.self, forKey: .customerAcct) customerInfo = try container.decodeIfPresent(CustomerInfo.self, forKey: .customerInfo) formInputList = try container.decodeIfPresent([FormInput].self, forKey: .formInputList) ?? [] ccInfo = try container.decodeIfPresent(CcInfo.self, forKey: .ccInfo) notes = try container.decodeIfPresent(String.self, forKey: .notes) voiceRecording = try container.decodeIfPresent(String.self, forKey: .voiceRecording) itemDescription = try container.decodeIfPresent(String.self, forKey: .itemDescription) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if refNumber != nil { try container.encode(refNumber, forKey: .refNumber) } if serialNumber != nil { try container.encode(serialNumber, forKey: .serialNumber) } if customerAcct != nil { try container.encode(customerAcct, forKey: .customerAcct) } if customerInfo != nil { try container.encode(customerInfo, forKey: .customerInfo) } if formInputList != nil { try container.encode(formInputList, forKey: .formInputList) } if ccInfo != nil { try container.encode(ccInfo, forKey: .ccInfo) } if notes != nil { try container.encode(notes, forKey: .notes) } if voiceRecording != nil { try container.encode(voiceRecording, forKey: .voiceRecording) } if itemDescription != nil { try container.encode(itemDescription, forKey: .itemDescription) } } } // @DataContract public class PostServiceTicketResponse : BaseResponse { // @DataMember public var webRef:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case webRef } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) webRef = try container.decodeIfPresent(String.self, forKey: .webRef) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if webRef != nil { try container.encode(webRef, forKey: .webRef) } } } // @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 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(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 BaseResponse : Codable { /** * */ // @DataMember // @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body") public var status:BaseResponseResult? required public init(){} }