# Rest Request

This is a base object that contains all you can do about Bundles.

## constructor


Constructor

### Parámetros

| Nombre | Tipo | Opcional | Descripción |
| :--- | :--- | :---: | :--- |
| **Reference** | `InternalOpenGateAPI` | ❌ | to the API object. |


---
## withAsyncResponseMaxTimeToWaitCallback(asyncResponseMaxTimeToWaitCallback)


Sets the async response with selected timeout

### Parámetros

| Nombre | Tipo | Opcional | Descripción |
| :--- | :--- | :---: | :--- |
| **asyncResponseMaxTimeToWaitCallback** | `string` | ❌ |  |

### Retorna

{{% notice tip %}}
**Tipo:** `RestRequest`
<br>

{{% /notice %}}

---
## withBody(restRequestBody)


Sets the body for restRequest

### Parámetros

| Nombre | Tipo | Opcional | Descripción |
| :--- | :--- | :---: | :--- |
| **restRequestBody** | `string` | ❌ |  |

### Retorna

{{% notice tip %}}
**Tipo:** `RestRequest`
<br>

{{% /notice %}}

---
## withHeaders(restRequestHeaders)


Sets the header for restRequest

### Parámetros

| Nombre | Tipo | Opcional | Descripción |
| :--- | :--- | :---: | :--- |
| **restRequestHeaders** | `string` | ❌ |  |

### Retorna

{{% notice tip %}}
**Tipo:** `RestRequest`
<br>

{{% /notice %}}

---
## withIdentifier(identifier)


Sets the identifier attribute

### Parámetros

| Nombre | Tipo | Opcional | Descripción |
| :--- | :--- | :---: | :--- |
| **identifier** | `string` | ❌ |  |

### Retorna

{{% notice tip %}}
**Tipo:** `RestRequest`
<br>

{{% /notice %}}

---
## withMethod(restRequestMethod)


Sets the method for restRequest

### Parámetros

| Nombre | Tipo | Opcional | Descripción |
| :--- | :--- | :---: | :--- |
| **restRequestMethod** | `string` | ❌ |  |

### Retorna

{{% notice tip %}}
**Tipo:** `RestRequest`
<br>

{{% /notice %}}

---
## withOrganization(organization)


Set the organization attribute

### Parámetros

| Nombre | Tipo | Opcional | Descripción |
| :--- | :--- | :---: | :--- |
| **organization** | `string` | ❌ |  |

### Retorna

{{% notice tip %}}
**Tipo:** `RestRequest`
<br>

{{% /notice %}}

---
## withScheduleCronExpression(cronExpression, timezone)


Sets the crontab expression for schedule

### Parámetros

| Nombre | Tipo | Opcional | Descripción |
| :--- | :--- | :---: | :--- |
| **cronExpression** | `string` | ❌ |  |
| **timezone** | `string` | ❌ |  |

### Retorna

{{% notice tip %}}
**Tipo:** `RestRequest`
<br>

{{% /notice %}}

---
## withScheduleExecuteNow(executeNow)


Sets the executeNow attribute

### Parámetros

| Nombre | Tipo | Opcional | Descripción |
| :--- | :--- | :---: | :--- |
| **executeNow** | `boolean` | ❌ |  |

### Retorna

{{% notice tip %}}
**Tipo:** `RestRequest`
<br>

{{% /notice %}}

---
## withScheduleFrom(from)


Sets the from attribute

### Parámetros

| Nombre | Tipo | Opcional | Descripción |
| :--- | :--- | :---: | :--- |
| **from** | `string` | ❌ |  |

### Retorna

{{% notice tip %}}
**Tipo:** `RestRequest`
<br>

{{% /notice %}}

---
## withScheduleMinutesInterval(interval)


Sets the interval for schedule in minutes

### Parámetros

| Nombre | Tipo | Opcional | Descripción |
| :--- | :--- | :---: | :--- |
| **interval** | `number` | ❌ | in minutes |

### Retorna

{{% notice tip %}}
**Tipo:** `RestRequest`
<br>

{{% /notice %}}

---
## withScheduleTo(to)


Sets the to attribute

### Parámetros

| Nombre | Tipo | Opcional | Descripción |
| :--- | :--- | :---: | :--- |
| **to** | `string` | ❌ |  |

### Retorna

{{% notice tip %}}
**Tipo:** `RestRequest`
<br>

{{% /notice %}}

---
## withSyncResponseTimeout(syncResponseTimeout)


Sets the sync response with selected timeout

### Parámetros

| Nombre | Tipo | Opcional | Descripción |
| :--- | :--- | :---: | :--- |
| **syncResponseTimeout** | `string` | ❌ |  |

### Retorna

{{% notice tip %}}
**Tipo:** `RestRequest`
<br>

{{% /notice %}}

---
## withUrl(restRequestUrl)


Sets the url for restRequest

### Parámetros

| Nombre | Tipo | Opcional | Descripción |
| :--- | :--- | :---: | :--- |
| **restRequestUrl** | `string` | ❌ |  |

### Retorna

{{% notice tip %}}
**Tipo:** `RestRequest`
<br>

{{% /notice %}}

---

