taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit cb8db09e0455dc854bc7c0ff458c00f15386faa8
parent 5c236f1101eccb9db17f87440099cdb7a819ca08
Author: Marc Stibane <marc@taler.net>
Date:   Sun,  4 Feb 2024 14:36:47 +0100

Identifiable

Diffstat:
MTalerWallet1/Backend/WalletBackendRequest.swift | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/TalerWallet1/Backend/WalletBackendRequest.swift b/TalerWallet1/Backend/WalletBackendRequest.swift @@ -84,7 +84,7 @@ struct Tax: Codable { /// A product being purchased from a merchant. /// https://docs.taler.net/core/api-merchant.html#the-contract-terms -struct Product: Codable { +struct Product: Codable, Identifiable { var product_id: String? var description: String // var description_i18n: ? @@ -94,6 +94,8 @@ struct Product: Codable { var image: String? // URL to a product image var taxes: [Tax]? var delivery_date: Timestamp? + + var id: String { product_id ?? "unknown" } } /// Brief information about an order.