Method: Evvnt::ClassTemplateMethods#show
- Defined in:
- lib/evvnt/class_template_methods.rb
#show(record_id = nil, **params) ⇒ Object
Template method for creating a given record
record_id - An Integer or String representing the record ID on the API. params - A Hash of params to send to the API.
Returns Base subclass
40 41 42 43 44 45 46 |
# File 'lib/evvnt/class_template_methods.rb', line 40 def show(record_id = nil, **params) if record_id.nil? && !singular_resource? raise ArgumentError, "record_id cannot be nil" end path = nest_path_within_parent(singular_path_for_record(record_id, params), params) api_request(:get, path, params: params) end |