/* Options: Date: 2024-07-03 12:39:33 SwiftVersion: 5.0 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: SendNewsLetter.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/newsletter/send", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") public class SendNewsLetter : IReturn, ICompany, Codable { public typealias Return = SendNewslettersResponse /** * The newsletter template id. */ // @ApiMember(Description="The newsletter template id.", IsRequired=true) public var id:Int /** * The company id, if empty will use the company id for the user you are logged in with. */ // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.") public var companyId:String? /** * The datetime when the newsletters should be sent. */ // @ApiMember(Description="The datetime when the newsletters should be sent.", IsRequired=true) public var sendDate:Date /** * The customer ids to send newsletters to. */ // @ApiMember(Description="The customer ids to send newsletters to.", IsRequired=true) public var customers:[String] = [] required public init(){} } public class SendNewslettersResponse : Codable { /** * The number of messages that are added into queue. */ // @ApiMember(Description="The number of messages that are added into queue.") public var total:Int /** * Send Method. 1 = Email, 2 = SMS */ // @ApiMember(Description="Send Method. 1 = Email, 2 = SMS") public var sendMethodId:Int /** * Message example sent (in HTML format) */ // @ApiMember(Description="Message example sent (in HTML format)") public var messageExample:String required public init(){} } public protocol ICompany { var companyId:String? { get set } }