public function requestCode($clientRef, $phoneNumber, $optionalArgs = array())
    {
        $requestCode = new RequestCode;
        $requestCode
            ->setClientRef($clientRef)
            ->setPhoneNumber($phoneNumber);

        if (count($optionalArgs) > 0) {
            foreach ($optionalArgs as $key => $value) {
                $requestCode->set($key, $value);
            }
        }

        $response = $this->request('TFA/Request', array(), $requestCode);

        $serializer = SerializerBuilder::create()->build();
        $result = $serializer->deserialize(
            $response,
            'Fortytwo\SDK\TwoFactorAuthentication\Response2FA',
            'json'
        );

        return $result;
    }
public function requestCode($clientRef, $phoneNumber, $optionalArgs = array())
    {
        $requestCode = new RequestCode;
        $requestCode
            ->setClientRef($clientRef)
            ->setPhoneNumber($phoneNumber);

        if (count($optionalArgs) > 0) {
            foreach ($optionalArgs as $key => $value) {
                $requestCode->set($key, $value);
            }
        }

        $response = $this->request('TFA/Request', array(), $requestCode);

        $serializer = SerializerBuilder::create()->build();
        $result = $serializer->deserialize(
            $response,
            'Fortytwo\SDK\TwoFactorAuthentication\Response2FA',
            'json'
        );

        return $result;
    }
public function requestCode ( $ clientRef , $ phoneNumber , $ optionalArgs = array ( ) ) { $ requestCode = new RequestCode ; $ requestCode -> setClientRef ( $ clientRef ) -> setPhoneNumber ( $ phoneNumber ) ; if ( count ( $ optionalArgs ) > 0 ) { foreach ( $ optionalArgs as $ key => $ value ) { $ requestCode -> set ( $ key , $ value ) ; } } $ response = $ this -> request ( 'TFA/Request' , array ( ) , $ requestCode ) ; $ serializer = SerializerBuilder :: create ( ) -> build ( ) ; $ result = $ serializer -> deserialize ( $ response , 'Fortytwo\SDK\TwoFactorAuthentication\Response2FA' , 'json' ) ; return $ result ; }
Request the authentication code

@api
@param string $clientRef     Client reference
@param string $phoneNumber   Destination Phone number
@param array  $optionalArgs   List of optionals arguments

@return object response
Request the authentication code