Example #1
0
 /**
  * Retrieve a File Upload.
  * @link   https://stripe.com/docs/api/php#retrieve_file_upload
  *
  * @param  string             $id
  * @param  array|string|null  $options
  *
  * @return self
  *
  * @todo: Refactor the FileUpload::retrieve() method
  */
 public static function retrieve($id, $options = null)
 {
     $apiKey = RequestOptions::parse($options)->getApiKey();
     $file = new self($id, $apiKey);
     /** @var \Arcanedev\Stripe\Http\Response $response */
     list($response, $apiKey) = Requestor::make($apiKey, self::baseUrl())->get("/v1/files/{$id}", $file->retrieveParameters);
     $file->refreshFrom($response->getJson(), $apiKey);
     $file->setLastResponse($response);
     return $file;
 }