All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.vfdtech.models.cba.mifos.MifosPaymentRequest Maven / Gradle / Ivy

Go to download

A utilities service with generic tools implementation. Can be plugged into your java project

There is a newer version: 0.3.5
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy