Sha256: c8a938abb47d7b2785bc0bc2269f780a4b8207a2f5fb5547e54d17f5670419ad

Contents?: true

Size: 798 Bytes

Versions: 12

Compression:

Stored size: 798 Bytes

Contents

module Maestrano
  module SSO
    class BaseGroup
      attr_accessor :local_id
      attr_reader :uid,:country, :company_name, :free_trial_end_at
      
      # Initializer
      # @param Maestrano::SAML::Response
      def initialize(saml_response)
        att = saml_response.attributes
        @uid = att['group_uid']
        @country = att['country']
        @free_trial_end_at = Time.iso8601(att['group_end_free_trial'])
        @company_name = att['company_name']
      end
      
      def to_hash
        {
          provider: 'maestrano',
          uid: self.uid,
          info: {
            free_trial_end_at: self.free_trial_end_at,
            company_name: self.company_name,
            country: self.country,
          },
          extra: {}
        }
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
maestrano-0.9.0 lib/maestrano/sso/base_group.rb
maestrano-ruby-test-0.8.3 lib/maestrano/sso/base_group.rb
maestrano-0.8.2 lib/maestrano/sso/base_group.rb
maestrano-0.8.1 lib/maestrano/sso/base_group.rb
maestrano-0.8.0 lib/maestrano/sso/base_group.rb
maestrano-0.7.0 lib/maestrano/sso/base_group.rb
maestrano-0.6.0 lib/maestrano/sso/base_group.rb
maestrano-0.5.0 lib/maestrano/sso/base_group.rb
maestrano-0.4.0 lib/maestrano/sso/base_group.rb
maestrano-0.3.0 lib/maestrano/sso/base_group.rb
maestrano-0.2.0 lib/maestrano/sso/base_group.rb
maestrano-0.1.0 lib/maestrano/sso/base_group.rb