forked from woocommerce/woocommerce-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request woocommerce#7258 from woocommerce/issue/7234-metad…
…ata-yosemite
- Loading branch information
Showing
7 changed files
with
104 additions
and
4 deletions.
There are no files selected for viewing
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
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
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
24 changes: 24 additions & 0 deletions
24
Yosemite/Yosemite/Model/Storage/OrderMetaData+ReadOnlyConvertible.swift
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Foundation | ||
import Storage | ||
|
||
|
||
// MARK: - Storage.OrderMetaData: ReadOnlyConvertible | ||
// | ||
extension Storage.OrderMetaData: ReadOnlyConvertible { | ||
|
||
/// Updates the Storage.OrderMetaData with the ReadOnly. | ||
/// | ||
public func update(with orderMetaData: Yosemite.OrderMetaData) { | ||
metadataID = orderMetaData.metadataID | ||
key = orderMetaData.key | ||
value = orderMetaData.value | ||
} | ||
|
||
/// Returns a ReadOnly version of the receiver. | ||
/// | ||
public func toReadOnly() -> Yosemite.OrderMetaData { | ||
return OrderMetaData(metadataID: metadataID, | ||
key: key ?? "", | ||
value: value ?? "") | ||
} | ||
} |
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
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
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