Skip to content

Commit

Permalink
Remove paymentMethodsDisplayed (#1249)
Browse files Browse the repository at this point in the history
* remove paymentMethodsDisplayed
  • Loading branch information
jaxdesmarais authored Jan 9, 2025
1 parent 934d2ba commit 9e9a402
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class AnalyticsClient internal constructor(
endTime = analyticsEventParams.endTime,
endpoint = analyticsEventParams.endpoint,
experiment = analyticsEventParams.experiment,
paymentMethodsDisplayed = analyticsEventParams.paymentMethodsDisplayed,
appSwitchUrl = analyticsEventParams.appSwitchUrl,
shopperSessionId = analyticsEventParams.shopperSessionId,
buttonType = analyticsEventParams.buttonType,
Expand Down Expand Up @@ -243,8 +242,6 @@ class AnalyticsClient internal constructor(
.putOpt(FPTI_KEY_END_TIME, event.endTime)
.putOpt(FPTI_KEY_ENDPOINT, event.endpoint)
.putOpt(FPTI_KEY_MERCHANT_EXPERIMENT, event.experiment)
.putOpt(FPTI_KEY_MERCHANT_PAYMENT_METHODS_DISPLAYED,
event.paymentMethodsDisplayed.ifEmpty { null })
.putOpt(FPTI_KEY_URL, event.appSwitchUrl)
.putOpt(FPTI_KEY_SHOPPER_SESSION_ID, event.shopperSessionId)
.putOpt(FPTI_KEY_BUTTON_TYPE, event.buttonType)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ internal data class AnalyticsEvent(
val endTime: Long? = null,
val endpoint: String? = null,
val experiment: String? = null,
val paymentMethodsDisplayed: List<String> = emptyList(),
val appSwitchUrl: String? = null,
val shopperSessionId: String? = null,
val buttonType: String? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import androidx.annotation.RestrictTo
* @property endpoint The endpoint being called.
* @property experiment Currently a ShopperInsights module specific event that indicates
* the experiment, as a JSON string, that the merchant sent to the us.
* @property paymentMethodsDisplayed A ShopperInsights module specific event that indicates the
* order of payment methods displayed to the shopper by the merchant.
* @property shopperSessionId The Shopper Insights customer session ID created by a merchant's
* server SDK or graphQL integration.
* @property buttonType buttonType Represents the tapped button type.
Expand All @@ -32,7 +30,6 @@ data class AnalyticsEventParams @JvmOverloads constructor(
var endTime: Long? = null,
var endpoint: String? = null,
val experiment: String? = null,
val paymentMethodsDisplayed: List<String> = emptyList(),
val appSwitchUrl: String? = null,
val shopperSessionId: String? = null,
val buttonType: String? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import static java.util.Collections.emptyList;

import android.net.Uri;

import androidx.fragment.app.FragmentActivity;
Expand Down Expand Up @@ -120,7 +118,7 @@ public void createPaymentAuthRequest_callsBackPayPalResponse_sendsStartedAnalyti

verify(braintreeClient).sendAnalyticsEvent(
PayPalAnalytics.TOKENIZATION_STARTED,
new AnalyticsEventParams(null, null, true, null, null, null, null, Collections.emptyList(), null, "test-shopper-session-id")
new AnalyticsEventParams(null, null, true, null, null, null, null, null, "test-shopper-session-id")
);
}

Expand Down Expand Up @@ -639,7 +637,6 @@ public void tokenize_whenPayPalInternalClientTokenizeResult_sendsAppSwitchSuccee
null,
null,
null,
emptyList(),
"sample-scheme://onetouch/v1/success?PayerID=HERMES-SANDBOX-PAYER-ID&paymentId=HERMES-SANDBOX-PAYMENT-ID&token=EC-HERMES-SANDBOX-EC-TOKEN&switch_initiated_time=17166111926211"
);
verify(braintreeClient).sendAnalyticsEvent(PayPalAnalytics.APP_SWITCH_SUCCEEDED, appSwitchParams);
Expand Down Expand Up @@ -681,7 +678,6 @@ public void tokenize_whenPayPalNotEnabled_sendsAppSwitchFailedEvents() throws JS
null,
null,
null,
emptyList(),
"https://some-scheme/onetouch/v1/cancel?token=SOME-BA&switch_initiated_time=17166111926211"
);
verify(braintreeClient).sendAnalyticsEvent(PayPalAnalytics.APP_SWITCH_FAILED, appSwitchParams);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
import org.mockito.Mockito;
import org.robolectric.RobolectricTestRunner;

import java.util.ArrayList;

@RunWith(RobolectricTestRunner.class)
public class VenmoClientUnitTest {

Expand Down Expand Up @@ -75,7 +73,6 @@ public class VenmoClientUnitTest {
null,
null,
null,
new ArrayList<>(),
appSwitchUrl.toString()
);
private final AnalyticsEventParams expectedVaultAnalyticsParams = new AnalyticsEventParams(
Expand All @@ -86,7 +83,6 @@ public class VenmoClientUnitTest {
null,
null,
null,
new ArrayList<>(),
appSwitchUrl.toString()
);

Expand Down

0 comments on commit 9e9a402

Please sign in to comment.