Product quantity unit
This commit is contained in:
@@ -167,6 +167,7 @@ public class Product: Codable, ObjectDebugger {
|
||||
public var producerVersionId: String?
|
||||
public var productName: String?
|
||||
public var productQuantity: Float?
|
||||
public var productQuantityUnit: String?
|
||||
public var purchasePlaces: String?
|
||||
public var purchasePlacesDebugTags: [String]?
|
||||
public var purchasePlacesTags: [String]?
|
||||
@@ -376,6 +377,7 @@ public class Product: Codable, ObjectDebugger {
|
||||
case producerVersionId = "producer_version_id"
|
||||
case productName = "product_name"
|
||||
case productQuantity = "product_quantity"
|
||||
case productQuantityUnit = "product_quantity_unit"
|
||||
case purchasePlaces = "purchase_places"
|
||||
case purchasePlacesDebugTags = "purchase_places_debug_tags"
|
||||
case purchasePlacesTags = "purchase_places_tags"
|
||||
@@ -933,6 +935,10 @@ public class Product: Codable, ObjectDebugger {
|
||||
productQuantity = nil
|
||||
}
|
||||
|
||||
productQuantityUnit = try container.decodeIfPresent(
|
||||
String.self,
|
||||
forKey:
|
||||
.productQuantityUnit)
|
||||
// ... (initialize other properties)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user