Skip to content
Permalink
86153dfea3
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
36 lines (32 sloc) 927 Bytes
//
// Transaction.swift
//
//
// Created by Alan Maynard on 1/23/19.
//
import Foundation
public enum TransactionType: Int {
case purchase = 0
case reimbursement = 1
}
class Transaction: NSObject {
var type: TransactionType
var amount: Double
var merchantID: String
var date: Date
var confirmationNum: String
var paymentId: Int
var isPending: Bool
var isModifiable: Bool
init(type: TransactionType, amount: Double, merchantID: String, date: Date,
confirmationNum: String? = nil, paymentId: Int? = nil, isPending: Bool? = nil, isModifiable: Bool? = nil) {
self.type = type
self.amount = amount
self.merchantID = merchantID
self.date = date
self.confirmationNum = confirmationNum ?? ""
self.paymentId = paymentId ?? 0
self.isPending = isPending ?? false
self.isModifiable = isModifiable ?? false
}
}