src/main/java/com/github/ka4ok85/wca/command/GetReportIdByDateCommand.java
@Override
	public ResponseContainer<GetReportIdByDateResponse> readResponse(Node resultNode,
			GetReportIdByDateOptions options) {
		XPathFactory factory = XPathFactory.newInstance();
		XPath xpath = factory.newXPath();

		List<ReportIdByDateMailing> mailings = new ArrayList<ReportIdByDateMailing>();
		final DateTimeFormatter responseFormatter = DateTimeFormatter.ofPattern("M/d/yy K:mm a");
		try {

			NodeList mailingsNode = (NodeList) xpath.evaluate("Mailing", resultNode, XPathConstants.NODESET);
			Node mailingNode;

			for (int i = 0; i < mailingsNode.getLength(); i++) {
				ReportIdByDateMailing mailingResponse = new ReportIdByDateMailing();
				mailingNode = mailingsNode.item(i);
				mailingResponse.setReportId(Long.parseLong(
						((Node) xpath.evaluate("ReportId", mailingNode, XPathConstants.NODE)).getTextContent()));
				mailingResponse.setSentDateTime(LocalDateTime.parse(
						((Node) xpath.evaluate("SentTS", mailingNode, XPathConstants.NODE)).getTextContent(),
						responseFormatter));

				mailings.add(mailingResponse);
			}
		} catch (XPathExpressionException | JobBadStateException e) {
			throw new EngageApiException(e.getMessage());
		}

		getReportIdByDateResponse.setMailings(mailings);

		ResponseContainer<GetReportIdByDateResponse> response = new ResponseContainer<GetReportIdByDateResponse>(
				getReportIdByDateResponse);

		return response;
	}
/**
	 * Reads GetReportIdByDate API response into
	 * {@link com.github.ka4ok85.wca.response.GetReportIdByDateResponse}
	 * 
	 * @param resultNode
	 *            - "RESULT" XML Node returned by API
	 * @param options
	 *            - settings for API call
	 * @return POJO GetReportIdByDate Response
	 */


@param resultNode
- "RESULT" XML Node returned by API
@param options
- settings for API call
@return POJO GetReportIdByDate Response
@param resultNode - " RESULT " XML Node returned by API @param options - settings for API call @return POJO GetReportIdByDate Response
@Override
	public ResponseContainer<GetReportIdByDateResponse> readResponse(Node resultNode,
			GetReportIdByDateOptions options) {
		XPathFactory factory = XPathFactory.newInstance();
		XPath xpath = factory.newXPath();
		List<ReportIdByDateMailing> mailings = new ArrayList<ReportIdByDateMailing>();
		final DateTimeFormatter responseFormatter = DateTimeFormatter.ofPattern("M/d/yy K:mm a");
		try {
			NodeList mailingsNode = (NodeList) xpath.evaluate("Mailing", resultNode, XPathConstants.NODESET);
			Node mailingNode;
			for (int i = 0; i < mailingsNode.getLength(); i++) {
				ReportIdByDateMailing mailingResponse = new ReportIdByDateMailing();
				mailingNode = mailingsNode.item(i);
				mailingResponse.setReportId(Long.parseLong(
						((Node) xpath.evaluate("ReportId", mailingNode, XPathConstants.NODE)).getTextContent()));
				mailingResponse.setSentDateTime(LocalDateTime.parse(
						((Node) xpath.evaluate("SentTS", mailingNode, XPathConstants.NODE)).getTextContent(),
						responseFormatter));
				mailings.add(mailingResponse);
			}
		} catch (XPathExpressionException | JobBadStateException e) {
			throw new EngageApiException(e.getMessage());
		}
		getReportIdByDateResponse.setMailings(mailings);
		ResponseContainer<GetReportIdByDateResponse> response = new ResponseContainer<GetReportIdByDateResponse>(
				getReportIdByDateResponse);
		return response;
	}
@ Override public ResponseContainer < GetReportIdByDateResponse > readResponse ( Node resultNode , GetReportIdByDateOptions options ) { XPathFactory factory = XPathFactory . newInstance ( ) ; XPath xpath = factory . newXPath ( ) ; List < ReportIdByDateMailing > mailings = new ArrayList < ReportIdByDateMailing > ( ) ; final DateTimeFormatter responseFormatter = DateTimeFormatter . ofPattern ( "M/d/yy K:mm a" ) ; try { NodeList mailingsNode = ( NodeList ) xpath . evaluate ( "Mailing" , resultNode , XPathConstants . NODESET ) ; Node mailingNode ; for ( int i = 0 ; i < mailingsNode . getLength ( ) ; i ++ ) { ReportIdByDateMailing mailingResponse = new ReportIdByDateMailing ( ) ; mailingNode = mailingsNode . item ( i ) ; mailingResponse . setReportId ( Long . parseLong ( ( ( Node ) xpath . evaluate ( "ReportId" , mailingNode , XPathConstants . NODE ) ) . getTextContent ( ) ) ) ; mailingResponse . setSentDateTime ( LocalDateTime . parse ( ( ( Node ) xpath . evaluate ( "SentTS" , mailingNode , XPathConstants . NODE ) ) . getTextContent ( ) , responseFormatter ) ) ; mailings . add ( mailingResponse ) ; } } catch ( XPathExpressionException | JobBadStateException e ) { throw new EngageApiException ( e . getMessage ( ) ) ; } getReportIdByDateResponse . setMailings ( mailings ) ; ResponseContainer < GetReportIdByDateResponse > response = new ResponseContainer < GetReportIdByDateResponse > ( getReportIdByDateResponse ) ; return response ; }
Reads GetReportIdByDate API response into
 {@link com.github.ka4ok85.wca.response.GetReportIdByDateResponse}
Reads GetReportIdByDate API response into { @link com . github . ka4ok85 . wca . response . GetReportIdByDateResponse }