Sha256: 66cf76a09f3943b65a7a88a0a4eaeea3cacac14decba1bfcc364b5dc2ffbdb51
Contents?: true
Size: 581 Bytes
Versions: 15
Compression:
Stored size: 581 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) [:json, :html, :pdf].include? format.to_sym end end end end
Version data entries
15 entries across 15 versions & 1 rubygems