Class: KlaviyoAPI::Metric
Class Method Summary
collapse
Instance Method Summary
collapse
count
Methods inherited from Base
activate_session, element_path, headers, reset_session, #to_h
Class Method Details
.collection_path(prefix_options = {}, query_options = {}) ⇒ Object
18
19
20
|
# File 'lib/klaviyo_api/resources/metric.rb', line 18
def collection_path(prefix_options = {}, query_options = {})
super prefix_options, query_options.deep_merge(api_key: ['api-key'])
end
|
.events ⇒ Object
24
25
26
|
# File 'lib/klaviyo_api/resources/metric.rb', line 24
def events
KlaviyoAPI::Event.all
end
|
.find_single(_scope, _options) ⇒ Object
14
15
16
|
# File 'lib/klaviyo_api/resources/metric.rb', line 14
def find_single(_scope, _options)
raise KlaviyoAPI::InvalidOperation, 'Cannot get single Metric via API. Please use KlaviyoAPI::Metric#all.'
end
|
Instance Method Details
#create ⇒ Object
33
34
35
|
# File 'lib/klaviyo_api/resources/metric.rb', line 33
def create
raise KlaviyoAPI::InvalidOperation, 'Cannot create Metrics via API.'
end
|
#destroy ⇒ Object
29
30
31
|
# File 'lib/klaviyo_api/resources/metric.rb', line 29
def destroy
raise KlaviyoAPI::InvalidOperation, 'Cannot delete Metrics via API.'
end
|
#update ⇒ Object
37
38
39
|
# File 'lib/klaviyo_api/resources/metric.rb', line 37
def update
raise KlaviyoAPI::InvalidOperation, 'Cannot update Metrics via API.'
end
|