Class: Moneybird::Service::Administration

Inherits:
Object
  • Object
show all
Includes:
Traits::FindAll, Traits::Service
Defined in:
lib/moneybird/service/administration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Traits::Service

#build, #resource_path

Methods included from Traits::FindAll

#all, #each, #each_page, #first, #first_page, #map

Constructor Details

#initialize(client) ⇒ Administration

Returns a new instance of Administration.



8
9
10
11
# File 'lib/moneybird/service/administration.rb', line 8

def initialize(client)
  @client = client
  @preloaded_data = nil
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



6
7
8
# File 'lib/moneybird/service/administration.rb', line 6

def client
  @client
end

#preloaded_dataObject (readonly)

Returns the value of attribute preloaded_data.



6
7
8
# File 'lib/moneybird/service/administration.rb', line 6

def preloaded_data
  @preloaded_data
end

Instance Method Details

#find(id) ⇒ Object



13
14
15
# File 'lib/moneybird/service/administration.rb', line 13

def find(id)
  all.find{ |administration| administration.id.to_i == id }
end