NetSuiteClient
in package
Table of Contents
- $client : SoapClient
- $config : array<string|int, mixed>
- $soapHeaders : array<string|int, mixed>
- __construct() : mixed
- addHeader() : mixed
- Add a header by name.
- clearHeader() : mixed
- Remove a header by name.
- clearPreferences() : mixed
- Clear preferences header.
- clearSearchPreferences() : mixed
- Clear the search preferences.
- createFromEnv() : mixed
- logRequests() : mixed
- Turn request logging on or off.
- setApplicationInfo() : mixed
- Set the application id.
- setDataCenterUrl() : void
- Set the data center URL for the configured NetSuite account
- setLogPath() : mixed
- Set the logging path.
- setPreferences() : mixed
- Set preferences header.
- setSearchPreferences() : mixed
- Set the search preferences header.
- makeSoapCall() : mixed
- Make the SOAP call!
- computeTokenPassportSignature() : string
- Compute TokenPassport signature
- createOptions() : array<string|int, mixed>
- Create the options array.
- createPassportFromConfig() : Passport
- Create the Passport.
- createTokenPassportFromConfig() : TokenPassport
- Create the TokenPassport.
- createWsdl() : string
- Build the WSDL address from the config.
- fixWtfCookieBug() : mixed
- SoapClient apparently always sends the JSESSIONID cookie.
- generateTokenPassportNonce() : mixed
- Generate random (or sufficiently enough so) string of characters
- logSoapCall() : mixed
- Log the last SOAP call.
Properties
$client
private
SoapClient
$client
$config
private
array<string|int, mixed>
$config
$soapHeaders
private
array<string|int, mixed>
$soapHeaders
= array()
Methods
__construct()
public
__construct(array<string|int, mixed> $config[, array<string|int, mixed> $options = array() ][, SoapClient $client = null ]) : mixed
Parameters
- $config : array<string|int, mixed>
- $options : array<string|int, mixed> = array()
- $client : SoapClient = null
Tags
Return values
mixed —addHeader()
Add a header by name.
public
addHeader(string $header, mixed $value) : mixed
Parameters
- $header : string
- $value : mixed
Return values
mixed —clearHeader()
Remove a header by name.
public
clearHeader(string $header) : mixed
Parameters
- $header : string
Return values
mixed —clearPreferences()
Clear preferences header.
public
clearPreferences() : mixed
Return values
mixed —clearSearchPreferences()
Clear the search preferences.
public
clearSearchPreferences() : mixed
Return values
mixed —createFromEnv()
public
static createFromEnv([mixed $options = array() ][, mixed $client = null ]) : mixed
Parameters
- $options : mixed = array()
- $client : mixed = null
Return values
mixed —logRequests()
Turn request logging on or off.
public
logRequests([bool $on = true ]) : mixed
Parameters
- $on : bool = true
Return values
mixed —setApplicationInfo()
Set the application id.
public
setApplicationInfo([string $appId = null ]) : mixed
Parameters
- $appId : string = null
Return values
mixed —setDataCenterUrl()
Set the data center URL for the configured NetSuite account
public
setDataCenterUrl(array<string|int, mixed> $config) : void
Parameters
- $config : array<string|int, mixed>
Return values
void —setLogPath()
Set the logging path.
public
setLogPath(string $logPath) : mixed
Parameters
- $logPath : string
Return values
mixed —setPreferences()
Set preferences header.
public
setPreferences([bool $warningAsError = false ][, bool $disableMandatoryCustomFieldValidation = false ][, bool $disableSystemNotesForCustomFields = false ][, bool $ignoreReadOnlyFields = false ]) : mixed
Parameters
- $warningAsError : bool = false
- $disableMandatoryCustomFieldValidation : bool = false
- $disableSystemNotesForCustomFields : bool = false
- $ignoreReadOnlyFields : bool = false
Return values
mixed —setSearchPreferences()
Set the search preferences header.
public
setSearchPreferences([bool $bodyFieldsOnly = true ][, int $pageSize = 50 ][, bool $returnSearchColumns = true ]) : mixed
Parameters
- $bodyFieldsOnly : bool = true
- $pageSize : int = 50
- $returnSearchColumns : bool = true
Return values
mixed —makeSoapCall()
Make the SOAP call!
protected
makeSoapCall(string $operation, mixed $parameter) : mixed
Parameters
- $operation : string
- $parameter : mixed
Return values
mixed —computeTokenPassportSignature()
Compute TokenPassport signature
private
computeTokenPassportSignature(int|string $account, string $consumerKey, mixed $consumerSecret, string $token, string $tokenSecret, string $nonce, int|string $timestamp, string $signatureAlgorithm) : string
Parameters
- $account : int|string
- $consumerKey : string
- $consumerSecret : mixed
- $token : string
- $tokenSecret : string
- $nonce : string
- $timestamp : int|string
- $signatureAlgorithm : string
Return values
string —createOptions()
Create the options array.
private
createOptions(array<string|int, mixed> $config[, array<string|int, mixed> $overrides = array() ]) : array<string|int, mixed>
Parameters
- $config : array<string|int, mixed>
- $overrides : array<string|int, mixed> = array()
Return values
array<string|int, mixed> —createPassportFromConfig()
Create the Passport.
private
createPassportFromConfig(array<string|int, mixed> $config) : Passport
Parameters
- $config : array<string|int, mixed>
Return values
Passport —createTokenPassportFromConfig()
Create the TokenPassport.
private
createTokenPassportFromConfig(array<string|int, mixed> $config) : TokenPassport
Parameters
- $config : array<string|int, mixed>
Return values
TokenPassport —createWsdl()
Build the WSDL address from the config.
private
createWsdl(array<string|int, mixed> $config) : string
Parameters
- $config : array<string|int, mixed>
Return values
string —fixWtfCookieBug()
SoapClient apparently always sends the JSESSIONID cookie.
private
fixWtfCookieBug() : mixed
So we'll just un-set it to prevent this.
Return values
mixed —generateTokenPassportNonce()
Generate random (or sufficiently enough so) string of characters
private
generateTokenPassportNonce([mixed $length = 32 ]) : mixed
Parameters
- $length : mixed = 32
Return values
mixed —logSoapCall()
Log the last SOAP call.
private
logSoapCall(string $operation) : mixed
Parameters
- $operation : string