Last active
June 7, 2019 11:47
-
-
Save Mreyna3/d6a0faa4689b21132d0242694a1d2ac6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
public class PaymentProcessor { | |
// Variable Declaration | |
fileprivate var batchSum : Double! | |
private var queue: Queue<Double>! | |
private let BATCH_CAP: Double! | |
private var defaults: UserDefaults! | |
init() { | |
queue = Queue<Double>() | |
defaults = UserDefaults() | |
batchSum = defaults.value(forKey: "batch_sum") as? Double ?? 0.0 | |
BATCH_CAP = 0.50 | |
} | |
private func shouldProcessBatch() -> Bool{ | |
return false | |
} | |
public func enqueue(transaction: Double){ | |
} | |
private func addToBatch(transaction: Double) { | |
} | |
func processBatch(){ | |
} | |
func resetBatchSum(){ | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment