Skip to content

Latest commit

 

History

History
372 lines (249 loc) · 11.1 KB

RolesApi.md

File metadata and controls

372 lines (249 loc) · 11.1 KB

Spinen\ConnectWise\Clients\Sales\RolesApi

Spinen's PHP ConnectWise Client for Sales API generated by Swagger Code Generator.

All URIs are relative to https://api-na.myconnectwise.net/v4_6_release/apis/3.0

Method HTTP request Description
salesRolesCountGet GET /sales/roles/count
salesRolesGet GET /sales/roles
salesRolesIdDelete DELETE /sales/roles/{id}
salesRolesIdGet GET /sales/roles/{id}
salesRolesIdPatch PATCH /sales/roles/{id}
salesRolesIdPut PUT /sales/roles/{id}
salesRolesPost POST /sales/roles

salesRolesCountGet

\Spinen\ConnectWise\Clients\Sales\Model\Count salesRolesCountGet($conditions)

Get Role Count

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: BasicAuth
Spinen\ConnectWise\Clients\Sales\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Spinen\ConnectWise\Clients\Sales\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Spinen\ConnectWise\Clients\Sales\Api\RolesApi();
$conditions = "conditions_example"; // string | 

try {
    $result = $api_instance->salesRolesCountGet($conditions);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->salesRolesCountGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
conditions string [optional]

Return type

\Spinen\ConnectWise\Clients\Sales\Model\Count

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

salesRolesGet

\Spinen\ConnectWise\Clients\Sales\Model\Role[] salesRolesGet($conditions, $order_by, $childconditions, $customfieldconditions, $page, $page_size)

Get Role

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: BasicAuth
Spinen\ConnectWise\Clients\Sales\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Spinen\ConnectWise\Clients\Sales\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Spinen\ConnectWise\Clients\Sales\Api\RolesApi();
$conditions = "conditions_example"; // string | 
$order_by = "order_by_example"; // string | 
$childconditions = "childconditions_example"; // string | 
$customfieldconditions = "customfieldconditions_example"; // string | 
$page = 56; // int | 
$page_size = 56; // int | 

try {
    $result = $api_instance->salesRolesGet($conditions, $order_by, $childconditions, $customfieldconditions, $page, $page_size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->salesRolesGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
conditions string [optional]
order_by string [optional]
childconditions string [optional]
customfieldconditions string [optional]
page int [optional]
page_size int [optional]

Return type

\Spinen\ConnectWise\Clients\Sales\Model\Role[]

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

salesRolesIdDelete

salesRolesIdDelete($id)

Delete Role By Id

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: BasicAuth
Spinen\ConnectWise\Clients\Sales\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Spinen\ConnectWise\Clients\Sales\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Spinen\ConnectWise\Clients\Sales\Api\RolesApi();
$id = 56; // int | 

try {
    $api_instance->salesRolesIdDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->salesRolesIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

void (empty response body)

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

salesRolesIdGet

\Spinen\ConnectWise\Clients\Sales\Model\Role salesRolesIdGet($id)

Get Role By Id

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: BasicAuth
Spinen\ConnectWise\Clients\Sales\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Spinen\ConnectWise\Clients\Sales\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Spinen\ConnectWise\Clients\Sales\Api\RolesApi();
$id = 56; // int | 

try {
    $result = $api_instance->salesRolesIdGet($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->salesRolesIdGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

\Spinen\ConnectWise\Clients\Sales\Model\Role

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

salesRolesIdPatch

\Spinen\ConnectWise\Clients\Sales\Model\Role salesRolesIdPatch($id, $operations)

Update Role

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: BasicAuth
Spinen\ConnectWise\Clients\Sales\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Spinen\ConnectWise\Clients\Sales\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Spinen\ConnectWise\Clients\Sales\Api\RolesApi();
$id = 56; // int | 
$operations = array(new PatchOperation()); // \Spinen\ConnectWise\Clients\Sales\Model\PatchOperation[] | 

try {
    $result = $api_instance->salesRolesIdPatch($id, $operations);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->salesRolesIdPatch: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int
operations \Spinen\ConnectWise\Clients\Sales\Model\PatchOperation[]

Return type

\Spinen\ConnectWise\Clients\Sales\Model\Role

Authorization

BasicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

salesRolesIdPut

\Spinen\ConnectWise\Clients\Sales\Model\Role salesRolesIdPut($id, $role)

Replace Role

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: BasicAuth
Spinen\ConnectWise\Clients\Sales\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Spinen\ConnectWise\Clients\Sales\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Spinen\ConnectWise\Clients\Sales\Api\RolesApi();
$id = 56; // int | 
$role = new \Spinen\ConnectWise\Clients\Sales\Model\Role(); // \Spinen\ConnectWise\Clients\Sales\Model\Role | 

try {
    $result = $api_instance->salesRolesIdPut($id, $role);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->salesRolesIdPut: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int
role \Spinen\ConnectWise\Clients\Sales\Model\Role

Return type

\Spinen\ConnectWise\Clients\Sales\Model\Role

Authorization

BasicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

salesRolesPost

\Spinen\ConnectWise\Clients\Sales\Model\Role salesRolesPost($role)

Create Role

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: BasicAuth
Spinen\ConnectWise\Clients\Sales\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Spinen\ConnectWise\Clients\Sales\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Spinen\ConnectWise\Clients\Sales\Api\RolesApi();
$role = new \Spinen\ConnectWise\Clients\Sales\Model\Role(); // \Spinen\ConnectWise\Clients\Sales\Model\Role | 

try {
    $result = $api_instance->salesRolesPost($role);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->salesRolesPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
role \Spinen\ConnectWise\Clients\Sales\Model\Role

Return type

\Spinen\ConnectWise\Clients\Sales\Model\Role

Authorization

BasicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]