Sha256: 1ceda8f4ab74721d9e923cfcb15656205b0275b79aa176a4bf64d24c9ac34aeb
Contents?: true
Size: 586 Bytes
Versions: 28
Compression:
Stored size: 586 Bytes
Contents
# frozen_string_literal: true module FinApps module REST class OrderReports < FinAppsCore::REST::Resources # :nodoc: def show(id, format) not_blank(id, :id) not_blank(format, :format) raise FinAppsCore::InvalidArgumentsError, 'Invalid argument: format' unless accepted_format?(format) path = "orders/#{ERB::Util.url_encode(id)}/report.#{ERB::Util.url_encode(format)}" super nil, path end private def accepted_format?(format) %i[json html pdf].include? format.to_sym end end end end
Version data entries
28 entries across 28 versions & 1 rubygems