Class: Stripe::Reporting::ReportRunService

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

Defined Under Namespace

Classes: CreateParams, ListParams, 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

Creates a new object and begin running the report. (Certain report types require a [live-mode API key](stripe.com/docs/keys#test-live-modes).)



130
131
132
133
134
135
136
137
138
# File 'lib/stripe/services/reporting/report_run_service.rb', line 130

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

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

Returns a list of Report Runs, with the most recent appearing first.



141
142
143
144
145
146
147
148
149
# File 'lib/stripe/services/reporting/report_run_service.rb', line 141

def list(params = {}, opts = {})
  request(
    method: :get,
    path: "/v1/reporting/report_runs",
    params: params,
    opts: opts,
    base_address: :api
  )
end

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

Retrieves the details of an existing Report Run.



152
153
154
155
156
157
158
159
160
# File 'lib/stripe/services/reporting/report_run_service.rb', line 152

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