Module: TheCity::API::Accounts

Includes:
Utils
Included in:
Client
Defined in:
lib/the_city/api/accounts.rb

Instance Method Summary collapse

Instance Method Details

#church_account(options = {}) ⇒ TheCity::Account Also known as: current_account, current_church

Returns the current City account associated with the current user

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:



15
16
17
18
# File 'lib/the_city/api/accounts.rb', line 15

def (options={})
   = nil if options.delete(:force_download)
   ||= object_from_response(TheCity::, :get, "/church_account", options)
end

#my_accounts(options = {}) ⇒ Array<TheCity::Account>

Returns an array of all the City accounts associated with the current user

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:



27
28
29
30
# File 'lib/the_city/api/accounts.rb', line 27

def my_accounts(options={})
  @my_accounts = nil if options.delete(:force_download)
  @my_accounts ||= objects_from_response(TheCity::, :get, "/me/accounts", options)
end