Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SWF-21 Modified header for transactions fetch
  • Loading branch information
ahm11003 committed Mar 28, 2019
1 parent c80231e commit c4cc995
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions SynchronyFinancial/SynchronyFinancial/Defaults.swift
Expand Up @@ -46,11 +46,15 @@ final class Defaults {
// get account alias
var account_alias = ""

// get today's date as ISO860 - YYYYMMDD string
var end_date = ""
// Dates
let formatter = DateFormatter()
formatter.locale = Locale.current
formatter.dateFormat = "yyyyMMdd"

// for now lets get transactions from the past 2 weeks
let start_date = formatter.string(from: Calendar.current.date(byAdding: .day, value: -14, to: Date()) ?? Date())
let end_date = formatter.string(from: Date())

// get desired start date as ISO860 - YYYYMMDD string
var start_date = ""

return ["account_alias": account_alias,
"begin_sequence": "1",
Expand Down Expand Up @@ -80,7 +84,6 @@ final class Defaults {
"username": "carecredit"]
}()


static var headerForPmt: [String: Any] = {
// get account alias
var account_alias = ""
Expand Down

0 comments on commit c4cc995

Please sign in to comment.