Class: StackOne::Models::Shared::Completion

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/stack_one/models/shared/completion.rb

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(certificate_url: nil, completed_at: nil, content_external_reference: nil, content_id: nil, course_id: nil, created_at: nil, external_id: nil, external_reference: nil, id: nil, learning_object_external_reference: nil, learning_object_id: nil, learning_object_type: nil, remote_content_id: nil, remote_course_id: nil, remote_external_id: nil, remote_id: nil, remote_learning_object_id: nil, remote_user_id: nil, result: nil, score: nil, time_spent: nil, unified_custom_fields: nil, updated_at: nil, user_id: nil) ⇒ Completion

Returns a new instance of Completion.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/stack_one/models/shared/completion.rb', line 81

def initialize(certificate_url: nil, completed_at: nil, content_external_reference: nil, content_id: nil, course_id: nil, created_at: nil, external_id: nil, external_reference: nil, id: nil, learning_object_external_reference: nil, learning_object_id: nil, learning_object_type: nil, remote_content_id: nil, remote_course_id: nil, remote_external_id: nil, remote_id: nil, remote_learning_object_id: nil, remote_user_id: nil, result: nil, score: nil, time_spent: nil, unified_custom_fields: nil, updated_at: nil, user_id: nil)
  @certificate_url = certificate_url
  @completed_at = completed_at
  @content_external_reference = content_external_reference
  @content_id = content_id
  @course_id = course_id
  @created_at = created_at
  @external_id = external_id
  @external_reference = external_reference
  @id = id
  @learning_object_external_reference = learning_object_external_reference
  @learning_object_id = learning_object_id
  @learning_object_type = learning_object_type
  @remote_content_id = remote_content_id
  @remote_course_id = remote_course_id
  @remote_external_id = remote_external_id
  @remote_id = remote_id
  @remote_learning_object_id = remote_learning_object_id
  @remote_user_id = remote_user_id
  @result = result
  @score = score
  @time_spent = time_spent
  @unified_custom_fields = unified_custom_fields
  @updated_at = updated_at
  @user_id = user_id
end

Instance Method Details

#==(other) ⇒ Object



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/stack_one/models/shared/completion.rb', line 109

def ==(other)
  return false unless other.is_a? self.class
  return false unless @certificate_url == other.certificate_url
  return false unless @completed_at == other.completed_at
  return false unless @content_external_reference == other.content_external_reference
  return false unless @content_id == other.content_id
  return false unless @course_id == other.course_id
  return false unless @created_at == other.created_at
  return false unless @external_id == other.external_id
  return false unless @external_reference == other.external_reference
  return false unless @id == other.id
  return false unless @learning_object_external_reference == other.learning_object_external_reference
  return false unless @learning_object_id == other.learning_object_id
  return false unless @learning_object_type == other.learning_object_type
  return false unless @remote_content_id == other.remote_content_id
  return false unless @remote_course_id == other.remote_course_id
  return false unless @remote_external_id == other.remote_external_id
  return false unless @remote_id == other.remote_id
  return false unless @remote_learning_object_id == other.remote_learning_object_id
  return false unless @remote_user_id == other.remote_user_id
  return false unless @result == other.result
  return false unless @score == other.score
  return false unless @time_spent == other.time_spent
  return false unless @unified_custom_fields == other.unified_custom_fields
  return false unless @updated_at == other.updated_at
  return false unless @user_id == other.user_id
  true
end