lib/kentaa/api/resources/donation.rb in kentaa-api-0.3.2 vs lib/kentaa/api/resources/donation.rb in kentaa-api-0.4.0

- old
+ new

@@ -173,24 +173,24 @@ @questions ||= begin questions = [] if data[:questions] data[:questions].each do |question| - questions << Kentaa::Api::Resources::Question.new(config, data: question) + questions << Kentaa::Api::Resources::Question.new(question) end end questions end end def reward - @reward ||= Kentaa::Api::Resources::Reward.new(config, data: data[:reward]) if data[:reward] + @reward ||= Kentaa::Api::Resources::Reward.new(data[:reward]) if data[:reward] end def address - @address ||= Kentaa::Api::Resources::Address.new(config, data: data[:address]) if data[:address] + @address ||= Kentaa::Api::Resources::Address.new(data[:address]) if data[:address] end def birthday Time.parse(data[:birthday]) if data[:birthday] end @@ -202,15 +202,15 @@ def phone data[:phone] end def consent - @consent ||= Kentaa::Api::Resources::Consent.new(config, data: data[:consent]) if data[:consent] + @consent ||= Kentaa::Api::Resources::Consent.new(data[:consent]) if data[:consent] end - protected + private - def load_resource(options) + def load_resource request.get("/donations/#{id}", options) end end end end