Class: Verity::Resources::Spending

Inherits:
Object
  • Object
show all
Defined in:
lib/verity/resources/spending.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Spending

Returns a new instance of Spending.



6
7
8
# File 'lib/verity/resources/spending.rb', line 6

def initialize(client)
  @client = client
end

Instance Method Details

#by_code(code: nil, codes: nil, year: nil) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/verity/resources/spending.rb', line 10

def by_code(code: nil, codes: nil, year: nil)
  params = {}
  params[:code] = code if code
  params[:codes] = codes.join(',') if codes
  params[:year] = year if year

  @client.request(:get, '/spending/by-code', params: params)
end