Skip to content

Commit

Permalink
update user guides to import class
Browse files Browse the repository at this point in the history
  • Loading branch information
tora-kozic committed Sep 20, 2021
1 parent fd52e85 commit 3774549
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions docs/userguides/cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ case = sdk.cases.get(case_number)
You can also access a case by its `number` to update its details. For instance, if you wanted to update a case's status to `CLOSED`:

```python
import py42.constants
from py42.constants import CaseStatus

response = sdk.cases.update(case_number, status=py42.constants.CaseStatus.CLOSED)
response = sdk.cases.update(case_number, status=CaseStatus.CLOSED)
```

Case statuses can be set to either `OPEN` or `CLOSED`.
Expand All @@ -34,9 +34,9 @@ Case statuses can be set to either `OPEN` or `CLOSED`.
This section describes how to view the details of all cases with an `OPEN` status.

```python
import py42.constants
from py42.constants import CaseStatus

response = sdk.cases.get_all(status=py42.constants.CaseStatus.OPEN)
response = sdk.cases.get_all(status=CaseStatus.OPEN)

for page in response:
cases = page["cases"]
Expand Down
4 changes: 2 additions & 2 deletions docs/userguides/highriskemployee.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ You can add/remove risk factor tags from a user programmatically using the `add_
you want to add/remove:

```python
import py42.constants
from py42.constants import RiskTags

tag_list = [py42.constants.RiskTags.CONTRACT_EMPLOYEE, py42.constants.RiskTags.ELEVATED_ACCESS_PRIVILEGES]
tag_list = [RiskTags.CONTRACT_EMPLOYEE, RiskTags.ELEVATED_ACCESS_PRIVILEGES]

# Add the risk tags
response = sdk.detectionlists.add_user_risk_tags(user_id, tag_list)
Expand Down
8 changes: 4 additions & 4 deletions docs/userguides/trustedactivities.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Use py42 to quickly and easily manage trusted activities and resources, includin
To get started create a new trusted activity resource.

```python
import py42.constants
from py42.constants import TrustedActivityType

response = sdk.trustedactivities.create(py42.constants.TrustedActivityType.DOMAIN, "test-domain.com")
response = sdk.trustedactivities.create(TrustedActivityType.DOMAIN, "test-domain.com")
```
Trusted activities can be of type `DOMAIN` or `SLACK`.

Expand Down Expand Up @@ -39,9 +39,9 @@ To clear the description of a trusted activity, pass an empty string `descriptio
This section describes how to view the details of all trusted activities of the type `DOMAIN` type.

```python
import py42.constants
from py42.constants import TrustedActivityType

response = sdk.trustedactivities.get_all(type=py42.constants.TrustedActivityType.DOMAIN)
response = sdk.trustedactivities.get_all(type=TrustedActivityType.DOMAIN)

for page in response:
resources = page["trustResources"]
Expand Down

0 comments on commit 3774549

Please sign in to comment.