41 lines
2.2 KiB
Java
41 lines
2.2 KiB
Java
package com.discord.stores;
|
|
|
|
import com.discord.restapi.RestAPIParams;
|
|
import com.discord.stores.StoreGooglePlayPurchases;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function0;
|
|
import rx.subjects.PublishSubject;
|
|
/* compiled from: StoreGooglePlayPurchases.kt */
|
|
public final class StoreGooglePlayPurchases$onVerificationSuccess$1 extends o implements Function0<Unit> {
|
|
public final /* synthetic */ StoreGooglePlayPurchases.VerificationResult $verificationResult;
|
|
public final /* synthetic */ StoreGooglePlayPurchases this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public StoreGooglePlayPurchases$onVerificationSuccess$1(StoreGooglePlayPurchases storeGooglePlayPurchases, StoreGooglePlayPurchases.VerificationResult verificationResult) {
|
|
super(0);
|
|
this.this$0 = storeGooglePlayPurchases;
|
|
this.$verificationResult = verificationResult;
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function0
|
|
/* renamed from: invoke */
|
|
public final void mo1invoke() {
|
|
PublishSubject access$getEventSubject$p = StoreGooglePlayPurchases.access$getEventSubject$p(this.this$0);
|
|
String b = this.$verificationResult.getPurchase().b();
|
|
m.checkNotNullExpressionValue(b, "verificationResult.purchase.sku");
|
|
RestAPIParams.VerifyPurchaseResponse apiResponse = this.$verificationResult.getApiResponse();
|
|
String str = null;
|
|
Long valueOf = apiResponse != null ? Long.valueOf(apiResponse.getVerifiedSkuId()) : null;
|
|
RestAPIParams.VerifyPurchaseResponse apiResponse2 = this.$verificationResult.getApiResponse();
|
|
Long subscriptionPlanId = apiResponse2 != null ? apiResponse2.getSubscriptionPlanId() : null;
|
|
RestAPIParams.VerifyPurchaseResponse apiResponse3 = this.$verificationResult.getApiResponse();
|
|
if (apiResponse3 != null) {
|
|
str = apiResponse3.getGiftCode();
|
|
}
|
|
access$getEventSubject$p.j.onNext(new StoreGooglePlayPurchases.Event.PurchaseQuerySuccess(b, valueOf, subscriptionPlanId, str));
|
|
StoreGooglePlayPurchases.access$setQueryState$p(this.this$0, StoreGooglePlayPurchases.QueryState.NotInProgress.INSTANCE);
|
|
this.this$0.markChanged();
|
|
}
|
|
}
|