Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' into SWE-23-transaction-details
  • Loading branch information
ahm11003 committed Apr 3, 2019
2 parents ce07b1f + 2fbd1fb commit 20ee910
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
1 change: 1 addition & 0 deletions SynchronyFinancial/SynchronyFinancial/BankAcct.swift
Expand Up @@ -12,6 +12,7 @@ public enum AccountType: Int {
case checkings = 0
case savings = 1
}

class BankAcct: NSObject {
var bankAcctId: String
var acctType: AccountType
Expand Down
23 changes: 5 additions & 18 deletions SynchronyFinancial/SynchronyFinancial/Transaction.swift
Expand Up @@ -22,28 +22,15 @@ class Transaction: NSObject {
var isPending: Bool
var isModifiable: Bool

//this constructor is for the case if it is a posted transaction
init(type: TransactionType, amount: Double, merchantID: String, date: Date, isPending: Bool) {
self.type = type
self.amount = amount
self.merchantID = merchantID
self.date = date
self.confirmationNum = ""
self.paymentId = 0
self.isPending = isPending
self.isModifiable = false
}

//this constructor is for the case if it is a pending transaction
init(type: TransactionType, amount: Double, merchantID: String, date: Date,
confirmationNum: String, paymentId: Int, isPending: Bool, isModifiable: Bool) {
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
self.isPending = isPending
self.isModifiable = isModifiable
self.confirmationNum = confirmationNum ?? ""
self.paymentId = paymentId ?? 0
self.isPending = isPending ?? false
self.isModifiable = isModifiable ?? false
}
}

0 comments on commit 20ee910

Please sign in to comment.