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

io.sphere.sdk.payments.commands.updateactions.ChangeTransactionTimestamp Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.payments.commands.updateactions;

import io.sphere.sdk.commands.UpdateActionImpl;
import io.sphere.sdk.payments.Payment;

import java.time.ZonedDateTime;

/**
 *Changes timestamp of a transaction. If this transaction represents an action at the PSP, the time returned by the PSP should be used.
 *
 * {@include.example io.sphere.sdk.payments.commands.PaymentUpdateCommandTest#changeTransactionTimestamp()}
 *
 */
public class ChangeTransactionTimestamp extends UpdateActionImpl {
    private final ZonedDateTime timestamp;
    private final String transactionId;

    private ChangeTransactionTimestamp(final ZonedDateTime timestamp, final String transactionId) {
        super("changeTransactionTimestamp");
        this.timestamp = timestamp;
        this.transactionId = transactionId;
    }

    public static ChangeTransactionTimestamp of(final ZonedDateTime timestamp, final String transactionId) {
        return new ChangeTransactionTimestamp(timestamp, transactionId);
    }

    public ZonedDateTime getTimestamp() {
        return timestamp;
    }

    public String getTransactionId() {
        return transactionId;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy