导航菜单

页面标题

页面副标题

Rilo v2.0.21 - ElementsSession.java 源代码

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

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


package com.stripe.android.model;

import android.os.Parcel;
import android.os.Parcelable;
import com.stripe.android.core.model.StripeModel;
import com.stripe.android.model.PaymentMethod;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;

@Metadata(d1 = {"\u0000L\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\u0003\n\u0002\b\u0017\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0087\b\u0018\u0000 02\u00020\u0001:\u000201BG\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007\u0012\b\u0010\b\u001a\u0004\u0018\u00010\u0005\u0012\u0006\u0010\t\u001a\u00020\n\u0012\u0006\u0010\u000b\u001a\u00020\n\u0012\n\b\u0002\u0010\f\u001a\u0004\u0018\u00010\r¢\u0006\u0002\u0010\u000eJ\u000b\u0010\u001c\u001a\u0004\u0018\u00010\u0003HÆ\u0003J\u000b\u0010\u001d\u001a\u0004\u0018\u00010\u0005HÆ\u0003J\t\u0010\u001e\u001a\u00020\u0007HÆ\u0003J\u000b\u0010\u001f\u001a\u0004\u0018\u00010\u0005HÆ\u0003J\t\u0010 \u001a\u00020\nHÆ\u0003J\t\u0010!\u001a\u00020\nHÆ\u0003J\u000b\u0010\"\u001a\u0004\u0018\u00010\rHÆ\u0003JW\u0010#\u001a\u00020\u00002\n\b\u0002\u0010\u0002\u001a\u0004\u0018\u00010\u00032\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u00052\b\b\u0002\u0010\u0006\u001a\u00020\u00072\n\b\u0002\u0010\b\u001a\u0004\u0018\u00010\u00052\b\b\u0002\u0010\t\u001a\u00020\n2\b\b\u0002\u0010\u000b\u001a\u00020\n2\n\b\u0002\u0010\f\u001a\u0004\u0018\u00010\rHÆ\u0001J\t\u0010$\u001a\u00020%HÖ\u0001J\u0013\u0010&\u001a\u00020\n2\b\u0010'\u001a\u0004\u0018\u00010(HÖ\u0003J\t\u0010)\u001a\u00020%HÖ\u0001J\t\u0010*\u001a\u00020\u0005HÖ\u0001J\u0019\u0010+\u001a\u00020,2\u0006\u0010-\u001a\u00020.2\u0006\u0010/\u001a\u00020%HÖ\u0001R\u0011\u0010\t\u001a\u00020\n¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\u000fR\u0011\u0010\u000b\u001a\u00020\n¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\u000fR\u0011\u0010\u0010\u001a\u00020\n8F¢\u0006\u0006\u001a\u0004\b\u0010\u0010\u000fR\u0011\u0010\u0011\u001a\u00020\n8F¢\u0006\u0006\u001a\u0004\b\u0012\u0010\u000fR\u0013\u0010\u0002\u001a\u0004\u0018\u00010\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\u0014R\u0013\u0010\b\u001a\u0004\u0018\u00010\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0015\u0010\u0016R\u0013\u0010\u0004\u001a\u0004\u0018\u00010\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0017\u0010\u0016R\u0013\u0010\f\u001a\u0004\u0018\u00010\r¢\u0006\b\n\u0000\u001a\u0004\b\u0018\u0010\u0019R\u0011\u0010\u0006\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u001a\u0010\u001b¨\u00062"}, d2 = {"Lcom/stripe/android/model/ElementsSession;", "Lcom/stripe/android/core/model/StripeModel;", "linkSettings", "Lcom/stripe/android/model/ElementsSession$LinkSettings;", "paymentMethodSpecs", "", "stripeIntent", "Lcom/stripe/android/model/StripeIntent;", "merchantCountry", "isEligibleForCardBrandChoice", "", "isGooglePayEnabled", "sessionsError", "", "(Lcom/stripe/android/model/ElementsSession$LinkSettings;Ljava/lang/String;Lcom/stripe/android/model/StripeIntent;Ljava/lang/String;ZZLjava/lang/Throwable;)V", "()Z", "isLinkEnabled", "linkPassthroughModeEnabled", "getLinkPassthroughModeEnabled", "getLinkSettings", "()Lcom/stripe/android/model/ElementsSession$LinkSettings;", "getMerchantCountry", "()Ljava/lang/String;", "getPaymentMethodSpecs", "getSessionsError", "()Ljava/lang/Throwable;", "getStripeIntent", "()Lcom/stripe/android/model/StripeIntent;", "component1", "component2", "component3", "component4", "component5", "component6", "component7", "copy", "describeContents", "", "equals", "other", "", "hashCode", "toString", "writeToParcel", "", "parcel", "Landroid/os/Parcel;", "flags", "Companion", "LinkSettings", "payments-core_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public final class ElementsSession implements StripeModel {
    private final boolean isEligibleForCardBrandChoice;
    private final boolean isGooglePayEnabled;
    private final LinkSettings linkSettings;
    private final String merchantCountry;
    private final String paymentMethodSpecs;
    private final Throwable sessionsError;
    private final StripeIntent stripeIntent;

    public static final Companion INSTANCE = new Companion(null);
    public static final int $stable = 8;
    public static final Parcelable.Creator<ElementsSession> CREATOR = new Creator();

    @Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
    public static final class Creator implements Parcelable.Creator<ElementsSession> {
        @Override
        public final ElementsSession createFromParcel(Parcel parcel) {
            Intrinsics.checkNotNullParameter(parcel, "parcel");
            return new ElementsSession(parcel.readInt() == 0 ? null : LinkSettings.CREATOR.createFromParcel(parcel), parcel.readString(), (StripeIntent) parcel.readParcelable(ElementsSession.class.getClassLoader()), parcel.readString(), parcel.readInt() != 0, parcel.readInt() != 0, (Throwable) parcel.readSerializable());
        }

        @Override
        public final ElementsSession[] newArray(int i2) {
            return new ElementsSession[i2];
        }
    }

    public static ElementsSession copy$default(ElementsSession elementsSession, LinkSettings linkSettings, String str, StripeIntent stripeIntent, String str2, boolean z, boolean z2, Throwable th, int i2, Object obj) {
        if ((i2 & 1) != 0) {
            linkSettings = elementsSession.linkSettings;
        }
        if ((i2 & 2) != 0) {
            str = elementsSession.paymentMethodSpecs;
        }
        String str3 = str;
        if ((i2 & 4) != 0) {
            stripeIntent = elementsSession.stripeIntent;
        }
        StripeIntent stripeIntent2 = stripeIntent;
        if ((i2 & 8) != 0) {
            str2 = elementsSession.merchantCountry;
        }
        String str4 = str2;
        if ((i2 & 16) != 0) {
            z = elementsSession.isEligibleForCardBrandChoice;
        }
        boolean z3 = z;
        if ((i2 & 32) != 0) {
            z2 = elementsSession.isGooglePayEnabled;
        }
        boolean z4 = z2;
        if ((i2 & 64) != 0) {
            th = elementsSession.sessionsError;
        }
        return elementsSession.copy(linkSettings, str3, stripeIntent2, str4, z3, z4, th);
    }

    public final LinkSettings getLinkSettings() {
        return this.linkSettings;
    }

    public final String getPaymentMethodSpecs() {
        return this.paymentMethodSpecs;
    }

    public final StripeIntent getStripeIntent() {
        return this.stripeIntent;
    }

    public final String getMerchantCountry() {
        return this.merchantCountry;
    }

    public final boolean getIsEligibleForCardBrandChoice() {
        return this.isEligibleForCardBrandChoice;
    }

    public final boolean getIsGooglePayEnabled() {
        return this.isGooglePayEnabled;
    }

    public final Throwable getSessionsError() {
        return this.sessionsError;
    }

    public final ElementsSession copy(LinkSettings linkSettings, String paymentMethodSpecs, StripeIntent stripeIntent, String merchantCountry, boolean isEligibleForCardBrandChoice, boolean isGooglePayEnabled, Throwable sessionsError) {
        Intrinsics.checkNotNullParameter(stripeIntent, "stripeIntent");
        return new ElementsSession(linkSettings, paymentMethodSpecs, stripeIntent, merchantCountry, isEligibleForCardBrandChoice, isGooglePayEnabled, sessionsError);
    }

    public int describeContents() {
        return 0;
    }

    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof ElementsSession)) {
            return false;
        }
        ElementsSession elementsSession = (ElementsSession) other;
        return Intrinsics.areEqual(this.linkSettings, elementsSession.linkSettings) && Intrinsics.areEqual(this.paymentMethodSpecs, elementsSession.paymentMethodSpecs) && Intrinsics.areEqual(this.stripeIntent, elementsSession.stripeIntent) && Intrinsics.areEqual(this.merchantCountry, elementsSession.merchantCountry) && this.isEligibleForCardBrandChoice == elementsSession.isEligibleForCardBrandChoice && this.isGooglePayEnabled == elementsSession.isGooglePayEnabled && Intrinsics.areEqual(this.sessionsError, elementsSession.sessionsError);
    }

    public int hashCode() {
        LinkSettings linkSettings = this.linkSettings;
        int hashCode = (linkSettings == null ? 0 : linkSettings.hashCode()) * 31;
        String str = this.paymentMethodSpecs;
        int hashCode2 = (((hashCode + (str == null ? 0 : str.hashCode())) * 31) + this.stripeIntent.hashCode()) * 31;
        String str2 = this.merchantCountry;
        int hashCode3 = (hashCode2 + (str2 == null ? 0 : str2.hashCode())) * 31;
        boolean z = this.isEligibleForCardBrandChoice;
        int i2 = z;
        if (z != 0) {
            i2 = 1;
        }
        int i3 = (hashCode3 + i2) * 31;
        boolean z2 = this.isGooglePayEnabled;
        int i4 = (i3 + (z2 ? 1 : z2 ? 1 : 0)) * 31;
        Throwable th = this.sessionsError;
        return i4 + (th != null ? th.hashCode() : 0);
    }

    public String toString() {
        return "ElementsSession(linkSettings=" + this.linkSettings + ", paymentMethodSpecs=" + this.paymentMethodSpecs + ", stripeIntent=" + this.stripeIntent + ", merchantCountry=" + this.merchantCountry + ", isEligibleForCardBrandChoice=" + this.isEligibleForCardBrandChoice + ", isGooglePayEnabled=" + this.isGooglePayEnabled + ", sessionsError=" + this.sessionsError + ")";
    }

    public void writeToParcel(Parcel parcel, int flags) {
        Intrinsics.checkNotNullParameter(parcel, "out");
        LinkSettings linkSettings = this.linkSettings;
        if (linkSettings == null) {
            parcel.writeInt(0);
        } else {
            parcel.writeInt(1);
            linkSettings.writeToParcel(parcel, flags);
        }
        parcel.writeString(this.paymentMethodSpecs);
        parcel.writeParcelable((Parcelable) this.stripeIntent, flags);
        parcel.writeString(this.merchantCountry);
        parcel.writeInt(this.isEligibleForCardBrandChoice ? 1 : 0);
        parcel.writeInt(this.isGooglePayEnabled ? 1 : 0);
        parcel.writeSerializable(this.sessionsError);
    }

    public ElementsSession(LinkSettings linkSettings, String str, StripeIntent stripeIntent, String str2, boolean z, boolean z2, Throwable th) {
        Intrinsics.checkNotNullParameter(stripeIntent, "stripeIntent");
        this.linkSettings = linkSettings;
        this.paymentMethodSpecs = str;
        this.stripeIntent = stripeIntent;
        this.merchantCountry = str2;
        this.isEligibleForCardBrandChoice = z;
        this.isGooglePayEnabled = z2;
        this.sessionsError = th;
    }

    public ElementsSession(LinkSettings linkSettings, String str, StripeIntent stripeIntent, String str2, boolean z, boolean z2, Throwable th, int i2, DefaultConstructorMarker defaultConstructorMarker) {
        this(linkSettings, str, stripeIntent, str2, z, z2, (i2 & 64) != 0 ? null : th);
    }

    public final LinkSettings getLinkSettings() {
        return this.linkSettings;
    }

    public final String getPaymentMethodSpecs() {
        return this.paymentMethodSpecs;
    }

    public final StripeIntent getStripeIntent() {
        return this.stripeIntent;
    }

    public final String getMerchantCountry() {
        return this.merchantCountry;
    }

    public final boolean isEligibleForCardBrandChoice() {
        return this.isEligibleForCardBrandChoice;
    }

    public final boolean isGooglePayEnabled() {
        return this.isGooglePayEnabled;
    }

    public final Throwable getSessionsError() {
        return this.sessionsError;
    }

    public final boolean getLinkPassthroughModeEnabled() {
        LinkSettings linkSettings = this.linkSettings;
        if (linkSettings != null) {
            return linkSettings.getLinkPassthroughModeEnabled();
        }
        return false;
    }

    public final boolean isLinkEnabled() {
        Set set;
        boolean z;
        boolean contains = this.stripeIntent.getPaymentMethodTypes().contains(PaymentMethod.Type.Link.code);
        List<String> linkFundingSources = this.stripeIntent.getLinkFundingSources();
        if (!(linkFundingSources instanceof Collection) || !linkFundingSources.isEmpty()) {
            for (String str : linkFundingSources) {
                set = ElementsSessionKt.LinkSupportedFundingSources;
                if (set.contains(str)) {
                    z = true;
                    break;
                }
            }
        }
        z = false;
        return (contains && z) || getLinkPassthroughModeEnabled();
    }

    @Metadata(d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0002\b\t\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0087\b\u0018\u00002\u00020\u0001B\u001b\u0012\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0006¢\u0006\u0002\u0010\u0007J\u000f\u0010\f\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003HÆ\u0003J\t\u0010\r\u001a\u00020\u0006HÆ\u0003J#\u0010\u000e\u001a\u00020\u00002\u000e\b\u0002\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u00032\b\b\u0002\u0010\u0005\u001a\u00020\u0006HÆ\u0001J\t\u0010\u000f\u001a\u00020\u0010HÖ\u0001J\u0013\u0010\u0011\u001a\u00020\u00062\b\u0010\u0012\u001a\u0004\u0018\u00010\u0013HÖ\u0003J\t\u0010\u0014\u001a\u00020\u0010HÖ\u0001J\t\u0010\u0015\u001a\u00020\u0004HÖ\u0001J\u0019\u0010\u0016\u001a\u00020\u00172\u0006\u0010\u0018\u001a\u00020\u00192\u0006\u0010\u001a\u001a\u00020\u0010HÖ\u0001R\u0017\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\tR\u0011\u0010\u0005\u001a\u00020\u0006¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u000b¨\u0006\u001b"}, d2 = {"Lcom/stripe/android/model/ElementsSession$LinkSettings;", "Lcom/stripe/android/core/model/StripeModel;", "linkFundingSources", "", "", "linkPassthroughModeEnabled", "", "(Ljava/util/List;Z)V", "getLinkFundingSources", "()Ljava/util/List;", "getLinkPassthroughModeEnabled", "()Z", "component1", "component2", "copy", "describeContents", "", "equals", "other", "", "hashCode", "toString", "writeToParcel", "", "parcel", "Landroid/os/Parcel;", "flags", "payments-core_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class LinkSettings implements StripeModel {
        public static final int $stable = 8;
        public static final Parcelable.Creator<LinkSettings> CREATOR = new Creator();
        private final List<String> linkFundingSources;
        private final boolean linkPassthroughModeEnabled;

        @Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
        public static final class Creator implements Parcelable.Creator<LinkSettings> {
            @Override
            public final LinkSettings createFromParcel(Parcel parcel) {
                Intrinsics.checkNotNullParameter(parcel, "parcel");
                return new LinkSettings(parcel.createStringArrayList(), parcel.readInt() != 0);
            }

            @Override
            public final LinkSettings[] newArray(int i2) {
                return new LinkSettings[i2];
            }
        }

        public static LinkSettings copy$default(LinkSettings linkSettings, List list, boolean z, int i2, Object obj) {
            if ((i2 & 1) != 0) {
                list = linkSettings.linkFundingSources;
            }
            if ((i2 & 2) != 0) {
                z = linkSettings.linkPassthroughModeEnabled;
            }
            return linkSettings.copy(list, z);
        }

        public final List<String> component1() {
            return this.linkFundingSources;
        }

        public final boolean getLinkPassthroughModeEnabled() {
            return this.linkPassthroughModeEnabled;
        }

        public final LinkSettings copy(List<String> linkFundingSources, boolean linkPassthroughModeEnabled) {
            Intrinsics.checkNotNullParameter(linkFundingSources, "linkFundingSources");
            return new LinkSettings(linkFundingSources, linkPassthroughModeEnabled);
        }

        public int describeContents() {
            return 0;
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof LinkSettings)) {
                return false;
            }
            LinkSettings linkSettings = (LinkSettings) other;
            return Intrinsics.areEqual(this.linkFundingSources, linkSettings.linkFundingSources) && this.linkPassthroughModeEnabled == linkSettings.linkPassthroughModeEnabled;
        }

        public int hashCode() {
            int hashCode = this.linkFundingSources.hashCode() * 31;
            boolean z = this.linkPassthroughModeEnabled;
            int i2 = z;
            if (z != 0) {
                i2 = 1;
            }
            return hashCode + i2;
        }

        public String toString() {
            return "LinkSettings(linkFundingSources=" + this.linkFundingSources + ", linkPassthroughModeEnabled=" + this.linkPassthroughModeEnabled + ")";
        }

        public void writeToParcel(Parcel parcel, int flags) {
            Intrinsics.checkNotNullParameter(parcel, "out");
            parcel.writeStringList(this.linkFundingSources);
            parcel.writeInt(this.linkPassthroughModeEnabled ? 1 : 0);
        }

        public LinkSettings(List<String> list, boolean z) {
            Intrinsics.checkNotNullParameter(list, "linkFundingSources");
            this.linkFundingSources = list;
            this.linkPassthroughModeEnabled = z;
        }

        public final List<String> getLinkFundingSources() {
            return this.linkFundingSources;
        }

        public final boolean getLinkPassthroughModeEnabled() {
            return this.linkPassthroughModeEnabled;
        }
    }

    @Metadata(d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0003\n\u0000\b\u0087\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0018\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\b\u0010\u0007\u001a\u0004\u0018\u00010\b¨\u0006\t"}, d2 = {"Lcom/stripe/android/model/ElementsSession$Companion;", "", "()V", "createFromFallback", "Lcom/stripe/android/model/ElementsSession;", "stripeIntent", "Lcom/stripe/android/model/StripeIntent;", "sessionsError", "", "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 ElementsSession createFromFallback(StripeIntent stripeIntent, Throwable sessionsError) {
            Intrinsics.checkNotNullParameter(stripeIntent, "stripeIntent");
            return new ElementsSession(null, null, stripeIntent, null, false, true, sessionsError);
        }
    }
}