File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Modules/Sources/Yosemite/Tools
WooCommerce/Classes/POS/Analytics Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ public final class AsyncPaginationTracker {
1313 }
1414
1515 /// Default pagination settings.
16- enum Defaults {
17- static let pageFirstIndex = Store . Default. firstPageNumber
16+ public enum Defaults {
17+ public static let pageFirstIndex = Store . Default. firstPageNumber
1818 }
1919
2020 /// The index of the first page in the API. So far, both Woo and WP.com API have the first page index at 1.
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ extension WooAnalyticsEvent {
125125 Key . cardReaderModel: readerModel ( for: cardReaderModel) ,
126126 Key . countryCode: countryCode. rawValue,
127127 Key . gatewayID: safeGatewayID ( for: forGatewayID) ,
128- Key . paymentMethodType: paymentMethod . analyticsValue,
128+ Key . paymentMethodType: analyticsValue ( for : paymentMethod ) ,
129129 Key . millisecondsSinceCustomerInteractionStarted: " \( millisecondsSinceCustomerIteractionStarted) " ,
130130 Key . millisecondsSinceOrderSyncSuccess: " \( millisecondsSinceOrderSyncSuccess) " ,
131131 Key . millisecondsSinceReaderReadyToCollect: " \( millisecondsSinceReaderReadyToCollect) " ,
@@ -134,6 +134,17 @@ extension WooAnalyticsEvent {
134134 ] )
135135 }
136136
137+ static func analyticsValue( for paymentMethod: PaymentMethod ) -> String {
138+ switch paymentMethod {
139+ case . card, . cardPresent:
140+ return " card "
141+ case . interacPresent:
142+ return " card_interac "
143+ case . unknown:
144+ return " unknown "
145+ }
146+ }
147+
137148 static func cashCollectPaymentSuccess( millisecondsSinceCustomerIteractionStarted: Double ) -> WooAnalyticsEvent {
138149 WooAnalyticsEvent ( statName: . pointOfSaleCashCollectPaymentSuccess, properties: [
139150 Key . millisecondsSinceCustomerInteractionStarted: " \( millisecondsSinceCustomerIteractionStarted) " ,
You can’t perform that action at this time.
0 commit comments