Method: Evvnt::ClassTemplateMethods#ours

Defined in:
lib/evvnt/class_template_methods.rb

#ours(record_id = nil, **params) ⇒ Object

Template method for fetching mine records from the API.

record_id - An Integer or String representing the record ID on the API (optional). params - A Hash of params to send to the API.

Returns Array Returns Base



69
70
71
72
73
74
# File 'lib/evvnt/class_template_methods.rb', line 69

def ours(record_id = nil, **params)
  id_segment = record_id.to_s
  segments   = [plural_resource_path, "ours", id_segment].select(&:present?)
  path       = File.join(*segments).to_s
  api_request(:get, path, params: params)
end