Sha256: 61ba4da6bc0ce73d2c2f649387b0efb3daf61dbc9b8cc26bcdafe507962bb68a
Contents?: true
Size: 535 Bytes
Versions: 15
Compression:
Stored size: 535 Bytes
Contents
module CiviCrm module Actions module Create module ClassMethods def create(attrs = {}) params = {'entity' => entity_class_name, 'action' => 'create'} response = CiviCrm::Client.request(:post, params.merge(attrs)) if response.first.nil? raise Error, "Couldn't create #{entity_class_name}" end Resource.build_from(response.first, params) end end def self.included(base) base.extend(ClassMethods) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems