Class: Rafflesia::TeamAccessResponse
- Inherits:
-
Rafflesia::Types::BaseModel
- Object
- Rafflesia::Types::BaseModel
- Rafflesia::TeamAccessResponse
- Defined in:
- lib/rafflesia/auth/team_access_response.rb
Constant Summary collapse
- HASH_ATTRS =
{ invitations: :invitations, members: :members }.freeze
Instance Attribute Summary collapse
-
#invitations ⇒ Object
Returns the value of attribute invitations.
-
#members ⇒ Object
Returns the value of attribute members.
Instance Method Summary collapse
-
#initialize(json) ⇒ TeamAccessResponse
constructor
A new instance of TeamAccessResponse.
Constructor Details
#initialize(json) ⇒ TeamAccessResponse
Returns a new instance of TeamAccessResponse.
17 18 19 20 21 22 |
# File 'lib/rafflesia/auth/team_access_response.rb', line 17 def initialize(json) super() hash = self.class.normalize(json) @invitations = (hash[:invitations] || []).map { |item| item ? Rafflesia::TeamInvitationResponse.new(item) : nil } @members = (hash[:members] || []).map { |item| item ? Rafflesia::TeamMemberResponse.new(item) : nil } end |
Instance Attribute Details
#invitations ⇒ Object
Returns the value of attribute invitations.
13 14 15 |
# File 'lib/rafflesia/auth/team_access_response.rb', line 13 def invitations @invitations end |
#members ⇒ Object
Returns the value of attribute members.
13 14 15 |
# File 'lib/rafflesia/auth/team_access_response.rb', line 13 def members @members end |