From eebbc8942378144c3305aa54b47d49695490a24d Mon Sep 17 00:00:00 2001 From: lzpup Date: Mon, 16 Nov 2020 16:22:30 -0800 Subject: [PATCH 1/2] AddingProspectAccount --- .../com/darksci/pardot/api/PardotClient.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/java/com/darksci/pardot/api/PardotClient.java b/src/main/java/com/darksci/pardot/api/PardotClient.java index 59050cc..34effec 100644 --- a/src/main/java/com/darksci/pardot/api/PardotClient.java +++ b/src/main/java/com/darksci/pardot/api/PardotClient.java @@ -51,6 +51,7 @@ import com.darksci.pardot.api.parser.opportunity.OpportunityReadResponseParser; import com.darksci.pardot.api.parser.prospect.ProspectQueryResponseParser; import com.darksci.pardot.api.parser.prospect.ProspectReadResponseParser; +import com.darksci.pardot.api.parser.prospectaccount.ProspectAccountQueryResponseParser; import com.darksci.pardot.api.parser.tag.TagQueryResponseParser; import com.darksci.pardot.api.parser.tag.TagReadResponseParser; import com.darksci.pardot.api.parser.tagobject.TagObjectQueryResponseParser; @@ -117,6 +118,7 @@ import com.darksci.pardot.api.request.prospect.ProspectUnassignRequest; import com.darksci.pardot.api.request.prospect.ProspectUpdateRequest; import com.darksci.pardot.api.request.prospect.ProspectUpsertRequest; +import com.darksci.pardot.api.request.prospectaccount.ProspectAccountQueryRequest; import com.darksci.pardot.api.request.tag.TagQueryRequest; import com.darksci.pardot.api.request.tag.TagReadRequest; import com.darksci.pardot.api.request.tagobject.TagObjectQueryRequest; @@ -163,6 +165,7 @@ import com.darksci.pardot.api.response.opportunity.OpportunityQueryResponse; import com.darksci.pardot.api.response.prospect.Prospect; import com.darksci.pardot.api.response.prospect.ProspectQueryResponse; +import com.darksci.pardot.api.response.prospectaccount.ProspectAccountQueryResponse; import com.darksci.pardot.api.response.tag.Tag; import com.darksci.pardot.api.response.tag.TagQueryResponse; import com.darksci.pardot.api.response.tagobject.TagObject; @@ -1095,6 +1098,18 @@ public VisitorActivityQueryResponse.Result visitorActivityQuery(final VisitorAct .orElseThrowInvalidRequestException(); } + + /** + * Make API request to query prospectAccounts. + * @param request Request definition. + * @return Parsed api response. + */ + public ProspectAccountQueryResponse.Result prospectAccountQuery(final ProspectAccountQueryRequest request) { + return submitRequest (request, new ProspectAccountQueryResponseParser()) + .orElseThrowInvalidRequestException(); + } + + /** * Make API request to read a visitor activity. * @param request Request definition. @@ -1146,4 +1161,6 @@ private Optional optionalUnlessErrorCode(final Result result, final Er }) ); } + + } \ No newline at end of file From 4b7c170e66e21e126c21708cb970ed7afd60df27 Mon Sep 17 00:00:00 2001 From: lzpup Date: Mon, 16 Nov 2020 16:49:16 -0800 Subject: [PATCH 2/2] commiting all clases updates for ProspectAccount --- .classpath | 38 ++++ .project | 23 +++ .settings/org.eclipse.core.resources.prefs | 6 + .settings/org.eclipse.jdt.core.prefs | 8 + ...rospectAccountCustomFieldDeserializer.java | 58 ++++++ .../ProspectAccountQueryResponseParser.java | 19 ++ .../ProspectAccountReadResponseParser.java | 28 +++ .../ProspectAccountQueryRequest.java | 109 ++++++++++++ .../ProspectAccountCustomFieldValue.java | 100 +++++++++++ .../prospectaccount/ProspectAccount.java | 165 ++++++++++++++++++ .../ProspectAccountQueryResponse.java | 56 ++++++ .../ProspectAccountReadResponse.java | 22 +++ 12 files changed, 632 insertions(+) create mode 100644 .classpath create mode 100644 .project create mode 100644 .settings/org.eclipse.core.resources.prefs create mode 100644 .settings/org.eclipse.jdt.core.prefs create mode 100644 src/main/java/com/darksci/pardot/api/parser/prospectaccount/ProspectAccountCustomFieldDeserializer.java create mode 100644 src/main/java/com/darksci/pardot/api/parser/prospectaccount/ProspectAccountQueryResponseParser.java create mode 100644 src/main/java/com/darksci/pardot/api/parser/prospectaccount/ProspectAccountReadResponseParser.java create mode 100644 src/main/java/com/darksci/pardot/api/request/prospectaccount/ProspectAccountQueryRequest.java create mode 100644 src/main/java/com/darksci/pardot/api/response/customfield/ProspectAccountCustomFieldValue.java create mode 100644 src/main/java/com/darksci/pardot/api/response/prospectaccount/ProspectAccount.java create mode 100644 src/main/java/com/darksci/pardot/api/response/prospectaccount/ProspectAccountQueryResponse.java create mode 100644 src/main/java/com/darksci/pardot/api/response/prospectaccount/ProspectAccountReadResponse.java diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..002ad57 --- /dev/null +++ b/.classpath @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..f680a68 --- /dev/null +++ b/.project @@ -0,0 +1,23 @@ + + + pardot-java-client + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..29abf99 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,6 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding//src/test/resources=UTF-8 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..2f5cc74 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/src/main/java/com/darksci/pardot/api/parser/prospectaccount/ProspectAccountCustomFieldDeserializer.java b/src/main/java/com/darksci/pardot/api/parser/prospectaccount/ProspectAccountCustomFieldDeserializer.java new file mode 100644 index 0000000..f1e9c41 --- /dev/null +++ b/src/main/java/com/darksci/pardot/api/parser/prospectaccount/ProspectAccountCustomFieldDeserializer.java @@ -0,0 +1,58 @@ +package com.darksci.pardot.api.parser.prospectaccount; + +import com.darksci.pardot.api.response.customfield.ProspectAccountCustomFieldValue; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** +* Custom deserializer to be able to support Record Multiple custom fields. +*/ +public class ProspectAccountCustomFieldDeserializer extends StdDeserializer { + + /** + * Constructor. + */ + public ProspectAccountCustomFieldDeserializer() { + this(null); + } + + /** + * Constructor. + * @param vc the type of the class this handles. + */ + public ProspectAccountCustomFieldDeserializer(final Class vc) { + super(vc); + } + + @Override + public ProspectAccountCustomFieldValue deserialize(final JsonParser parser, final DeserializationContext context) throws IOException { + // Get the current custom field name. + final String fieldName = parser.getCurrentName(); + + // Keep track of all the values associated with the field. + final List fieldValues = new ArrayList<>(); + + // If we have multiple values + if (parser.getCurrentToken() == JsonToken.START_OBJECT) { + // Loop until we hit end object + while (parser.nextToken() != JsonToken.END_OBJECT) { + // Pull out each value + if (parser.getCurrentToken() == JsonToken.VALUE_STRING) { + fieldValues.add(parser.getValueAsString()); + } + } + } else if (parser.getCurrentToken() == JsonToken.VALUE_STRING) { + // If we have a single value, we just record the value as is. + fieldValues.add(parser.getValueAsString()); + } + + // Return our deserialized instance. + return new ProspectAccountCustomFieldValue(fieldName, fieldValues); + } +} \ No newline at end of file diff --git a/src/main/java/com/darksci/pardot/api/parser/prospectaccount/ProspectAccountQueryResponseParser.java b/src/main/java/com/darksci/pardot/api/parser/prospectaccount/ProspectAccountQueryResponseParser.java new file mode 100644 index 0000000..5163f30 --- /dev/null +++ b/src/main/java/com/darksci/pardot/api/parser/prospectaccount/ProspectAccountQueryResponseParser.java @@ -0,0 +1,19 @@ +package com.darksci.pardot.api.parser.prospectaccount; + +import java.io.IOException; + +import com.darksci.pardot.api.parser.JacksonFactory; +import com.darksci.pardot.api.parser.ResponseParser; +import com.darksci.pardot.api.response.prospectaccount.ProspectAccountQueryResponse; + + +/** + * Handles parsing ProspectQuery API responses into POJOs. + */ +public class ProspectAccountQueryResponseParser implements ResponseParser { + + @Override + public ProspectAccountQueryResponse.Result parseResponse(final String responseStr) throws IOException { + return JacksonFactory.newInstance().readValue(responseStr, ProspectAccountQueryResponse.class).getResult(); + } +} diff --git a/src/main/java/com/darksci/pardot/api/parser/prospectaccount/ProspectAccountReadResponseParser.java b/src/main/java/com/darksci/pardot/api/parser/prospectaccount/ProspectAccountReadResponseParser.java new file mode 100644 index 0000000..5313f2b --- /dev/null +++ b/src/main/java/com/darksci/pardot/api/parser/prospectaccount/ProspectAccountReadResponseParser.java @@ -0,0 +1,28 @@ +package com.darksci.pardot.api.parser.prospectaccount; + +import java.io.IOException; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.darksci.pardot.api.parser.JacksonFactory; +import com.darksci.pardot.api.parser.ResponseParser; +import com.darksci.pardot.api.parser.prospectaccount.ProspectAccountReadResponseParser; +import com.darksci.pardot.api.response.prospectaccount.ProspectAccount; +import com.darksci.pardot.api.response.prospectaccount.ProspectAccountReadResponse; + + +/** + * Parses Prospect Read API response. + */ +public class ProspectAccountReadResponseParser implements ResponseParser { + private static final Logger logger = LoggerFactory.getLogger(ProspectAccountReadResponseParser.class); + + @Override + public ProspectAccount parseResponse(final String responseStr) throws IOException { + logger.info("{}", responseStr); + return JacksonFactory + .newInstance() + .readValue(responseStr, ProspectAccountReadResponse.class).getProspectAccount(); + } +} diff --git a/src/main/java/com/darksci/pardot/api/request/prospectaccount/ProspectAccountQueryRequest.java b/src/main/java/com/darksci/pardot/api/request/prospectaccount/ProspectAccountQueryRequest.java new file mode 100644 index 0000000..4d54ca5 --- /dev/null +++ b/src/main/java/com/darksci/pardot/api/request/prospectaccount/ProspectAccountQueryRequest.java @@ -0,0 +1,109 @@ +package com.darksci.pardot.api.request.prospectaccount; + + +import com.darksci.pardot.api.request.BaseQueryRequest; +import com.darksci.pardot.api.request.DateParameter; +import com.darksci.pardot.api.request.prospect.ProspectQueryRequest; + +import java.util.Collection; +import java.util.stream.Collectors; + + + +public class ProspectAccountQueryRequest extends BaseQueryRequest +{ + + @Override + public String getApiEndpoint() { + return "prospectAccount/do/query"; + } + + + /** + * Specifies the fields to be returned. Note: If this parameter isn't present, all default fields and custom fields + * for which the prospect has a value will be returned; + * id field will always be returned. + * + * Each call will append the field argument to the list of previously passed fields. + * + * @param fields Collection of fields to be selected by the request. + * @return RequestBuilder + */ + public ProspectAccountQueryRequest withFields(final Collection fields) { + final String fieldsStr = fields.stream().collect(Collectors.joining( "," )); + final String currentValue = getParam("fields"); + if (currentValue == null) { + // set + return setParam("fields", fieldsStr); + } else { + // Append + return setParam("fields", currentValue + "," + fieldsStr); + } + } + + /** + * Specifies the fields to be returned. Note: If this parameter isn't present, all default fields and custom fields + * for which the prospect has a value will be returned; + * id field will always be returned. + * + * Each call will append the field argument to the list of previously passed fields. + * + * @param field Field to be selected by request. + * @return RequestBuilder + */ + public ProspectAccountQueryRequest withField(final String field) { + final String currentValue = getParam("fields"); + if (currentValue == null) { + // set + return setParam("fields", field); + } else { + // Append + return setParam("fields", currentValue + "," + field); + } + } + + + public ProspectAccountQueryRequest withUpdatedAfter(final DateParameter dateParameter) { + return super.withUpdatedAfter(dateParameter); + } + + public ProspectAccountQueryRequest withUpdatedBefore(final DateParameter dateParameter) { + return super.withUpdatedBefore(dateParameter); + } + + public ProspectAccountQueryRequest withCreatedBefore(final DateParameter dateParameter) { + return super.withCreatedBefore(dateParameter); + } + public ProspectAccountQueryRequest withCreatedAfter(final DateParameter dateParameter) { + return super.withCreatedAfter(dateParameter); + } + // Filter Options + public ProspectAccountQueryRequest withName(final String name) { + return setParam("name", name); + } + /** + * Sort by CreatedAt. + * @return BaseQueryRequest + */ + public ProspectAccountQueryRequest withSortByCreatedAt() { + return super.withSortByCreatedAt(); + } + + /** + * Sort results by Id. + * @return BaseQueryRequest + */ + public ProspectAccountQueryRequest withSortById() { + return super.withSortById(); + } + @Override + public ProspectAccountQueryRequest withSortByName() { + return super.withSortByName(); + } + + public ProspectAccountQueryRequest withSortByUpdatedAt() { + return super.withSortByUpdatedAt(); + } + + +} diff --git a/src/main/java/com/darksci/pardot/api/response/customfield/ProspectAccountCustomFieldValue.java b/src/main/java/com/darksci/pardot/api/response/customfield/ProspectAccountCustomFieldValue.java new file mode 100644 index 0000000..9464bf0 --- /dev/null +++ b/src/main/java/com/darksci/pardot/api/response/customfield/ProspectAccountCustomFieldValue.java @@ -0,0 +1,100 @@ +package com.darksci.pardot.api.response.customfield; + + + +import com.darksci.pardot.api.parser.prospectaccount.ProspectAccountCustomFieldDeserializer; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + + +/** +* Represents a Prospect CustomField value. +* Since custom fields can be stored as a single value, or as a list of values (for record multiple fields), +* this attempts to normalize the way these two types are accessed. +*/ +@JsonDeserialize(using = ProspectAccountCustomFieldDeserializer.class) +public class ProspectAccountCustomFieldValue {private final String fieldName; +private final List values = new ArrayList<>(); + +/** +* Constructor for custom field which only has a single value. +* @param fieldName name of the field. +* @param value value of the field. +*/ +public ProspectAccountCustomFieldValue(final String fieldName, final String value) { + this.fieldName = fieldName; + if (value != null) { + this.values.add(value); + } +} + +/** +* Constructor for custom field which has multiple values. +* @param fieldName name of the field. +* @param values values for the field. +*/ +public ProspectAccountCustomFieldValue(final String fieldName, final Collection values) { + this.fieldName = fieldName; + if (values != null) { + this.values.addAll(values); + } +} + +public String getFieldName() { + return fieldName; +} + +/** +* The value of the custom field. +* @return value of the custom field. +* *NOTE* If this is a record multiple field with multiple values, this will return the first value only. +*/ +public String getValue() { + if (values.isEmpty()) { + return null; + } + if (values != null) + { + return values.get(0); + } + else return null; +} + +public List getValues() { + return values; +} + +public boolean hasMultipleValues() { + return getValues().size() > 1; +} + +public void addValue(final String value) { + values.add(value); +} + +public void addValues(final Collection values) { + values.addAll(values); +} + +public void setValue(final String value) { + values.clear(); + addValue(value); +} + +public void setValues(final Collection values) { + values.clear(); + addValues(values); +} + +@Override +public String toString() { + return "ProspectCustomFieldValue{" + + "fieldName='" + fieldName + '\'' + + ", values=" + values + + '}'; +} +} + diff --git a/src/main/java/com/darksci/pardot/api/response/prospectaccount/ProspectAccount.java b/src/main/java/com/darksci/pardot/api/response/prospectaccount/ProspectAccount.java new file mode 100644 index 0000000..c3970ab --- /dev/null +++ b/src/main/java/com/darksci/pardot/api/response/prospectaccount/ProspectAccount.java @@ -0,0 +1,165 @@ +package com.darksci.pardot.api.response.prospectaccount; + + +import com.darksci.pardot.api.parser.prospect.ProspectCustomFieldDeserializer; +import com.darksci.pardot.api.response.customfield.ProspectAccountCustomFieldValue; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +import org.joda.time.LocalDateTime; + +public class ProspectAccount { + private Long id; + private String name; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createdAt; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updatedAt; + + // Custom fields + @JsonDeserialize(using = ProspectCustomFieldDeserializer.class) + private Map customFields = new HashMap<>(); + + + public Long getId() { + return id; + } + public String getName() { + return name; + } + public LocalDateTime getCreatedAt() { + return createdAt; + } + + public LocalDateTime getUpdatedAt() { + return updatedAt; + } + /** + * Get all CustomFields defined on the prospect. + * @return Map of all CustomFields. + */ + @JsonAnyGetter + public Map getCustomFields() { + return customFields; + } + /** + * Utility method to get custom field value. + * + * @param customFieldName Field to retrieve value for. + * @return Value of the custom field. + */ + public String getCustomField(final String customFieldName) { + if (!hasCustomField(customFieldName)|| (customFields.get(customFieldName)==null)) { + return null; + } + return customFields.get(customFieldName).getValue(); + } + + /** + * Utility method to get custom field values for record multiple custom fields. + * @param customFieldName Field to retrieve values for. + * @return List of all values. + */ + public List getCustomFieldValues(final String customFieldName) { + if (!hasCustomField(customFieldName)) { + return new ArrayList<>(); + } + return customFields.get(customFieldName).getValues(); + } + + /** + * Set a custom fields value. + * @param fieldName name of custom field to set. + * @param fieldValue value to set custom field to. + */ + public void setCustomField(final String fieldName, final String fieldValue) { + setCustomField(new ProspectAccountCustomFieldValue(fieldName, fieldValue)); + } + + /** + * For record multiple custom field values, set multiple values for the field. + * @param fieldName name of custom field to set. + * @param fieldValues values to set custom field to. + */ + public void setCustomField(final String fieldName, final Collection fieldValues) { + setCustomField(new ProspectAccountCustomFieldValue(fieldName, fieldValues)); + } + + /** + * Set custom field value. + * @param value value of custom field to set. + */ + public void setCustomField(final ProspectAccountCustomFieldValue value) { + Objects.requireNonNull(value); + Objects.requireNonNull(value.getFieldName(), "Field name may not be null."); + setCustomField(value.getFieldName(), value); + } + + /** + * Protected internal method for deserializing server responses. + * @param fieldName name of the custom field. + * @param value value of the custom field. + */ + @JsonAnySetter + protected void setCustomField(final String fieldName, final ProspectAccountCustomFieldValue value) { + Objects.requireNonNull(fieldName, "FieldName may not be null."); + customFields.put(fieldName, value); + } + + /** + * Is there a custom field set on the prospect. + * @param fieldName name of the field to check. + * @return true if it exists, false if not. + */ + public boolean hasCustomField(final String fieldName) { + return customFields.containsKey(fieldName); + } + + /** + * Remove a custom field from the prospect. + * @param fieldName name of the field to remove. + */ + public void removeCustomField(final String fieldName) { + if (hasCustomField(fieldName)) { + customFields.remove(fieldName); + } + } + + /** + * Append a new custom field value to a record multiple custom field. + * @param fieldName name of the custom field to append a value to. + * @param value value to append. + */ + public void appendCustomFieldValue(final String fieldName, final String value) { + if (hasCustomField(fieldName)) { + customFields.get(fieldName).addValue(value); + return; + } + setCustomField(fieldName, new ProspectAccountCustomFieldValue(fieldName, value)); + } + // Setters + public void setId(final Long id) { + this.id = id; + } + public void setName(final String name) { + this.name = name; + } + public void setCreatedAt(final LocalDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setUpdatedAt(final LocalDateTime updatedAt) { + this.updatedAt = updatedAt; + } +} diff --git a/src/main/java/com/darksci/pardot/api/response/prospectaccount/ProspectAccountQueryResponse.java b/src/main/java/com/darksci/pardot/api/response/prospectaccount/ProspectAccountQueryResponse.java new file mode 100644 index 0000000..8d02d45 --- /dev/null +++ b/src/main/java/com/darksci/pardot/api/response/prospectaccount/ProspectAccountQueryResponse.java @@ -0,0 +1,56 @@ +package com.darksci.pardot.api.response.prospectaccount; + +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; + +import java.util.Collections; +import java.util.List; + +public class ProspectAccountQueryResponse { + private ProspectAccountQueryResponse.Result result; + + public Result getResult() { + return result; + } + + /** + * Represents the results of querying Campaigns in Pardot API. + */ + public static class Result { + private Integer totalResults = 0; + + @JacksonXmlProperty(localName = "prospectAccount") + private List prospectAccounts = Collections.emptyList(); + + public Integer getTotalResults() { + return totalResults; + } + + /** + * Prospects returned by the API. + * + * @return Immutable list of Prospects returned by the API. + */ + public List getProspectAccount() { + if (prospectAccounts == null) { + prospectAccounts = Collections.emptyList(); + } + return Collections.unmodifiableList(prospectAccounts); + } + + @Override + public String toString() { + return "Result{" + + "totalResults=" + totalResults + + ", prospectAccounts=" + prospectAccounts + + '}'; + } + } + + + @Override + public String toString() { + return "ProspectAccountQueryResponse{" + + "result=" + result + + '}'; + } +} \ No newline at end of file diff --git a/src/main/java/com/darksci/pardot/api/response/prospectaccount/ProspectAccountReadResponse.java b/src/main/java/com/darksci/pardot/api/response/prospectaccount/ProspectAccountReadResponse.java new file mode 100644 index 0000000..0921585 --- /dev/null +++ b/src/main/java/com/darksci/pardot/api/response/prospectaccount/ProspectAccountReadResponse.java @@ -0,0 +1,22 @@ +package com.darksci.pardot.api.response.prospectaccount; + + + + +/** + * Represents the response from a Prospect Read API request. + */ +public class ProspectAccountReadResponse { + private ProspectAccount prospectAccount; + + public ProspectAccount getProspectAccount() { + return prospectAccount; + } + + @Override + public String toString() { + return "ProspectReadResponse{" + + "prospectAccount=" + prospectAccount + + '}'; + } +}