lib/SiftClient.php
public function applyDecisionToUser($user_id, $decision_id, $source, $opts = array()) {
        $this->mergeArguments($opts, array(
            'account_id' => $this->account_id,
            'timeout' => $this->timeout,
            'decision_id' => $decision_id,
            'source' => $source,
            'analyst' => null,
            'description' => null,
            'time' => null
        ));

        $this->validateArgument($user_id, 'user_id', 'string');

        $url = ($this->api_endpoint .
            '/v3/accounts/' . rawurlencode($opts['account_id']) .
            '/users/'. rawurlencode($user_id) .
            '/decisions');

        return $this->applyDecision($url, $opts);
    }
public function applyDecisionToUser($user_id, $decision_id, $source, $opts = array()) {
        $this->mergeArguments($opts, array(
            'account_id' => $this->account_id,
            'timeout' => $this->timeout,
            'decision_id' => $decision_id,
            'source' => $source,
            'analyst' => null,
            'description' => null,
            'time' => null
        ));

        $this->validateArgument($user_id, 'user_id', 'string');

        $url = ($this->api_endpoint .
            '/v3/accounts/' . rawurlencode($opts['account_id']) .
            '/users/'. rawurlencode($user_id) .
            '/decisions');

        return $this->applyDecision($url, $opts);
    }
public function applyDecisionToUser ( $ user_id , $ decision_id , $ source , $ opts = array ( ) ) { $ this -> mergeArguments ( $ opts , array ( 'account_id' => $ this -> account_id , 'timeout' => $ this -> timeout , 'decision_id' => $ decision_id , 'source' => $ source , 'analyst' => null , 'description' => null , 'time' => null ) ) ; $ this -> validateArgument ( $ user_id , 'user_id' , 'string' ) ; $ url = ( $ this -> api_endpoint . '/v3/accounts/' . rawurlencode ( $ opts [ 'account_id' ] ) . '/users/' . rawurlencode ( $ user_id ) . '/decisions' ) ; return $ this -> applyDecision ( $ url , $ opts ) ; }
Apply a decision to a user. Builds url to apply decision to user and
delegates to applyDecision

@param string $user_id the id of the user that will get this decision
@param string $decision_id The decision that will be applied to a user
@param string $source the source of the decision, i.e. MANUAL_REVIEW,
AUTOMATED_RULE, CHARGEBACK
@param array $opts  Array of optional parameters for this request:
- string 'account_id': by default, this client's account ID is used.
- int 'timeout': By default, this client's timeout is used.
- string 'analyst': when the source is MANUAL_REVIEW, an analyst
identifier must be passed.
- string 'description': free form text adding context to why this
decision is being applied.
- int 'time': Timestamp of when a decision was applied, mainly used
for backfilling
Apply a decision to a user . Builds url to apply decision to user and delegates to applyDecision