Class: Lago::Api::Resources::BillableMetric
- Inherits:
-
Base
- Object
- Base
- Lago::Api::Resources::BillableMetric
show all
- Defined in:
- lib/lago/api/resources/billable_metric.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
7
8
9
|
# File 'lib/lago/api/resources/billable_metric.rb', line 7
def api_resource
'billable_metrics'
end
|
#root_name ⇒ Object
11
12
13
|
# File 'lib/lago/api/resources/billable_metric.rb', line 11
def root_name
'billable_metric'
end
|
#whitelist_params(params) ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/lago/api/resources/billable_metric.rb', line 15
def whitelist_params(params)
{
root_name => {
name: params[:name],
code: params[:code],
description: params[:description],
recurring: params[:recurring],
aggregation_type: params[:aggregation_type],
weighted_interval: params[:weighted_interval],
field_name: params[:field_name],
group: params[:group],
}.compact,
}
end
|