| Qore NetSuiteRestClient Module Reference 1.0

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
NetSuiteRestClient::NetSuiteRestConnection Class Reference

Class for NetSuite REST connections; returns NetSuiteRestClient objects. More...

Inheritance diagram for NetSuiteRestClient::NetSuiteRestConnection:
[legend]

## Public Member Functions
| constructor (hash< auto > config, *hash< auto > attr)
| creates the NetSuiteRestConnection object
*string | getAppName ()
| Returns the data provider application name this connection serves, if any.
string | getAuthUrl (*bool allow_relative)
| Returns the OAuth2 authorization URL or throws an exception if not set.
DataProvider::AbstractDataProvider | getDataProvider (*hash< auto > constructor_options)
| returns a data provider object for this connection
hash< auto > | getOAuth2Options ()
| Return OAuth2 options.
string | getTokenUrl (*bool allow_relative)
| Returns the OAuth2 token URL or throws an exception if not set.
string | getType ()
| returns `"netsuite"`
bool | hasDataProvider ()
| returns True as this connection returns a data provider with the getDataProvider() method

## Public Attributes
const | ConnectionScheme = ...
| Connection entry info.
const | DefaultUrl = "netsuite://auto-detected"
| Default URL.

## Protected Member Functions
hash< ConnectionSchemeInfo > | getConnectionSchemeInfoImpl ()
| Returns the ConnectionSchemeInfo hash for this object.
NetSuiteRestClient | getImpl (bool connect=True, *hash< auto > rtopts)
| returns a NetSuiteRestClient object
string | getUrlOption (string opt, *bool allow_relative)
| Returns the value of a URL option or throws an exception if not set.
| setChildCapabilities ()
| Sets child data provider capabilities.
| setRealUrl (*string url)
| Called by the constructor to set the real URL.

## Detailed Description

Class for NetSuite REST connections; returns NetSuiteRestClient objects.

This class implements all options of RestClientConnection; in addition, this class provides the following default values for the following options:

- `oauth2_auth_url:` `auto`
- `oauth2_grant_type:` `authorization_code`
- `oauth2_token_url:` `auto`

See also
  NetSuiteRestClient::NetSuiteRestClient::constructor() for more information on the above options

## Member Function Documentation

## ◆ constructor()

NetSuiteRestClient::NetSuiteRestConnection::constructor | ( | hash< auto > | config,
|  | *hash< auto > | attr )

creates the NetSuiteRestConnection object

Parameters

  config | with the following keys: name (required string): the connection name display_name (optional string): the display name short_desc (optional string): a short description in plain text desc (optional string): a long description with markdown formatting url (required string): the connection URL opts (optional hash): connection options logger (optional LoggerInterface object): logger for the connection
  attr | optional connection attributes monitor (optional bool): should the connection be monitored? Default: True enabled (optional bool): is the connection enabled? Default: True locked (optional bool): is the connection locked? Default: False debug_data (optional bool): debug data? Default: False tags (optional hash): tags for the connection; no default value

Exceptions

  CONNECTION-OPTION-ERROR | missing or invalid connection option or attribute

## ◆ getAppName()

*string NetSuiteRestClient::NetSuiteRestConnection::getAppName | ( |  | ) |

Returns the data provider application name this connection serves, if any.

Returns
  the data provider application name this connection serves, if any

## ◆ getDataProvider()

DataProvider::AbstractDataProvider NetSuiteRestClient::NetSuiteRestConnection::getDataProvider | ( | *hash< auto > | constructor_options | ) |

returns a data provider object for this connection

Parameters

  constructor_options | any additional constructor options for the data provider

Returns
  a data provider object for this connection

## ◆ getImpl()

NetSuiteRestClient NetSuiteRestClient::NetSuiteRestConnection::getImpl | ( | bool | connect = True,
|  | *hash< auto > | rtopts )
| protected

returns a NetSuiteRestClient object

Parameters

  connect | if True, then the connection is returned already connected
  rtopts | this connection type does not accept any runtime options, so this parameter is ignored

Returns
  a NetSuiteRestClient object

## ◆ getOAuth2Options()

hash< auto > NetSuiteRestClient::NetSuiteRestConnection::getOAuth2Options | ( |  | ) |

Return OAuth2 options.

Returns
  a hash of OAuth2 options

## ◆ hasDataProvider()

bool NetSuiteRestClient::NetSuiteRestConnection::hasDataProvider | ( |  | ) |

returns True as this connection returns a data provider with the getDataProvider() method

Returns
  True as this connection returns a data provider with the getDataProvider() method

See also
  getDataProvider()

## ◆ setRealUrl()

NetSuiteRestClient::NetSuiteRestConnection::setRealUrl | ( | *string | url | ) |
| protected

Called by the constructor to set the real URL.

@path the new URL

sets the real HTTP URL for HTTP-based connections