Skip to content

Latest commit

 

History

History
372 lines (249 loc) · 11.2 KB

CodesApi.md

File metadata and controls

372 lines (249 loc) · 11.2 KB

Spinen\ConnectWise\Clients\Service\CodesApi

Spinen's PHP ConnectWise Client for Service 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
serviceCodesCountGet GET /service/codes/count
serviceCodesGet GET /service/codes
serviceCodesIdDelete DELETE /service/codes/{id}
serviceCodesIdGet GET /service/codes/{id}
serviceCodesIdPatch PATCH /service/codes/{id}
serviceCodesIdPut PUT /service/codes/{id}
serviceCodesPost POST /service/codes

serviceCodesCountGet

\Spinen\ConnectWise\Clients\Service\Model\Count serviceCodesCountGet($conditions)

Create Codes Count

Example

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

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

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

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

Parameters

Name Type Description Notes
conditions string [optional]

Return type

\Spinen\ConnectWise\Clients\Service\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]

serviceCodesGet

\Spinen\ConnectWise\Clients\Service\Model\Code[] serviceCodesGet($conditions, $order_by, $childconditions, $customfieldconditions, $page, $page_size)

Get Codes

Example

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

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

$api_instance = new Spinen\ConnectWise\Clients\Service\Api\CodesApi();
$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->serviceCodesGet($conditions, $order_by, $childconditions, $customfieldconditions, $page, $page_size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CodesApi->serviceCodesGet: ', $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\Service\Model\Code[]

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]

serviceCodesIdDelete

serviceCodesIdDelete($id)

Delete Code By Id

Example

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

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

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

try {
    $api_instance->serviceCodesIdDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling CodesApi->serviceCodesIdDelete: ', $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]

serviceCodesIdGet

\Spinen\ConnectWise\Clients\Service\Model\Code serviceCodesIdGet($id)

Get Code By Id

Example

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

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

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

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

Parameters

Name Type Description Notes
id int

Return type

\Spinen\ConnectWise\Clients\Service\Model\Code

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]

serviceCodesIdPatch

\Spinen\ConnectWise\Clients\Service\Model\Code serviceCodesIdPatch($id, $operations)

Update Code

Example

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

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

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

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

Parameters

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

Return type

\Spinen\ConnectWise\Clients\Service\Model\Code

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]

serviceCodesIdPut

\Spinen\ConnectWise\Clients\Service\Model\Code serviceCodesIdPut($id, $code)

Replace Code

Example

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

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

$api_instance = new Spinen\ConnectWise\Clients\Service\Api\CodesApi();
$id = 56; // int | 
$code = new \Spinen\ConnectWise\Clients\Service\Model\Code(); // \Spinen\ConnectWise\Clients\Service\Model\Code | 

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

Parameters

Name Type Description Notes
id int
code \Spinen\ConnectWise\Clients\Service\Model\Code

Return type

\Spinen\ConnectWise\Clients\Service\Model\Code

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]

serviceCodesPost

\Spinen\ConnectWise\Clients\Service\Model\Code serviceCodesPost($code)

Create Codes

Example

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

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

$api_instance = new Spinen\ConnectWise\Clients\Service\Api\CodesApi();
$code = new \Spinen\ConnectWise\Clients\Service\Model\Code(); // \Spinen\ConnectWise\Clients\Service\Model\Code | 

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

Parameters

Name Type Description Notes
code \Spinen\ConnectWise\Clients\Service\Model\Code

Return type

\Spinen\ConnectWise\Clients\Service\Model\Code

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]