Sha256: 65e561fa536829b69bf67dde3754852aba096c75e795de1f4228f7174de198df

Contents?: true

Size: 598 Bytes

Versions: 25

Compression:

Stored size: 598 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'),
       'Reason' => self.feedback,
       'WorkerId' => worker_id}
    end
    
  end
  def self.GrantBonus(*args)
    RTurk::GrantBonus.create(*args)
  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

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