\TxTextControl\ReportingCloudPutTrait

Trait PutTrait

Summary

Methods
Properties
Constants
createApiKey()
No public properties found
No constants found
uri()
request()
buildPropertyMapArray()
No protected properties found
N/A
put()
No private properties found
N/A

Methods

createApiKey()

createApiKey() : string

Create an API key

Throws

\TxTextControl\ReportingCloud\Exception\InvalidArgumentException

Returns

string —

uri()

uri(string  $uri) : string

Construct URI with version number

Parameters

string $uri

URI

Returns

string —

request()

request(string  $method, string  $uri, array  $options) : \Psr\Http\Message\ResponseInterface

Request the URI with options

Parameters

string $method

HTTP method

string $uri

URI

array $options

Options

Throws

\TxTextControl\ReportingCloud\Exception\RuntimeException

Returns

\Psr\Http\Message\ResponseInterface —

buildPropertyMapArray()

buildPropertyMapArray(array  $array, \TxTextControl\ReportingCloud\PropertyMap\AbstractPropertyMap  $propertyMap) : array

Using the passed propertyMap, recursively build array

Parameters

array $array

Array

\TxTextControl\ReportingCloud\PropertyMap\AbstractPropertyMap $propertyMap

PropertyMap

Returns

array —

put()

put(string  $uri, array[]  $query = [], mixed  $json = '', int  $statusCode) : string

Execute a PUT request via REST client

Parameters

string $uri

URI

array[] $query

Query

mixed $json

JSON

int $statusCode

Required HTTP status code for response

Returns

string —