Module: Mailblastr::ContactProperties
- Defined in:
- lib/mailblastr/contact_properties.rb
Overview
Custom contact fields, usable as {merge_tags}.
Class Method Summary collapse
-
.create(params) ⇒ Object
POST /contact-properties — params: { key:, type: "string"|"number", fallback_value: }.
-
.delete(property_id) ⇒ Object
DELETE /contact-properties/:id.
-
.get(property_id) ⇒ Object
GET /contact-properties/:id.
-
.list(params = {}) ⇒ Object
GET /contact-properties.
-
.update(property_id, params) ⇒ Object
PATCH /contact-properties/:id — only fallback_value is mutable.
Class Method Details
.create(params) ⇒ Object
POST /contact-properties — params: { key:, type: "string"|"number", fallback_value: }
8 9 10 |
# File 'lib/mailblastr/contact_properties.rb', line 8 def create(params) Client.request(:post, "/contact-properties", body: params) end |
.delete(property_id) ⇒ Object
DELETE /contact-properties/:id
28 29 30 |
# File 'lib/mailblastr/contact_properties.rb', line 28 def delete(property_id) Client.request(:delete, "/contact-properties/#{Client.path_escape(property_id)}") end |
.get(property_id) ⇒ Object
GET /contact-properties/:id
13 14 15 |
# File 'lib/mailblastr/contact_properties.rb', line 13 def get(property_id) Client.request(:get, "/contact-properties/#{Client.path_escape(property_id)}") end |
.list(params = {}) ⇒ Object
GET /contact-properties
18 19 20 |
# File 'lib/mailblastr/contact_properties.rb', line 18 def list(params = {}) Client.request(:get, "/contact-properties", query: Client.pagination(params)) end |
.update(property_id, params) ⇒ Object
PATCH /contact-properties/:id — only fallback_value is mutable.
23 24 25 |
# File 'lib/mailblastr/contact_properties.rb', line 23 def update(property_id, params) Client.request(:patch, "/contact-properties/#{Client.path_escape(property_id)}", body: params) end |