com.truelayer.java.merchantaccounts.entities.transactions.Payout Maven / Gradle / Ivy
package com.truelayer.java.merchantaccounts.entities.transactions;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonValue;
import com.truelayer.java.entities.CurrencyCode;
import com.truelayer.java.entities.beneficiary.Beneficiary;
import java.time.ZonedDateTime;
import java.util.Map;
import java.util.Optional;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Value;
/**
* DTO class that represents both pending
and executed
payouts.
* We're not defining explicit variants in this case based on the status
field because
* it seems that the library used for deserialization is not capable of handling more than one deserialization hints,
* which would be required in this case to first select a DTO based on the type
and then on the
* status
fields.
*/
@Value
@EqualsAndHashCode(callSuper = false)
public class Payout extends Transaction {
Transaction.Type type = Transaction.Type.PAYOUT;
String id;
CurrencyCode currency;
int amountInMinor;
/**
* Represents the status of the payout.
* Either pending
or executed
.
*/
Transaction.Status status;
ZonedDateTime createdAt;
ZonedDateTime executedAt;
Beneficiary beneficiary;
Payout.ContextCode contextCode;
String payoutId;
Map metadata;
@JsonGetter
public Optional
© 2015 - 2025 Weber Informatics LLC | Privacy Policy