Created
April 18, 2019 22:39
-
-
Save RinniSwift/4afac14ff428cece61c320c1fc13fe1d to your computer and use it in GitHub Desktop.
This file contains 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
struct CollectionInfo: Codable { | |
let title: String | |
let productType: String | |
let variants: [VariantsInfo] | |
let image: ImageInfo | |
enum CodingKeys: String, CodingKey { | |
case title | |
case productType = "product_type" | |
case variants | |
case image | |
} | |
} | |
struct VariantsInfo: Codable { | |
let title: String | |
let inventoryQuantity: Int | |
enum CodingKeys: String, CodingKey { | |
case title | |
case inventoryQuantity = "inventory_quantity" | |
} | |
} | |
struct ImageInfo: Codable { | |
let path: String | |
enum CodingKeys: String, CodingKey { | |
case path = "src" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment