amazonka-mechanicalturk-1.6.0: Amazon Mechanical Turk SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.MechanicalTurk.SendBonus

Contents

Description

The SendBonus operation issues a payment of money from your account to a Worker. This payment happens separately from the reward you pay to the Worker when you approve the Worker's assignment. The SendBonus operation requires the Worker's ID and the assignment ID as parameters to initiate payment of the bonus. You must include a message that explains the reason for the bonus payment, as the Worker may not be expecting the payment. Amazon Mechanical Turk collects a fee for bonus payments, similar to the HIT listing fee. This operation fails if your account does not have enough funds to pay for both the bonus and the fees.

Synopsis

Creating a Request

sendBonus Source #

Creates a value of SendBonus with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • sbUniqueRequestToken - A unique identifier for this request, which allows you to retry the call on error without granting multiple bonuses. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the bonus already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return an error with a message containing the request ID.
  • sbWorkerId - The ID of the Worker being paid the bonus.
  • sbBonusAmount - The Bonus amount is a US Dollar amount specified using a string (for example, "5" represents $5.00 USD and "101.42" represents $101.42 USD). Do not include currency symbols or currency codes.
  • sbAssignmentId - The ID of the assignment for which this bonus is paid.
  • sbReason - A message that explains the reason for the bonus payment. The Worker receiving the bonus can see this message.

data SendBonus Source #

See: sendBonus smart constructor.

Instances

Eq SendBonus Source # 
Data SendBonus Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SendBonus -> c SendBonus #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SendBonus #

toConstr :: SendBonus -> Constr #

dataTypeOf :: SendBonus -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SendBonus) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SendBonus) #

gmapT :: (forall b. Data b => b -> b) -> SendBonus -> SendBonus #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SendBonus -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SendBonus -> r #

gmapQ :: (forall d. Data d => d -> u) -> SendBonus -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SendBonus -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SendBonus -> m SendBonus #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SendBonus -> m SendBonus #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SendBonus -> m SendBonus #

Read SendBonus Source # 
Show SendBonus Source # 
Generic SendBonus Source # 

Associated Types

type Rep SendBonus :: * -> * #

Hashable SendBonus Source # 
ToJSON SendBonus Source # 
NFData SendBonus Source # 

Methods

rnf :: SendBonus -> () #

AWSRequest SendBonus Source # 
ToHeaders SendBonus Source # 

Methods

toHeaders :: SendBonus -> [Header] #

ToPath SendBonus Source # 
ToQuery SendBonus Source # 
type Rep SendBonus Source # 
type Rep SendBonus = D1 * (MetaData "SendBonus" "Network.AWS.MechanicalTurk.SendBonus" "amazonka-mechanicalturk-1.6.0-LJdO7bIweE9BcCI1YoYmug" False) (C1 * (MetaCons "SendBonus'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_sbUniqueRequestToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_sbWorkerId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_sbBonusAmount") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) ((:*:) * (S1 * (MetaSel (Just Symbol "_sbAssignmentId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_sbReason") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))))))
type Rs SendBonus Source # 

Request Lenses

sbUniqueRequestToken :: Lens' SendBonus (Maybe Text) Source #

A unique identifier for this request, which allows you to retry the call on error without granting multiple bonuses. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the bonus already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return an error with a message containing the request ID.

sbWorkerId :: Lens' SendBonus Text Source #

The ID of the Worker being paid the bonus.

sbBonusAmount :: Lens' SendBonus Text Source #

The Bonus amount is a US Dollar amount specified using a string (for example, "5" represents $5.00 USD and "101.42" represents $101.42 USD). Do not include currency symbols or currency codes.

sbAssignmentId :: Lens' SendBonus Text Source #

The ID of the assignment for which this bonus is paid.

sbReason :: Lens' SendBonus Text Source #

A message that explains the reason for the bonus payment. The Worker receiving the bonus can see this message.

Destructuring the Response

sendBonusResponse Source #

Creates a value of SendBonusResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data SendBonusResponse Source #

See: sendBonusResponse smart constructor.

Instances

Eq SendBonusResponse Source # 
Data SendBonusResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SendBonusResponse -> c SendBonusResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SendBonusResponse #

toConstr :: SendBonusResponse -> Constr #

dataTypeOf :: SendBonusResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SendBonusResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SendBonusResponse) #

gmapT :: (forall b. Data b => b -> b) -> SendBonusResponse -> SendBonusResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SendBonusResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SendBonusResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> SendBonusResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SendBonusResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SendBonusResponse -> m SendBonusResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SendBonusResponse -> m SendBonusResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SendBonusResponse -> m SendBonusResponse #

Read SendBonusResponse Source # 
Show SendBonusResponse Source # 
Generic SendBonusResponse Source # 
NFData SendBonusResponse Source # 

Methods

rnf :: SendBonusResponse -> () #

type Rep SendBonusResponse Source # 
type Rep SendBonusResponse = D1 * (MetaData "SendBonusResponse" "Network.AWS.MechanicalTurk.SendBonus" "amazonka-mechanicalturk-1.6.0-LJdO7bIweE9BcCI1YoYmug" True) (C1 * (MetaCons "SendBonusResponse'" PrefixI True) (S1 * (MetaSel (Just Symbol "_sbrsResponseStatus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Int)))

Response Lenses

sbrsResponseStatus :: Lens' SendBonusResponse Int Source #

  • - | The response status code.