Module: MangoApi::Events

Extended by:
UriProvider
Defined in:
lib/mangopay/api/service/events.rb

Overview

Provides API method delegates concerning the Event entity

Class Method Summary collapse

Methods included from UriProvider

provide_uri

Class Method Details

.all {|filter_request = FilterRequest.new| ... } ⇒ Array

Retrieves list of Event entity pages. Allows configuration of paging and sorting parameters by yielding a filtering object to a provided block. When no filters are specified, will retrieve the first page of 10 newest results.

Allowed FilterRequest params:

  • page

  • per_page

  • sort_field and sort_direction

  • before_date

  • after_date

  • event_type

Yields:

Returns:

  • (Array)

    requested Event entity objects



25
26
27
28
29
30
31
# File 'lib/mangopay/api/service/events.rb', line 25

def all
  uri = provide_uri(:get_events)
  filter_request = nil
  yield filter_request = FilterRequest.new if block_given?
  results = HttpClient.get(uri, filter_request)
  parse_results results
end