导航菜单

页面标题

页面副标题

Biko v2.0.23 - ConsumersApiServiceImpl.java 源代码

正在查看: Biko v2.0.23 应用的 ConsumersApiServiceImpl.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.stripe.android.repository;

import com.stripe.android.core.AppInfo;
import com.stripe.android.core.model.parsers.StripeErrorJsonParser;
import com.stripe.android.core.networking.ApiRequest;
import com.stripe.android.core.networking.RequestExecutorKt;
import com.stripe.android.core.networking.StripeNetworkClient;
import com.stripe.android.model.ConsumerSession;
import com.stripe.android.model.CustomEmailType;
import com.stripe.android.model.PaymentMethodOptionsParams;
import com.stripe.android.model.VerificationType;
import com.stripe.android.model.parsers.ConsumerSessionJsonParser;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.TuplesKt;
import kotlin.collections.CollectionsKt;
import kotlin.collections.MapsKt;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;

@Metadata(d1 = {"\u0000X\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0007\u0018\u0000 $2\u00020\u0001:\u0001$B)\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\b\b\u0002\u0010\u0006\u001a\u00020\u0005\u0012\b\u0010\u0007\u001a\u0004\u0018\u00010\b¢\u0006\u0002\u0010\tJC\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\u0010\u001a\u00020\u00052\u0006\u0010\u0011\u001a\u00020\u00052\b\u0010\u0012\u001a\u0004\u0018\u00010\u00052\u0006\u0010\u0013\u001a\u00020\u00052\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0016\u001a\u00020\u0017H\u0096@ø\u0001\u0000¢\u0006\u0002\u0010\u0018J5\u0010\u0019\u001a\u00020\u001a2\b\u0010\u001b\u001a\u0004\u0018\u00010\u00052\b\u0010\u0012\u001a\u0004\u0018\u00010\u00052\u0006\u0010\u0013\u001a\u00020\u00052\u0006\u0010\u0016\u001a\u00020\u0017H\u0096@ø\u0001\u0000¢\u0006\u0002\u0010\u001cJW\u0010\u001d\u001a\u00020\u000f2\u0006\u0010\u0010\u001a\u00020\u00052\u0006\u0010\u001e\u001a\u00020\u001f2\b\u0010\u0012\u001a\u0004\u0018\u00010\u00052\u0006\u0010\u0013\u001a\u00020\u00052\u0006\u0010\u0014\u001a\u00020\u00152\b\u0010 \u001a\u0004\u0018\u00010!2\b\u0010\"\u001a\u0004\u0018\u00010\u00052\u0006\u0010\u0016\u001a\u00020\u0017H\u0096@ø\u0001\u0000¢\u0006\u0002\u0010#R\u000e\u0010\n\u001a\u00020\u000bX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\f\u001a\u00020\rX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006%"}, d2 = {"Lcom/stripe/android/repository/ConsumersApiServiceImpl;", "Lcom/stripe/android/repository/ConsumersApiService;", "stripeNetworkClient", "Lcom/stripe/android/core/networking/StripeNetworkClient;", "apiVersion", "", "sdkVersion", "appInfo", "Lcom/stripe/android/core/AppInfo;", "(Lcom/stripe/android/core/networking/StripeNetworkClient;Ljava/lang/String;Ljava/lang/String;Lcom/stripe/android/core/AppInfo;)V", "apiRequestFactory", "Lcom/stripe/android/core/networking/ApiRequest$Factory;", "stripeErrorJsonParser", "Lcom/stripe/android/core/model/parsers/StripeErrorJsonParser;", "confirmConsumerVerification", "Lcom/stripe/android/model/ConsumerSession;", "consumerSessionClientSecret", "verificationCode", "authSessionCookie", "requestSurface", "type", "Lcom/stripe/android/model/VerificationType;", "requestOptions", "Lcom/stripe/android/core/networking/ApiRequest$Options;", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/stripe/android/model/VerificationType;Lcom/stripe/android/core/networking/ApiRequest$Options;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "lookupConsumerSession", "Lcom/stripe/android/model/ConsumerSessionLookup;", "email", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/stripe/android/core/networking/ApiRequest$Options;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "startConsumerVerification", "locale", "Ljava/util/Locale;", "customEmailType", "Lcom/stripe/android/model/CustomEmailType;", "connectionsMerchantName", "(Ljava/lang/String;Ljava/util/Locale;Ljava/lang/String;Ljava/lang/String;Lcom/stripe/android/model/VerificationType;Lcom/stripe/android/model/CustomEmailType;Ljava/lang/String;Lcom/stripe/android/core/networking/ApiRequest$Options;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "Companion", "payments-model_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public final class ConsumersApiServiceImpl implements ConsumersApiService {

    public static final Companion INSTANCE;
    private static final String confirmConsumerVerificationUrl;
    private static final String consumerSessionLookupUrl;
    private static final String startConsumerVerificationUrl;
    private final ApiRequest.Factory apiRequestFactory;
    private final StripeErrorJsonParser stripeErrorJsonParser;
    private final StripeNetworkClient stripeNetworkClient;

    public ConsumersApiServiceImpl(StripeNetworkClient stripeNetworkClient, String str, String str2, AppInfo appInfo) {
        Intrinsics.checkNotNullParameter(stripeNetworkClient, "stripeNetworkClient");
        Intrinsics.checkNotNullParameter(str, "apiVersion");
        Intrinsics.checkNotNullParameter(str2, "sdkVersion");
        this.stripeNetworkClient = stripeNetworkClient;
        this.stripeErrorJsonParser = new StripeErrorJsonParser();
        this.apiRequestFactory = new ApiRequest.Factory(appInfo, str, str2);
    }

    public ConsumersApiServiceImpl(StripeNetworkClient stripeNetworkClient, String str, String str2, AppInfo appInfo, int i2, DefaultConstructorMarker defaultConstructorMarker) {
        this(stripeNetworkClient, str, (i2 & 4) != 0 ? "AndroidBindings/20.36.0" : str2, appInfo);
    }

    @Override
    public java.lang.Object lookupConsumerSession(java.lang.String r10, java.lang.String r11, java.lang.String r12, com.stripe.android.core.networking.ApiRequest.Options r13, kotlin.coroutines.Continuation<? super com.stripe.android.model.ConsumerSessionLookup> r14) {
        throw new UnsupportedOperationException("Method not decompiled: com.stripe.android.repository.ConsumersApiServiceImpl.lookupConsumerSession(java.lang.String, java.lang.String, java.lang.String, com.stripe.android.core.networking.ApiRequest$Options, kotlin.coroutines.Continuation):java.lang.Object");
    }

    @Override
    public Object startConsumerVerification(String str, Locale locale, String str2, String str3, VerificationType verificationType, CustomEmailType customEmailType, String str4, ApiRequest.Options options, Continuation<? super ConsumerSession> continuation) {
        Map emptyMap;
        StripeErrorJsonParser stripeErrorJsonParser = this.stripeErrorJsonParser;
        StripeNetworkClient stripeNetworkClient = this.stripeNetworkClient;
        ApiRequest.Factory factory = this.apiRequestFactory;
        String str5 = startConsumerVerificationUrl;
        Pair[] pairArr = new Pair[6];
        pairArr[0] = TuplesKt.to("request_surface", str3);
        pairArr[1] = TuplesKt.to("credentials", MapsKt.mapOf(TuplesKt.to("consumer_session_client_secret", str)));
        pairArr[2] = TuplesKt.to("type", verificationType.getValue());
        pairArr[3] = TuplesKt.to("custom_email_type", customEmailType != null ? customEmailType.getValue() : null);
        pairArr[4] = TuplesKt.to("connections_merchant_name", str4);
        pairArr[5] = TuplesKt.to("locale", locale.toLanguageTag());
        Map mapOf = MapsKt.mapOf(pairArr);
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        for (Map.Entry entry : mapOf.entrySet()) {
            if (entry.getValue() != null) {
                linkedHashMap.put(entry.getKey(), entry.getValue());
            }
        }
        LinkedHashMap linkedHashMap2 = linkedHashMap;
        if (str2 == null || (emptyMap = MapsKt.mapOf(TuplesKt.to("cookies", MapsKt.mapOf(TuplesKt.to("verification_session_client_secrets", CollectionsKt.listOf(str2)))))) == null) {
            emptyMap = MapsKt.emptyMap();
        }
        return RequestExecutorKt.executeRequestWithModelJsonParser(stripeNetworkClient, stripeErrorJsonParser, ApiRequest.Factory.createPost$default(factory, str5, options, MapsKt.plus(linkedHashMap2, emptyMap), false, 8, (Object) null), new ConsumerSessionJsonParser(), continuation);
    }

    @Override
    public Object confirmConsumerVerification(String str, String str2, String str3, String str4, VerificationType verificationType, ApiRequest.Options options, Continuation<? super ConsumerSession> continuation) {
        Map emptyMap;
        StripeErrorJsonParser stripeErrorJsonParser = this.stripeErrorJsonParser;
        StripeNetworkClient stripeNetworkClient = this.stripeNetworkClient;
        ApiRequest.Factory factory = this.apiRequestFactory;
        String str5 = confirmConsumerVerificationUrl;
        Map mapOf = MapsKt.mapOf(new Pair[]{TuplesKt.to("request_surface", str4), TuplesKt.to("credentials", MapsKt.mapOf(TuplesKt.to("consumer_session_client_secret", str))), TuplesKt.to("type", verificationType.getValue()), TuplesKt.to(PaymentMethodOptionsParams.Blik.PARAM_CODE, str2)});
        if (str3 == null || (emptyMap = MapsKt.mapOf(TuplesKt.to("cookies", MapsKt.mapOf(TuplesKt.to("verification_session_client_secrets", CollectionsKt.listOf(str3)))))) == null) {
            emptyMap = MapsKt.emptyMap();
        }
        return RequestExecutorKt.executeRequestWithModelJsonParser(stripeNetworkClient, stripeErrorJsonParser, ApiRequest.Factory.createPost$default(factory, str5, options, MapsKt.plus(mapOf, emptyMap), false, 8, (Object) null), new ConsumerSessionJsonParser(), continuation);
    }

    @Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\t\b\u0080\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0010\u0010\u000b\u001a\u00020\u00042\u0006\u0010\f\u001a\u00020\u0004H\u0002R\u0014\u0010\u0003\u001a\u00020\u0004X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006R\u0014\u0010\u0007\u001a\u00020\u0004X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\u0006R\u0014\u0010\t\u001a\u00020\u0004X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u0006¨\u0006\r"}, d2 = {"Lcom/stripe/android/repository/ConsumersApiServiceImpl$Companion;", "", "()V", "confirmConsumerVerificationUrl", "", "getConfirmConsumerVerificationUrl$payments_model_release", "()Ljava/lang/String;", "consumerSessionLookupUrl", "getConsumerSessionLookupUrl$payments_model_release", "startConsumerVerificationUrl", "getStartConsumerVerificationUrl$payments_model_release", "getApiUrl", "path", "payments-model_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class Companion {
        public Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        private Companion() {
        }

        public final String getConsumerSessionLookupUrl$payments_model_release() {
            return ConsumersApiServiceImpl.consumerSessionLookupUrl;
        }

        public final String getStartConsumerVerificationUrl$payments_model_release() {
            return ConsumersApiServiceImpl.startConsumerVerificationUrl;
        }

        public final String getConfirmConsumerVerificationUrl$payments_model_release() {
            return ConsumersApiServiceImpl.confirmConsumerVerificationUrl;
        }

        public final String getApiUrl(String path) {
            return "https://api.stripe.com/v1/" + path;
        }
    }

    static {
        Companion companion = new Companion(null);
        INSTANCE = companion;
        consumerSessionLookupUrl = companion.getApiUrl("consumers/sessions/lookup");
        startConsumerVerificationUrl = companion.getApiUrl("consumers/sessions/start_verification");
        confirmConsumerVerificationUrl = companion.getApiUrl("consumers/sessions/confirm_verification");
    }
}