# HomeworkSubmissionVersion

Represents a homework submission version on SMHW.

## Constructor

#### new HomeworkSubmissionVersion(client, response)

Instantiate a HomeworkSubmissionVersion object.

Parameters:

Name | Type | Description
--- | --- | ---
`client` | Client | The client that is instantiating the object.
`response` | Object | The data for the object.

Source:
  - structures/HomeworkSubmissionVersion.js, line 10

### Members

#### (private) _client :Client

The client that instantiated this object.

Type:

- Client

Source:
  - structures/HomeworkSubmissionVersion.js, line 16

#### attachment_ids :Array.<Number>

An array of IDs to attachments attached to the homework submission version.

Type:

- Array.<Number>

Source:
  - structures/HomeworkSubmissionVersion.js, line 22

#### complete_online_text :String

The text submitted through online.

Type:

- String

Source:
  - structures/HomeworkSubmissionVersion.js, line 28

#### created_at :Number

The timestamp of when the homework submission version was created.

Type:

- Number

Source:
  - structures/HomeworkSubmissionVersion.js, line 34

#### id :Number

The ID of the homework submission version.

Type:

- Number

Source:
  - structures/HomeworkSubmissionVersion.js, line 40

#### updated_at :Number

The timestamp of when the homework submission version was last updated.

Type:

- Number

Source:
  - structures/HomeworkSubmissionVersion.js, line 46

#### user_attachment_ids :Array.<Number>

An array of IDs to attachments attached to the homework submission version.

Type:

- Array.<Number>

Source:
  - structures/HomeworkSubmissionVersion.js, line 52

#### user_id :Number

The ID of the user who the version was created by.

Type:

- Number

Source:
  - structures/HomeworkSubmissionVersion.js, line 58

#### user_name :String

The name of the user who the version was created by.

Type:

- String

Source:
  - structures/HomeworkSubmissionVersion.js, line 64

### Methods

#### getAttachments(idsopt) → {Promise.<Array.<Attachment>>}

Get attachments attached to the homework submission version.

Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`ids` | Array.<Number> | <optional> | An array of IDs of attachments to retrieve.

Source:
  - structures/HomeworkSubmissionVersion.js, line 72

Returns:

Type
  Promise.<Array.<Attachment>>

#### getUser() → {Promise.<User>}

Get the user who created the homework submission version.

Source:
  - structures/HomeworkSubmissionVersion.js, line 80

Returns:

Type
  Promise.<User>