Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove paymentMethodsDisplayed #1249

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,7 +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.
jaxdesmarais marked this conversation as resolved.
Show resolved Hide resolved
* @property shopperSessionId The Shopper Insights customer session ID created by a merchant's
* server SDK or graphQL integration.
Expand All @@ -32,7 +31,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
Loading