class EatabitRails::Account

Attributes

created_at[R]
enabled[R]
environment[R]
name[R]

Public Class Methods

find() click to toggle source
# File lib/eatabit_rails/account.rb, line 19
def self.find
  account_uri = EatabitRails::REST::Uri.new.account
  params = EatabitRails::REST::Uri.default_params
  response = RestClient.get(account_uri, params)
  attributes = JSON.parse(response.body)['account']

  new(attributes)
end
new(attributes) click to toggle source
# File lib/eatabit_rails/account.rb, line 12
def initialize(attributes)
  @name = attributes['name']
  @environment = attributes['environment']
  @enabled = attributes['enabled']
  @created_at = attributes['created_at']
end