Class: FrameIo::Account

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/frame_io/account.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all(client:) ⇒ Object



3
4
5
# File 'lib/frame_io/account.rb', line 3

def self.all(client:)
  client.get_resource('accounts', object_class: self)
end

.find(id:, client:) ⇒ Object



7
8
9
# File 'lib/frame_io/account.rb', line 7

def self.find(id:, client:)
  client.get_resource("accounts/#{id}", object_class: self)
end

Instance Method Details

#teams(cache: true) ⇒ Object



11
12
13
14
15
# File 'lib/frame_io/account.rb', line 11

def teams(cache: true)
  @teams = nil unless cache

  @teams ||= Team.all(account: self, client:)
end