lib/kentaa/api/clients/donations.rb in kentaa-api-0.2.1 vs lib/kentaa/api/clients/donations.rb in kentaa-api-0.3.0

- old
+ new

@@ -5,16 +5,16 @@ module Clients class Donations < Base include Kentaa::Api::Clients::All def list(options = {}) - response = request.get("/donations", options) - Kentaa::Api::Resources::Donations.new(config, response) + donations = Kentaa::Api::Resources::Donations.new(config, options) + donations.load end - def get(id) - response = request.get("/donations/#{id}") - Kentaa::Api::Resources::Donation.new(config, response) + def get(id, options = {}) + donation = Kentaa::Api::Resources::Donation.new(config, options.merge(id: id)) + donation.load end end end end end