Class ReportRun

All Implemented Interfaces:
HasId, StripeActiveObject, StripeObjectInterface

public class ReportRun extends ApiResource implements HasId
The Report Run object represents an instance of a report type generated with specific run parameters. Once the object is created, Stripe begins processing the report. When the report has finished running, it will give you a reference to a file where you can retrieve your results. For an overview, see API Access to Reports.

Note that certain report types can only be run based on your live-mode data (not test-mode data), and will error when queried without a live-mode API key.

  • Constructor Details

    • ReportRun

      public ReportRun()
  • Method Details

    • create

      public static ReportRun create(Map<String,Object> params) throws StripeException
      Creates a new object and begin running the report. (Certain report types require a live-mode API key.)
      Throws:
      StripeException
    • create

      public static ReportRun create(Map<String,Object> params, RequestOptions options) throws StripeException
      Creates a new object and begin running the report. (Certain report types require a live-mode API key.)
      Throws:
      StripeException
    • create

      public static ReportRun create(ReportRunCreateParams params) throws StripeException
      Creates a new object and begin running the report. (Certain report types require a live-mode API key.)
      Throws:
      StripeException
    • create

      public static ReportRun create(ReportRunCreateParams params, RequestOptions options) throws StripeException
      Creates a new object and begin running the report. (Certain report types require a live-mode API key.)
      Throws:
      StripeException
    • list

      public static ReportRunCollection list(Map<String,Object> params) throws StripeException
      Returns a list of Report Runs, with the most recent appearing first.
      Throws:
      StripeException
    • list

      public static ReportRunCollection list(Map<String,Object> params, RequestOptions options) throws StripeException
      Returns a list of Report Runs, with the most recent appearing first.
      Throws:
      StripeException
    • list

      public static ReportRunCollection list(ReportRunListParams params) throws StripeException
      Returns a list of Report Runs, with the most recent appearing first.
      Throws:
      StripeException
    • list

      public static ReportRunCollection list(ReportRunListParams params, RequestOptions options) throws StripeException
      Returns a list of Report Runs, with the most recent appearing first.
      Throws:
      StripeException
    • retrieve

      public static ReportRun retrieve(String reportRun) throws StripeException
      Retrieves the details of an existing Report Run.
      Throws:
      StripeException
    • retrieve

      public static ReportRun retrieve(String reportRun, RequestOptions options) throws StripeException
      Retrieves the details of an existing Report Run.
      Throws:
      StripeException
    • retrieve

      public static ReportRun retrieve(String reportRun, Map<String,Object> params, RequestOptions options) throws StripeException
      Retrieves the details of an existing Report Run.
      Throws:
      StripeException
    • retrieve

      public static ReportRun retrieve(String reportRun, ReportRunRetrieveParams params, RequestOptions options) throws StripeException
      Retrieves the details of an existing Report Run.
      Throws:
      StripeException
    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter responseGetter)
      Description copied from interface: StripeActiveObject
      Method is used by the containing object or StripeResponseGetter implementations to set the StripeResponseGetter instance used to make further requests.
      Specified by:
      setResponseGetter in interface StripeActiveObject
      Overrides:
      setResponseGetter in class ApiResource
      Parameters:
      responseGetter - the StripeResponseGetter instance to use for making further requests.
    • getCreated

      public Long getCreated()
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • getError

      public String getError()
      If something should go wrong during the run, a message about the failure (populated when status=failed).
    • getLivemode

      public Boolean getLivemode()
      true if the report is run on live mode data and false if it is run on test mode data.
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value.

      Equal to reporting.report_run.

    • getParameters

      public ReportRun.Parameters getParameters()
    • getReportType

      public String getReportType()
      The ID of the report type to run, such as "balance.summary.1".
    • getResult

      public File getResult()
      The file object representing the result of the report run (populated when status=succeeded).
    • getStatus

      public String getStatus()
      Status of this report run. This will be pending when the run is initially created. When the run finishes, this will be set to succeeded and the result field will be populated. Rarely, we may encounter an error, at which point this will be set to failed and the error field will be populated.
    • getSucceededAt

      public Long getSucceededAt()
      Timestamp at which this run successfully finished (populated when status=succeeded). Measured in seconds since the Unix epoch.
    • setCreated

      public void setCreated(Long created)
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • setError

      public void setError(String error)
      If something should go wrong during the run, a message about the failure (populated when status=failed).
    • setId

      public void setId(String id)
      Unique identifier for the object.
    • setLivemode

      public void setLivemode(Boolean livemode)
      true if the report is run on live mode data and false if it is run on test mode data.
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to reporting.report_run.

    • setParameters

      public void setParameters(ReportRun.Parameters parameters)
    • setReportType

      public void setReportType(String reportType)
      The ID of the report type to run, such as "balance.summary.1".
    • setResult

      public void setResult(File result)
      The file object representing the result of the report run (populated when status=succeeded).
    • setStatus

      public void setStatus(String status)
      Status of this report run. This will be pending when the run is initially created. When the run finishes, this will be set to succeeded and the result field will be populated. Rarely, we may encounter an error, at which point this will be set to failed and the error field will be populated.
    • setSucceededAt

      public void setSucceededAt(Long succeededAt)
      Timestamp at which this run successfully finished (populated when status=succeeded). Measured in seconds since the Unix epoch.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getId

      public String getId()
      Unique identifier for the object.
      Specified by:
      getId in interface HasId