Class: SendGridWebApi::SubUserModules::MonitorRecord

Inherits:
SendGridWebApi::SubUser show all
Defined in:
lib/sub_user/monitor_records.rb

Constant Summary collapse

MONITOR_RECORD_URL =
"apiv2/customer.monitor.json"

Instance Attribute Summary

Attributes inherited from Base

#api_key

Instance Method Summary collapse

Methods inherited from SendGridWebApi::SubUser

#base_url

Methods included from SendGridWebApi::SubUserModules

#apps, #auth, #bounces, #event_notification, #iframe, #invalid_emails, #ip_management, #limits, #management, #monitor_records, #parse_email, #spam, #stats, #unsubscribes, #white_label

Methods inherited from Base

#builder_options, #initialize, #make_request_url, #query_api, #query_delete_api, #query_patch_api, #query_post_api, #query_post_json_api, #session, #to_query

Constructor Details

This class inherits a constructor from SendGridWebApi::Base

Instance Method Details

#add_user(options = {}) ⇒ Object



25
26
27
28
# File 'lib/sub_user/monitor_records.rb', line 25

def add_user options = {}
  options.merge!({:task => "append"}) unless options[:task]
  query_api(MONITOR_RECORD_URL, options)
end

#create(options = {}) ⇒ Object



10
11
12
13
# File 'lib/sub_user/monitor_records.rb', line 10

def create options = {}
  options.merge!({:task => "create"}) unless options[:task]
  query_api(MONITOR_RECORD_URL, options)
end

#delete(options = {}) ⇒ Object



20
21
22
23
# File 'lib/sub_user/monitor_records.rb', line 20

def delete options = {}
  options.merge!({:task => "delete"}) unless options[:task]
  query_api(MONITOR_RECORD_URL, options)
end

#edit(options = {}) ⇒ Object



15
16
17
18
# File 'lib/sub_user/monitor_records.rb', line 15

def edit options = {}
  options.merge!({:task => "edit"}) unless options[:task]
  query_api(MONITOR_RECORD_URL, options)
end

#get(options = {}) ⇒ Object



5
6
7
8
# File 'lib/sub_user/monitor_records.rb', line 5

def get options = {}
  options.merge!({:task => "list"}) unless options[:task]
  query_api(MONITOR_RECORD_URL, options)
end

#remove_user(options = {}) ⇒ Object



30
31
32
33
# File 'lib/sub_user/monitor_records.rb', line 30

def remove_user options = {}
  options.merge!({:task => "detach"}) unless options[:task]
  query_api(MONITOR_RECORD_URL, options)
end