Sha256: 1afe0e0f97661ffe9f2fe8b5a9216f5d3219c68f99ffe2d28334af27de85a0ce

Contents?: true

Size: 635 Bytes

Versions: 23

Compression:

Stored size: 635 Bytes

Contents

module Sorenson
  module Services
    class Site < Base
      attr_accessor :name, :account_id, :id, :description
      def self.create(name, options = {})
        new(post_to('/sites', {:site => {:name => name}.merge(options)}))
      end
      
      def self.all
        get_from('/sites')
      end
      
      def Site.find_by_name(name)
        new(get_from('/sites/find_by_name/', :name => name))
      end
      
      def initialize(data)
        @name         = data['name']
        @account_id   = data['account_id']
        @id           = data['id']
        @description  = data['description']
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
360_services-1.1.3 lib/sorenson/services/site.rb
360_services-1.1.2 lib/sorenson/services/site.rb
360_services-1.1.1 lib/sorenson/services/site.rb
360_services-1.0.10 lib/sorenson/services/site.rb
360_services-1.1.0 lib/sorenson/services/site.rb
360_services-1.0.9 lib/sorenson/services/site.rb
360_services-1.0.8 lib/sorenson/services/site.rb
360_services-1.0.7 lib/sorenson/services/site.rb
360_services-1.0.6 lib/sorenson/services/site.rb
360_services-1.0.5 lib/sorenson/services/site.rb
360_services-1.0.4 lib/sorenson/services/site.rb
360_services-1.0.3 lib/sorenson/services/site.rb
360_services-1.0.2 lib/sorenson/services/site.rb
360_services-0.0.8 lib/sorenson/services/site.rb
360_services-0.0.7 lib/sorenson/services/site.rb
360_services-0.0.6 lib/sorenson/services/site.rb
360_services-0.0.5 lib/sorenson/services/site.rb
360_services-1.0.1 lib/sorenson/services/site.rb
360_services-1.0.0 lib/sorenson/services/site.rb
360_services-0.0.4 lib/sorenson/services/site.rb