lib/quaderno-ruby/report.rb in quaderno-1.17.0 vs lib/quaderno-ruby/report.rb in quaderno-1.17.1

- old
+ new

@@ -6,11 +6,11 @@ undef :all, :find, :create, :update, :delete, :parse_nested end def self.journal(options = {}) authentication = get_authentication(options.merge(api_model: api_model)) - filter = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } + filter = options.dup.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } response = get("#{authentication[:url]}#{api_model.api_path}/journal.json", query: filter, basic_auth: authentication[:basic_auth], headers: version_header.merge(authentication[:headers]) @@ -21,11 +21,11 @@ response.parsed_response end def self.taxes(options = {}) authentication = get_authentication(options.merge(api_model: api_model)) - filter = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } + filter = options.dup.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } response = get("#{authentication[:url]}#{api_model.api_path}/taxes.json", query: filter, basic_auth: authentication[:basic_auth], headers: version_header.merge(authentication[:headers]) @@ -58,10 +58,10 @@ private def self.request_tax_report(tax_report_type, options) authentication = get_authentication(options.merge(api_model: api_model)) - filter = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } + filter = options.dup.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s } response = get("#{authentication[:url]}#{api_model.api_path}/#{tax_report_type}.json", query: filter, basic_auth: authentication[:basic_auth], headers: version_header.merge(authentication[:headers]) \ No newline at end of file