Swf 21 hook up to web apis #11
Changes from 1 commit
79afbdf
ff0b413
f2a8883
e85d2cb
da5294a
a2599ec
ba4409d
8405351
c80231e
c4cc995
21d742c
8487ce3
24deb73
a3682e4
56caa7c
2c01f37
82d2319
28a7fc1
3ee46a5
6bedc02
00d3583
d5f19aa
86153df
File filter...
Jump to…
Added requests and handlers for fetching pending transactions, fetchi…
…ng bank accounts, and updated transaction UI to show yellow color for pending transactions
- Loading branch information
@@ -0,0 +1,22 @@ | ||
// | ||
// Banks.swift | ||
// SynchronyFinancial | ||
// | ||
// Created by Rahul Kantesaria on 4/2/19. | ||
// Copyright © 2019 Alan Maynard. All rights reserved. | ||
// | ||
import Foundation | ||
|
||
public enum AccountType: Int { | ||
case checkings = 0 | ||
case savings = 1 | ||
} | ||
|
||
class BankAcct: NSObject { | ||
var bankAcctId: String | ||
var acctType: AccountType | ||
init(bankAcctId: String, acctType: AccountType) { | ||
self.bankAcctId = bankAcctId | ||
self.acctType = acctType | ||
} | ||
} |
@@ -17,11 +17,33 @@ class Transaction: NSObject { | ||
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) { | ||
//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 | ||
} | ||
|
||
ahm11003
Collaborator
|
||
//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) { | ||
self.type = type | ||
self.amount = amount | ||
self.merchantID = merchantID | ||
self.date = date | ||
self.confirmationNum = confirmationNum | ||
self.paymentId = paymentId | ||
self.isPending = isPending | ||
self.isModifiable = isModifiable | ||
} | ||
} |
newline after this closing brace for the
enum