Cartalyst\Stripe\Api\FileUploads::create PHP Method

create() public method

Creates a file upload.
public create ( string $file, string $purpose, array $headers = [] ) : array
$file string
$purpose string
$headers array
return array
    public function create($file, $purpose, array $headers = [])
    {
        $response = $this->getClient()->request('POST', 'v1/files', ['headers' => $headers, 'multipart' => [['name' => 'purpose', 'contents' => $purpose], ['name' => 'file', 'contents' => fopen($file, 'r')]]]);
        return json_decode($response->getBody(), true);
    }