Class: RTurk::RevokeQualification

Inherits:
Operation
  • Object
show all
Defined in:
lib/rturk/operations/revoke_qualification.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Operation

#check_params, create, #default_params, default_params, #initialize, #parse, #request, require_params, required_params, set_operation

Constructor Details

This class inherits a constructor from RTurk::Operation

Instance Attribute Details

#qualification_type_idObject

Returns the value of attribute qualification_type_id



5
6
7
# File 'lib/rturk/operations/revoke_qualification.rb', line 5

def qualification_type_id
  @qualification_type_id
end

#reasonObject

Returns the value of attribute reason



5
6
7
# File 'lib/rturk/operations/revoke_qualification.rb', line 5

def reason
  @reason
end

#subject_idObject

Returns the value of attribute subject_id



5
6
7
# File 'lib/rturk/operations/revoke_qualification.rb', line 5

def subject_id
  @subject_id
end

Instance Method Details

#to_paramsObject



8
9
10
11
12
13
14
15
# File 'lib/rturk/operations/revoke_qualification.rb', line 8

def to_params
  params = {
    'QualificationTypeId' => qualification_type_id,
    'SubjectId' => subject_id
  }
  params['Reason'] = reason unless reason.nil?
  params
end