lib/kentaa/api/resources/site.rb in kentaa-api-0.7.2 vs lib/kentaa/api/resources/site.rb in kentaa-api-0.8.0

- old
+ new

@@ -79,23 +79,57 @@ banners end end + def logos + @logos ||= begin + logos = [] + + if data[:logos] + data[:logos].map do |logo| + logos << Kentaa::Api::Resources::Logo.new(logo) + end + end + + logos + end + end + def external_reference data[:external_reference] end + def background_image_url + data[:background_image_url] + end + + def sign_up_flow_background_image_url + data[:sign_up_flow_background_image_url] + end + + def theme + @theme ||= Kentaa::Api::Resources::Theme.new(data[:theme]) + end + def donations @donations ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Donation, endpoint_path: '/donations') end def manual_donations @manual_donations ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::ManualDonation, endpoint_path: '/manual-donations') end def newsletter_subscriptions @newsletter_subscriptions ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::NewsletterSubscription, endpoint_path: '/newsletter-subscriptions') + end + + def orders + @orders ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Order, endpoint_path: '/orders') + end + + def activities + @activities ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Activity, endpoint_path: '/activities') end private def load_resource