com.github.GBSEcom.simple.Timestamp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of first-data-gateway Show documentation
Show all versions of first-data-gateway Show documentation
Java SDK to be used with a First Data Gateway account. This SDK has been created and packaged to offer the easiest way to integrate your application into the First Data Gateway. This SDK gives you the ability to run transactions such as sales, preauthorizations, postauthorizations, credits, voids, and returns; transaction inquiries; setting up scheduled payments and much more.
package com.github.GBSEcom.simple;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import lombok.AllArgsConstructor;
@AllArgsConstructor
public class Timestamp {
public static final Long SECS_TO_MILLIS = 1000L;
public static Timestamp now(ZoneId zoneId) {
return new Timestamp(ZonedDateTime.now(zoneId));
}
public static Timestamp now() {
return Timestamp.now(ZoneId.of("GMT"));
}
private final ZonedDateTime dateTime;
public Long toMilliseconds() {
return dateTime.toEpochSecond() * Timestamp.SECS_TO_MILLIS;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy