Class: Mobiscroll::Connect::Attendee

Inherits:
Struct
  • Object
show all
Defined in:
lib/mobiscroll/connect/models.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#emailObject

Returns the value of attribute email

Returns:

  • (Object)

    the current value of email



86
87
88
# File 'lib/mobiscroll/connect/models.rb', line 86

def email
  @email
end

#organizerObject

Returns the value of attribute organizer

Returns:

  • (Object)

    the current value of organizer



86
87
88
# File 'lib/mobiscroll/connect/models.rb', line 86

def organizer
  @organizer
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



86
87
88
# File 'lib/mobiscroll/connect/models.rb', line 86

def status
  @status
end

Class Method Details

.from_h(hash) ⇒ Object



87
88
89
90
91
92
93
94
95
# File 'lib/mobiscroll/connect/models.rb', line 87

def self.from_h(hash)
  return nil if hash.nil?

  new(
    email: hash['email'] || hash[:email],
    status: hash['status'] || hash[:status],
    organizer: hash['organizer'] || hash[:organizer]
  )
end

Instance Method Details

#to_hObject



97
98
99
100
101
102
# File 'lib/mobiscroll/connect/models.rb', line 97

def to_h
  result = { 'email' => email }
  result['status'] = status unless status.nil?
  result['organizer'] = organizer unless organizer.nil?
  result
end