package com.robinpowered.sdk.model;

import org.joda.time.DateTime;

/**
 * Represents the check-in/confirmation of an {@link Event}.
 */
public class Confirmation {

    public static final String MIME_TYPE = "vnd.robinpowered.confirmation.v1";

    private String eventId;
    private Integer user_id;
    private Integer device_id;
    private DateTime confirmedAt;

    public Confirmation(String eventId, Integer user_id, Integer device_id, DateTime confirmedAt) {
        this.eventId = eventId;
        this.user_id = user_id;
        this.device_id = device_id;
        this.confirmedAt = confirmedAt;
    }

    public String getEventId() {
        return eventId;
    }

    public Integer getUser_id() {
        return user_id;
    }

    public Integer getDevice_id() {
        return device_id;
    }

    public DateTime getConfirmedAt() {
        return confirmedAt;
    }
}

package com.robinpowered.sdk.model;

import com.google.common.base.Objects;
import org.joda.time.DateTime;

/**
 * Represents the check-in/confirmation of an {@link Event}.
 */
public class Confirmation {

    public static final String MIME_TYPE = "vnd.robinpowered.confirmation.v1";

    private final String eventId;
    private final Integer userId;
    private final Integer deviceId;
    private final DateTime confirmedAt;

    public Confirmation(String eventId, Integer userId, Integer deviceId, DateTime confirmedAt) {
        this.eventId = eventId;
        this.userId = userId;
        this.deviceId = deviceId;
        this.confirmedAt = confirmedAt;
    }

    public String getEventId() {
        return eventId;
    }

    public Integer getUserId() {
        return userId;
    }

    public Integer getDeviceId() {
        return deviceId;
    }

    public DateTime getConfirmedAt() {
        return confirmedAt;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Confirmation that = (Confirmation) o;
        return Objects.equal(eventId, that.eventId) &&
                Objects.equal(userId, that.userId) &&
                Objects.equal(deviceId, that.deviceId) &&
                Objects.equal(confirmedAt, that.confirmedAt);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(eventId, userId, deviceId, confirmedAt);
    }
}

Test fixes for Confirmation model.