Skip to content

Swe 12 enable payment suite #13

Merged
merged 14 commits into from Apr 8, 2019

SWE-12 Static member to handle date formatting

  • Loading branch information
ahm11003 committed Mar 29, 2019
commit 2e991f602dab1ecd45a4c7441437a3a4ed98cdc7
@@ -22,6 +22,13 @@ final class Defaults {
static let token = UserDefaults.standard.string(forKey: "access_token") ?? ""
static let authHeader = ["Authorization": "Bearer \(token)"]

static let careCreditDateFormatter: DateFormatter = {
var formatter = DateFormatter()
formatter.dateFormat = "yyyyMMdd"
formatter.locale = Locale.current
return formatter
}()

static var headerForLogin: [String: Any] = {
return ["client_id": "carecredit",
"client_secret": "",
@@ -55,7 +62,6 @@ final class Defaults {
let start_date = formatter.string(from: Calendar.current.date(byAdding: .day, value: -14, to: Date()) ?? Date())
let end_date = formatter.string(from: Date())


return ["account_alias": account_alias,
"begin_sequence": "1",
"end_date": end_date,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.