Module: KB::Upsertable::ClassMethods

Defined in:
lib/kb/models/concerns/upsertable.rb

Instance Method Summary collapse

Instance Method Details

#upsert(attributes) ⇒ Object



10
11
12
13
14
# File 'lib/kb/models/concerns/upsertable.rb', line 10

def upsert(attributes)
  from_api kb_client.upsert(attributes)
rescue Faraday::Error => e
  raise KB::Error.from_faraday(e)
end