Class: SendpulseClient::Addressbook
- Inherits:
-
Object
- Object
- SendpulseClient::Addressbook
- Defined in:
- lib/sendpulse_client/addressbook.rb
Constant Summary collapse
- URL =
'/addressbooks'.freeze
Class Method Summary collapse
Class Method Details
.add_clients(book_id, clients) ⇒ Object
16 17 18 19 |
# File 'lib/sendpulse_client/addressbook.rb', line 16 def add_clients(book_id, clients) emails = JSON.generate(clients) Connection.post_request("#{URL}/#{book_id}/emails", emails: emails) end |
.all ⇒ Object
8 9 10 |
# File 'lib/sendpulse_client/addressbook.rb', line 8 def all Connection.get_request(URL) end |
.create(name) ⇒ Object
12 13 14 |
# File 'lib/sendpulse_client/addressbook.rb', line 12 def create(name) Connection.post_request(URL, 'bookName' => name) end |