Class TimeInterval


  • public class TimeInterval
    extends java.lang.Object
    A date-time interval in ISO 8601 format which is used to compute metrics. Only the date is required, but you must pass the complete date and time value. For example, November 11, 2022 should be passed as \"2022-11-07T00:00:00Z\". Note that only data for the trailing 2 years is supported. **Note**: The `listOfferMetrics` operation only supports a time interval which covers a single unit of the aggregation frequency. For example, for a MONTH aggregation frequency, the duration of the interval between the startDate and endDate can not be more than 1 month.
    • Constructor Summary

      Constructors 
      Constructor Description
      TimeInterval()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      TimeInterval endDate​(org.threeten.bp.OffsetDateTime endDate)  
      boolean equals​(java.lang.Object o)  
      org.threeten.bp.OffsetDateTime getEndDate()
      When this object is used as a request parameter, the specified `endDate` is adjusted based on the aggregation frequency.
      org.threeten.bp.OffsetDateTime getStartDate()
      When this object is used as a request parameter, the specified `startDate` is adjusted based on the aggregation frequency.
      int hashCode()  
      void setEndDate​(org.threeten.bp.OffsetDateTime endDate)  
      void setStartDate​(org.threeten.bp.OffsetDateTime startDate)  
      TimeInterval startDate​(org.threeten.bp.OffsetDateTime startDate)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TimeInterval

        public TimeInterval()
    • Method Detail

      • startDate

        public TimeInterval startDate​(org.threeten.bp.OffsetDateTime startDate)
      • getStartDate

        public org.threeten.bp.OffsetDateTime getStartDate()
        When this object is used as a request parameter, the specified `startDate` is adjusted based on the aggregation frequency. * For `WEEK` the metric is computed from the first day of the week (Sunday, based on ISO 8601) that contains the `startDate`. * For `MONTH` the metric is computed from the first day of the month that contains the `startDate`. * For `QUARTER` the metric is computed from the first day of the quarter that contains the `startDate`. * For `YEAR` the metric is computed from the first day of the year that contains the `startDate`.
        Returns:
        startDate
      • setStartDate

        public void setStartDate​(org.threeten.bp.OffsetDateTime startDate)
      • endDate

        public TimeInterval endDate​(org.threeten.bp.OffsetDateTime endDate)
      • getEndDate

        public org.threeten.bp.OffsetDateTime getEndDate()
        When this object is used as a request parameter, the specified `endDate` is adjusted based on the aggregation frequency. * For `WEEK` the metric is computed up to the last day of the week (Sunday, based on ISO 8601) that contains the `endDate`. * For `MONTH`, the metric is computed up to the last day that contains the `endDate`. * For `QUARTER` the metric is computed up to the last day of the quarter that contains the `endDate`. * For `YEAR` the metric is computed up to the last day of the year that contains the `endDate`. Note: The end date may be adjusted to a lower value based on the data available in our system.
        Returns:
        endDate
      • setEndDate

        public void setEndDate​(org.threeten.bp.OffsetDateTime endDate)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object