Class: Ghee::API::Users::Emails::Proxy

Inherits:
ResourceProxy show all
Defined in:
lib/ghee/api/emails.rb

Instance Attribute Summary

Attributes inherited from ResourceProxy

#connection, #current_page, #id, #pagination, #params, #path_prefix, #total

Instance Method Summary collapse

Methods inherited from ResourceProxy

accept_header, #all, #all_parallel, #build_prefix, #initialize, #method_missing, #paginate, #raw, #subject

Methods included from CUD

#create, #destroy, #patch

Constructor Details

This class inherits a constructor from Ghee::ResourceProxy

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Ghee::ResourceProxy

Instance Method Details

#add(emails) ⇒ Object



12
13
14
# File 'lib/ghee/api/emails.rb', line 12

def add(emails)
  connection.post(path_prefix, emails).body
end

#remove(emails) ⇒ Object



16
17
18
19
20
# File 'lib/ghee/api/emails.rb', line 16

def remove(emails)
  connection.delete(path_prefix) do |req|
    req.body = emails
  end.status == 204
end