src/Api/User/Csv.php
public function postKey($type, $fileKey): int
    {
        if (!in_array($type, self::$type, true)) {
            throw new \InvalidArgumentException('Invalid type parameter');
        }

        $options = ['json' => ['fileKey' => $fileKey]];

        /** @var JsonStream $stream */
        $stream = $this->client
            ->post(UserApi::generateUrl("csv/{$type}.json"), $options)
            ->getBody();

        return $stream->jsonSerialize()['id'];
    }
public function postKey($type, $fileKey): int
    {
        if (!in_array($type, self::$type, true)) {
            throw new \InvalidArgumentException('Invalid type parameter');
        }

        $options = ['json' => ['fileKey' => $fileKey]];

        /** @var JsonStream $stream */
        $stream = $this->client
            ->post(UserApi::generateUrl("csv/{$type}.json"), $options)
            ->getBody();

        return $stream->jsonSerialize()['id'];
    }
public function postKey ( $ type , $ fileKey ) : int { if ( ! in_array ( $ type , self :: $ type , true ) ) { throw new \ InvalidArgumentException ( 'Invalid type parameter' ) ; } $ options = [ 'json' => [ 'fileKey' => $ fileKey ] ] ; /** @var JsonStream $stream */ $ stream = $ this -> client -> post ( UserApi :: generateUrl ( "csv/{$type}.json" ) , $ options ) -> getBody ( ) ; return $ stream -> jsonSerialize ( ) [ 'id' ] ; }
Post file key

@param string $type
@param string $fileKey
@return int
@throws \InvalidArgumentException
Post file key