Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bytemerger committed Dec 9, 2022
1 parent f7e078f commit ae4e09b
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,52 @@ HashMap<String, Object> data = new HashMap<>(){{
);
}};
```
## Convert user to account

Converts a customer/user to account

```java
JSONObject response = userResource.convertToAccount("uid");
```

## Convert account to customer/user

Converts a account to customer

```java
JSONObject response = userResource.convertToCustomer("aid");
```

## Add user to an account

This adds a user to an account if it exists

```java
JSONObject response = userResource.addToAccount(uid, aid, role)
```
Where
- uid is the user id
- aid is the account id
- role is the role of the user for the account; This can be null


## Change a user's role in an account

This changes a user's role in an account

```java
JSONObject response = userResource.changeUserRole(uid, aid, role)
```

## Remove a user from an account

This removes a user from an account

```java
JSONObject response = userResource.removeFromAccount(uid, aid);
```


## Set New Client
Change the `userResource` client

Expand Down

0 comments on commit ae4e09b

Please sign in to comment.