Skip to content

Commit 7796f99

Browse files
committed
Update code to support new fields on their inits
1 parent 0081afe commit 7796f99

File tree

6 files changed

+21
-0
lines changed

6 files changed

+21
-0
lines changed

WooCommerce/Classes/ViewRelated/Orders/Order Details/Address Edit/EditOrderAddressForm.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,9 @@ struct EditAddressForm_Previews: PreviewProvider {
431431
parentID: 2,
432432
customerID: 11,
433433
orderKey: "",
434+
isEditable: false,
435+
needsPayment: false,
436+
needsProcessing: false,
434437
number: "789",
435438
status: .processing,
436439
currency: "USD",

WooCommerce/Classes/ViewRelated/Orders/Order Details/Shipping Labels/Create Shipping Label Form/Package Details/Multi-package/ShippingLabelPackagesFormViewModel.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ extension ShippingLabelPackagesFormViewModel {
447447
parentID: 0,
448448
customerID: 11,
449449
orderKey: "",
450+
isEditable: false,
451+
needsPayment: false,
452+
needsProcessing: false,
450453
number: "963",
451454
status: .processing,
452455
currency: "USD",

WooCommerce/Classes/ViewRelated/Orders/Order Details/Shipping Labels/Create Shipping Label Form/Package Details/ShippingLabelSampleData.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ enum ShippingLabelSampleData {
1111
parentID: 0,
1212
customerID: 11,
1313
orderKey: "",
14+
isEditable: false,
15+
needsPayment: false,
16+
needsProcessing: false,
1417
number: "963",
1518
status: .processing,
1619
currency: "USD",

Yosemite/Yosemite/Model/Mocks/MockObjectGraph.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ extension MockObjectGraph {
215215
parentID: 0,
216216
customerID: 1,
217217
orderKey: "",
218+
isEditable: false,
219+
needsPayment: false,
220+
needsProcessing: false,
218221
number: "\(number)",
219222
status: status,
220223
currency: "USD",

Yosemite/Yosemite/Model/Storage/Order+ReadOnlyConvertible.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ extension Storage.Order: ReadOnlyConvertible {
1414
parentID = order.parentID
1515
customerID = order.customerID
1616
orderKey = order.orderKey
17+
isEditable = order.isEditable
18+
needsPayment = order.needsPayment
19+
needsProcessing = order.needsProcessing
1720
number = order.number
1821
statusKey = order.status.rawValue
1922
currency = order.currency
@@ -79,6 +82,9 @@ extension Storage.Order: ReadOnlyConvertible {
7982
parentID: parentID,
8083
customerID: customerID,
8184
orderKey: orderKey,
85+
isEditable: isEditable,
86+
needsPayment: needsPayment,
87+
needsProcessing: needsPayment,
8288
number: number ?? "",
8389
status: OrderStatusEnum(rawValue: statusKey),
8490
currency: currency ?? "",

Yosemite/Yosemite/Stores/Order/OrderFactory.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ public enum OrderFactory {
1313
parentID: 0,
1414
customerID: 0,
1515
orderKey: "",
16+
isEditable: false,
17+
needsPayment: false,
18+
needsProcessing: false,
1619
number: "",
1720
status: status,
1821
currency: "",

0 commit comments

Comments
 (0)