Skip to content

Commit dce428e

Browse files
committed
rename the constructor field to description
1 parent b2f2055 commit dce428e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

swift-sdk/CommerceItem.swift

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import UIKit
2323
public var sku: String?
2424

2525
/// description of the product
26+
/// the class field is named `itemDescription` to avoid iOS namespace (`description`)
2627
public var itemDescription: String?
2728

2829
/// URL of the product
@@ -54,7 +55,7 @@ import UIKit
5455
price: NSNumber,
5556
quantity: UInt,
5657
sku: String? = nil,
57-
itemDescription: String? = nil,
58+
description: String? = nil,
5859
url: String? = nil,
5960
imageUrl: String? = nil,
6061
categories: [String]? = nil) {
@@ -63,7 +64,7 @@ import UIKit
6364
self.price = price
6465
self.quantity = quantity
6566
self.sku = sku
66-
self.itemDescription = itemDescription
67+
self.itemDescription = description
6768
self.url = url
6869
self.imageUrl = imageUrl
6970
self.categories = categories

tests/unit-tests/CommerceItemTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class CommerceItemTests: XCTestCase {
2424
price: 7.62,
2525
quantity: 9,
2626
sku: "kusanagi",
27-
itemDescription: "spider type multi leg/multi ped combat vehicle equipped with AI",
27+
description: "spider type multi leg/multi ped combat vehicle equipped with AI",
2828
url: "stand-alone-complex",
2929
imageUrl: "laughing-man",
3030
categories: ["section 9",

0 commit comments

Comments
 (0)