Method: LoopsRails::Contacts#update

Defined in:
lib/loops_rails/client/contacts.rb

#update(email:, **attributes) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/loops_rails/client/contacts.rb', line 13

def update(email:, **attributes)
  payload = { email: email }.merge(attributes).compact

  response = @conn.put("contacts/update") do |req|
    req.body = payload.to_json
  end

  parse_response(response)
end