Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]Fix getter setter is double-defined. #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions src/main/java/com/mailchimp/domain/CampaignDefaults.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,35 +48,4 @@ public class CampaignDefaults {
@Setter
private String language;

public String getFromName() {
return fromName;
}

public void setFromName(String fromName) {
this.fromName = fromName;
}

public String getFromEmail() {
return fromEmail;
}

public void setFromEmail(String fromEmail) {
this.fromEmail = fromEmail;
}

public String getSubject() {
return subject;
}

public void setSubject(String subject) {
this.subject = subject;
}

public String getLanguage() {
return language;
}

public void setLanguage(String language) {
this.language = language;
}
}
13 changes: 2 additions & 11 deletions src/main/java/com/mailchimp/domain/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,11 @@ public static class SubscriberStats {
private SubscribeStatus status;

@JsonProperty("merge_fields")
@Builder.Default
@Getter
@Setter
private Map<String, String> mergeFields = new HashMap<>();

// @JsonProperty
// @Getter
// @Setter
// private Map<String, Boolean> interests = new HashMap<>();
//@JsonProperty
//@Getter
//@JsonIgnore
//private SubscriberStats stats = new SubscriberStats();
// @JsonProperty("ip_signup")
// @Getter
// private String ipSignup;
@JsonProperty("timestamp_signup")
@JsonDeserialize(using = MailChimpZonedDateTimeDeserializer.class)
@JsonSerialize(using = MailChimpZonedDateTimeSerializer.class)
Expand Down Expand Up @@ -157,6 +147,7 @@ public static class SubscriberStats {
private String listId;

@JsonProperty("interests")
@Builder.Default
private Map<String,Boolean> interests = new HashMap<>();

@JsonIgnore
Expand Down
219 changes: 11 additions & 208 deletions src/main/java/com/mailchimp/domain/SubscriberList.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,80 +84,18 @@ public static class Contact {
@Getter
@Setter
private String phone;

public String getCompany() {
return company;
}

public void setCompany(String company) {
this.company = company;
}

public String getAddress1() {
return address1;
}

public void setAddress1(String address1) {
this.address1 = address1;
}

public String getAddress2() {
return address2;
}

public void setAddress2(String address2) {
this.address2 = address2;
}

public String getCity() {
return city;
}

public void setCity(String city) {
this.city = city;
}

public String getState() {
return state;
}

public void setState(String state) {
this.state = state;
}

public String getZip() {
return zip;
}

public void setZip(String zip) {
this.zip = zip;
}

public String getCountry() {
return country;
}

public void setCountry(String country) {
this.country = country;
}

public String getPhone() {
return phone;
}

public void setPhone(String phone) {
this.phone = phone;
}
}

/**
* A string that uniquely identifies this list.
*/
@Getter
@Setter
private String id;

@JsonProperty("total_items")
@Getter
@Setter
private Integer totalItems;

/**
Expand All @@ -172,6 +110,7 @@ public void setPhone(String phone) {
*/
@JsonProperty("contact")
@Getter
@Setter
private Contact contact = new Contact();

/**
Expand All @@ -195,6 +134,7 @@ public void setPhone(String phone) {
*/
@JsonProperty("campaign_defaults")
@Getter
@Setter
private CampaignDefaults campaignDefaults = new CampaignDefaults();

/**
Expand All @@ -218,6 +158,7 @@ public void setPhone(String phone) {
*/
@JsonProperty("date_created")
@Getter
@Setter
@JsonDeserialize(using = MailChimpZonedDateTimeDeserializer.class)
private ZonedDateTime dateCreated;

Expand All @@ -226,6 +167,7 @@ public void setPhone(String phone) {
*/
@JsonProperty("list_rating")
@Getter
@Setter
private Integer listRating;

/**
Expand All @@ -243,20 +185,23 @@ public void setPhone(String phone) {
*/
@JsonProperty("subscribe_url_short")
@Getter
@Setter
private String subscribeUrlShort;

/**
* The full version of this list’s subscribe form (host will vary).
*/
@JsonProperty("subscribe_url_long")
@Getter
@Setter
private String subscribeUrlLong;

/**
* The list’s <a href="http://kb.mailchimp.com/campaigns/ways-to-build/use-email-beamer-to-create-a-campaign?utm_source=mc-api&amp;utm_medium=docs&amp;utm_campaign=apidocs">Email Beamer</a> address.
*/
@JsonProperty("beamer_address")
@Getter
@Setter
private String beamerAddress;

/**
Expand All @@ -270,155 +215,13 @@ public void setPhone(String phone) {
* Any list-specific modules installed for this list.
*/
@Getter
@Setter
private java.util.List<String> modules;

/**
* Stats for the list. Many of these are cached for at least five minutes.
*/
@Getter
@Setter
private ListStats stats;

public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

public Integer getTotalItems() {
return totalItems;
}

public void setTotalItems(Integer totalItems) {
this.totalItems = totalItems;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public Contact getContact() {
return contact;
}

public void setContact(Contact contact) {
this.contact = contact;
}

public String getPermissionReminder() {
return permissionReminder;
}

public void setPermissionReminder(String permissionReminder) {
this.permissionReminder = permissionReminder;
}

public Boolean getUseArchiveBar() {
return useArchiveBar;
}

public void setUseArchiveBar(Boolean useArchiveBar) {
this.useArchiveBar = useArchiveBar;
}

public CampaignDefaults getCampaignDefaults() {
return campaignDefaults;
}

public void setCampaignDefaults(CampaignDefaults campaignDefaults) {
this.campaignDefaults = campaignDefaults;
}

public String getNotifyOnSubscribe() {
return notifyOnSubscribe;
}

public void setNotifyOnSubscribe(String notifyOnSubscribe) {
this.notifyOnSubscribe = notifyOnSubscribe;
}

public String getNotifyOnUnsubscribe() {
return notifyOnUnsubscribe;
}

public void setNotifyOnUnsubscribe(String notifyOnUnsubscribe) {
this.notifyOnUnsubscribe = notifyOnUnsubscribe;
}

public ZonedDateTime getDateCreated() {
return dateCreated;
}

public void setDateCreated(ZonedDateTime dateCreated) {
this.dateCreated = dateCreated;
}

public Integer getListRating() {
return listRating;
}

public void setListRating(Integer listRating) {
this.listRating = listRating;
}

public Boolean getEmailTypeOption() {
return emailTypeOption;
}

public void setEmailTypeOption(Boolean emailTypeOption) {
this.emailTypeOption = emailTypeOption;
}

public String getSubscribeUrlShort() {
return subscribeUrlShort;
}

public void setSubscribeUrlShort(String subscribeUrlShort) {
this.subscribeUrlShort = subscribeUrlShort;
}

public String getSubscribeUrlLong() {
return subscribeUrlLong;
}

public void setSubscribeUrlLong(String subscribeUrlLong) {
this.subscribeUrlLong = subscribeUrlLong;
}

public String getBeamerAddress() {
return beamerAddress;
}

public void setBeamerAddress(String beamerAddress) {
this.beamerAddress = beamerAddress;
}

public Visibility getVisibility() {
return visibility;
}

public void setVisibility(Visibility visibility) {
this.visibility = visibility;
}

public java.util.List<String> getModules() {
return modules;
}

public void setModules(java.util.List<String> modules) {
this.modules = modules;
}

public ListStats getStats() {
return stats;
}

public void setStats(ListStats stats) {
this.stats = stats;
}
}