/* Options: Date: 2024-12-15 19:31:20 SwiftVersion: 5.0 Version: 6.10 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://staging-api.billiecart.com.au //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: SetLeaseDetailsRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/packages/{Id}/lease-details", "PUT") public class SetLeaseDetailsRequest : PutOperationTenanted, IReturn { public typealias Return = SetLeaseDetailsResponse public var id:String? public var term:Int? public var startDate:Date? public var amountFinanced:Double? public var financeProvider:String? public var paymentAmount:Double? public var residualValue:Double? public var yearlyKmsTravelled:Int? public var onRoadCost:Double? public var fringeBenefitTaxValue:Double? public var fringeBenefitTaxMethod:String? public var fringeBenefitBusinessUse:Int? public var fringeBenefitStartDate:Date? public var preTaxDeduction:Double? public var postTaxDeduction:Double? public var gstOnPostTaxDeduction:Double? public var luxuryVehicleCharge:Double? public var registrationDueDate:Date? public var insuranceDueDate:Date? public var leaseProviderBankAccountNumber:String? public var leaseProviderBankAccountBsbNumber:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case term case startDate case amountFinanced case financeProvider case paymentAmount case residualValue case yearlyKmsTravelled case onRoadCost case fringeBenefitTaxValue case fringeBenefitTaxMethod case fringeBenefitBusinessUse case fringeBenefitStartDate case preTaxDeduction case postTaxDeduction case gstOnPostTaxDeduction case luxuryVehicleCharge case registrationDueDate case insuranceDueDate case leaseProviderBankAccountNumber case leaseProviderBankAccountBsbNumber } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(String.self, forKey: .id) term = try container.decodeIfPresent(Int.self, forKey: .term) startDate = try container.decodeIfPresent(Date.self, forKey: .startDate) amountFinanced = try container.decodeIfPresent(Double.self, forKey: .amountFinanced) financeProvider = try container.decodeIfPresent(String.self, forKey: .financeProvider) paymentAmount = try container.decodeIfPresent(Double.self, forKey: .paymentAmount) residualValue = try container.decodeIfPresent(Double.self, forKey: .residualValue) yearlyKmsTravelled = try container.decodeIfPresent(Int.self, forKey: .yearlyKmsTravelled) onRoadCost = try container.decodeIfPresent(Double.self, forKey: .onRoadCost) fringeBenefitTaxValue = try container.decodeIfPresent(Double.self, forKey: .fringeBenefitTaxValue) fringeBenefitTaxMethod = try container.decodeIfPresent(String.self, forKey: .fringeBenefitTaxMethod) fringeBenefitBusinessUse = try container.decodeIfPresent(Int.self, forKey: .fringeBenefitBusinessUse) fringeBenefitStartDate = try container.decodeIfPresent(Date.self, forKey: .fringeBenefitStartDate) preTaxDeduction = try container.decodeIfPresent(Double.self, forKey: .preTaxDeduction) postTaxDeduction = try container.decodeIfPresent(Double.self, forKey: .postTaxDeduction) gstOnPostTaxDeduction = try container.decodeIfPresent(Double.self, forKey: .gstOnPostTaxDeduction) luxuryVehicleCharge = try container.decodeIfPresent(Double.self, forKey: .luxuryVehicleCharge) registrationDueDate = try container.decodeIfPresent(Date.self, forKey: .registrationDueDate) insuranceDueDate = try container.decodeIfPresent(Date.self, forKey: .insuranceDueDate) leaseProviderBankAccountNumber = try container.decodeIfPresent(String.self, forKey: .leaseProviderBankAccountNumber) leaseProviderBankAccountBsbNumber = try container.decodeIfPresent(String.self, forKey: .leaseProviderBankAccountBsbNumber) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if term != nil { try container.encode(term, forKey: .term) } if startDate != nil { try container.encode(startDate, forKey: .startDate) } if amountFinanced != nil { try container.encode(amountFinanced, forKey: .amountFinanced) } if financeProvider != nil { try container.encode(financeProvider, forKey: .financeProvider) } if paymentAmount != nil { try container.encode(paymentAmount, forKey: .paymentAmount) } if residualValue != nil { try container.encode(residualValue, forKey: .residualValue) } if yearlyKmsTravelled != nil { try container.encode(yearlyKmsTravelled, forKey: .yearlyKmsTravelled) } if onRoadCost != nil { try container.encode(onRoadCost, forKey: .onRoadCost) } if fringeBenefitTaxValue != nil { try container.encode(fringeBenefitTaxValue, forKey: .fringeBenefitTaxValue) } if fringeBenefitTaxMethod != nil { try container.encode(fringeBenefitTaxMethod, forKey: .fringeBenefitTaxMethod) } if fringeBenefitBusinessUse != nil { try container.encode(fringeBenefitBusinessUse, forKey: .fringeBenefitBusinessUse) } if fringeBenefitStartDate != nil { try container.encode(fringeBenefitStartDate, forKey: .fringeBenefitStartDate) } if preTaxDeduction != nil { try container.encode(preTaxDeduction, forKey: .preTaxDeduction) } if postTaxDeduction != nil { try container.encode(postTaxDeduction, forKey: .postTaxDeduction) } if gstOnPostTaxDeduction != nil { try container.encode(gstOnPostTaxDeduction, forKey: .gstOnPostTaxDeduction) } if luxuryVehicleCharge != nil { try container.encode(luxuryVehicleCharge, forKey: .luxuryVehicleCharge) } if registrationDueDate != nil { try container.encode(registrationDueDate, forKey: .registrationDueDate) } if insuranceDueDate != nil { try container.encode(insuranceDueDate, forKey: .insuranceDueDate) } if leaseProviderBankAccountNumber != nil { try container.encode(leaseProviderBankAccountNumber, forKey: .leaseProviderBankAccountNumber) } if leaseProviderBankAccountBsbNumber != nil { try container.encode(leaseProviderBankAccountBsbNumber, forKey: .leaseProviderBankAccountBsbNumber) } } } public class SetLeaseDetailsResponse : Codable { public var responseStatus:ResponseStatus? public var salaryPackage:SalaryPackage? required public init(){} } public protocol ITenantedRequest { var organisationId:String? { get set } } public class PutOperationUnTenanted : IPut, Codable { required public init(){} } public class PutOperationTenanted : PutOperationUnTenanted, ITenantedRequest { public var organisationId:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case organisationId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) organisationId = try container.decodeIfPresent(String.self, forKey: .organisationId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if organisationId != nil { try container.encode(organisationId, forKey: .organisationId) } } } public class SalaryPackage : IIdentifiableResource, Codable { public var customerId:String? public var customerFirstName:String? public var customerLastName:String? public var status:String? public var notes:String? public var budgetBreakdown:BudgetBreakdown? public var employment:Employment? public var vehicle:Vehicle? public var leaseDetails:LeaseDetails? public var budgetBalances:BudgetBalances? public var currentBalance:Double? public var forecastedSalarySacrifices:[ForecastedSalarySacrifice] = [] public var forecastedOutgoingPayments:[ForecastedOutgoingPayment] = [] public var adjustments:[Adjustment] = [] public var transactions:[Transaction] = [] public var id:String? required public init(){} } public class SalarySacrificeBreakdown : Codable { public var leaseAmount:Double? public var administrationFee:Double? public var fuel:Double? public var servicing:Double? public var tyres:Double? public var insurance:Double? public var carWash:Double? public var registration:Double? public var roadSideAssistance:Double? public var anythingExtra:Double? required public init(){} } public protocol IIdentifiableResource { var id:String? { get set } } public class BankAccount : Codable { public var bsbNumber:String? public var accountNumber:String? required public init(){} } public class BudgetBreakdown : Codable { public var leaseAmount:Double? public var administrationFee:Double? public var fuel:Double? public var servicing:Double? public var tyres:Double? public var insurance:Double? public var carWash:Double? public var registration:Double? public var roadSideAssistance:Double? public var anythingExtra:Double? required public init(){} } public class Employment : Codable { public var payrollCycle:String? public var firstPayDate:Date? public var employerId:String? public var employerName:String? required public init(){} } public class Vehicle : Codable { public var make:String? public var model:String? public var colour:String? public var bodyShape:String? public var licensePlate:String? public var transmission:String? public var manufactureYear:Int? required public init(){} } public class LeaseDetails : Codable { public var term:Int? public var startDate:Date? public var amountFinanced:Double? public var paymentAmount:Double? public var financeProvider:String? public var residualValue:Double? public var yearlyKmsTravelled:Int? public var fringeBenefitTaxValue:Double? public var fringeBenefitTaxMethod:String? public var fringeBenefitTaxBusinessUse:Int? public var fringeBenefitTaxStartDate:Date? public var preTaxDeduction:Double? public var postTaxDeduction:Double? public var gstOnPostTaxDeduction:Double? public var luxuryVehicleCharge:Double? public var onRoadCost:Double? public var registrationDueDate:Date? public var insuranceDueDate:Date? public var leaseProviderBankAccount:BankAccount? required public init(){} } public class BudgetBalances : Codable { public var leaseAmount:Double? public var administrationFee:Double? public var fuel:Double? public var servicing:Double? public var tyres:Double? public var insurance:Double? public var carWash:Double? public var registration:Double? public var roadSideAssistance:Double? public var anythingExtra:Double? required public init(){} } public class ForecastedSalarySacrifice : Codable { public var paymentDate:Date? public var amount:Double? public var matched:SalarySacrifice? required public init(){} } public class ForecastedOutgoingPayment : Codable { public var scheduled:Date? public var amount:Double? public var budgetCategory:String? public var matched:Expense? required public init(){} } public class Adjustment : IIdentifiableResource, Codable { public var budgetCategory:String? public var amount:Double? public var gst:Double? public var Description:String? public var received:Date? public var id:String? required public init(){} } public class Transaction : Codable { public var received:Date? public var budgetCategory:String? public var amount:Double? public var gst:Double? public var Description:String? public var type:String? required public init(){} } public class SalarySacrifice : Codable { public var paymentDate:Date? public var salarySacrificeBreakdown:SalarySacrificeBreakdown? public var preTaxDeduction:Double? public var postTaxDeduction:Double? public var contributionId:String? required public init(){} } public class Expense : Codable { public var budgetCategory:String? public var amount:Double? public var gst:Double? required public init(){} }