lib/kentaa/api/resources/newsletter_subscription.rb in kentaa-api-0.4.0 vs lib/kentaa/api/resources/newsletter_subscription.rb in kentaa-api-0.5.0

- old
+ new

@@ -8,18 +8,24 @@ "NewsletterSubscription_#{id}" end def entity if project_id - Kentaa::Api::Resources::Project.new(config, id: project_id) + Kentaa::Api::Resources::Project.new(config, id: project_id, options: options) elsif segment_id - Kentaa::Api::Resources::Segment.new(config, id: segment_id) + Kentaa::Api::Resources::Segment.new(config, id: segment_id, options: options) + elsif donation_form_id + Kentaa::Api::Resources::DonationForm.new(config, id: donation_form_id, options: options) else - Kentaa::Api::Resources::Site.new(config, id: site_id) + Kentaa::Api::Resources::Site.new(config, id: site_id, options: options) end end + def site + Kentaa::Api::Resources::Site.new(config, id: site_id, options: options) + end + def first_name data[:first_name] end def infix @@ -34,9 +40,13 @@ [first_name, infix, last_name].reject { |s| s.to_s.empty? }.join(" ") end def site_id data[:site_id] + end + + def donation_form_id + data[:donation_form_id] end def segment_id data[:segment_id] end