Class: Notisend::Resources::Lists
- Inherits:
-
Base
- Object
- Base
- Notisend::Resources::Lists
show all
- Defined in:
- lib/notisend/resources/lists.rb
Overview
Recipient lists (groups): /email/lists
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#create(title:) ⇒ Object
7
8
9
|
# File 'lib/notisend/resources/lists.rb', line 7
def create(title:)
client.post(email_path('lists'), { title: })
end
|
#delete(id:) ⇒ Object
23
24
25
|
# File 'lib/notisend/resources/lists.rb', line 23
def delete(id:)
client.delete(email_path('lists', id))
end
|
#get(id:) ⇒ Object
15
16
17
|
# File 'lib/notisend/resources/lists.rb', line 15
def get(id:)
client.get(email_path('lists', id))
end
|
#list(page_number: nil, page_size: nil) ⇒ Object
11
12
13
|
# File 'lib/notisend/resources/lists.rb', line 11
def list(page_number: nil, page_size: nil)
paginated(email_path('lists'), page_params(page_number:, page_size:))
end
|
#update(id:, title:) ⇒ Object
19
20
21
|
# File 'lib/notisend/resources/lists.rb', line 19
def update(id:, title:)
client.patch(email_path('lists', id), { title: })
end
|