Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created January 4, 2018 19:42
Show Gist options
  • Save azamsharp/1912d630da39df9f196fecb41f9c7b39 to your computer and use it in GitHub Desktop.
Save azamsharp/1912d630da39df9f196fecb41f9c7b39 to your computer and use it in GitHub Desktop.
enum TranslationType : String, Codable {
case international
case domestic
}
class Transaction : Codable {
var from :String
var to :String
var amount :Double
var fees :Double = 0.0
var transactionType :TranslationType = .domestic
init(from :String, to:String, amount :Double, transactionType :TranslationType = .domestic) {
self.from = from
self.to = to
self.amount = amount
self.transactionType = transactionType
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment