lib/kentaa/api/resources/action.rb in kentaa-api-0.5.0 vs lib/kentaa/api/resources/action.rb in kentaa-api-0.6.0
- old
+ new
@@ -196,14 +196,18 @@
def external_reference
data[:external_reference]
end
def donations
- @donations ||= Kentaa::Api::Resources::Donations.new(config, action_id: id)
+ @donations ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Donation, endpoint_path: "/actions/#{id}/donations")
end
def manual_donations
- @manual_donations ||= Kentaa::Api::Resources::ManualDonations.new(config, action_id: id)
+ @manual_donations ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::ManualDonation, endpoint_path: "/actions/#{id}/manual-donations")
+ end
+
+ def performances
+ @performances ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Performance, endpoint_path: "/actions/#{id}/performances")
end
private
def load_resource