Class: Maestrano::SSO::BaseGroup
- Inherits:
-
Object
- Object
- Maestrano::SSO::BaseGroup
- Defined in:
- lib/maestrano/sso/base_group.rb
Instance Attribute Summary collapse
-
#company_name ⇒ Object
readonly
Returns the value of attribute company_name.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#free_trial_end_at ⇒ Object
readonly
Returns the value of attribute free_trial_end_at.
-
#has_credit_card ⇒ Object
readonly
Returns the value of attribute has_credit_card.
-
#local_id ⇒ Object
Returns the value of attribute local_id.
-
#uid ⇒ Object
readonly
Returns the value of attribute uid.
Instance Method Summary collapse
-
#initialize(saml_response) ⇒ BaseGroup
constructor
Initializer.
- #to_hash ⇒ Object
Constructor Details
#initialize(saml_response) ⇒ BaseGroup
Initializer
9 10 11 12 13 14 15 16 |
# File 'lib/maestrano/sso/base_group.rb', line 9 def initialize(saml_response) att = saml_response.attributes @uid = att['group_uid'] @has_credit_card = (att['group_has_credit_card'] == 'true') @country = att['country'] @free_trial_end_at = Time.iso8601(att['group_end_free_trial']) @company_name = att['company_name'] end |
Instance Attribute Details
#company_name ⇒ Object (readonly)
Returns the value of attribute company_name.
5 6 7 |
# File 'lib/maestrano/sso/base_group.rb', line 5 def company_name @company_name end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
5 6 7 |
# File 'lib/maestrano/sso/base_group.rb', line 5 def country @country end |
#free_trial_end_at ⇒ Object (readonly)
Returns the value of attribute free_trial_end_at.
5 6 7 |
# File 'lib/maestrano/sso/base_group.rb', line 5 def free_trial_end_at @free_trial_end_at end |
#has_credit_card ⇒ Object (readonly)
Returns the value of attribute has_credit_card.
5 6 7 |
# File 'lib/maestrano/sso/base_group.rb', line 5 def has_credit_card @has_credit_card end |
#local_id ⇒ Object
Returns the value of attribute local_id.
4 5 6 |
# File 'lib/maestrano/sso/base_group.rb', line 4 def local_id @local_id end |
#uid ⇒ Object (readonly)
Returns the value of attribute uid.
5 6 7 |
# File 'lib/maestrano/sso/base_group.rb', line 5 def uid @uid end |
Instance Method Details
#to_hash ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/maestrano/sso/base_group.rb', line 18 def to_hash { provider: 'maestrano', uid: self.uid, info: { free_trial_end_at: self.free_trial_end_at, company_name: self.company_name, has_credit_card: self.has_credit_card, country: self.country, }, extra: {} } end |