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

com.github.GBSEcom.simple.Timestamp Maven / Gradle / Ivy

Go to download

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.

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