Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions lib/stripe/resources/reporting/report_run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@ class ReportRun < APIResource
extend Stripe::APIOperations::List

OBJECT_NAME = "reporting.report_run"

def contents(params = {}, opts = {}, &read_body_chunk_block)
unless block_given?
raise ArgumentError, "A read_body_chunk_block block parameter is required when calling the contents method."
end

config = opts[:client]&.config || Stripe.config

request_stream(
method: :get,
path: "/v1/files/#{result.id}/contents",
params: params,
opts: {
api_base: config.uploads_base,
}.merge(opts),
&read_body_chunk_block
)
end
end
end
end