Module: Millionsend::ContactProperties
- Defined in:
- lib/millionsend/contact_properties.rb
Overview
Typed custom properties for contacts. key and type are fixed at creation; only fallback_value can change.
Class Method Summary collapse
-
.create(params) ⇒ Object
POST /contact-properties — key, type ("string"/"number"), fallback_value.
-
.get(id) ⇒ Object
GET /contact-properties/:id.
-
.list(options = {}) ⇒ Object
GET /contact-properties — accepts limit:/after:/before:.
-
.remove(id) ⇒ Object
DELETE /contact-properties/:id.
-
.update(id, params) ⇒ Object
PATCH /contact-properties/:id — fallback_value (nil clears it).
Class Method Details
.create(params) ⇒ Object
POST /contact-properties — key, type ("string"/"number"), fallback_value.
9 10 11 |
# File 'lib/millionsend/contact_properties.rb', line 9 def create(params) Millionsend::Request.new(method: :post, path: "/contact-properties", body: params).perform end |
.get(id) ⇒ Object
GET /contact-properties/:id
14 15 16 |
# File 'lib/millionsend/contact_properties.rb', line 14 def get(id) Millionsend::Request.new(method: :get, path: member_path(id)).perform end |
.list(options = {}) ⇒ Object
GET /contact-properties — accepts limit:/after:/before:.
19 20 21 22 23 |
# File 'lib/millionsend/contact_properties.rb', line 19 def list( = {}) Millionsend::Request.new( method: :get, path: "/contact-properties", query: Millionsend::Util.list_query() ).perform end |
.remove(id) ⇒ Object
DELETE /contact-properties/:id
31 32 33 |
# File 'lib/millionsend/contact_properties.rb', line 31 def remove(id) Millionsend::Request.new(method: :delete, path: member_path(id)).perform end |
.update(id, params) ⇒ Object
PATCH /contact-properties/:id — fallback_value (nil clears it).
26 27 28 |
# File 'lib/millionsend/contact_properties.rb', line 26 def update(id, params) Millionsend::Request.new(method: :patch, path: member_path(id), body: params).perform end |