/* Options: Date: 2024-11-21 11:43:06 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: CreateCompanyCreditCard.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/billing/company/creditcard", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") public class CreateCompanyCreditCard : IReturn, ICompany, Codable { public typealias Return = CompanyCreditCardQueryResponse /** * 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 credit card name */ // @ApiMember(Description="The credit card name") public var name:String /** * The credit card type. In example Mastercard, Visa */ // @ApiMember(Description="The credit card type. In example Mastercard, Visa") public var type:String /** * The credit card expiration Year */ // @ApiMember(Description="The credit card expiration Year") public var expYear:String /** * The credit card expiration month */ // @ApiMember(Description="The credit card expiration month") public var expMonth:String /** * The credit card ticket name. This is secret information and won't be displayed */ // @ApiMember(Description="The credit card ticket name. This is secret information and won't be displayed") public var ticketId:String required public init(){} } public class CompanyCreditCardQueryResponse : Codable { /** * The credit card id */ // @ApiMember(Description="The credit card id") public var id:Int /** * The credit card name */ // @ApiMember(Description="The credit card name") public var name:String /** * If the credit card is active */ // @ApiMember(Description="If the credit card is active") public var active:Bool /** * If the credit card is valid (active and not expired) */ // @ApiMember(Description="If the credit card is valid (active and not expired)") public var isValid:Bool /** * The credit card type */ // @ApiMember(Description="The credit card type") public var type:String /** * The credit card expiration Year */ // @ApiMember(Description="The credit card expiration Year") public var expYear:String /** * The credit card expiration month */ // @ApiMember(Description="The credit card expiration month") public var expMonth:String /** * The credit card ticket name. This is secret information and won't be displayed */ // @ApiMember(Description="The credit card ticket name. This is secret information and won't be displayed") public var ticketId:String /** * The date when the credit card was saved. */ // @ApiMember(Description="The date when the credit card was saved.") public var created:Date? /** * The date when the credit card was updated. */ // @ApiMember(Description="The date when the credit card was updated.") public var updated:Date? required public init(){} } public protocol ICompany { var companyId:String? { get set } }