lib/finapps/rest/cashflows.rb in finapps-1.0.3 vs lib/finapps/rest/cashflows.rb in finapps-1.0.4
- old
+ new
@@ -10,11 +10,10 @@
# @param [Date] end_date
# @return [Hash, Array<String>]
def show(start_date, end_date)
raise MissingArgumentsError.new 'Missing argument: start_date.' if start_date.blank?
logger.debug "##{__method__.to_s} => start_date: #{start_date}"
-
raise MissingArgumentsError.new 'Missing argument: end_date.' if end_date.blank?
logger.debug "##{__method__.to_s} => end_date: #{end_date}"
cashflow = Cashflow.new({:start_date => start_date,
:end_date => end_date,
@@ -27,11 +26,11 @@
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
path = end_point.sub(':start_date', ERB::Util.url_encode(start_date)).sub(':end_date', ERB::Util.url_encode(end_date))
logger.debug "##{__method__.to_s} => path: #{path}"
- result, error_messages = @client.send_request(path, :get)
+ result, error_messages = client.send_request(path, :get)
if result.present? && error_messages.blank?
summary = extract_value(result, 'summary')
raise 'Summary result-set for cashflow is not present.' if summary.nil?
raise 'Summary result-set for cashflow is not a hash.' unless summary.respond_to?(:key?)
@@ -83,6 +82,6 @@
class CashflowDetail < FinApps::REST::Resource
attr_accessor :category_id, :credits, :debits, :balance
end
end
-end
+end
\ No newline at end of file