
com.securionpay.response.Customer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of securionpay-java Show documentation
Show all versions of securionpay-java Show documentation
Java client library for SecurionPay API
The newest version!
package com.securionpay.response;
import static com.securionpay.util.SecurionPayUtils.toStringNullSafe;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
public class Customer {
private String id;
private Long created;
private boolean deleted = false;
private String email;
private String description;
private String defaultCardId;
private List cards;
private Map metadata;
@JsonIgnore
private final Map other = new HashMap<>();
public String getId() {
return id;
}
public Long getCreated() {
return created;
}
public boolean isDeleted() {
return deleted;
}
public String getEmail() {
return email;
}
public String getDescription() {
return description;
}
public String getDefaultCardId() {
return defaultCardId;
}
public Card getDefaultCard() {
if (getCards() == null) {
return null;
}
for (Card card : getCards()) {
if (card.getId().equals(getDefaultCardId())) {
return card;
}
}
return null;
}
public List getCards() {
return cards;
}
public Map getMetadata() {
return metadata;
}
public String get(String name) {
return toStringNullSafe(other.get(name));
}
@JsonAnySetter
private void set(String name, Object value) {
other.put(name, value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy