File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
Networking/Model/Bookings Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,10 @@ import Foundation
22
33public struct BookingCustomerInfo : Hashable {
44 public let billingAddress : Address
5+ public let note : String ?
56
6- public init ( billingAddress: Address ) {
7+ public init ( billingAddress: Address , note : String ? = nil ) {
78 self . billingAddress = billingAddress
9+ self . note = note
810 }
911}
Original file line number Diff line number Diff line change @@ -22,7 +22,10 @@ public struct BookingOrderInfo: Hashable {
2222 guard let billingAddress = order. billingAddress else {
2323 return nil
2424 }
25- return BookingCustomerInfo ( billingAddress: billingAddress)
25+ return BookingCustomerInfo (
26+ billingAddress: billingAddress,
27+ note: order. customerNote
28+ )
2629 } ( )
2730 self . productInfo = BookingProductInfo ( name: order. items. first ( where: { $0. productID == booking. productID } ) ? . name ?? " " )
2831 self . paymentInfo = BookingPaymentInfo (
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ extension Storage.BookingCustomerInfo: ReadOnlyConvertible {
1616 billingPhone = customerInfo. billingAddress. phone
1717 billingPostcode = customerInfo. billingAddress. postcode
1818 billingState = customerInfo. billingAddress. state
19+ note = customerInfo. note
1920 }
2021
2122 public func toReadOnly( ) -> Yosemite . BookingCustomerInfo {
@@ -30,6 +31,6 @@ extension Storage.BookingCustomerInfo: ReadOnlyConvertible {
3031 country: billingCountry ?? " " ,
3132 phone: billingPhone,
3233 email: billingEmail)
33- return . init( billingAddress: address)
34+ return . init( billingAddress: address, note : note )
3435 }
3536}
You can’t perform that action at this time.
0 commit comments