导航菜单

页面标题

页面副标题

Biko v2.0.23 - LuxeNextActionRepository.java 源代码

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

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


package com.stripe.android.model;

import com.stripe.android.model.LuxeActionCreatorForStatus;
import com.stripe.android.model.PaymentMethodOptionsParams;
import com.stripe.android.model.StripeIntent;
import com.truecaller.android.sdk.network.VerificationService;
import java.util.LinkedHashMap;
import java.util.Map;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.json.JSONObject;

@Metadata(d1 = {"\u0000^\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010%\n\u0002\u0010\u000e\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010$\n\u0002\b\u0005\b\u0007\u0018\u0000 !2\u00020\u0001:\u0003!\"#B\u0005¢\u0006\u0002\u0010\u0002J/\u0010\u0007\u001a\u00020\b2\u000e\u0010\t\u001a\n\u0018\u00010\u0005j\u0004\u0018\u0001`\n2\b\u0010\u000b\u001a\u0004\u0018\u00010\f2\u0006\u0010\r\u001a\u00020\u000eH\u0000¢\u0006\u0002\b\u000fJ$\u0010\u0010\u001a\u0004\u0018\u00010\u00112\u000e\u0010\t\u001a\n\u0018\u00010\u0005j\u0004\u0018\u0001`\n2\b\u0010\u000b\u001a\u0004\u0018\u00010\fH\u0002J\u0019\u0010\u0012\u001a\u0004\u0018\u00010\u00132\u0006\u0010\u0014\u001a\u00020\u0015H\u0000¢\u0006\u0004\b\u0016\u0010\u0017J\u0019\u0010\u0018\u001a\u00020\u00192\n\u0010\u001a\u001a\u00060\u0005j\u0002`\nH\u0001¢\u0006\u0002\b\u001bJ!\u0010\u001c\u001a\u00020\u001d2\u0012\u0010\u001e\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00060\u001fH\u0000¢\u0006\u0002\b R\u001a\u0010\u0003\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00060\u0004X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006$"}, d2 = {"Lcom/stripe/android/model/LuxeNextActionRepository;", "", "()V", "codeToNextActionSpec", "", "", "Lcom/stripe/android/model/LuxeNextActionRepository$LuxeAction;", "getAction", "Lcom/stripe/android/model/LuxeNextActionRepository$Result;", "lpmCode", "Lcom/stripe/android/model/PaymentMethodCode;", VerificationService.JSON_KEY_STATUS, "Lcom/stripe/android/model/StripeIntent$Status;", "stripeIntentJson", "Lorg/json/JSONObject;", "getAction$payments_core_release", "getActionCreator", "Lcom/stripe/android/model/LuxeActionCreatorForStatus;", "getPostAuthorizeIntentOutcome", "", "stripeIntent", "Lcom/stripe/android/model/StripeIntent;", "getPostAuthorizeIntentOutcome$payments_core_release", "(Lcom/stripe/android/model/StripeIntent;)Ljava/lang/Integer;", "isPresent", "", PaymentMethodOptionsParams.Blik.PARAM_CODE, "isPresent$payments_core_release", "update", "", "additionalData", "", "update$payments_core_release", "Companion", "LuxeAction", "Result", "payments-core_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public final class LuxeNextActionRepository {
    private final Map<String, LuxeAction> codeToNextActionSpec = new LinkedHashMap();

    public static final Companion INSTANCE = new Companion(null);
    public static final int $stable = 8;
    private static final LuxeNextActionRepository Instance = new LuxeNextActionRepository();

    public final void update$payments_core_release(Map<String, LuxeAction> additionalData) {
        Intrinsics.checkNotNullParameter(additionalData, "additionalData");
        this.codeToNextActionSpec.putAll(additionalData);
    }

    public final boolean isPresent$payments_core_release(String code) {
        Intrinsics.checkNotNullParameter(code, PaymentMethodOptionsParams.Blik.PARAM_CODE);
        return this.codeToNextActionSpec.containsKey(code);
    }

    public final Integer getPostAuthorizeIntentOutcome$payments_core_release(StripeIntent stripeIntent) {
        Map<StripeIntent.Status, Integer> postAuthorizeIntentStatus;
        Intrinsics.checkNotNullParameter(stripeIntent, "stripeIntent");
        if (stripeIntent.requiresAction() && stripeIntent.getNextActionData() == null) {
            return 2;
        }
        Map<String, LuxeAction> map = this.codeToNextActionSpec;
        PaymentMethod paymentMethod = stripeIntent.getPaymentMethod();
        LuxeAction luxeAction = map.get(paymentMethod != null ? paymentMethod.code : null);
        if (luxeAction == null || (postAuthorizeIntentStatus = luxeAction.getPostAuthorizeIntentStatus()) == null) {
            return null;
        }
        return postAuthorizeIntentStatus.get(stripeIntent.getStatus());
    }

    public final Result getAction$payments_core_release(String lpmCode, StripeIntent.Status status, JSONObject stripeIntentJson) {
        LuxeActionCreatorForStatus.ActionCreator actionCreator;
        Result create$payments_core_release;
        Intrinsics.checkNotNullParameter(stripeIntentJson, "stripeIntentJson");
        LuxeActionCreatorForStatus actionCreator2 = getActionCreator(lpmCode, status);
        return (actionCreator2 == null || (actionCreator = actionCreator2.getActionCreator()) == null || (create$payments_core_release = actionCreator.create$payments_core_release(stripeIntentJson)) == null) ? Result.NotSupported.INSTANCE : create$payments_core_release;
    }

    private final LuxeActionCreatorForStatus getActionCreator(String lpmCode, StripeIntent.Status status) {
        LuxeAction luxeAction = this.codeToNextActionSpec.get(lpmCode);
        LuxeActionCreatorForStatus postConfirmStatusNextStatus = luxeAction != null ? luxeAction.getPostConfirmStatusNextStatus() : null;
        if ((postConfirmStatusNextStatus != null ? postConfirmStatusNextStatus.getStatus() : null) == status) {
            return postConfirmStatusNextStatus;
        }
        return null;
    }

    @Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u0011\u0010\u0003\u001a\u00020\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u0007"}, d2 = {"Lcom/stripe/android/model/LuxeNextActionRepository$Companion;", "", "()V", "Instance", "Lcom/stripe/android/model/LuxeNextActionRepository;", "getInstance", "()Lcom/stripe/android/model/LuxeNextActionRepository;", "payments-core_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class Companion {
        public Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        private Companion() {
        }

        public final LuxeNextActionRepository getInstance() {
            return LuxeNextActionRepository.Instance;
        }
    }

    @Metadata(d1 = {"\u0000.\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010$\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0002\b\t\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0000\b\u0080\b\u0018\u00002\u00020\u0001B#\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003\u0012\u0012\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u00070\u0005¢\u0006\u0002\u0010\bJ\u000b\u0010\r\u001a\u0004\u0018\u00010\u0003HÆ\u0003J\u0015\u0010\u000e\u001a\u000e\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u00070\u0005HÆ\u0003J+\u0010\u000f\u001a\u00020\u00002\n\b\u0002\u0010\u0002\u001a\u0004\u0018\u00010\u00032\u0014\b\u0002\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u00070\u0005HÆ\u0001J\u0013\u0010\u0010\u001a\u00020\u00112\b\u0010\u0012\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0013\u001a\u00020\u0007HÖ\u0001J\t\u0010\u0014\u001a\u00020\u0015HÖ\u0001R\u001d\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u00070\u0005¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\nR\u0013\u0010\u0002\u001a\u0004\u0018\u00010\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\f¨\u0006\u0016"}, d2 = {"Lcom/stripe/android/model/LuxeNextActionRepository$LuxeAction;", "", "postConfirmStatusNextStatus", "Lcom/stripe/android/model/LuxeActionCreatorForStatus;", "postAuthorizeIntentStatus", "", "Lcom/stripe/android/model/StripeIntent$Status;", "", "(Lcom/stripe/android/model/LuxeActionCreatorForStatus;Ljava/util/Map;)V", "getPostAuthorizeIntentStatus", "()Ljava/util/Map;", "getPostConfirmStatusNextStatus", "()Lcom/stripe/android/model/LuxeActionCreatorForStatus;", "component1", "component2", "copy", "equals", "", "other", "hashCode", "toString", "", "payments-core_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class LuxeAction {
        private final Map<StripeIntent.Status, Integer> postAuthorizeIntentStatus;
        private final LuxeActionCreatorForStatus postConfirmStatusNextStatus;

        public static LuxeAction copy$default(LuxeAction luxeAction, LuxeActionCreatorForStatus luxeActionCreatorForStatus, Map map, int i2, Object obj) {
            if ((i2 & 1) != 0) {
                luxeActionCreatorForStatus = luxeAction.postConfirmStatusNextStatus;
            }
            if ((i2 & 2) != 0) {
                map = luxeAction.postAuthorizeIntentStatus;
            }
            return luxeAction.copy(luxeActionCreatorForStatus, map);
        }

        public final LuxeActionCreatorForStatus getPostConfirmStatusNextStatus() {
            return this.postConfirmStatusNextStatus;
        }

        public final Map<StripeIntent.Status, Integer> component2() {
            return this.postAuthorizeIntentStatus;
        }

        public final LuxeAction copy(LuxeActionCreatorForStatus postConfirmStatusNextStatus, Map<StripeIntent.Status, Integer> postAuthorizeIntentStatus) {
            Intrinsics.checkNotNullParameter(postAuthorizeIntentStatus, "postAuthorizeIntentStatus");
            return new LuxeAction(postConfirmStatusNextStatus, postAuthorizeIntentStatus);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof LuxeAction)) {
                return false;
            }
            LuxeAction luxeAction = (LuxeAction) other;
            return Intrinsics.areEqual(this.postConfirmStatusNextStatus, luxeAction.postConfirmStatusNextStatus) && Intrinsics.areEqual(this.postAuthorizeIntentStatus, luxeAction.postAuthorizeIntentStatus);
        }

        public int hashCode() {
            LuxeActionCreatorForStatus luxeActionCreatorForStatus = this.postConfirmStatusNextStatus;
            return ((luxeActionCreatorForStatus == null ? 0 : luxeActionCreatorForStatus.hashCode()) * 31) + this.postAuthorizeIntentStatus.hashCode();
        }

        public String toString() {
            return "LuxeAction(postConfirmStatusNextStatus=" + this.postConfirmStatusNextStatus + ", postAuthorizeIntentStatus=" + this.postAuthorizeIntentStatus + ")";
        }

        public LuxeAction(LuxeActionCreatorForStatus luxeActionCreatorForStatus, Map<StripeIntent.Status, Integer> map) {
            Intrinsics.checkNotNullParameter(map, "postAuthorizeIntentStatus");
            this.postConfirmStatusNextStatus = luxeActionCreatorForStatus;
            this.postAuthorizeIntentStatus = map;
        }

        public final LuxeActionCreatorForStatus getPostConfirmStatusNextStatus() {
            return this.postConfirmStatusNextStatus;
        }

        public final Map<StripeIntent.Status, Integer> getPostAuthorizeIntentStatus() {
            return this.postAuthorizeIntentStatus;
        }
    }

    @Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\b0\u0018\u00002\u00020\u0001:\u0003\u0003\u0004\u0005B\u0007\b\u0004¢\u0006\u0002\u0010\u0002\u0082\u0001\u0003\u0006\u0007\b¨\u0006\t"}, d2 = {"Lcom/stripe/android/model/LuxeNextActionRepository$Result;", "", "()V", "Action", "NoAction", "NotSupported", "Lcom/stripe/android/model/LuxeNextActionRepository$Result$Action;", "Lcom/stripe/android/model/LuxeNextActionRepository$Result$NoAction;", "Lcom/stripe/android/model/LuxeNextActionRepository$Result$NotSupported;", "payments-core_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static abstract class Result {
        public Result(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        @Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0087\b\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\t\u0010\u0007\u001a\u00020\u0003HÆ\u0003J\u0013\u0010\b\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u0003HÆ\u0001J\u0013\u0010\t\u001a\u00020\n2\b\u0010\u000b\u001a\u0004\u0018\u00010\fHÖ\u0003J\t\u0010\r\u001a\u00020\u000eHÖ\u0001J\t\u0010\u000f\u001a\u00020\u0010HÖ\u0001R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u0011"}, d2 = {"Lcom/stripe/android/model/LuxeNextActionRepository$Result$Action;", "Lcom/stripe/android/model/LuxeNextActionRepository$Result;", "nextActionData", "Lcom/stripe/android/model/StripeIntent$NextActionData;", "(Lcom/stripe/android/model/StripeIntent$NextActionData;)V", "getNextActionData", "()Lcom/stripe/android/model/StripeIntent$NextActionData;", "component1", "copy", "equals", "", "other", "", "hashCode", "", "toString", "", "payments-core_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
        public static final class Action extends Result {
            public static final int $stable = 0;
            private final StripeIntent.NextActionData nextActionData;

            public static Action copy$default(Action action, StripeIntent.NextActionData nextActionData, int i2, Object obj) {
                if ((i2 & 1) != 0) {
                    nextActionData = action.nextActionData;
                }
                return action.copy(nextActionData);
            }

            public final StripeIntent.NextActionData getNextActionData() {
                return this.nextActionData;
            }

            public final Action copy(StripeIntent.NextActionData nextActionData) {
                Intrinsics.checkNotNullParameter(nextActionData, "nextActionData");
                return new Action(nextActionData);
            }

            public boolean equals(Object other) {
                if (this == other) {
                    return true;
                }
                return (other instanceof Action) && Intrinsics.areEqual(this.nextActionData, ((Action) other).nextActionData);
            }

            public int hashCode() {
                return this.nextActionData.hashCode();
            }

            public String toString() {
                return "Action(nextActionData=" + this.nextActionData + ")";
            }

            public Action(StripeIntent.NextActionData nextActionData) {
                super(null);
                Intrinsics.checkNotNullParameter(nextActionData, "nextActionData");
                this.nextActionData = nextActionData;
            }

            public final StripeIntent.NextActionData getNextActionData() {
                return this.nextActionData;
            }
        }

        private Result() {
        }

        @Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\bÇ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0003"}, d2 = {"Lcom/stripe/android/model/LuxeNextActionRepository$Result$NoAction;", "Lcom/stripe/android/model/LuxeNextActionRepository$Result;", "()V", "payments-core_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
        public static final class NoAction extends Result {
            public static final int $stable = 0;
            public static final NoAction INSTANCE = new NoAction();

            private NoAction() {
                super(null);
            }
        }

        @Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\bÇ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0003"}, d2 = {"Lcom/stripe/android/model/LuxeNextActionRepository$Result$NotSupported;", "Lcom/stripe/android/model/LuxeNextActionRepository$Result;", "()V", "payments-core_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
        public static final class NotSupported extends Result {
            public static final int $stable = 0;
            public static final NotSupported INSTANCE = new NotSupported();

            private NotSupported() {
                super(null);
            }
        }
    }
}