/* Options: Date: 2026-11-08 11:52:54 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: CreditCardPaymentRefund.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/api/CreditCard/Payment/Refund", "POST") public class CreditCardPaymentRefund : CreditCardPaymentRefund, IReturn { public typealias Return = CreditCardPaymentRefundResult 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 CreditCardPaymentRefundResult : CreditCardCloudServiceResponse { public var transactionRecordID:Int? public var failureType:PaymentFailureType? public var isOverpayment:Bool? public var paymentNotFound:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case transactionRecordID case failureType case isOverpayment case paymentNotFound } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) transactionRecordID = try container.decodeIfPresent(Int.self, forKey: .transactionRecordID) failureType = try container.decodeIfPresent(PaymentFailureType.self, forKey: .failureType) 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 transactionRecordID != nil { try container.encode(transactionRecordID, forKey: .transactionRecordID) } if failureType != nil { try container.encode(failureType, forKey: .failureType) } if isOverpayment != nil { try container.encode(isOverpayment, forKey: .isOverpayment) } if paymentNotFound != nil { try container.encode(paymentNotFound, forKey: .paymentNotFound) } } } public class ApiClientHeader : Codable { public var clientId:Int? public var referrer:String? public var ipAddress:String? public var loggedInUserId:Int? public var groupId:Int? public var task:String? public var machine:String? public var location:String? public var createdBy:Int? public var campaignId:Int? public var reCaptchaScore:Double? required public init(){} } public class CreditCardRefundInformation : Codable { public var currencyCode:String? public var gatewayTransactionId:String? public var amount:Double? public var memo:String? public var memberPaymentId:Int? public var type:PaymentTransactionType? public var reasonId:Int? public var userId:Int? required public init(){} } public class CreditCardPaymentRefund : Codable { public var header:ApiClientHeader? public var refundInfo:CreditCardRefundInformation? required public init(){} } public protocol IHaveErrorField { var isError:Bool? { get set } } public enum PaymentFailureType : Int, Codable { case None = 0 case Gateway = 1 case PaymentTransaction = 2 case KeyProcurment = 3 case CardVerification = 4 } 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 } } public enum PaymentTransactionType : Int, Codable { case None = 0 case MemberPayment = 1 case DonationPayment = 2 case PmiPayment = 3 case MemberPaymentRefund = 4 case DonationRefund = 5 case SmpPayment = 6 }