Class: LoopsSdk::ContactProperties
- Defined in:
- lib/loops_sdk/contact_properties.rb
Class Method Summary collapse
Class Method Details
.create(name:, type:) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/loops_sdk/contact_properties.rb', line 6 def create(name:, type:) body = { name: name, type: type } make_request(method: :post, path: "v1/contacts/properties", body: body) end |
.list(list: nil) ⇒ Object
13 14 15 16 |
# File 'lib/loops_sdk/contact_properties.rb', line 13 def list(list: nil) raise ArgumentError, "List value must be nil, 'custom' or 'all'." unless [nil, "custom", "all"].include?(list) make_request(method: :get, path: "v1/contacts/properties", params: { list: list || "all" }) end |