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

- old
+ new

@@ -5,16 +5,16 @@ module Clients class NewsletterSubscriptions < Base include Kentaa::Api::Clients::All def list(options = {}) - response = request.get("/newsletter-subscriptions", options) - Kentaa::Api::Resources::NewsletterSubscriptions.new(config, response) + newsletter_subscriptions = Kentaa::Api::Resources::NewsletterSubscriptions.new(config, options) + newsletter_subscriptions.load end - def get(id) - response = request.get("/newsletter-subscriptions/#{id}") - Kentaa::Api::Resources::NewsletterSubscription.new(config, response) + def get(id, options = {}) + newsletter_subscription = Kentaa::Api::Resources::NewsletterSubscription.new(config, options.merge(id: id)) + newsletter_subscription.load end end end end end