Sha256: 497a90290efe52d6c979a17bab415f75cfad81cf2d22a2c4be7075d696aa4d24

Contents?: true

Size: 907 Bytes

Versions: 9

Compression:

Stored size: 907 Bytes

Contents

class Syncano
  module Resources
    # Admin resource
    class Admin < ::Syncano::Resources::Base
      # Wrapper for api "get_one" method with admin_email as a key
      # @param [Syncano::Clients::Base] client
      # @param [String] email
      # @param [Hash] scope_parameters
      # @param [Hash] conditions
      # @return [Syncano::Resources::Admin]
      def self.find_by_email(client, email, scope_parameters = {}, conditions = {})
        perform_find(client, :admin_email, email, scope_parameters, conditions)
      end

      # Wrapper for api "new" method
      # Creates object in Syncano
      # @param [Syncano::Clients::Base] client
      # @param [Hash] attributes
      # @return [Syncano::Resources::Base]
      def self.create(client, attributes)
        perform_create(client, nil, attributes)
        all(client, map_to_scope_parameters(attributes)).last
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
syncano-3.1.4 lib/syncano/resources/admin.rb
syncano-3.1.3 lib/syncano/resources/admin.rb
syncano-3.1.2 lib/syncano/resources/admin.rb
syncano-3.1.1 lib/syncano/resources/admin.rb
syncano-3.1.1.beta5 lib/syncano/resources/admin.rb
syncano-3.1.1.beta4 lib/syncano/resources/admin.rb
syncano-3.1.1.beta3 lib/syncano/resources/admin.rb
syncano-3.1.1.beta2 lib/syncano/resources/admin.rb
syncano-3.1.1.beta lib/syncano/resources/admin.rb