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

com.securionpay.request.EventListRequest Maven / Gradle / Ivy

The newest version!
package com.securionpay.request;

import java.util.HashMap;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.securionpay.response.Event;

@JsonInclude(Include.NON_NULL)
public class EventListRequest {

	private Integer limit;
	private String startingAfterId;
	private String endingBeforeId;
	private Boolean includeTotalCount;

	private CreatedFilter created;

	@JsonIgnore
	private final Map other = new HashMap<>();

	public Integer getLimit() {
		return limit;
	}

	public String getStartingAfterId() {
		return startingAfterId;
	}

	public String getEndingBeforeId() {
		return endingBeforeId;
	}

	public Boolean getIncludeTotalCount() {
		return includeTotalCount;
	}

	public CreatedFilter getCreated() {
		return created;
	}

	public EventListRequest limit(Integer limit) {
		this.limit = limit;
		return this;
	}

	public EventListRequest startingAfterId(String startingAfterId) {
		this.startingAfterId = startingAfterId;
		return this;
	}

	public EventListRequest startingAfter(Event event) {
		return startingAfterId(event.getId());
	}

	public EventListRequest endingBeforeId(String endingBeforeId) {
		this.endingBeforeId = endingBeforeId;
		return this;
	}

	public EventListRequest endingBefore(Event event) {
		return endingBeforeId(event.getId());
	}

	public EventListRequest includeTotalCount(Boolean includeTotalCount) {
		this.includeTotalCount = includeTotalCount;
		return this;
	}

	public EventListRequest includeTotalCount() {
		return includeTotalCount(true);
	}

	public EventListRequest created(CreatedFilter created) {
		this.created = created;
		return this;
	}

	@JsonAnyGetter
	private Map getOtherMap() {
		return other;
	}

	@JsonAnySetter
	public EventListRequest set(String name, Object value) {
		other.put(name, value);
		return this;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy