-
Notifications
You must be signed in to change notification settings - Fork 0
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
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So we should only need one initializer for this class. We can achieve this like: This way we can choose to pass in values for |
||
//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 | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline after this closing brace for the
enum