// Path: allegro-nice-domain/src/main/java/com/apwglobal/nice/util/UnixDate.java
// public class UnixDate {
// 
//     public static Date toDate(long unixTimestamp) {
//         return new Date(unixTimestamp * 1000);
//     }
// 
//     public static long toUnixTimestamp(Date date) {
//         return date.getTime() / 1000;
//     }
// 
// }


import com.apwglobal.bd.BD;
import com.apwglobal.nice.util.UnixDate;
import java.util.Date;
import java.util.Optional;

        public Builder() {
        }

        public Builder transactionId(long transactionId) {
            this.transactionId = transactionId;
            return this;
        }

        public Builder buyerId(long buyerId) {
            this.buyerId = buyerId;
            return this;
        }

        public Builder sellerId(long sellerId) {
            this.sellerId = sellerId;
            return this;
        }

        public Builder status(String status) {
            this.status = IncomingPaymentStatus.VALUES.get(status);
            return this;
        }

        public Builder amount(double amount) {
            this.amount = new BD(amount).doubleValue(2);
            return this;
        }

        public Builder receiveDate(long receiveDate) {
// Path: allegro-nice-domain/src/main/java/com/apwglobal/nice/util/UnixDate.java
// public class UnixDate {
// 
//     public static Date toDate(long unixTimestamp) {
//         return new Date(unixTimestamp * 1000);
//     }
// 
//     public static long toUnixTimestamp(Date date) {
//         return date.getTime() / 1000;
//     }
// 
// }


// Path: allegro-nice-domain/src/main/java/com/apwglobal/nice/domain/IncomingPayment.java
import com.apwglobal.bd.BD;
import com.apwglobal.nice.util.UnixDate;
import java.util.Date;
import java.util.Optional;


        public Builder() {
        }

        public Builder transactionId(long transactionId) {
            this.transactionId = transactionId;
            return this;
        }

        public Builder buyerId(long buyerId) {
            this.buyerId = buyerId;
            return this;
        }

        public Builder sellerId(long sellerId) {
            this.sellerId = sellerId;
            return this;
        }

        public Builder status(String status) {
            this.status = IncomingPaymentStatus.VALUES.get(status);
            return this;
        }

        public Builder amount(double amount) {
            this.amount = new BD(amount).doubleValue(2);
            return this;
        }

        public Builder receiveDate(long receiveDate) {
            this.receiveDate = UnixDate.toDate(receiveDate);