FuelSoap

FuelSoap

new FuelSoap(options) → {FuelSoap}

Source:
Parameters:
Name Type Description
options Object

Configuration options

Properties
Name Type Attributes Default Description
auth Object

Object containing information for auth client to initialize

headers Object <optional>

Object key/value pairs will add headers every request.

soapEndpoint String <optional>
https://webservice.exacttarget.com/Service.asmx

URL for designated SOAP web service

Returns:
Type
FuelSoap

Methods

create(type, props, optionsopt, callback)

Source:

This method handles the Create SOAP Action

Parameters:
Name Type Attributes Description
type String

xsi:type

props Object

Value set in body as CreateRequest.Objects

options Object <optional>

Configuration options passed in body as CreateRequest.Options

Properties
Name Type Attributes Default Description
queryAllAccounts Boolean <optional>
false

Sets QueryAllAccounts = true to body under CreateRequest.Options. Note: This value will be delete from body if used

reqOptions Object <optional>

Request options passed to soapRequest fn. Note: These will be delete from body if passed

callback FuelSoap~StandardCallback

Callback that handles response

delete(type, props, optionsopt, callback)

Source:

This method handles the Delete SOAP Action

Parameters:
Name Type Attributes Description
type String

xsi:type

props Object

Value set in body as DeleteRequest.Objects

options Object <optional>

Configuration options passed in body as DeleteRequest.Options

Properties
Name Type Attributes Default Description
queryAllAccounts Boolean <optional>
false

Sets QueryAllAccounts = true to body under DeleteRequest.Options. Note: This value will be delete from body if used

reqOptions Object <optional>

Request options passed to soapRequest fn. Note: These will be delete from body if passed

callback FuelSoap~StandardCallback

Callback that handles response

describe(type, callback)

Source:

This method handles the Describe SOAP Action

Parameters:
Name Type Description
type String

Will be used in body as ObjectType under DefinitionRequestMsg.DescribeRequests.ObjectDefinitionRequest

callback FuelSoap~StandardCallback

Callback that handles response

execute(type, props, callback)

Source:

This method handles the Execute SOAP Actionf

Parameters:
Name Type Description
type String

xsi:type

props Object

Value set in body as ExecuteRequestMsg.Requests.Parameters

callback FuelSoap~StandardCallback

Callback that handles response

perform(type, def, callback)

Source:

This method handles the Perform SOAP Action

Parameters:
Name Type Description
type String

xsi:type

def Object

definition set in body as PerformRequestMsg.Definitions.Definition...only handles one def

callback FuelSoap~StandardCallback

Callback that handles response

retrieve(type, propsopt, optionsopt, callback)

Source:

This method handles the Retrieve SOAP Action It should be noted that type and callback are the only params required. If 3 params exist, function looks like function(type, options, callback). If 2 params exist, function looks like function(type, callback).

Parameters:
Name Type Attributes Default Description
type String

Will be used in body as ObjectType under RetrieveRequestMsg.RetrieveRequest

props Object <optional>
['Client', 'ID', 'ObjectID']

Value set in body as RetrieveRequestMsg.RetrieveRequest.Properties

options Object <optional>

Configuration options

Properties
Name Type Attributes Description
reqOptions Object <optional>

Request options passed to soapRequest fn. Note: These will be delete from body if passed

clientIDs <optional>

Will be used in body as ClientIDs under RetrieveRequestMsg.RetrieveRequest

filter <optional>

Will be used in body as Filter under RetrieveRequestMsg.RetrieveRequest

continueRequest <optional>

Will be used in body as ContinueRequest under RetrieveRequestMsg.RetrieveRequest

callback FuelSoap~StandardCallback

Callback that handles response

soapRequest(options, callback)

Source:

This method handles the heavy lifing and is used by other SOAP Actions

Parameters:
Name Type Description
options Object

Configuration options

Properties
Name Type Attributes Default Description
action String

Value that will be used as SOAPAction header

req Object

SOAP body to be sent prior to building the envelope

reqOptions Object <optional>

Options that will be passed into request module (actual API request)

auth Object <optional>

Options that will be passed to FuelAuth's getAccessToken function

retry Boolean <optional>
false

Whether or not request will retry if token is invalid

callback FuelSoap~StandardCallback

Callback that handles response

update(type, props, optionsopt, callback)

Source:

This method handles the Update SOAP Action

Parameters:
Name Type Attributes Description
type String

xsi:type

props Object

Value set in body as UpdateRequest.Objects

options Object <optional>

Configuration options passed in body as UpdateRequest.Options

Properties
Name Type Attributes Default Description
queryAllAccounts Boolean <optional>
false

Sets QueryAllAccounts = true to body under UpdateRequest.Options. Note: This value will be delete from body if used

reqOptions Object <optional>

Request options passed to soapRequest fn. Note: These will be delete from body if passed

callback FuelSoap~StandardCallback

Callback that handles response

Type Definitions

StandardCallback(error, response)

Source:

This callback is displayed as part of the Requester class.

Parameters:
Name Type Description
error Object

error object as node standard

response Object

reponse object created from API request

Properties
Name Type Description
body Object

Parsed XML response from API

res Object

Full response from API returned by request module