Class: FreshBooks::System

Inherits:
Base
  • Object
show all
Defined in:
lib/freshbooks/system.rb

Instance Attribute Summary

Attributes inherited from Base

#error_msg

Class Method Summary collapse

Methods inherited from Base

actions, #api_action, api_class_name, #api_create_action, api_get_action, api_list_action, #api_update_action, class_of_freshbooks_base_descendant, connection, define_class_method, establish_connection, #initialize, metaclass, new_from_xml, #primary_key, #primary_key_value, #primary_key_value=, #to_xml

Methods included from FreshBooks::Schema::Mixin

included

Constructor Details

This class inherits a constructor from FreshBooks::Base

Class Method Details

.currentObject



9
10
11
12
# File 'lib/freshbooks/system.rb', line 9

def self.current
  response = FreshBooks::Base.connection.call_api("#{api_class_name}.current")
  response.success? ? self.new_from_xml(response.elements[1]) : nil
end