Skip to content

Commit d0bc0d7

Browse files
Merge pull request #2 from ipdata/claude/swift-ipdata-sdk-S4ezn
Rename TimeZone to TimeZoneInfo to fix macOS CI failure
2 parents a16701b + f1445a4 commit d0bc0d7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Sources/IPData/Models.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public struct IPResponse: Codable, Sendable, Equatable {
2626
public let carrier: Carrier?
2727
public let languages: [Language]?
2828
public let currency: Currency?
29-
public let timeZone: TimeZone?
29+
public let timeZone: TimeZoneInfo?
3030
public let threat: Threat?
3131
/// Number of API requests made in the last 24 hours.
3232
/// The API may return this as either a number or a string.
@@ -76,7 +76,7 @@ public struct IPResponse: Codable, Sendable, Equatable {
7676
carrier = try c.decodeIfPresent(Carrier.self, forKey: .carrier)
7777
languages = try c.decodeIfPresent([Language].self, forKey: .languages)
7878
currency = try c.decodeIfPresent(Currency.self, forKey: .currency)
79-
timeZone = try c.decodeIfPresent(TimeZone.self, forKey: .timeZone)
79+
timeZone = try c.decodeIfPresent(TimeZoneInfo.self, forKey: .timeZone)
8080
threat = try c.decodeIfPresent(Threat.self, forKey: .threat)
8181
// The API returns count as either an Int or a String.
8282
if let intVal = try? c.decodeIfPresent(Int.self, forKey: .count) {
@@ -171,7 +171,7 @@ public struct Currency: Codable, Sendable, Equatable {
171171
// MARK: - TimeZone
172172

173173
/// Time zone information for the IP address location.
174-
public struct TimeZone: Codable, Sendable, Equatable {
174+
public struct TimeZoneInfo: Codable, Sendable, Equatable {
175175
public let name: String?
176176
public let abbr: String?
177177
public let offset: String?

0 commit comments

Comments
 (0)