Class: MangoPay::Report
- Includes:
- HTTPCalls::Fetch
- Defined in:
- lib/mangopay/report.rb
Overview
Class Method Summary collapse
-
.create(params, idempotency_key = nil) ⇒ Object
params
: hash; see docs.mangopay.com/endpoints/v2.01/reporting#e825_create-a-transaction-report.
Methods included from HTTPCalls::Fetch
Methods inherited from Resource
Class Method Details
.create(params, idempotency_key = nil) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/mangopay/report.rb', line 10 def create(params, idempotency_key = nil) if params[:ReportType] == 'transactions' url = url() + '/transactions/' elsif params[:ReportType] == 'wallets' url = url() + '/wallets/' else raise 'When creating a report, ReportType is required. Ex: ("transactions", "wallets")' end MangoPay.request(:post, url, params, {}, idempotency_key) end |