Skip to content

Commit

Permalink
Another property that is indeed optional from the API.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewangeta committed Aug 26, 2018
1 parent d509288 commit 347fb89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Stripe/Models/Sources/Source.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public struct StripeSource: StripeModel {
public var amount: Int?
public var clientSecret: String?
public var codeVerification: CodeVerification?
public var created: Date
public var created: Date?
public var currency: StripeCurrency?
public var flow: Flow
public var livemode: Bool
Expand Down Expand Up @@ -52,7 +52,7 @@ public struct StripeSource: StripeModel {
amount = try container.decodeIfPresent(Int.self, forKey: .amount)
clientSecret = try container.decodeIfPresent(String.self, forKey: .clientSecret)
codeVerification = try container.decodeIfPresent(CodeVerification.self, forKey: .codeVerification)
created = try container.decode(Date.self, forKey: .created)
created = try container.decodeIfPresent(Date.self, forKey: .created)
currency = try container.decodeIfPresent(StripeCurrency.self, forKey: .currency)
flow = try container.decode(Flow.self, forKey: .flow)
livemode = try container.decode(Bool.self, forKey: .livemode)
Expand Down

0 comments on commit 347fb89

Please sign in to comment.