Class: Stripe::V2::Reporting::ReportRunService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/v2/reporting/report_run_service.rb

Defined Under Namespace

Classes: CreateParams, RetrieveParams

Instance Method Summary collapse

Methods inherited from StripeService

#initialize, #request, #request_stream

Constructor Details

This class inherits a constructor from Stripe::StripeService

Instance Method Details

#create(params = {}, opts = {}) ⇒ Object

Initiates the generation of a ‘ReportRun` based on the specified report template and user-provided parameters. It’s the starting point for obtaining report data, and returns a ‘ReportRun` object which can be used to track the progress and retrieve the results of the report.

** raises RateLimitError



64
65
66
67
68
69
70
71
72
# File 'lib/stripe/services/v2/reporting/report_run_service.rb', line 64

def create(params = {}, opts = {})
  request(
    method: :post,
    path: "/v2/reporting/report_runs",
    params: params,
    opts: opts,
    base_address: :api
  )
end

#retrieve(id, params = {}, opts = {}) ⇒ Object

Fetches the current state and details of a previously created ‘ReportRun`. If the `ReportRun` has succeeded, the endpoint will provide details for how to retrieve the results.



76
77
78
79
80
81
82
83
84
# File 'lib/stripe/services/v2/reporting/report_run_service.rb', line 76

def retrieve(id, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v2/reporting/report_runs/%<id>s", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end