Sha256: cc30def54eb8253ced59f645b05f8e2df3662cd6ae3fa66c7d535771bc98e778

Contents?: true

Size: 870 Bytes

Versions: 19

Compression:

Stored size: 870 Bytes

Contents

module Sorenson
  module Services
    class Subaccount < Base

      # Attributes
      attr_accessor :account, :id, :username, :status, :accountId, :email, :dateRetrieved
      
      # Class Methods

      # Instance Methods
      
      def initialize(account, data)
        self.account                  = account
        self.username                 = data['username']
        self.id                       = data['id']
        self.status                   = data['status']
        self.accountId                = data['accountId']
        self.email                    = data['email']
        self.dateRetrieved            = data['dateRetrieved']
      end
      
      def activate!
        Base.put_to("/subaccounts/#{id}/activate")
      end
      
      def deactivate!
        Base.put_to("/subaccounts/#{id}/deactivate")
      end
      
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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