Class: Supercast::UsageAlert

Inherits:
Resource show all
Extended by:
Operations::List
Defined in:
lib/supercast/resources/usage_alert.rb

Constant Summary collapse

OBJECT_NAME =
'usage_alert'

Instance Method Summary collapse

Methods included from Operations::List

list

Methods inherited from Resource

class_name, custom_method, object_name, #object_name, #refresh, resource_url, #resource_url, retrieve

Methods included from Operations::Request

included

Methods inherited from DataObject

#==, #[], #[]=, #as_json, construct_from, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Supercast::DataObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Supercast::DataObject

Instance Method Details

#dismiss(params = {}, opts = {}) ⇒ Object



13
14
15
16
# File 'lib/supercast/resources/usage_alert.rb', line 13

def dismiss(params = {}, opts = {})
  resp, opts = request(:patch, resource_url + '/dismiss', params, opts)
  initialize_from(resp.data, opts)
end

#ignore(params = {}, opts = {}) ⇒ Object



18
19
20
21
# File 'lib/supercast/resources/usage_alert.rb', line 18

def ignore(params = {}, opts = {})
  resp, opts = request(:patch, resource_url + '/ignore', params, opts)
  initialize_from(resp.data, opts)
end

#suspend(params = {}, opts = {}) ⇒ Object



23
24
25
26
# File 'lib/supercast/resources/usage_alert.rb', line 23

def suspend(params = {}, opts = {})
  resp, opts = request(:patch, resource_url + '/suspend', params, opts)
  initialize_from(resp.data, opts)
end