Sha256: 2ba57675da3df0f2e5664653c616914cbdf1d944578684144345761d03b86c4a
Contents?: true
Size: 1.1 KB
Versions: 4
Compression:
Stored size: 1.1 KB
Contents
module RockRMS class Client module Person def list_people(options = {}) res = get(people_path, options) RockRMS::Person.format(res) end def find_person(id) res = get(people_path(id)) RockRMS::Person.format(res) end def find_person_by_email(email) res = get("People/GetByEmail/#{email}") RockRMS::Person.format(res) end def find_person_by_name(full_name) res = get("People/Search?name=#{full_name}&includeHtml=false&includeDetails=true&includeBusinesses=false&includeDeceased=false") RockRMS::Person.format(res) end def create_person(first_name:, last_name:, email:) options = { 'IsSystem' => false, 'FirstName' => first_name, 'LastName' => last_name, 'Email' => email, 'Gender' => 1 } post(people_path, options) end def update_person(id, options = {}) put(people_path(id), options) end private def people_path(id = nil) id ? "People/#{id}" : 'People' end end end end
Version data entries
4 entries across 4 versions & 1 rubygems