Sha256: 5c34d6fdab9feb0643ee9e20e7f4274a9646e1eea32acfd94d09f5d2e5f853bd

Contents?: true

Size: 580 Bytes

Versions: 8

Compression:

Stored size: 580 Bytes

Contents

module RTurk
  
  # == Grant Bonus operation
  #
  # Grants a worker a bonus
  #
  
  class GrantBonus < Operation

    attr_accessor :assignment_id, :feedback, :worker_id, :amount, :currency
    require_params :assignment_id, :worker_id, :amount, :feedback
    
    def to_params
      {'AssignmentId' => self.assignment_id,
        'BonusAmount.1.Amount' => self.amount,
        'BonusAmount.1.CurrencyCode' => (self.currency || 'USD'),
        'RequesterFeedback' => self.feedback}
    end
    
  end
  def self.GrantBonus(*args)
    RTurk::GrantBonus.create(*args)
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rturk-2.2.1 lib/rturk/operations/grant_bonus.rb
rturk-2.2.0 lib/rturk/operations/grant_bonus.rb
rturk-2.1.1 lib/rturk/operations/grant_bonus.rb
rturk-2.1.0 lib/rturk/operations/grant_bonus.rb
rturk-2.0.5 lib/rturk/operations/grant_bonus.rb
rturk-2.0.4 lib/rturk/operations/grant_bonus.rb
rturk-2.0.3 lib/rturk/operations/grant_bonus.rb
rturk-2.0.2 lib/rturk/operations/grant_bonus.rb