what-the-bank/sources/o/C16138lbJ.java

200 lines
7.1 KiB
Java

package o;
import com.scb.phone.data.entity.transfer.SingleDataEntity;
import com.scb.phone.data.network.service.MerchantService;
import java.util.ArrayList;
import java.util.List;
import o.PRA;
import org.threeten.bp.OffsetDateTime;
/* renamed from: o.lbJ, reason: case insensitive filesystem */
/* loaded from: classes3.dex */
public final class C16138lbJ implements lAx {
private final FUU a;
final DSH c;
final C16654pye d;
private final MerchantService e;
@InterfaceC13391fZD
public C16138lbJ(MerchantService merchantService, FUU fuu, C16654pye c16654pye, DSH dsh) {
this.e = merchantService;
this.a = fuu;
this.d = c16654pye;
this.c = dsh;
}
@Override // o.lAx
public final AbstractC13163fSk<List<PuL>> b() {
return a(2, null, null);
}
@Override // o.lAx
public final AbstractC13163fSk<PuL> c(C5280bq c5280bq) {
return this.e.inquiryMerchantTransactions(new C5439bt(c5280bq)).flatMap(new fSS(this) { // from class: o.YuG
private C16138lbJ a;
@Override // o.fSS
public final Object a(Object obj) {
PuL puL;
C16138lbJ c16138lbJ = this.a;
List<PuL> a = c16138lbJ.d.a(c16138lbJ.c(), ((Rbp) ((SingleDataEntity) obj).getData()).a);
if (!a.isEmpty()) {
puL = a.get(0);
} else {
puL = new PuL();
}
return AbstractC13163fSk.just(puL);
}
{
this.a = this;
}
});
}
@Override // o.lAx
public final AbstractC13163fSk<Bnu> a(C5280bq c5280bq) {
return this.e.inquiryMerchantSweepTransactions(new C5439bt(c5280bq)).flatMap(new fSS(this) { // from class: o.yyQ
private C16138lbJ e;
@Override // o.fSS
public final Object a(Object obj) {
Bnu bnu;
C16138lbJ c16138lbJ = this.e;
C16654pye c16654pye = c16138lbJ.d;
List<Wqa> c = c16138lbJ.c();
List<Model> list = ((fDH) ((SingleDataEntity) obj).getData()).a;
if (list != 0 && (!list.isEmpty()) && c != null && (!c.isEmpty())) {
Wqa wqa = c.get(0);
C12985fNR c12985fNR = (C12985fNR) list.get(0);
C14957gcv.e(wqa, "");
bnu = new Bnu();
bnu.h = c12985fNR != null ? c12985fNR.c : 0;
bnu.f = wqa.j;
bnu.c = wqa.e;
JZY jzy = wqa.b;
bnu.j = jzy != null ? jzy.d : null;
bnu.b = wqa.a;
bnu.d = c12985fNR != null ? c12985fNR.e : null;
bnu.e = c12985fNR != null ? c12985fNR.d : null;
AhB ahB = c12985fNR != null ? c12985fNR.a : null;
LTg lTg = new LTg();
lTg.e = ahB != null ? ahB.d : 0;
lTg.d = C16654pye.b(ahB != null ? ahB.b : null, new InterfaceC1244Ytw(c16654pye) { // from class: o.hAF
private C16654pye c;
@Override // o.InterfaceC1244Ytw
public final Object d(Object obj2) {
C16868ruv c16868ruv = (C16868ruv) obj2;
Nti nti = new Nti();
nti.c = c16868ruv != null ? c16868ruv.d : null;
nti.a = (OffsetDateTime) ZTC.e(new Object[]{c16868ruv != null ? c16868ruv.e : null, null}, 267499366, -267499366, (int) System.currentTimeMillis());
Double c2 = C16654pye.c(c16868ruv != null ? c16868ruv.c : null);
C14957gcv.c(c2, "");
nti.b = c2.doubleValue();
nti.e = c16868ruv != null ? c16868ruv.a : null;
return nti;
}
{
this.c = c16654pye;
}
});
bnu.i = lTg;
bnu.a = true;
} else {
bnu = new Bnu();
}
return AbstractC13163fSk.just(bnu);
}
{
this.e = this;
}
});
}
/* JADX INFO: Access modifiers changed from: package-private */
public final List<Wqa> c() {
FUU fuu = this.a;
C7968cyO c7968cyO = (C7968cyO) FUU.d(new Object[]{fuu}, 1479505950, -1479505941, System.identityHashCode(fuu));
if (c7968cyO == null || c7968cyO.i == null) {
return new ArrayList();
}
return c7968cyO.i;
}
@Override // o.lAx
public final List<PuL> a() {
if (this.c.a != null) {
return this.d.a(c(), this.c.a);
}
return null;
}
@Override // o.lAx
public final AbstractC13163fSk<List<PuL>> a(final int i, final String str, final String str2) {
YKU yku = new YKU(c());
C5439bt c5439bt = new C5439bt((List<C5280bq>) new YKU(yku.a, new wxK(yku.b, new InterfaceC1244Ytw(i, str, str2) { // from class: o.cgQ
private int a;
private String b;
private String d;
@Override // o.InterfaceC1244Ytw
public final Object d(Object obj) {
int i2 = this.a;
String str3 = this.d;
String str4 = this.b;
Wqa wqa = (Wqa) obj;
C5280bq c5280bq = new C5280bq();
if (wqa != null) {
String str5 = wqa.j;
if (str5 == null) {
str5 = "";
}
C14957gcv.e(str5, "");
c5280bq.b = str5;
}
c5280bq.c = 1;
c5280bq.a = Integer.valueOf(i2);
c5280bq.d = str3;
c5280bq.e = str4;
return c5280bq;
}
{
this.a = i;
this.d = str;
this.b = str2;
}
})).a(new PRA.Sts(new PRA.AnonymousClass4(), new PRA.AnonymousClass8())));
if (c5439bt.a != null && c5439bt.a.isEmpty()) {
return AbstractC13163fSk.just(new ArrayList());
}
return this.e.inquiryMerchantTransactions(c5439bt).doOnNext(new fSQ(this) { // from class: o.FcT
private C16138lbJ b;
@Override // o.fSQ
public final void c(Object obj) {
this.b.c.a = ((Rbp) ((SingleDataEntity) obj).getData()).a;
}
{
this.b = this;
}
}).flatMap(new fSS(this) { // from class: o.pac
private C16138lbJ b;
@Override // o.fSS
public final Object a(Object obj) {
C16138lbJ c16138lbJ = this.b;
return AbstractC13163fSk.just(c16138lbJ.d.a(c16138lbJ.c(), ((Rbp) ((SingleDataEntity) obj).getData()).a));
}
{
this.b = this;
}
});
}
}