Class: Maestrano::SSO::BaseGroup
- Inherits:
-
Object
- Object
- Maestrano::SSO::BaseGroup
- Defined in:
- lib/maestrano/sso/base_group.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#company_name ⇒ Object
readonly
Returns the value of attribute company_name.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#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.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#org_uid ⇒ Object
readonly
Returns the value of attribute org_uid.
-
#timezone ⇒ Object
readonly
Returns the value of attribute timezone.
-
#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
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/maestrano/sso/base_group.rb', line 11 def initialize(saml_response) att = saml_response.attributes @uid = att['group_uid'] @has_credit_card = (att['group_has_credit_card'] == 'true') @free_trial_end_at = Time.iso8601(att['group_end_free_trial']) @company_name = att['company_name'] @name = att['group_name'] @org_uid = att['group_org_uid'] @email = att['group_email'] @city = att['group_city'] @timezone = att['group_timezone'] @currency = att['group_currency'] @country = att['country'] end |
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city.
5 6 7 |
# File 'lib/maestrano/sso/base_group.rb', line 5 def city @city end |
#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 |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
5 6 7 |
# File 'lib/maestrano/sso/base_group.rb', line 5 def currency @currency end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
5 6 7 |
# File 'lib/maestrano/sso/base_group.rb', line 5 def email @email 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 |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/maestrano/sso/base_group.rb', line 5 def name @name end |
#org_uid ⇒ Object (readonly)
Returns the value of attribute org_uid.
5 6 7 |
# File 'lib/maestrano/sso/base_group.rb', line 5 def org_uid @org_uid end |
#timezone ⇒ Object (readonly)
Returns the value of attribute timezone.
5 6 7 |
# File 'lib/maestrano/sso/base_group.rb', line 5 def timezone @timezone 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
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/maestrano/sso/base_group.rb', line 26 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, name: self.name, org_uid: self.org_uid, email: self.email, city: self.city, country: self.country, timezone: self.timezone, currency: self.currency }, extra: {} } end |