com.truelayer.java.payments.entities.paymentdetail.SettledPaymentDetail Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truelayer-java Show documentation
Show all versions of truelayer-java Show documentation
TrueLayer Java SDK for https://truelayer.com
package com.truelayer.java.payments.entities.paymentdetail;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonValue;
import com.truelayer.java.entities.AuthorizationFlowWithConfiguration;
import com.truelayer.java.entities.PaymentSource;
import java.time.ZonedDateTime;
import java.util.Optional;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Value;
@Value
@EqualsAndHashCode(callSuper = false)
public class SettledPaymentDetail extends PaymentDetail {
Status status = Status.SETTLED;
PaymentSource paymentSource;
ZonedDateTime succeededAt;
ZonedDateTime settledAt;
ZonedDateTime executedAt;
AuthorizationFlowWithConfiguration authorizationFlow;
SettlementRisk settlementRisk;
@JsonGetter
public Optional getAuthorizationFlow() {
return Optional.ofNullable(authorizationFlow);
}
@JsonGetter
public Optional getSettlementRisk() {
return Optional.ofNullable(settlementRisk);
}
@Value
@EqualsAndHashCode
public static class SettlementRisk {
Category category;
@RequiredArgsConstructor
@Getter
public enum Category {
LOW_RISK("low_risk"),
HIGH_RISK("high_risk");
@JsonValue
private final String category;
}
}
}