@@ -18,6 +18,8 @@ public struct SourceCommercetools: Codable, JSONEncodable {
1818 /// Predicate to filter out specific products when indexing. For more information, see [Query
1919 /// Predicate](https://docs.commercetools.com/api/predicates/query).
2020 public var productQueryPredicate : String ?
21+ /// When set to true, the connector indexes objects with all images attributes instead of only the URLs.
22+ public var useImagesObjects : Bool ?
2123 public var customFields : CommercetoolsCustomFields ?
2224
2325 public init (
@@ -27,6 +29,7 @@ public struct SourceCommercetools: Codable, JSONEncodable {
2729 projectKey: String ,
2830 fallbackIsInStockValue: Bool ? = nil ,
2931 productQueryPredicate: String ? = nil ,
32+ useImagesObjects: Bool ? = nil ,
3033 customFields: CommercetoolsCustomFields ? = nil
3134 ) {
3235 self . storeKeys = storeKeys
@@ -35,6 +38,7 @@ public struct SourceCommercetools: Codable, JSONEncodable {
3538 self . projectKey = projectKey
3639 self . fallbackIsInStockValue = fallbackIsInStockValue
3740 self . productQueryPredicate = productQueryPredicate
41+ self . useImagesObjects = useImagesObjects
3842 self . customFields = customFields
3943 }
4044
@@ -45,6 +49,7 @@ public struct SourceCommercetools: Codable, JSONEncodable {
4549 case projectKey
4650 case fallbackIsInStockValue
4751 case productQueryPredicate
52+ case useImagesObjects
4853 case customFields
4954 }
5055
@@ -58,6 +63,7 @@ public struct SourceCommercetools: Codable, JSONEncodable {
5863 try container. encode ( self . projectKey, forKey: . projectKey)
5964 try container. encodeIfPresent ( self . fallbackIsInStockValue, forKey: . fallbackIsInStockValue)
6065 try container. encodeIfPresent ( self . productQueryPredicate, forKey: . productQueryPredicate)
66+ try container. encodeIfPresent ( self . useImagesObjects, forKey: . useImagesObjects)
6167 try container. encodeIfPresent ( self . customFields, forKey: . customFields)
6268 }
6369}
@@ -70,6 +76,7 @@ extension SourceCommercetools: Equatable {
7076 lhs. projectKey == rhs. projectKey &&
7177 lhs. fallbackIsInStockValue == rhs. fallbackIsInStockValue &&
7278 lhs. productQueryPredicate == rhs. productQueryPredicate &&
79+ lhs. useImagesObjects == rhs. useImagesObjects &&
7380 lhs. customFields == rhs. customFields
7481 }
7582}
@@ -82,6 +89,7 @@ extension SourceCommercetools: Hashable {
8289 hasher. combine ( self . projectKey. hashValue)
8390 hasher. combine ( self . fallbackIsInStockValue? . hashValue)
8491 hasher. combine ( self . productQueryPredicate? . hashValue)
92+ hasher. combine ( self . useImagesObjects? . hashValue)
8593 hasher. combine ( self . customFields? . hashValue)
8694 }
8795}
0 commit comments