require 'alula/version' require 'request_store' require 'forwardable' require_relative 'alula/resource_attributes' require_relative 'alula/relationship_attributes' require_relative 'alula/api_operations/list' require_relative 'alula/api_operations/request' require_relative 'alula/api_operations/save' require_relative 'alula/api_operations/delete' require_relative 'alula/api_resource' require_relative 'alula/rpc_resource' require_relative 'alula/rpc_response' require_relative 'alula/rest_resource' require_relative 'alula/meta' require_relative 'alula/pagination' require_relative 'alula/singleton_rest_resource' require_relative 'alula/alula_response' require_relative 'alula/filter_builder' require_relative 'alula/query_interface' require_relative 'alula/util' require_relative 'alula/rate_limit' require_relative 'alula/client' require_relative 'alula/client_configuration' require_relative 'alula/errors' require_relative 'alula/list_object' require_relative 'alula/oauth' require_relative 'alula/helpers/device_attribute_translations' require_relative 'alula/resources/billing_program' require_relative 'alula/resources/device' require_relative 'alula/resources/device_charge' require_relative 'alula/resources/device_event_log' require_relative 'alula/resources/device_cellular_status' require_relative 'alula/resources/device_program' require_relative 'alula/resources/dealer_address' require_relative 'alula/resources/dealer_account_transfer' require_relative 'alula/resources/dealer_suspension_log' require_relative 'alula/resources/dealer_program' require_relative 'alula/resources/event_trigger' require_relative 'alula/resources/event_webhook' require_relative 'alula/resources/self' require_relative 'alula/resources/user' require_relative 'alula/resources/admin_user' require_relative 'alula/resources/user_phone' require_relative 'alula/resources/user_address' require_relative 'alula/resources/user_pushtoken' require_relative 'alula/resources/user_preferences' require_relative 'alula/resources/user_videoprofile' require_relative 'alula/resources/dealer' require_relative 'alula/resources/dealer_branding' require_relative 'alula/resources/token_exchange' require_relative 'alula/resources/receiver_connection' require_relative 'alula/resources/receiver_group' require_relative 'alula/resources/revision' require_relative 'alula/resources/station' require_relative 'alula/resources/feature_plan' require_relative 'alula/resources/feature_planvideo' require_relative 'alula/resources/feature_price' require_relative 'alula/resources/feature_bysubject' require_relative 'alula/resources/video/base_resource' require_relative 'alula/resources/video/device' require_relative 'alula/procedures/device_cellular_history_proc' require_relative 'alula/procedures/device_rateplan_get_proc' require_relative 'alula/procedures/device_register_proc' require_relative 'alula/procedures/device_unregister_proc' require_relative 'alula/procedures/device_assign_proc' require_relative 'alula/procedures/device_unassign_proc' require_relative 'alula/procedures/device_signal_add_proc' require_relative 'alula/procedures/device_signal_update_proc' require_relative 'alula/procedures/device_signal_delivered_proc' require_relative 'alula/procedures/dealer_device_stats_proc' require_relative 'alula/procedures/dealer_suspend_proc' require_relative 'alula/procedures/dealer_restore_proc' require_relative 'alula/procedures/upload_touchpad_branding_proc' require_relative 'alula/procedures/user_transfer_request' require_relative 'alula/procedures/user_transfer_cancel' require_relative 'alula/procedures/user_transfer_authorize' require_relative 'alula/procedures/user_transfer_deny' require_relative 'alula/procedures/user_transfer_reject' require_relative 'alula/procedures/user_transfer_accept' require_relative 'alula/procedures/user_plansvideo_price_get' module Alula # # A map of API REST resource names to Alula Ruby classes # { # 'feature-plansvideo' => Alula::FeaturePlanVideo # } # This is used to determine which class to initialize when working with # API query responses, and included models. @@resource_map = [ Alula::BillingProgram, Alula::Device, Alula::DeviceCharge, Alula::DeviceEventLog, Alula::DeviceProgram, Alula::DealerAddress, Alula::DealerProgram, Alula::DeviceCellularStatus, Alula::Self, Alula::User, Alula::AdminUser, Alula::UserPhone, Alula::UserAddress, Alula::UserPushtoken, Alula::UserPreferences, Alula::UserVideoProfile, Alula::Dealer, Alula::DealerBranding, Alula::ReceiverGroup, Alula::Station, Alula::DealerAccountTransfer, Alula::FeaturePlan, Alula::FeaturePlanVideo, Alula::FeaturePrice, Alula::FeatureBySubject, ].each_with_object({}) do |klass, resource_map| resource_map[klass.get_type] = klass end def self.class_from_resource_type(type) @@resource_map[type] || (raise "Unknown resource name #{type}, you need to map this "\ 'name to a class in the Alula module.') end def self.logger @@logger ||= defined?(Rails) ? Rails.logger : Logger.new(STDOUT) end def self.logger=(logger) @@logger = logger end end