

# Resource Class
<a name="resource-class"></a>

The Resource Class can fetch or discard the corresponding file that was just printed or downloaded. When performing these actions, the corresponding observer functions [`filePrinted`](dcv-module.md#filePrintedCallback) and [`fileDownload`](dcv-module.md#fileDownloadCallback) would respectively be invoked with the resource object as their only argument. Such resource can be accepted or declined in order to fetch or discard the file they reference. 

**Topics**
+ [Methods](#methods)

## Methods
<a name="methods"></a>

**Topics**
+ [accept(urlParameters) → \$1void\$1](#accept)
+ [decline() → \$1void\$1](#decline)

### accept(urlParameters) → \$1void\$1
<a name="accept"></a>

 Locally downloads the resource. 

#### Parameters:
<a name="parameters-1"></a>


|  Name  |  Type  |  Description  | 
| --- | --- | --- | 
|  urlParameters  |  Object  |  The optional object containing the key/value pairs of the URL search parameters passed to the request to fetch the resource.  | 

#### Returns:
<a name="returns"></a>

 Type   
 void 

### decline() → \$1void\$1
<a name="decline"></a>

 Discards the resource. 

#### Returns:
<a name="returns-1"></a>

 Type   
 void 