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

com.yoti.api.client.shareurl.extension.ThirdPartyAttributeContent Maven / Gradle / Ivy

The newest version!
package com.yoti.api.client.shareurl.extension;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.yoti.api.client.AttributeDefinition;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.TimeZone;

public class ThirdPartyAttributeContent {

    private final Date expiryDate;

    @JsonProperty("definitions")
    private final List definitions;

    public ThirdPartyAttributeContent(Date expiryDate, List definitions) {
        this.expiryDate = expiryDate;
        this.definitions = definitions;
    }

    @JsonProperty("expiry_date")
    public String getExpiryDate() {
        SimpleDateFormat rfcDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
        rfcDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
        return rfcDateFormat.format(expiryDate.getTime());
    }

    public List getDefinitions() {
        return definitions;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy