/* Options: Date: 2026-11-08 11:52:58 SwiftVersion: 5.0 Version: 5.140 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://devapi.billhighway.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: CreditCardDonationRefund.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/api/creditcard/DonationRefund", "POST") public class CreditCardDonationRefund : CreditCardDonationRefund, IReturn { public typealias Return = RefundResponse 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) } } public class RefundResponse : CreditCardCloudServiceResponse { public var isOverpayment:Bool? public var paymentNotFound:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case isOverpayment case paymentNotFound } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) isOverpayment = try container.decodeIfPresent(Bool.self, forKey: .isOverpayment) paymentNotFound = try container.decodeIfPresent(Bool.self, forKey: .paymentNotFound) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if isOverpayment != nil { try container.encode(isOverpayment, forKey: .isOverpayment) } if paymentNotFound != nil { try container.encode(paymentNotFound, forKey: .paymentNotFound) } } } public class CreditCardDonationRefund : Codable { public var confirmationId:Int? public var amount:Double? public var memo:String? public var reasonId:String? required public init(){} } public protocol IHaveErrorField { var isError:Bool? { get set } } public class CreditCardCloudServiceResponse : IHaveErrorField, Codable { public var isDuplicate:Bool? public var isSuccessful:Bool? public var errorCode:String? public var message:String? public var gatewayId:Int? public var confirmationNumber:String? public var networkTransactionId:String? public var isError:Bool? required public init(){} } public protocol IHaveErrorField { var isError:Bool? { get set } }