Sha256: 393866cf55c1d58287dc58ec44fa83a1caf8f319f565e386af4aff63eb507f91

Contents?: true

Size: 1.21 KB

Versions: 24

Compression:

Stored size: 1.21 KB

Contents

# Operation to create a qualification type

module RTurk
  class CreateQualificationType < Operation
    attr_accessor :name, :description, :keywords, :status, :auto_granted,
                  :retry_delay_in_seconds, :test, :answer_key,
                  :test_duration_in_seconds, :auto_granted_value
    require_params :name, :description

    def parse(response)
      RTurk::GetQualificationTypeResponse.new(response)
    end

    def to_params
      params = {
        'Name' => name,
        'Description' => description,
        'QualificationTypeStatus' => (status || "Active")
      }
      params['Keywords'] = keywords unless keywords.nil?
      params['AutoGranted'] = auto_granted unless auto_granted.nil?
      params['AutoGrantedValue'] = auto_granted_value unless auto_granted_value.nil?
      params['RetryDelayInSeconds'] = retry_delay_in_seconds unless retry_delay_in_seconds.nil?
      params['Test'] = test unless test.nil?
      params['AnswerKey'] = answer_key unless answer_key.nil?
      params['TestDurationInSeconds'] = test_duration_in_seconds unless test_duration_in_seconds.nil?
      params
    end
  end

  def self.CreateQualificationType(*args)
    RTurk::CreateQualificationType.create(*args)
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rturk-2.12.1 lib/rturk/operations/create_qualification_type.rb
rturk-2.12.0 lib/rturk/operations/create_qualification_type.rb
rturk-2.11.3 lib/rturk/operations/create_qualification_type.rb
rturk-2.11.2 lib/rturk/operations/create_qualification_type.rb
rturk-2.11.1 lib/rturk/operations/create_qualification_type.rb
rturk-2.11.0 lib/rturk/operations/create_qualification_type.rb
rturk-2.10.3 lib/rturk/operations/create_qualification_type.rb
rturk-2.10.2 lib/rturk/operations/create_qualification_type.rb
rturk-2.10.1 lib/rturk/operations/create_qualification_type.rb
rturk-2.10.0 lib/rturk/operations/create_qualification_type.rb
rturk-2.9.0 lib/rturk/operations/create_qualification_type.rb
rturk-2.8.0 lib/rturk/operations/create_qualification_type.rb
rturk-2.7.0 lib/rturk/operations/create_qualification_type.rb
rturk-2.6.0 lib/rturk/operations/create_qualification_type.rb
rturk-2.5.2 lib/rturk/operations/create_qualification_type.rb
rturk-2.5.0 lib/rturk/operations/create_qualification_type.rb
rturk-2.4.1 lib/rturk/operations/create_qualification_type.rb
rturk-2.4.0 lib/rturk/operations/create_qualification_type.rb
rturk-2.3.6 lib/rturk/operations/create_qualification_type.rb
rturk-2.3.5 lib/rturk/operations/create_qualification_type.rb