导航菜单

页面标题

页面副标题

Rilo v2.0.21 - LuxePostConfirmActionRepository.java 源代码

正在查看: Rilo v2.0.21 应用的 LuxePostConfirmActionRepository.java JAVA 源代码文件

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


package com.stripe.android.model;

import com.stripe.android.model.PaymentMethodOptionsParams;
import com.stripe.android.model.StripeIntent;
import com.truecaller.android.sdk.network.VerificationService;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import kotlin.Metadata;
import kotlin.collections.CollectionsKt;
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\u0004\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\u001c\u0010\u001c\u001a\u00020\u001d2\u0012\u0010\u001e\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00060\u001fH\u0007R\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/LuxePostConfirmActionRepository;", "", "()V", "lpmToConfirmActionSpec", "", "", "Lcom/stripe/android/model/LuxePostConfirmActionRepository$LuxeAction;", "getAction", "Lcom/stripe/android/model/LuxePostConfirmActionRepository$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/LuxePostConfirmActionCreator;", "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", "", "Companion", "LuxeAction", "Result", "payments-core_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public final class LuxePostConfirmActionRepository {
    private final Map<String, LuxeAction> lpmToConfirmActionSpec = new LinkedHashMap();

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

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

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

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

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

    private final LuxePostConfirmActionCreator getActionCreator(String lpmCode, StripeIntent.Status status) {
        Map<StripeIntent.Status, LuxePostConfirmActionCreator> postConfirmStatusToAction;
        LuxeAction luxeAction = this.lpmToConfirmActionSpec.get(lpmCode);
        if (luxeAction == null || (postConfirmStatusToAction = luxeAction.getPostConfirmStatusToAction()) == null) {
            return null;
        }
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        for (Map.Entry<StripeIntent.Status, LuxePostConfirmActionCreator> entry : postConfirmStatusToAction.entrySet()) {
            if (entry.getKey() == status) {
                linkedHashMap.put(entry.getKey(), entry.getValue());
            }
        }
        ArrayList arrayList = new ArrayList(linkedHashMap.size());
        Iterator it2 = linkedHashMap.entrySet().iterator();
        while (it2.hasNext()) {
            arrayList.add((LuxePostConfirmActionCreator) ((Map.Entry) it2.next()).getValue());
        }
        return (LuxePostConfirmActionCreator) CollectionsKt.firstOrNull(arrayList);
    }

    @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/LuxePostConfirmActionRepository$Companion;", "", "()V", "Instance", "Lcom/stripe/android/model/LuxePostConfirmActionRepository;", "getInstance", "()Lcom/stripe/android/model/LuxePostConfirmActionRepository;", "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 LuxePostConfirmActionRepository getInstance() {
            return LuxePostConfirmActionRepository.Instance;
        }
    }

    @Metadata(d1 = {"\u0000.\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\b\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0000\b\u0087\b\u0018\u00002\u00020\u0001B-\u0012\u0012\u0010\u0002\u001a\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00050\u0003\u0012\u0012\u0010\u0006\u001a\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00070\u0003¢\u0006\u0002\u0010\bJ\u0015\u0010\f\u001a\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00050\u0003HÆ\u0003J\u0015\u0010\r\u001a\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00070\u0003HÆ\u0003J5\u0010\u000e\u001a\u00020\u00002\u0014\b\u0002\u0010\u0002\u001a\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00050\u00032\u0014\b\u0002\u0010\u0006\u001a\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00070\u0003HÆ\u0001J\u0013\u0010\u000f\u001a\u00020\u00102\b\u0010\u0011\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0012\u001a\u00020\u0007HÖ\u0001J\t\u0010\u0013\u001a\u00020\u0014HÖ\u0001R\u001d\u0010\u0006\u001a\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00070\u0003¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\nR\u001d\u0010\u0002\u001a\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00050\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\n¨\u0006\u0015"}, d2 = {"Lcom/stripe/android/model/LuxePostConfirmActionRepository$LuxeAction;", "", "postConfirmStatusToAction", "", "Lcom/stripe/android/model/StripeIntent$Status;", "Lcom/stripe/android/model/LuxePostConfirmActionCreator;", "postConfirmActionIntentStatus", "", "(Ljava/util/Map;Ljava/util/Map;)V", "getPostConfirmActionIntentStatus", "()Ljava/util/Map;", "getPostConfirmStatusToAction", "component1", "component2", "copy", "equals", "", "other", "hashCode", "toString", "", "payments-core_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class LuxeAction {
        public static final int $stable = 8;
        private final Map<StripeIntent.Status, Integer> postConfirmActionIntentStatus;
        private final Map<StripeIntent.Status, LuxePostConfirmActionCreator> postConfirmStatusToAction;

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

        public final Map<StripeIntent.Status, LuxePostConfirmActionCreator> component1() {
            return this.postConfirmStatusToAction;
        }

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

        public final LuxeAction copy(Map<StripeIntent.Status, ? extends LuxePostConfirmActionCreator> postConfirmStatusToAction, Map<StripeIntent.Status, Integer> postConfirmActionIntentStatus) {
            Intrinsics.checkNotNullParameter(postConfirmStatusToAction, "postConfirmStatusToAction");
            Intrinsics.checkNotNullParameter(postConfirmActionIntentStatus, "postConfirmActionIntentStatus");
            return new LuxeAction(postConfirmStatusToAction, postConfirmActionIntentStatus);
        }

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

        public int hashCode() {
            return (this.postConfirmStatusToAction.hashCode() * 31) + this.postConfirmActionIntentStatus.hashCode();
        }

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

        public LuxeAction(Map<StripeIntent.Status, ? extends LuxePostConfirmActionCreator> map, Map<StripeIntent.Status, Integer> map2) {
            Intrinsics.checkNotNullParameter(map, "postConfirmStatusToAction");
            Intrinsics.checkNotNullParameter(map2, "postConfirmActionIntentStatus");
            this.postConfirmStatusToAction = map;
            this.postConfirmActionIntentStatus = map2;
        }

        public final Map<StripeIntent.Status, LuxePostConfirmActionCreator> getPostConfirmStatusToAction() {
            return this.postConfirmStatusToAction;
        }

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

    @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/LuxePostConfirmActionRepository$Result;", "", "()V", "Action", "NoAction", "NotSupported", "Lcom/stripe/android/model/LuxePostConfirmActionRepository$Result$Action;", "Lcom/stripe/android/model/LuxePostConfirmActionRepository$Result$NoAction;", "Lcom/stripe/android/model/LuxePostConfirmActionRepository$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/LuxePostConfirmActionRepository$Result$Action;", "Lcom/stripe/android/model/LuxePostConfirmActionRepository$Result;", "postConfirmAction", "Lcom/stripe/android/model/StripeIntent$NextActionData;", "(Lcom/stripe/android/model/StripeIntent$NextActionData;)V", "getPostConfirmAction", "()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 postConfirmAction;

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

            public final StripeIntent.NextActionData getPostConfirmAction() {
                return this.postConfirmAction;
            }

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

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

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

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

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

            public final StripeIntent.NextActionData getPostConfirmAction() {
                return this.postConfirmAction;
            }
        }

        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/LuxePostConfirmActionRepository$Result$NoAction;", "Lcom/stripe/android/model/LuxePostConfirmActionRepository$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/LuxePostConfirmActionRepository$Result$NotSupported;", "Lcom/stripe/android/model/LuxePostConfirmActionRepository$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);
            }
        }
    }
}