正在查看: Crafto v9.3.3 应用的 PaymentIntent.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Crafto v9.3.3 应用的 PaymentIntent.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.stripe.android.model;
import android.os.Parcel;
import android.os.Parcelable;
import c0.u0;
import com.stripe.android.core.model.StripeModel;
import com.stripe.android.model.PaymentMethod;
import com.stripe.android.model.StripeIntent;
import com.stripe.android.model.parsers.PaymentIntentJsonParser;
import java.util.List;
import java.util.ListIterator;
import java.util.regex.Pattern;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.collections.CollectionsKt;
import kotlin.collections.F;
import kotlin.collections.o;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Regex;
import org.jetbrains.annotations.NotNull;
import org.json.JSONObject;
@Metadata
public final class PaymentIntent implements StripeIntent {
private final Long amount;
private final long canceledAt;
private final CancellationReason cancellationReason;
@NotNull
private final CaptureMethod captureMethod;
private final String clientSecret;
@NotNull
private final ConfirmationMethod confirmationMethod;
private final long created;
private final String currency;
private final String description;
private final String id;
private final boolean isLiveMode;
private final Error lastPaymentError;
private final StripeIntent.NextActionData nextActionData;
private final PaymentMethod paymentMethod;
private final String paymentMethodId;
@NotNull
private final List<String> paymentMethodTypes;
private final String receiptEmail;
private final StripeIntent.Usage setupFutureUsage;
private final Shipping shipping;
private final StripeIntent.Status status;
@NotNull
private final List<String> unactivatedPaymentMethods;
@NotNull
public static final Companion Companion = new Companion(null);
@NotNull
public static final Parcelable.Creator<PaymentIntent> CREATOR = new Creator();
public static final int $stable = 8;
@Metadata
public enum CancellationReason {
Duplicate("duplicate"),
Fraudulent("fraudulent"),
RequestedByCustomer("requested_by_customer"),
Abandoned("abandoned"),
FailedInvoice("failed_invoice"),
VoidInvoice("void_invoice"),
Automatic("automatic");
@NotNull
public static final Companion Companion = new Companion(null);
@NotNull
private final String code;
@Metadata
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final CancellationReason fromCode(String str) {
for (CancellationReason cancellationReason : CancellationReason.values()) {
if (Intrinsics.areEqual(cancellationReason.code, str)) {
return cancellationReason;
}
}
return null;
}
private Companion() {
}
}
CancellationReason(String str) {
this.code = str;
}
}
@Metadata
public enum CaptureMethod {
Automatic("automatic"),
Manual("manual");
@NotNull
public static final Companion Companion = new Companion(null);
@NotNull
private final String code;
@Metadata
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@NotNull
public final CaptureMethod fromCode(String str) {
CaptureMethod captureMethod;
CaptureMethod[] values = CaptureMethod.values();
int length = values.length;
int i = 0;
while (true) {
if (i >= length) {
captureMethod = null;
break;
}
captureMethod = values[i];
if (Intrinsics.areEqual(captureMethod.code, str)) {
break;
}
i++;
}
return captureMethod == null ? CaptureMethod.Automatic : captureMethod;
}
private Companion() {
}
}
CaptureMethod(String str) {
this.code = str;
}
}
@Metadata
public static final class ClientSecret {
@NotNull
public static final Companion Companion = new Companion(null);
private static final Pattern PATTERN = Pattern.compile("^pi_[^_]+_secret_[^_]+$");
@NotNull
private final String paymentIntentId;
@NotNull
private final String value;
@Metadata
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final boolean isMatch(@NotNull String str) {
Intrinsics.checkNotNullParameter(str, "value");
return ClientSecret.PATTERN.matcher(str).matches();
}
private Companion() {
}
}
public ClientSecret(@NotNull String str) {
List list;
Intrinsics.checkNotNullParameter(str, "value");
this.value = str;
List e = new Regex("_secret").e(str);
if (!e.isEmpty()) {
ListIterator listIterator = e.listIterator(e.size());
while (listIterator.hasPrevious()) {
if (((String) listIterator.previous()).length() != 0) {
list = CollectionsKt.W(e, listIterator.nextIndex() + 1);
break;
}
}
}
list = F.a;
Object[] array = list.toArray(new String[0]);
if (array == null) {
throw new NullPointerException("null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
}
this.paymentIntentId = ((String[]) array)[0];
if (Companion.isMatch(this.value)) {
return;
}
throw new IllegalArgumentException(("Invalid Payment Intent client secret: " + this.value).toString());
}
public static ClientSecret copy$default(ClientSecret clientSecret, String str, int i, Object obj) {
if ((i & 1) != 0) {
str = clientSecret.value;
}
return clientSecret.copy(str);
}
@NotNull
public final String component1$payments_core_release() {
return this.value;
}
@NotNull
public final ClientSecret copy(@NotNull String str) {
Intrinsics.checkNotNullParameter(str, "value");
return new ClientSecret(str);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
return (obj instanceof ClientSecret) && Intrinsics.areEqual(this.value, ((ClientSecret) obj).value);
}
@NotNull
public final String getPaymentIntentId$payments_core_release() {
return this.paymentIntentId;
}
@NotNull
public final String getValue$payments_core_release() {
return this.value;
}
public int hashCode() {
return this.value.hashCode();
}
@NotNull
public String toString() {
return u0.a(new StringBuilder("ClientSecret(value="), this.value, ')');
}
}
@Metadata
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final PaymentIntent fromJson(JSONObject jSONObject) {
if (jSONObject != null) {
return new PaymentIntentJsonParser().parse(jSONObject);
}
return null;
}
private Companion() {
}
}
@Metadata
public enum ConfirmationMethod {
Automatic("automatic"),
Manual("manual");
@NotNull
public static final Companion Companion = new Companion(null);
@NotNull
private final String code;
@Metadata
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@NotNull
public final ConfirmationMethod fromCode(String str) {
ConfirmationMethod confirmationMethod;
ConfirmationMethod[] values = ConfirmationMethod.values();
int length = values.length;
int i = 0;
while (true) {
if (i >= length) {
confirmationMethod = null;
break;
}
confirmationMethod = values[i];
if (Intrinsics.areEqual(confirmationMethod.code, str)) {
break;
}
i++;
}
return confirmationMethod == null ? ConfirmationMethod.Automatic : confirmationMethod;
}
private Companion() {
}
}
ConfirmationMethod(String str) {
this.code = str;
}
}
@Metadata
public static final class Creator implements Parcelable.Creator<PaymentIntent> {
@Override
@NotNull
public final PaymentIntent createFromParcel(@NotNull Parcel parcel) {
Intrinsics.checkNotNullParameter(parcel, "parcel");
return new PaymentIntent(parcel.readString(), parcel.createStringArrayList(), parcel.readInt() == 0 ? null : Long.valueOf(parcel.readLong()), parcel.readLong(), parcel.readInt() == 0 ? null : CancellationReason.valueOf(parcel.readString()), CaptureMethod.valueOf(parcel.readString()), parcel.readString(), ConfirmationMethod.valueOf(parcel.readString()), parcel.readLong(), parcel.readString(), parcel.readString(), parcel.readInt() != 0, parcel.readInt() == 0 ? null : PaymentMethod.CREATOR.createFromParcel(parcel), parcel.readString(), parcel.readString(), parcel.readInt() == 0 ? null : StripeIntent.Status.valueOf(parcel.readString()), parcel.readInt() == 0 ? null : StripeIntent.Usage.valueOf(parcel.readString()), parcel.readInt() == 0 ? null : Error.CREATOR.createFromParcel(parcel), parcel.readInt() != 0 ? Shipping.CREATOR.createFromParcel(parcel) : null, parcel.createStringArrayList(), (StripeIntent.NextActionData) parcel.readParcelable(PaymentIntent.class.getClassLoader()));
}
@Override
@NotNull
public final PaymentIntent[] newArray(int i) {
return new PaymentIntent[i];
}
}
@Metadata
public static final class Error implements StripeModel {
@NotNull
public static final String CODE_AUTHENTICATION_ERROR = "payment_intent_authentication_failure";
private final String charge;
private final String code;
private final String declineCode;
private final String docUrl;
private final String message;
private final String param;
private final PaymentMethod paymentMethod;
private final Type type;
@NotNull
public static final Companion Companion = new Companion(null);
@NotNull
public static final Parcelable.Creator<Error> CREATOR = new Creator();
public static final int $stable = 8;
@Metadata
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
@Metadata
public static final class Creator implements Parcelable.Creator<Error> {
@Override
@NotNull
public final Error createFromParcel(@NotNull Parcel parcel) {
Intrinsics.checkNotNullParameter(parcel, "parcel");
return new Error(parcel.readString(), parcel.readString(), parcel.readString(), parcel.readString(), parcel.readString(), parcel.readString(), parcel.readInt() == 0 ? null : PaymentMethod.CREATOR.createFromParcel(parcel), parcel.readInt() == 0 ? null : Type.valueOf(parcel.readString()));
}
@Override
@NotNull
public final Error[] newArray(int i) {
return new Error[i];
}
}
@Metadata
public enum Type {
ApiConnectionError("api_connection_error"),
ApiError("api_error"),
AuthenticationError("authentication_error"),
CardError("card_error"),
IdempotencyError("idempotency_error"),
InvalidRequestError("invalid_request_error"),
RateLimitError("rate_limit_error");
@NotNull
public static final Companion Companion = new Companion(null);
@NotNull
private final String code;
@Metadata
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final Type fromCode(String str) {
for (Type type : Type.values()) {
if (Intrinsics.areEqual(type.getCode(), str)) {
return type;
}
}
return null;
}
private Companion() {
}
}
Type(String str) {
this.code = str;
}
@NotNull
public final String getCode() {
return this.code;
}
}
public Error(String str, String str2, String str3, String str4, String str5, String str6, PaymentMethod paymentMethod, Type type) {
this.charge = str;
this.code = str2;
this.declineCode = str3;
this.docUrl = str4;
this.message = str5;
this.param = str6;
this.paymentMethod = paymentMethod;
this.type = type;
}
public final String component1() {
return this.charge;
}
public final String component2() {
return this.code;
}
public final String component3() {
return this.declineCode;
}
public final String component4() {
return this.docUrl;
}
public final String component5() {
return this.message;
}
public final String component6() {
return this.param;
}
public final PaymentMethod component7() {
return this.paymentMethod;
}
public final Type component8() {
return this.type;
}
@NotNull
public final Error copy(String str, String str2, String str3, String str4, String str5, String str6, PaymentMethod paymentMethod, Type type) {
return new Error(str, str2, str3, str4, str5, str6, paymentMethod, type);
}
@Override
public int describeContents() {
return 0;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Error)) {
return false;
}
Error error = (Error) obj;
return Intrinsics.areEqual(this.charge, error.charge) && Intrinsics.areEqual(this.code, error.code) && Intrinsics.areEqual(this.declineCode, error.declineCode) && Intrinsics.areEqual(this.docUrl, error.docUrl) && Intrinsics.areEqual(this.message, error.message) && Intrinsics.areEqual(this.param, error.param) && Intrinsics.areEqual(this.paymentMethod, error.paymentMethod) && this.type == error.type;
}
public final String getCharge() {
return this.charge;
}
public final String getCode() {
return this.code;
}
public final String getDeclineCode() {
return this.declineCode;
}
public final String getDocUrl() {
return this.docUrl;
}
public final String getMessage() {
return this.message;
}
public final String getParam() {
return this.param;
}
public final PaymentMethod getPaymentMethod() {
return this.paymentMethod;
}
public final Type getType() {
return this.type;
}
@Override
public int hashCode() {
String str = this.charge;
int hashCode = (str == null ? 0 : str.hashCode()) * 31;
String str2 = this.code;
int hashCode2 = (hashCode + (str2 == null ? 0 : str2.hashCode())) * 31;
String str3 = this.declineCode;
int hashCode3 = (hashCode2 + (str3 == null ? 0 : str3.hashCode())) * 31;
String str4 = this.docUrl;
int hashCode4 = (hashCode3 + (str4 == null ? 0 : str4.hashCode())) * 31;
String str5 = this.message;
int hashCode5 = (hashCode4 + (str5 == null ? 0 : str5.hashCode())) * 31;
String str6 = this.param;
int hashCode6 = (hashCode5 + (str6 == null ? 0 : str6.hashCode())) * 31;
PaymentMethod paymentMethod = this.paymentMethod;
int hashCode7 = (hashCode6 + (paymentMethod == null ? 0 : paymentMethod.hashCode())) * 31;
Type type = this.type;
return hashCode7 + (type != null ? type.hashCode() : 0);
}
@NotNull
public String toString() {
return "Error(charge=" + this.charge + ", code=" + this.code + ", declineCode=" + this.declineCode + ", docUrl=" + this.docUrl + ", message=" + this.message + ", param=" + this.param + ", paymentMethod=" + this.paymentMethod + ", type=" + this.type + ')';
}
@Override
public void writeToParcel(@NotNull Parcel parcel, int i) {
Intrinsics.checkNotNullParameter(parcel, "out");
parcel.writeString(this.charge);
parcel.writeString(this.code);
parcel.writeString(this.declineCode);
parcel.writeString(this.docUrl);
parcel.writeString(this.message);
parcel.writeString(this.param);
PaymentMethod paymentMethod = this.paymentMethod;
if (paymentMethod == null) {
parcel.writeInt(0);
} else {
parcel.writeInt(1);
paymentMethod.writeToParcel(parcel, i);
}
Type type = this.type;
if (type == null) {
parcel.writeInt(0);
} else {
parcel.writeInt(1);
parcel.writeString(type.name());
}
}
}
@Metadata
public class WhenMappings {
public static final int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[StripeIntent.Usage.values().length];
iArr[StripeIntent.Usage.OnSession.ordinal()] = 1;
iArr[StripeIntent.Usage.OffSession.ordinal()] = 2;
iArr[StripeIntent.Usage.OneTime.ordinal()] = 3;
$EnumSwitchMapping$0 = iArr;
}
}
public PaymentIntent(String str, @NotNull List<String> list, Long l, long j, CancellationReason cancellationReason, @NotNull CaptureMethod captureMethod, String str2, @NotNull ConfirmationMethod confirmationMethod, long j2, String str3, String str4, boolean z, PaymentMethod paymentMethod, String str5, String str6, StripeIntent.Status status, StripeIntent.Usage usage, Error error, Shipping shipping, @NotNull List<String> list2, StripeIntent.NextActionData nextActionData) {
Intrinsics.checkNotNullParameter(list, "paymentMethodTypes");
Intrinsics.checkNotNullParameter(captureMethod, "captureMethod");
Intrinsics.checkNotNullParameter(confirmationMethod, "confirmationMethod");
Intrinsics.checkNotNullParameter(list2, "unactivatedPaymentMethods");
this.id = str;
this.paymentMethodTypes = list;
this.amount = l;
this.canceledAt = j;
this.cancellationReason = cancellationReason;
this.captureMethod = captureMethod;
this.clientSecret = str2;
this.confirmationMethod = confirmationMethod;
this.created = j2;
this.currency = str3;
this.description = str4;
this.isLiveMode = z;
this.paymentMethod = paymentMethod;
this.paymentMethodId = str5;
this.receiptEmail = str6;
this.status = status;
this.setupFutureUsage = usage;
this.lastPaymentError = error;
this.shipping = shipping;
this.unactivatedPaymentMethods = list2;
this.nextActionData = nextActionData;
}
public static final PaymentIntent fromJson(JSONObject jSONObject) {
return Companion.fromJson(jSONObject);
}
public final String component1() {
return getId();
}
public final String component10() {
return this.currency;
}
public final String component11() {
return getDescription();
}
public final boolean component12() {
return isLiveMode();
}
public final PaymentMethod component13() {
return getPaymentMethod();
}
public final String component14() {
return getPaymentMethodId();
}
public final String component15() {
return this.receiptEmail;
}
public final StripeIntent.Status component16() {
return getStatus();
}
public final StripeIntent.Usage component17() {
return this.setupFutureUsage;
}
public final Error component18() {
return this.lastPaymentError;
}
public final Shipping component19() {
return this.shipping;
}
@NotNull
public final List<String> component2() {
return getPaymentMethodTypes();
}
@NotNull
public final List<String> component20() {
return getUnactivatedPaymentMethods();
}
public final StripeIntent.NextActionData component21() {
return getNextActionData();
}
public final Long component3() {
return this.amount;
}
public final long component4() {
return this.canceledAt;
}
public final CancellationReason component5() {
return this.cancellationReason;
}
@NotNull
public final CaptureMethod component6() {
return this.captureMethod;
}
public final String component7() {
return getClientSecret();
}
@NotNull
public final ConfirmationMethod component8() {
return this.confirmationMethod;
}
public final long component9() {
return getCreated();
}
@NotNull
public final PaymentIntent copy(String str, @NotNull List<String> list, Long l, long j, CancellationReason cancellationReason, @NotNull CaptureMethod captureMethod, String str2, @NotNull ConfirmationMethod confirmationMethod, long j2, String str3, String str4, boolean z, PaymentMethod paymentMethod, String str5, String str6, StripeIntent.Status status, StripeIntent.Usage usage, Error error, Shipping shipping, @NotNull List<String> list2, StripeIntent.NextActionData nextActionData) {
Intrinsics.checkNotNullParameter(list, "paymentMethodTypes");
Intrinsics.checkNotNullParameter(captureMethod, "captureMethod");
Intrinsics.checkNotNullParameter(confirmationMethod, "confirmationMethod");
Intrinsics.checkNotNullParameter(list2, "unactivatedPaymentMethods");
return new PaymentIntent(str, list, l, j, cancellationReason, captureMethod, str2, confirmationMethod, j2, str3, str4, z, paymentMethod, str5, str6, status, usage, error, shipping, list2, nextActionData);
}
@Override
public int describeContents() {
return 0;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof PaymentIntent)) {
return false;
}
PaymentIntent paymentIntent = (PaymentIntent) obj;
return Intrinsics.areEqual(getId(), paymentIntent.getId()) && Intrinsics.areEqual(getPaymentMethodTypes(), paymentIntent.getPaymentMethodTypes()) && Intrinsics.areEqual(this.amount, paymentIntent.amount) && this.canceledAt == paymentIntent.canceledAt && this.cancellationReason == paymentIntent.cancellationReason && this.captureMethod == paymentIntent.captureMethod && Intrinsics.areEqual(getClientSecret(), paymentIntent.getClientSecret()) && this.confirmationMethod == paymentIntent.confirmationMethod && getCreated() == paymentIntent.getCreated() && Intrinsics.areEqual(this.currency, paymentIntent.currency) && Intrinsics.areEqual(getDescription(), paymentIntent.getDescription()) && isLiveMode() == paymentIntent.isLiveMode() && Intrinsics.areEqual(getPaymentMethod(), paymentIntent.getPaymentMethod()) && Intrinsics.areEqual(getPaymentMethodId(), paymentIntent.getPaymentMethodId()) && Intrinsics.areEqual(this.receiptEmail, paymentIntent.receiptEmail) && getStatus() == paymentIntent.getStatus() && this.setupFutureUsage == paymentIntent.setupFutureUsage && Intrinsics.areEqual(this.lastPaymentError, paymentIntent.lastPaymentError) && Intrinsics.areEqual(this.shipping, paymentIntent.shipping) && Intrinsics.areEqual(getUnactivatedPaymentMethods(), paymentIntent.getUnactivatedPaymentMethods()) && Intrinsics.areEqual(getNextActionData(), paymentIntent.getNextActionData());
}
public final Long getAmount() {
return this.amount;
}
public final long getCanceledAt() {
return this.canceledAt;
}
public final CancellationReason getCancellationReason() {
return this.cancellationReason;
}
@NotNull
public final CaptureMethod getCaptureMethod() {
return this.captureMethod;
}
@Override
public String getClientSecret() {
return this.clientSecret;
}
@NotNull
public final ConfirmationMethod getConfirmationMethod() {
return this.confirmationMethod;
}
@Override
public long getCreated() {
return this.created;
}
public final String getCurrency() {
return this.currency;
}
@Override
public String getDescription() {
return this.description;
}
@Override
public String getId() {
return this.id;
}
@Override
public String getLastErrorMessage() {
Error error = this.lastPaymentError;
if (error != null) {
return error.getMessage();
}
return null;
}
public final Error getLastPaymentError() {
return this.lastPaymentError;
}
@Override
public StripeIntent.NextActionData getNextActionData() {
return this.nextActionData;
}
@Override
public StripeIntent.NextActionType getNextActionType() {
StripeIntent.NextActionData nextActionData = getNextActionData();
if (nextActionData instanceof StripeIntent.NextActionData.SdkData) {
return StripeIntent.NextActionType.UseStripeSdk;
}
if (nextActionData instanceof StripeIntent.NextActionData.RedirectToUrl) {
return StripeIntent.NextActionType.RedirectToUrl;
}
if (nextActionData instanceof StripeIntent.NextActionData.DisplayOxxoDetails) {
return StripeIntent.NextActionType.DisplayOxxoDetails;
}
if (nextActionData instanceof StripeIntent.NextActionData.VerifyWithMicrodeposits) {
return StripeIntent.NextActionType.VerifyWithMicrodeposits;
}
return null;
}
@Override
public PaymentMethod getPaymentMethod() {
return this.paymentMethod;
}
@Override
public String getPaymentMethodId() {
return this.paymentMethodId;
}
@Override
@NotNull
public List<String> getPaymentMethodTypes() {
return this.paymentMethodTypes;
}
public final String getReceiptEmail() {
return this.receiptEmail;
}
public final StripeIntent.Usage getSetupFutureUsage() {
return this.setupFutureUsage;
}
public final Shipping getShipping() {
return this.shipping;
}
@Override
public StripeIntent.Status getStatus() {
return this.status;
}
@Override
@NotNull
public List<String> getUnactivatedPaymentMethods() {
return this.unactivatedPaymentMethods;
}
@Override
public int hashCode() {
int hashCode = (getPaymentMethodTypes().hashCode() + ((getId() == null ? 0 : getId().hashCode()) * 31)) * 31;
Long l = this.amount;
int hashCode2 = l == null ? 0 : l.hashCode();
long j = this.canceledAt;
int i = (((hashCode + hashCode2) * 31) + ((int) (j ^ (j >>> 32)))) * 31;
CancellationReason cancellationReason = this.cancellationReason;
int hashCode3 = (this.confirmationMethod.hashCode() + ((((this.captureMethod.hashCode() + ((i + (cancellationReason == null ? 0 : cancellationReason.hashCode())) * 31)) * 31) + (getClientSecret() == null ? 0 : getClientSecret().hashCode())) * 31)) * 31;
long created = getCreated();
int i2 = (hashCode3 + ((int) (created ^ (created >>> 32)))) * 31;
String str = this.currency;
int hashCode4 = (((i2 + (str == null ? 0 : str.hashCode())) * 31) + (getDescription() == null ? 0 : getDescription().hashCode())) * 31;
boolean isLiveMode = isLiveMode();
int i3 = isLiveMode;
if (isLiveMode) {
i3 = 1;
}
int hashCode5 = (((((hashCode4 + i3) * 31) + (getPaymentMethod() == null ? 0 : getPaymentMethod().hashCode())) * 31) + (getPaymentMethodId() == null ? 0 : getPaymentMethodId().hashCode())) * 31;
String str2 = this.receiptEmail;
int hashCode6 = (((hashCode5 + (str2 == null ? 0 : str2.hashCode())) * 31) + (getStatus() == null ? 0 : getStatus().hashCode())) * 31;
StripeIntent.Usage usage = this.setupFutureUsage;
int hashCode7 = (hashCode6 + (usage == null ? 0 : usage.hashCode())) * 31;
Error error = this.lastPaymentError;
int hashCode8 = (hashCode7 + (error == null ? 0 : error.hashCode())) * 31;
Shipping shipping = this.shipping;
return ((getUnactivatedPaymentMethods().hashCode() + ((hashCode8 + (shipping == null ? 0 : shipping.hashCode())) * 31)) * 31) + (getNextActionData() != null ? getNextActionData().hashCode() : 0);
}
@Override
public boolean isConfirmed() {
StripeIntent.Status[] statusArr = {StripeIntent.Status.Processing, StripeIntent.Status.RequiresCapture, StripeIntent.Status.Succeeded};
Intrinsics.checkNotNullParameter(statusArr, "elements");
return CollectionsKt.A(o.J(statusArr), getStatus());
}
@Override
public boolean isLiveMode() {
return this.isLiveMode;
}
public final boolean isSetupFutureUsageSet() {
StripeIntent.Usage usage = this.setupFutureUsage;
int i = usage == null ? -1 : WhenMappings.$EnumSwitchMapping$0[usage.ordinal()];
if (i == -1) {
return false;
}
if (i == 1 || i == 2) {
return true;
}
if (i == 3) {
return false;
}
throw new NoWhenBranchMatchedException();
}
@Override
public boolean requiresAction() {
return getStatus() == StripeIntent.Status.RequiresAction;
}
@Override
public boolean requiresConfirmation() {
return getStatus() == StripeIntent.Status.RequiresConfirmation;
}
@NotNull
public String toString() {
return "PaymentIntent(id=" + getId() + ", paymentMethodTypes=" + getPaymentMethodTypes() + ", amount=" + this.amount + ", canceledAt=" + this.canceledAt + ", cancellationReason=" + this.cancellationReason + ", captureMethod=" + this.captureMethod + ", clientSecret=" + getClientSecret() + ", confirmationMethod=" + this.confirmationMethod + ", created=" + getCreated() + ", currency=" + this.currency + ", description=" + getDescription() + ", isLiveMode=" + isLiveMode() + ", paymentMethod=" + getPaymentMethod() + ", paymentMethodId=" + getPaymentMethodId() + ", receiptEmail=" + this.receiptEmail + ", status=" + getStatus() + ", setupFutureUsage=" + this.setupFutureUsage + ", lastPaymentError=" + this.lastPaymentError + ", shipping=" + this.shipping + ", unactivatedPaymentMethods=" + getUnactivatedPaymentMethods() + ", nextActionData=" + getNextActionData() + ')';
}
@Override
public void writeToParcel(@NotNull Parcel parcel, int i) {
Intrinsics.checkNotNullParameter(parcel, "out");
parcel.writeString(this.id);
parcel.writeStringList(this.paymentMethodTypes);
Long l = this.amount;
if (l == null) {
parcel.writeInt(0);
} else {
parcel.writeInt(1);
parcel.writeLong(l.longValue());
}
parcel.writeLong(this.canceledAt);
CancellationReason cancellationReason = this.cancellationReason;
if (cancellationReason == null) {
parcel.writeInt(0);
} else {
parcel.writeInt(1);
parcel.writeString(cancellationReason.name());
}
parcel.writeString(this.captureMethod.name());
parcel.writeString(this.clientSecret);
parcel.writeString(this.confirmationMethod.name());
parcel.writeLong(this.created);
parcel.writeString(this.currency);
parcel.writeString(this.description);
parcel.writeInt(this.isLiveMode ? 1 : 0);
PaymentMethod paymentMethod = this.paymentMethod;
if (paymentMethod == null) {
parcel.writeInt(0);
} else {
parcel.writeInt(1);
paymentMethod.writeToParcel(parcel, i);
}
parcel.writeString(this.paymentMethodId);
parcel.writeString(this.receiptEmail);
StripeIntent.Status status = this.status;
if (status == null) {
parcel.writeInt(0);
} else {
parcel.writeInt(1);
parcel.writeString(status.name());
}
StripeIntent.Usage usage = this.setupFutureUsage;
if (usage == null) {
parcel.writeInt(0);
} else {
parcel.writeInt(1);
parcel.writeString(usage.name());
}
Error error = this.lastPaymentError;
if (error == null) {
parcel.writeInt(0);
} else {
parcel.writeInt(1);
error.writeToParcel(parcel, i);
}
Shipping shipping = this.shipping;
if (shipping == null) {
parcel.writeInt(0);
} else {
parcel.writeInt(1);
shipping.writeToParcel(parcel, i);
}
parcel.writeStringList(this.unactivatedPaymentMethods);
parcel.writeParcelable(this.nextActionData, i);
}
@Metadata
public static final class Shipping implements StripeModel {
public static final int $stable = 0;
@NotNull
public static final Parcelable.Creator<Shipping> CREATOR = new Creator();
@NotNull
private final Address address;
private final String carrier;
private final String name;
private final String phone;
private final String trackingNumber;
@Metadata
public static final class Creator implements Parcelable.Creator<Shipping> {
@Override
@NotNull
public final Shipping createFromParcel(@NotNull Parcel parcel) {
Intrinsics.checkNotNullParameter(parcel, "parcel");
return new Shipping(Address.CREATOR.createFromParcel(parcel), parcel.readString(), parcel.readString(), parcel.readString(), parcel.readString());
}
@Override
@NotNull
public final Shipping[] newArray(int i) {
return new Shipping[i];
}
}
public Shipping(@NotNull Address address, String str, String str2, String str3, String str4) {
Intrinsics.checkNotNullParameter(address, PaymentMethod.BillingDetails.PARAM_ADDRESS);
this.address = address;
this.carrier = str;
this.name = str2;
this.phone = str3;
this.trackingNumber = str4;
}
public static Shipping copy$default(Shipping shipping, Address address, String str, String str2, String str3, String str4, int i, Object obj) {
if ((i & 1) != 0) {
address = shipping.address;
}
if ((i & 2) != 0) {
str = shipping.carrier;
}
String str5 = str;
if ((i & 4) != 0) {
str2 = shipping.name;
}
String str6 = str2;
if ((i & 8) != 0) {
str3 = shipping.phone;
}
String str7 = str3;
if ((i & 16) != 0) {
str4 = shipping.trackingNumber;
}
return shipping.copy(address, str5, str6, str7, str4);
}
@NotNull
public final Address component1() {
return this.address;
}
public final String component2() {
return this.carrier;
}
public final String component3() {
return this.name;
}
public final String component4() {
return this.phone;
}
public final String component5() {
return this.trackingNumber;
}
@NotNull
public final Shipping copy(@NotNull Address address, String str, String str2, String str3, String str4) {
Intrinsics.checkNotNullParameter(address, PaymentMethod.BillingDetails.PARAM_ADDRESS);
return new Shipping(address, str, str2, str3, str4);
}
@Override
public int describeContents() {
return 0;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Shipping)) {
return false;
}
Shipping shipping = (Shipping) obj;
return Intrinsics.areEqual(this.address, shipping.address) && Intrinsics.areEqual(this.carrier, shipping.carrier) && Intrinsics.areEqual(this.name, shipping.name) && Intrinsics.areEqual(this.phone, shipping.phone) && Intrinsics.areEqual(this.trackingNumber, shipping.trackingNumber);
}
@NotNull
public final Address getAddress() {
return this.address;
}
public final String getCarrier() {
return this.carrier;
}
public final String getName() {
return this.name;
}
public final String getPhone() {
return this.phone;
}
public final String getTrackingNumber() {
return this.trackingNumber;
}
@Override
public int hashCode() {
int hashCode = this.address.hashCode() * 31;
String str = this.carrier;
int hashCode2 = (hashCode + (str == null ? 0 : str.hashCode())) * 31;
String str2 = this.name;
int hashCode3 = (hashCode2 + (str2 == null ? 0 : str2.hashCode())) * 31;
String str3 = this.phone;
int hashCode4 = (hashCode3 + (str3 == null ? 0 : str3.hashCode())) * 31;
String str4 = this.trackingNumber;
return hashCode4 + (str4 != null ? str4.hashCode() : 0);
}
@NotNull
public String toString() {
StringBuilder sb = new StringBuilder("Shipping(address=");
sb.append(this.address);
sb.append(", carrier=");
sb.append(this.carrier);
sb.append(", name=");
sb.append(this.name);
sb.append(", phone=");
sb.append(this.phone);
sb.append(", trackingNumber=");
return u0.a(sb, this.trackingNumber, ')');
}
@Override
public void writeToParcel(@NotNull Parcel parcel, int i) {
Intrinsics.checkNotNullParameter(parcel, "out");
this.address.writeToParcel(parcel, i);
parcel.writeString(this.carrier);
parcel.writeString(this.name);
parcel.writeString(this.phone);
parcel.writeString(this.trackingNumber);
}
public Shipping(Address address, String str, String str2, String str3, String str4, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(address, (i & 2) != 0 ? null : str, (i & 4) != 0 ? null : str2, (i & 8) != 0 ? null : str3, (i & 16) != 0 ? null : str4);
}
}
public PaymentIntent(String str, List list, Long l, long j, CancellationReason cancellationReason, CaptureMethod captureMethod, String str2, ConfirmationMethod confirmationMethod, long j2, String str3, String str4, boolean z, PaymentMethod paymentMethod, String str5, String str6, StripeIntent.Status status, StripeIntent.Usage usage, Error error, Shipping shipping, List list2, StripeIntent.NextActionData nextActionData, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, list, l, (i & 8) != 0 ? 0L : j, (i & 16) != 0 ? null : cancellationReason, (i & 32) != 0 ? CaptureMethod.Automatic : captureMethod, str2, (i & 128) != 0 ? ConfirmationMethod.Automatic : confirmationMethod, j2, str3, (i & 1024) != 0 ? null : str4, z, (i & 4096) != 0 ? null : paymentMethod, (i & 8192) != 0 ? null : str5, (i & 16384) != 0 ? null : str6, (32768 & i) != 0 ? null : status, (65536 & i) != 0 ? null : usage, (131072 & i) != 0 ? null : error, (262144 & i) != 0 ? null : shipping, list2, (i & 1048576) != 0 ? null : nextActionData);
}
}