Method: LoopsRails::Contacts#create
- Defined in:
- lib/loops_rails/client/contacts.rb
#create(email:, **attributes) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/loops_rails/client/contacts.rb', line 3 def create(email:, **attributes) payload = { email: email }.merge(attributes).compact response = @conn.post("contacts/create") do |req| req.body = payload.to_json end parse_response(response) end |