Files
in package
Client operations for Inttegro files.
Request arrays use the API's documented snake_case field names. Responses
are returned as immutable values from the corresponding singular namespace.
Table of Contents
Methods
- __construct() : mixed
- Creates the files resource client.
- contents() : FileDownload
- Downloads the contents of the file.
- create() : File
- Creates a new file.
- delete() : File
- Deletes the file.
- lookup() : File
- Retrieves the requested file.
- page() : Page
- Retrieves a paginated collection of files.
Methods
__construct()
Creates the files resource client.
public
__construct(HttpClient $http) : mixed
Parameters
- $http : HttpClient
-
Shared authenticated HTTP transport used by this resource client.
contents()
Downloads the contents of the file.
public
contents(array<string, mixed> $payload) : FileDownload
Sends the documented request through the shared authenticated transport and hydrates the successful response into the declared return type.
Parameters
- $payload : array<string, mixed>
-
Request fields keyed by the documented
snake_caseAPI names.
Return values
FileDownload —The downloaded file download.
create()
Creates a new file.
public
create(array<string, mixed> $payload[, array<string, mixed> $options = [] ]) : File
Sends the documented request through the shared authenticated transport and hydrates the successful response into the declared return type.
Parameters
- $payload : array<string, mixed>
-
Request fields keyed by the documented
snake_caseAPI names. - $options : array<string, mixed> = []
-
Optional endpoint-specific request fields.
Return values
File —The created file.
delete()
Deletes the file.
public
delete(string $fileId) : File
Sends the documented request through the shared authenticated transport and hydrates the successful response into the declared return type.
Parameters
- $fileId : string
-
Unique identifier of the file.
Return values
File —The deleted file result.
lookup()
Retrieves the requested file.
public
lookup(string $fileId) : File
Sends the documented request through the shared authenticated transport and hydrates the successful response into the declared return type.
Parameters
- $fileId : string
-
Unique identifier of the file.
Return values
File —The requested file.
page()
Retrieves a paginated collection of files.
public
page([array<string, mixed> $payload = [] ]) : Page
Sends the documented request through the shared authenticated transport and hydrates the successful response into the declared return type.
Parameters
- $payload : array<string, mixed> = []
-
Request fields keyed by the documented
snake_caseAPI names.
Return values
Page —A typed page of matching files.