Class: Lago::Api::Resources::AddOn
- Inherits:
-
Base
- Object
- Base
- Lago::Api::Resources::AddOn
show all
- Defined in:
- lib/lago/api/resources/add_on.rb
Instance Attribute Summary
Attributes inherited from Base
#client
Instance Method Summary
collapse
Methods inherited from Base
#create, #destroy, #get, #get_all, #initialize, #update
Instance Method Details
#api_resource ⇒ Object
9
10
11
|
# File 'lib/lago/api/resources/add_on.rb', line 9
def api_resource
'add_ons'
end
|
#root_name ⇒ Object
13
14
15
|
# File 'lib/lago/api/resources/add_on.rb', line 13
def root_name
'add_on'
end
|
#whitelist_params(params) ⇒ Object
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/lago/api/resources/add_on.rb', line 17
def whitelist_params(params)
{
root_name => {
name: params[:name],
invoice_display_name: params[:invoice_display_name],
code: params[:code],
description: params[:description],
amount_cents: params[:amount_cents],
amount_currency: params[:amount_currency],
tax_codes: params[:tax_codes],
}.compact
}
end
|