Sha256: 67d911ab2a1f06dfd79e081f05980ffcbc16099307dad1d4630954d426cbcf53
Contents?: true
Size: 474 Bytes
Versions: 1
Compression:
Stored size: 474 Bytes
Contents
module Pipekit class Person include Repository def get_by_email(email) request.get("find", term: email, search_by_email: 1) end def get_by_name(name) request.get("find", term: name) end def create_or_update(fields) person = find_by(email: fields[:email]) update(person["id"], fields) rescue ResourceNotFoundError create(fields) end def find_deals(id) request.get("#{id}/deals") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pipekit-1.0.0 | lib/pipekit/person.rb |