Class: Stripe::V2::Core::EventService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/v2/core/event_service.rb

Defined Under Namespace

Classes: 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

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

List events, going back up to 30 days.



26
27
28
29
30
31
32
33
34
# File 'lib/stripe/services/v2/core/event_service.rb', line 26

def list(params = {}, opts = {})
  request(
    method: :get,
    path: "/v2/core/events",
    params: params,
    opts: opts,
    base_address: :api
  )
end

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

Retrieves the details of an event.



37
38
39
40
41
42
43
44
45
# File 'lib/stripe/services/v2/core/event_service.rb', line 37

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