Class: Lago::Api::Resources::Tax

Inherits:
Base
  • Object
show all
Defined in:
lib/lago/api/resources/tax.rb

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#create, #destroy, #get, #get_all, #initialize, #update

Constructor Details

This class inherits a constructor from Lago::Api::Resources::Base

Instance Method Details

#api_resourceObject



9
10
11
# File 'lib/lago/api/resources/tax.rb', line 9

def api_resource
  'taxes'
end

#root_nameObject



13
14
15
# File 'lib/lago/api/resources/tax.rb', line 13

def root_name
  'tax'
end

#whitelist_params(params) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/lago/api/resources/tax.rb', line 17

def whitelist_params(params)
  {
    root_name => {
      name: params[:name],
      code: params[:code],
      rate: params[:rate],
      description: params[:description],
      applied_to_organization: params[:applied_to_organization],
    }.compact,
  }
end