Module: Resend::Segments
- Defined in:
- lib/resend/segments.rb
Overview
Segments api wrapper
Class Method Summary collapse
- .create(params) ⇒ Object
- .get(segment_id = "") ⇒ Object
- .list(params = {}) ⇒ Object
- .remove(segment_id = "") ⇒ Object
Class Method Details
.create(params) ⇒ Object
8 9 10 11 |
# File 'lib/resend/segments.rb', line 8 def create(params) path = "segments" Resend::Request.new(path, params, "post").perform end |
.get(segment_id = "") ⇒ Object
14 15 16 17 |
# File 'lib/resend/segments.rb', line 14 def get(segment_id = "") path = "segments/#{segment_id}" Resend::Request.new(path, {}, "get").perform end |
.list(params = {}) ⇒ Object
20 21 22 23 |
# File 'lib/resend/segments.rb', line 20 def list(params = {}) path = Resend::PaginationHelper.build_paginated_path("segments", params) Resend::Request.new(path, {}, "get").perform end |