Class: Fakturoid::Api::Event

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/fakturoid/api/event.rb

Constant Summary collapse

INDEX_PARAMS =
[:page, :since, :subject_id].freeze

Instance Attribute Summary

Attributes included from Base

#client

Instance Method Summary collapse

Methods included from Base

#initialize, #perform_request

Instance Method Details

#all(params = {}) ⇒ Object



10
11
12
13
14
# File 'lib/fakturoid/api/event.rb', line 10

def all(params = {})
  request_params = Utils.permit_params(params, *INDEX_PARAMS) || {}

  perform_request(HTTP_GET, "events.json", request_params: request_params)
end


16
17
18
19
20
# File 'lib/fakturoid/api/event.rb', line 16

def paid(params = {})
  request_params = Utils.permit_params(params, *INDEX_PARAMS) || {}

  perform_request(HTTP_GET, "events/paid.json", request_params: request_params)
end