Sha256: 9f4c6ce8065b49241ce2ee7c7fd2897d6de400f14821c2e007c5ae58d3d80bd7
Contents?: true
Size: 579 Bytes
Versions: 16
Compression:
Stored size: 579 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.new '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
16 entries across 16 versions & 1 rubygems