Class: Syncano::Resources::Admin
- Defined in:
- lib/syncano/resources/admin.rb
Overview
Admin resource
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.create(client, attributes) ⇒ Syncano::Resources::Base
Wrapper for api “new” method Creates object in Syncano.
-
.find_by_email(client, email, scope_parameters = {}, conditions = {}) ⇒ Syncano::Resources::Admin
Wrapper for api “get_one” method with admin_email as a key.
Methods inherited from Base
#[], #[]=, all, #batch, batch_create, #batch_destroy, #batch_save, #batch_update, count, #destroy, #destroyed?, find, #initialize, #new_record?, #reload!, #save, #saved?, #update
Constructor Details
This class inherits a constructor from Syncano::Resources::Base
Class Method Details
.create(client, attributes) ⇒ Syncano::Resources::Base
Wrapper for api “new” method Creates object in Syncano
20 21 22 23 |
# File 'lib/syncano/resources/admin.rb', line 20 def self.create(client, attributes) perform_create(client, nil, attributes) all(client, map_to_scope_parameters(attributes)).last end |
.find_by_email(client, email, scope_parameters = {}, conditions = {}) ⇒ Syncano::Resources::Admin
Wrapper for api “get_one” method with admin_email as a key
11 12 13 |
# File 'lib/syncano/resources/admin.rb', line 11 def self.find_by_email(client, email, scope_parameters = {}, conditions = {}) perform_find(client, :admin_email, email, scope_parameters, conditions) end |