Sha256: c8ee382ab6bf6779b45eb4d0d733868bb2855ca58949e110b3efbc61ac710f31
Contents?: true
Size: 576 Bytes
Versions: 16
Compression:
Stored size: 576 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
16 entries across 16 versions & 1 rubygems