Skip to content

Swf 21 hook up to web apis #11

Merged
merged 23 commits into from Apr 3, 2019
Merged

Swf 21 hook up to web apis #11

merged 23 commits into from Apr 3, 2019

Conversation

@rrk12005
Copy link
Owner

rrk12005 commented Apr 2, 2019

No description provided.

ahm11003 and others added 22 commits Mar 12, 2019
- created `Defaults` to hold all of our url’s and other static info
- set up initial login web service call
- move login web service call to `FetchData` and modified other calls to take a completion as a parameter
- modified parsing of account in order to reduce complexity
- modified parsing to convert date strings to `Date`s
# Conflicts:
#	SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj
- removed now unused objects
- set up `acctDict` to pass any initially fetched accounts to `AccountsTableViewInterfaceController`
- we check upon awake if we have accounts, and then configure table accordingly
- when an account is tapped from `AccountsTableViewInterfaceController`, we will grab the `accountAlias` and pass to this function
- we now fetch transactions for a given account when that account is selected from the table
- storyboard segue to present account details and transactions was deleted in favor of presenting programmatically in order to only perform the segue once web service to fetch transactions completes
- removed some code populating UI with demo data
- we may need to refine this a bit, but for now we display an alert that we are loading once the user taps their account
- it will auto-dismiss and push to account details when the web service returns
- this will enable us to quickly show, hide and configure “activity indicators”
- to be used when we are waiting for web service calls to return
- added Image assets for animation
- replaced “placeholder” calls using alerts to use our new activity indicator look-alike
- we previously moved these web service calls to `ExtensionDelegate` so they are no longer needed here
# Conflicts:
#	SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard
#	SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift
#	SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj
#	SynchronyFinancial/SynchronyFinancial/Account.swift
- we now fetch transactions when the Recents button is tapped from AccountDetails
- created convenience method to show/hide all interface objects when showing activity indicator
- was incorrectly not hiding interface objects when Recents button was tapped
- made Minimum Payment label slightly taller to support text displaying on two lines by default to avoid truncating
…ng bank accounts, and updated transaction UI to show yellow color for pending transactions
self.isPending = isPending
self.isModifiable = false
}

This comment has been minimized.

Copy link
@ahm11003

ahm11003 Apr 2, 2019

Collaborator

So we should only need one initializer for this class. We can achieve this like:
init(type: TransactionType, amount: Double, merchantID: String, date: Date, confirmation: 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 = confirmation ?? ""
self.paymentId = paymentId ?? 0
self.isPending = isPending ?? false
self.isModifiable = isModifiable ?? false
}

This way we can choose to pass in values for confirmation, paymentID, isPending and isModifiable but if not they default to nil and we assign default values inside the body of the initializer. So for a processed transaction we can just omit those parameters in the function call.

public enum AccountType: Int {
case checkings = 0
case savings = 1
}

This comment has been minimized.

Copy link
@ahm11003

ahm11003 Apr 2, 2019

Collaborator

newline after this closing brace for the enum

Copy link
Collaborator

ahm11003 left a comment

Once the comments are addressed looks good to me!

@ahm11003 ahm11003 merged commit 2fbd1fb into master Apr 3, 2019
Sign in to join this conversation on GitHub.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.