|
| 1 | +# PandaDoc\Client\UserAndWorkspaceManagementApi |
| 2 | + |
| 3 | +All URIs are relative to https://api.pandadoc.com. |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**addMember()**](UserAndWorkspaceManagementApi.md#addMember) | **POST** /public/v1/workspaces/{workspace_id}/members | Add member |
| 8 | +[**createUser()**](UserAndWorkspaceManagementApi.md#createUser) | **POST** /public/v1/users | Create User |
| 9 | +[**createWorkspace()**](UserAndWorkspaceManagementApi.md#createWorkspace) | **POST** /public/v1/workspaces | Create Workspace |
| 10 | + |
| 11 | + |
| 12 | +## `addMember()` |
| 13 | + |
| 14 | +```php |
| 15 | +addMember($workspaceId, $addMemberRequest, $notifyUser, $notifyWsAdmins): \PandaDoc\Client\Model\AddMemberResponse |
| 16 | +``` |
| 17 | + |
| 18 | +Add member |
| 19 | + |
| 20 | +### Example |
| 21 | + |
| 22 | +```php |
| 23 | +<?php |
| 24 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 25 | + |
| 26 | + |
| 27 | +// Configure API key authorization: apiKey |
| 28 | +$config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); |
| 29 | +// Setup prefix (e.g. Bearer) for API key, if needed |
| 30 | +$config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'API-Key'); |
| 31 | + |
| 32 | +// Configure OAuth2 access token for authorization: oauth2 |
| 33 | +// $config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); |
| 34 | + |
| 35 | + |
| 36 | +$apiInstance = new PandaDoc\Client\Api\UserAndWorkspaceManagementApi( |
| 37 | + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. |
| 38 | + // This is optional, `GuzzleHttp\Client` will be used as default. |
| 39 | + new GuzzleHttp\Client(), |
| 40 | + $config |
| 41 | +); |
| 42 | +$workspaceId = BhVzRcxH9Z2LgfPPGXFUBa; // string |
| 43 | +$addMemberRequest = new \PandaDoc\Client\Model\AddMemberRequest(); // \PandaDoc\Client\Model\AddMemberRequest |
| 44 | +$notifyUser = True; // bool | Send a confirmation email to the user that was added to workspace(s). |
| 45 | +$notifyWsAdmins = True; // bool | Send a confirmation email to all workspace admins indicating that the user has been added to the workspace. |
| 46 | + |
| 47 | +try { |
| 48 | + $result = $apiInstance->addMember($workspaceId, $addMemberRequest, $notifyUser, $notifyWsAdmins); |
| 49 | + print_r($result); |
| 50 | +} catch (Exception $e) { |
| 51 | + echo 'Exception when calling UserAndWorkspaceManagementApi->addMember: ', $e->getMessage(), PHP_EOL; |
| 52 | +} |
| 53 | +``` |
| 54 | + |
| 55 | +### Parameters |
| 56 | + |
| 57 | +Name | Type | Description | Notes |
| 58 | +------------- | ------------- | ------------- | ------------- |
| 59 | + **workspaceId** | **string**| | |
| 60 | + **addMemberRequest** | [**\PandaDoc\Client\Model\AddMemberRequest**](../Model/AddMemberRequest.md)| | |
| 61 | + **notifyUser** | **bool**| Send a confirmation email to the user that was added to workspace(s). | [optional] |
| 62 | + **notifyWsAdmins** | **bool**| Send a confirmation email to all workspace admins indicating that the user has been added to the workspace. | [optional] |
| 63 | + |
| 64 | +### Return type |
| 65 | + |
| 66 | +[**\PandaDoc\Client\Model\AddMemberResponse**](../Model/AddMemberResponse.md) |
| 67 | + |
| 68 | +### Authorization |
| 69 | + |
| 70 | +[apiKey](../../README.md#apiKey), [oauth2](../../README.md#oauth2) |
| 71 | + |
| 72 | +### HTTP request headers |
| 73 | + |
| 74 | +- **Content-Type**: `application/json` |
| 75 | +- **Accept**: `application/json` |
| 76 | + |
| 77 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 78 | +[[Back to README]](../../README.md) |
| 79 | + |
| 80 | +## `createUser()` |
| 81 | + |
| 82 | +```php |
| 83 | +createUser($createUserRequest, $notifyUser, $notifyWsAdmins): \PandaDoc\Client\Model\CreateUserResponse |
| 84 | +``` |
| 85 | + |
| 86 | +Create User |
| 87 | + |
| 88 | +### Example |
| 89 | + |
| 90 | +```php |
| 91 | +<?php |
| 92 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 93 | + |
| 94 | + |
| 95 | +// Configure API key authorization: apiKey |
| 96 | +$config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); |
| 97 | +// Setup prefix (e.g. Bearer) for API key, if needed |
| 98 | +$config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'API-Key'); |
| 99 | + |
| 100 | +// Configure OAuth2 access token for authorization: oauth2 |
| 101 | +// $config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); |
| 102 | + |
| 103 | + |
| 104 | +$apiInstance = new PandaDoc\Client\Api\UserAndWorkspaceManagementApi( |
| 105 | + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. |
| 106 | + // This is optional, `GuzzleHttp\Client` will be used as default. |
| 107 | + new GuzzleHttp\Client(), |
| 108 | + $config |
| 109 | +); |
| 110 | +$createUserRequest = new \PandaDoc\Client\Model\CreateUserRequest(); // \PandaDoc\Client\Model\CreateUserRequest |
| 111 | +$notifyUser = True; // bool | Send a confirmation email to the user that was added to workspace(s). |
| 112 | +$notifyWsAdmins = True; // bool | Send a confirmation email to all workspace admins indicating that the user has been added to the workspace. |
| 113 | + |
| 114 | +try { |
| 115 | + $result = $apiInstance->createUser($createUserRequest, $notifyUser, $notifyWsAdmins); |
| 116 | + print_r($result); |
| 117 | +} catch (Exception $e) { |
| 118 | + echo 'Exception when calling UserAndWorkspaceManagementApi->createUser: ', $e->getMessage(), PHP_EOL; |
| 119 | +} |
| 120 | +``` |
| 121 | + |
| 122 | +### Parameters |
| 123 | + |
| 124 | +Name | Type | Description | Notes |
| 125 | +------------- | ------------- | ------------- | ------------- |
| 126 | + **createUserRequest** | [**\PandaDoc\Client\Model\CreateUserRequest**](../Model/CreateUserRequest.md)| | |
| 127 | + **notifyUser** | **bool**| Send a confirmation email to the user that was added to workspace(s). | [optional] |
| 128 | + **notifyWsAdmins** | **bool**| Send a confirmation email to all workspace admins indicating that the user has been added to the workspace. | [optional] |
| 129 | + |
| 130 | +### Return type |
| 131 | + |
| 132 | +[**\PandaDoc\Client\Model\CreateUserResponse**](../Model/CreateUserResponse.md) |
| 133 | + |
| 134 | +### Authorization |
| 135 | + |
| 136 | +[apiKey](../../README.md#apiKey), [oauth2](../../README.md#oauth2) |
| 137 | + |
| 138 | +### HTTP request headers |
| 139 | + |
| 140 | +- **Content-Type**: `application/json` |
| 141 | +- **Accept**: `application/json` |
| 142 | + |
| 143 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 144 | +[[Back to README]](../../README.md) |
| 145 | + |
| 146 | +## `createWorkspace()` |
| 147 | + |
| 148 | +```php |
| 149 | +createWorkspace($createWorkspaceRequest): \PandaDoc\Client\Model\CreateWorkspaceResponse |
| 150 | +``` |
| 151 | + |
| 152 | +Create Workspace |
| 153 | + |
| 154 | +### Example |
| 155 | + |
| 156 | +```php |
| 157 | +<?php |
| 158 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 159 | + |
| 160 | + |
| 161 | +// Configure API key authorization: apiKey |
| 162 | +$config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); |
| 163 | +// Setup prefix (e.g. Bearer) for API key, if needed |
| 164 | +$config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'API-Key'); |
| 165 | + |
| 166 | +// Configure OAuth2 access token for authorization: oauth2 |
| 167 | +// $config = PandaDoc\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); |
| 168 | + |
| 169 | + |
| 170 | +$apiInstance = new PandaDoc\Client\Api\UserAndWorkspaceManagementApi( |
| 171 | + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. |
| 172 | + // This is optional, `GuzzleHttp\Client` will be used as default. |
| 173 | + new GuzzleHttp\Client(), |
| 174 | + $config |
| 175 | +); |
| 176 | +$createWorkspaceRequest = new \PandaDoc\Client\Model\CreateWorkspaceRequest(); // \PandaDoc\Client\Model\CreateWorkspaceRequest |
| 177 | + |
| 178 | +try { |
| 179 | + $result = $apiInstance->createWorkspace($createWorkspaceRequest); |
| 180 | + print_r($result); |
| 181 | +} catch (Exception $e) { |
| 182 | + echo 'Exception when calling UserAndWorkspaceManagementApi->createWorkspace: ', $e->getMessage(), PHP_EOL; |
| 183 | +} |
| 184 | +``` |
| 185 | + |
| 186 | +### Parameters |
| 187 | + |
| 188 | +Name | Type | Description | Notes |
| 189 | +------------- | ------------- | ------------- | ------------- |
| 190 | + **createWorkspaceRequest** | [**\PandaDoc\Client\Model\CreateWorkspaceRequest**](../Model/CreateWorkspaceRequest.md)| | |
| 191 | + |
| 192 | +### Return type |
| 193 | + |
| 194 | +[**\PandaDoc\Client\Model\CreateWorkspaceResponse**](../Model/CreateWorkspaceResponse.md) |
| 195 | + |
| 196 | +### Authorization |
| 197 | + |
| 198 | +[apiKey](../../README.md#apiKey), [oauth2](../../README.md#oauth2) |
| 199 | + |
| 200 | +### HTTP request headers |
| 201 | + |
| 202 | +- **Content-Type**: `application/json` |
| 203 | +- **Accept**: `application/json` |
| 204 | + |
| 205 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 206 | +[[Back to README]](../../README.md) |
0 commit comments