org.vfdtech.models.cba.mifos.MifosPaymentRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utilities-and-generic-tools Show documentation
Show all versions of utilities-and-generic-tools Show documentation
A utilities service with generic tools implementation. Can be
plugged into your java project
package org.vfdtech.models.cba.mifos;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.vfdtech.implementations.CoreBankingOperations;
import org.vfdtech.models.Jsonable;
import java.time.LocalDate;
import java.util.Objects;
@EqualsAndHashCode(callSuper = true)
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class MifosPaymentRequest extends Jsonable implements IPaymentRequest {
@Builder.Default
private String locale = "en";
@Builder.Default
private String dateFormat = "dd MMMM yyyy";
private String transactionDate;
private String transactionAmount;
private String paymentTypeId;
private String remarks;
private String transactionBrandName;
private String category;
private String receiptNumber;
private String note;
private String routingCode;
private String accountId;
private String toAccountId;
private String fromAccountId;
@JsonIgnore
public String getAccountId(){
return this.accountId;
}
@Override
@JsonIgnore
public String getReference() {
return this.receiptNumber;
}
@SuppressWarnings("unused")
public String getTransactionDate(){
if(Objects.isNull(this.transactionDate)){
return CoreBankingOperations.getMifosDate(LocalDate.now());
}
return this.transactionDate;
}
}