@MetaDataScope(value=DefaultMetaData.class) @Connector(name="netsuite", friendlyName="NetSuite", schemaVersion="3.0", minMuleVersion="3.5") @ReconnectOn(exceptions=InvalidSessionFault.class) @RequiresEnterpriseLicense(allowEval=true) public class NetSuiteConnector extends Object
Constructor and Description |
---|
NetSuiteConnector() |
Modifier and Type | Method and Description |
---|---|
RecordRef |
addFile(RecordRef folderId,
Map<String,Object> attributes,
Object content,
String fileName,
Preferences preferences)
Creates a new file record.
|
List<WriteResponse> |
addList(String recordType,
List<Map<String,Object>> records,
Preferences preferences)
Adds one or more records into the system.
|
BaseRef |
addRecord(String recordType,
Map<String,Object> attributes,
Preferences preferences)
Creates a new record.
|
List<WriteResponse> |
addRecordObjects(List<? extends Record> records)
Creates new records.
|
AsyncStatusResult |
asyncAddList(String recordType,
List<Map<String,Object>> recordsAttributes,
Preferences preferences)
An asynchronous request equivalent to
addList(java.lang.String, java.util.List<java.util.Map<java.lang.String, java.lang.Object>>, com.netsuite.webservices.platform.messages.Preferences) . |
AsyncStatusResult |
asyncDeleteList(List<BaseRefType> records,
Preferences preferences)
An asynchronous request equivalent to
deleteList(List, Preferences) . |
AsyncStatusResult |
asyncDeleteListRecords(List<RecordRef> records,
Preferences preferences)
An asynchronous request equivalent to
deleteRecordsList(List, Preferences) . |
AsyncStatusResult |
asyncGetList(List<BaseRefType> records,
Preferences preferences)
An asynchronous request equivalent to
getList(List, Preferences) . |
AsyncStatusResult |
asyncGetListRecords(List<RecordRef> records,
Preferences preferences)
An asynchronous request equivalent to
getList(List, Preferences) . |
AsyncStatusResult |
asyncInitializeList(List<InitializeRecord> initializeRecord,
Preferences preferences)
An asynchronous request equivalent to
initializeList(List, Preferences) . |
AsyncStatusResult |
asyncSearch(String searchRecord,
SearchRecord criteria,
boolean bodyFieldsOnly,
boolean returnSearchColumns,
Integer pageSize)
An asynchronous request equivalent to
search(String, SearchRecord, boolean, boolean, PagingConfiguration) . |
AsyncStatusResult |
asyncUpdateList(String recordType,
List<Map<String,Object>> recordsAttributes,
Preferences preferences)
An asynchronous request equivalent to
updateList(String, List, Preferences) . |
AsyncStatusResult |
asyncUpsertList(String recordType,
List<Map<String,Object>> recordsAttributes,
Preferences preferences)
An asynchronous request equivalent to
upsertList(String, List, Preferences) . |
WriteResponse |
attachRecord(RecordRef source,
RecordRef destination,
RecordRef contact,
RecordRef role,
Preferences preferences)
Attaches a source or contact record - that is, the attachment - to another destination one.
|
void |
callRestletDelete(int script,
int deploy,
Map<String,Object> data)
Calls a NetSuite RESTlet using the DELETE method.
|
List<Map<String,Object>> |
callRestletGet(int script,
int deploy,
Map<String,Object> data)
Calls a NetSuite RESTlet using the GET method.
|
List<Map<String,Object>> |
callRestletPost(int script,
int deploy,
Map<String,Object> data)
Calls a NetSuite RESTlet using the POST method.
|
List<Map<String,Object>> |
callRestletPut(int script,
int deploy,
Map<String,Object> data)
Calls a NetSuite RESTlet using the PUT method.
|
SessionResponse |
changeEmail(String newEmail,
Boolean justThisAccount)
Changes the email address of the account.
|
SessionResponse |
changePassword(String newPassword,
Boolean justThisAccount)
Changes the password of the account.
|
AsyncStatusResult |
checkAsyncStatus(String jobId,
Preferences preferences)
Checks whether a particular asynchronous job has finished processing or not.
|
WriteResponse |
delete(BaseRefType baseRef,
Preferences preferences)
Deletes a record.
|
List<WriteResponse> |
deleteList(List<BaseRefType> records,
Preferences preferences)
Deletes one or more records in the system.
|
WriteResponse |
deleteRecord(RecordRef recordRef,
Preferences preferences)
Deletes a record.
|
List<WriteResponse> |
deleteRecordsList(List<RecordRef> records,
Preferences preferences)
Deletes one or more records in the system.
|
WriteResponse |
detachRecord(RecordRef source,
RecordRef destination,
Preferences preferences)
Detaches a source record - that is, the attachment - from a destination record.
|
Map<String,Object> |
get(BaseRefType baseRef,
Preferences preferences)
Retrieves a record by providing the unique id that identifies that record.
|
AsyncResult |
getAsyncResult(String jobId,
Integer pageIndex,
Preferences preferences)
This operation returns the result of a job given that it has finished processing.
|
GetBudgetExchangeRateResult |
getBudgetExchangeRates(RecordRef period,
RecordRef fromSubsidiary,
RecordRef toSubsidiary,
Preferences preferences)
Retrieves a list of budget exchange rates for a give period.
|
AbstractConfig |
getConfig() |
GetCurrencyRateResult |
getCurrentRate(CurrencyRateFilter rateFilter,
Preferences preferences)
Retrieves the exchange rate between two currencies.
|
GetCustomizationIdResult |
getCustomizationIds(GetCustomizationType type,
boolean includeInactives,
Preferences preferences)
Retrieves the IDs of available customizations for a given customization type.
|
Map<String,Object> |
getCustomRecord(String type,
String internalId,
String externalId,
Preferences preferences)
Retrieves a custom record by providing the unique id that identifies that record.
|
GetDataCenterUrlsResult |
getDataCenterUrls(String accountId)
Retrieves the accessible data-center URLs for the accountId specified.
|
GetDeletedResult |
getDeletedRecords(RecordTypeEnum type,
Integer pageIndex,
SearchDateField deletedDate,
Preferences preferences)
Retrieves a list of deleted records for the given record type and date period.
|
GetItemAvailabilityResult |
getItemAvailability(RecordRef record,
Date ifModifiedSince,
Preferences preferences)
Retrieves the availability for a given item record reference.
|
List<ReadResponse> |
getList(List<? extends BaseRef> references,
Preferences preferences)
Retrieves a list of objects referenced in the list of BaseRef object.
|
GetPostingTransactionSummaryResult |
getPostingTransactionSummary(PostingTransactionSummaryField fields,
PostingTransactionSummaryFilter filters,
Integer pageIndex,
Preferences preferences)
Retrieves a summary of the actual data in an Account.
|
Map<String,Object> |
getRecord(String type,
String internalId,
String externalId,
Preferences preferences)
Retrieves a record by providing the unique id that identifies that record.
|
GetAllResult |
getRecords(GetAllRecordType type,
Preferences preferences)
Retrieves a list of all records of the specified type.
|
GetSavedSearchResult |
getSavedSearch(SearchRecordType type)
Retrieves a list of existing saved searches for the given record type.
|
GetSelectValueResult |
getSelectValue(int page,
GetSelectValueFieldDescription fieldDescriptor,
Preferences preferences)
Retrieves valid values for a given recordRef field where the referenced record type is not yet exposed in the Web services API or when the logged in role does not have
access to the instances of the record type.
|
Date |
getServerTime()
Returns the server time.
|
void |
init() |
ReadResponse |
initialize(InitializeRecord record,
Preferences preferences)
Populates fields on transaction line items with values from a related record, in a similar way empty text boxes are pre-populated within the NetSuite UI.
|
List<ReadResponse> |
initializeList(List<InitializeRecord> initializeRecord,
Preferences preferences)
Emulates the UI workflow by pre-populating fields on transaction line items with values from a related record.
|
SessionResponse |
mapSso(String userAccount,
String userPartnerId,
String authenticationToken,
String userEmail,
String userPassword,
RecordRef userRole)
Automates the mapping between external applications credentials and NetSuite’s credentials for a user.
|
protected void |
registerTransformers() |
org.mule.streaming.ProviderAwarePagingDelegate<Map<String,Object>,NetSuiteConnector> |
search(String searchRecord,
SearchRecord criteria,
boolean bodyFieldsOnly,
boolean returnSearchColumns,
org.mule.streaming.PagingConfiguration pagingConfiguration)
Executes a search on a specific record type based on a set of criteria.
|
void |
setConfig(AbstractConfig config) |
void |
setRegistry(org.mule.api.registry.MuleRegistry registry) |
WriteResponse |
updateInviteeStatus(RecordRef eventId,
CalendarEventAttendeeResponseEnum status,
Preferences preferences)
Sets a new invitation status for a given event.
|
List<WriteResponse> |
updateInviteeStatusList(List<UpdateInviteeStatusReference> inviteeStatusList,
Preferences preferences)
Sets multiple new invitation status for a given event.
|
List<WriteResponse> |
updateList(String recordType,
List<Map<String,Object>> records,
Preferences preferences)
Updates one or more existing records in the system by providing new values for the fields to be updated for each record.
|
BaseRef |
updateRecord(String recordType,
Map<String,Object> attributes,
Preferences preferences)
Updates an existing record.The attributes can either be the POJOs corresponding to the field or a map that represents it.
|
List<WriteResponse> |
updateRecordsList(List<? extends Record> records,
Preferences preferences)
Updates one or more existing records in the system by providing a list of records.
|
List<WriteResponse> |
upsertList(String recordType,
List<Map<String,Object>> records,
Preferences preferences)
Adds or updates one or more instances of a record type in NetSuite.
|
BaseRef |
upsertRecord(String recordType,
Map<String,Object> attributes,
Preferences preferences)
Adds a new instance or to update an instance of a record in NetSuite.
|
@Processor public WriteResponse attachRecord(@RefOnly @Default(value="#[payload]") RecordRef source, @RefOnly RecordRef destination, @RefOnly @Optional RecordRef contact, @RefOnly @Optional RecordRef role, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
source
- An instance of RecordRef
.destination
- An instance of RecordRef
.contact
- An instance of RecordRef
.role
- An instance of RecordRef
.preferences
- Preferences for the request.WriteResponse
.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public WriteResponse deleteRecord(@RefOnly @Default(value="#[payload]") RecordRef recordRef, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
recordRef
- An instance of RecordRef
.preferences
- Preferences for the request.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public WriteResponse delete(@RefOnly @Default(value="#[payload]") BaseRefType baseRef, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
baseRef
- An instance of BaseRefType
.preferences
- Preferences for the request.WriteResponse
.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public WriteResponse detachRecord(@RefOnly @Default(value="#[payload]") RecordRef source, @RefOnly RecordRef destination, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
source
- An instance of RecordRef
.destination
- An instance of RecordRef
.preferences
- Preferences for the request.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public GetBudgetExchangeRateResult getBudgetExchangeRates(@RefOnly @Default(value="#[payload]") RecordRef period, @RefOnly @Optional RecordRef fromSubsidiary, @RefOnly @Optional RecordRef toSubsidiary, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
period
- References an existing period.fromSubsidiary
- References the receiving subsidiary.toSubsidiary
- References the originating subsidiary.preferences
- Preferences for the request.GetBudgetExchangeRateResult
.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public GetCustomizationIdResult getCustomizationIds(GetCustomizationType type, @Default(value="false") boolean includeInactives, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
type
- The target record type.includeInactives
- If inactive customizations should also be returned.preferences
- Preferences for the request.CustomizationRef
.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public GetDeletedResult getDeletedRecords(RecordTypeEnum type, @Default(value="1") Integer pageIndex, @RefOnly @Default(value="#[payload]") SearchDateField deletedDate, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
type
- The type of the target deleted record to retrieve.pageIndex
- The page number to retrieve.deletedDate
- A SearchDateField
where you can define a predefined search date value, or a date period of your choice, together
with the search date operator.preferences
- Preferences for the request.DeletedRecord
that match the given date filtering expression.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public GetAllResult getRecords(GetAllRecordType type, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
GetAllRecordType
.type
- The target record type.preferences
- Preferences for the request.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public List<ReadResponse> getList(@RefOnly @Default(value="#[payload]") List<? extends BaseRef> references, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
references
- List of BaseRef child classes. Check BaseRef
for a list of child classes.preferences
- Preferences for the request.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public Map<String,Object> get(@RefOnly @Default(value="#[payload]") BaseRefType baseRef, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
baseRef
- An instance of BaseRefType
.preferences
- Preferences for the request.NetSuiteException
- This is thrown when the request returned an unsuccessful status. This could also be one of the following:
ExceededRecordCountFault
, InvalidCredentialsFault
,
UnexpectedErrorFault
, ExceededRequestSizeFault
,
ExceededRequestLimitFault
, ExceededUsageLimitFault
,
InvalidSessionFault
@MetaDataScope(value=RecordMetaData.class) @Processor public Map<String,Object> getRecord(@MetaDataKeyParam(affects=OUTPUT) String type, @Optional String internalId, @Optional String externalId, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
type
- The type of record to get.internalId
- The internalId of the record to get. You can choose between this or externalId.externalId
- The externalId of the record to get. You can choose between this or internalId.preferences
- Preferences for the request.NetSuiteException
- This is thrown when the request returned an unsuccessful status. This could also be one of the following:
ExceededRecordCountFault
, InvalidCredentialsFault
,
UnexpectedErrorFault
, ExceededRequestSizeFault
,
ExceededRequestLimitFault
, ExceededUsageLimitFault
,
InvalidSessionFault
@MetaDataScope(value=CustomRecordMetaData.class) @Processor public Map<String,Object> getCustomRecord(@MetaDataKeyParam(affects=OUTPUT) String type, @Default(value="#[payload]") String internalId, @Optional String externalId, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
type
- The type of record to get.internalId
- The internalId of the record to get. You can choose between this or externalId.externalId
- The externalId of the record to get. You can choose between this or internalId.preferences
- Preferences for the request.NetSuiteException
- This is thrown when the request returned an unsuccessful status. This could also be one of the following:
ExceededRecordCountFault
, InvalidCredentialsFault
,
UnexpectedErrorFault
, ExceededRequestSizeFault
,
ExceededRequestLimitFault
, ExceededUsageLimitFault
,
InvalidSessionFault
@Processor public GetItemAvailabilityResult getItemAvailability(@RefOnly @Default(value="#[payload]") RecordRef record, @Optional Date ifModifiedSince, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
record
- An instance of RecordRef
.ifModifiedSince
- An optional modified since date. If set, only items with quantity available changes recorded as of the specified date are returned.preferences
- Preferences for the request.GetItemAvailabilityResult
.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public GetSavedSearchResult getSavedSearch(SearchRecordType type) throws NetSuiteException
type
- The target record type.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public Date getServerTime() throws NetSuiteException
NetSuiteException
- This could be one of the following: InvalidCredentialsFault
,
UnexpectedErrorFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public WriteResponse updateInviteeStatus(@RefOnly @Default(value="#[payload]") RecordRef eventId, CalendarEventAttendeeResponseEnum status, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
eventId
- The target event ID.status
- The new status value to set.preferences
- Preferences for the request.WriteResponse
.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public List<WriteResponse> updateInviteeStatusList(@RefOnly @Default(value="#[payload]") List<UpdateInviteeStatusReference> inviteeStatusList, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
inviteeStatusList
- A list of the UpdateInviteeStatusReference
items.preferences
- Preferences for the request.WriteResponse
.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public List<WriteResponse> addRecordObjects(@RefOnly @Default(value="#[payload]") List<? extends Record> records) throws NetSuiteException
records
- A list of Record
objects.WriteResponse
.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public BaseRef addRecord(@MetaDataKeyParam String recordType, @Placement(group="Record attributes") @RefOnly @Default(value="#[payload]") Map<String,Object> attributes, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
recordType
- The type of record to add.attributes
- The record attributes.preferences
- Preferences of the request.RecordRef
or CustomRecordRef
depending on the type of
record that was added.NetSuiteException
- This is thrown when the request returned an unsuccessful status. This could also be one of the following:
ExceededRecordCountFault
, InvalidCredentialsFault
,
UnexpectedErrorFault
, ExceededRequestSizeFault
,
ExceededRequestLimitFault
, ExceededUsageLimitFault
,
InvalidSessionFault
@Processor public List<WriteResponse> addList(@MetaDataKeyParam String recordType, @RefOnly @Default(value="#[payload]") List<Map<String,Object>> records, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
recordType
- The type of record to add.records
- The records with their attributes.preferences
- Preferences for the request.WriteResponse
.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public List<WriteResponse> updateList(@MetaDataKeyParam String recordType, @RefOnly @Default(value="#[payload]") List<Map<String,Object>> records, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
recordType
- The type of record to add.records
- The records with their attributes.preferences
- Preferences for the request.WriteResponse
.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public List<WriteResponse> updateRecordsList(@RefOnly @Default(value="#[payload]") List<? extends Record> records, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
records
- The records with their attributes.preferences
- Preferences for the request.WriteResponse
.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public List<WriteResponse> deleteList(@RefOnly @Default(value="#[payload]") List<BaseRefType> records, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
records
- The records with their attributes.preferences
- Preferences for the request.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public List<WriteResponse> deleteRecordsList(@RefOnly @Default(value="#[payload]") List<RecordRef> records, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
records
- A list of RecordRef
to delete.preferences
- Preferences for the request.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public RecordRef addFile(@RefOnly @Default(value="#[payload]") RecordRef folderId, @Placement(group="Additional file attributes") @RefOnly @Optional Map<String,Object> attributes, @RefOnly Object content, String fileName, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws IOException, NetSuiteException
attributes
- The additional file attributes.content
- The content of the file record to add. It can be of type String, Byte Array, File or InputStream.fileName
- the name of the remote file.folderId
- the id of the folder record where to add this file.preferences
- Preferences for the request.IOException
- If the content cannot be parsed to byte[].NetSuiteException
- This is thrown when the request returned an unsuccessful status. This could also be one of the following:
ExceededRecordCountFault
, InvalidCredentialsFault
,
UnexpectedErrorFault
, ExceededRequestSizeFault
,
ExceededRequestLimitFault
, ExceededUsageLimitFault
,
InvalidSessionFault
@Processor public BaseRef updateRecord(@MetaDataKeyParam String recordType, @Placement(group="Record attributes") @RefOnly @Default(value="#[payload]") Map<String,Object> attributes, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
recordType
- The target record type to update.attributes
- The record attributes, including internalId or externalId attribute.preferences
- Preferences for the request.RecordRef
or CustomRecordRef
depending on the type of
record that was added.NetSuiteException
- This is thrown when the request returned an unsuccessful status. This could also be one of the following:
ExceededRecordCountFault
, InvalidCredentialsFault
,
UnexpectedErrorFault
, ExceededRequestSizeFault
,
ExceededRequestLimitFault
, ExceededUsageLimitFault
,
InvalidSessionFault
@Processor public BaseRef upsertRecord(@MetaDataKeyParam String recordType, @Placement(group="Record attributes") @RefOnly @Default(value="#[payload]") Map<String,Object> attributes, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
recordType
- The target record type to update.attributes
- The record attributes.preferences
- Preferences for the request.RecordRef
or CustomRecordRef
depending on the type of
record that was added.NetSuiteException
- This is thrown when the request returned an unsuccessful status. This could also be one of the following:
ExceededRecordCountFault
, InvalidCredentialsFault
,
UnexpectedErrorFault
, ExceededRequestSizeFault
,
ExceededRequestLimitFault
, ExceededUsageLimitFault
,
InvalidSessionFault
@Processor public List<WriteResponse> upsertList(@MetaDataKeyParam String recordType, @RefOnly @Default(value="#[payload]") List<Map<String,Object>> records, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
recordType
- The target record type to update.records
- The record attributes.preferences
- Preferences for the request.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
@Processor public AsyncStatusResult checkAsyncStatus(@Default(value="#[payload]") String jobId, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
jobId
- The ID of the job to check.preferences
- Preferences for the request.AsyncStatusResult
for the given job.NetSuiteException
- This could be one of the following: InvalidCredentialsFault
,
UnexpectedErrorFault
, ExceededRequestLimitFault
,
InvalidSessionFault
, AsyncFault
@MetaDataScope(value=SearchMetaData.class) @Processor public AsyncStatusResult asyncSearch(@MetaDataKeyParam(affects=INPUT) String searchRecord, @RefOnly @Default(value="#[payload]") SearchRecord criteria, @Placement(group="Search preferences") @Default(value="true") boolean bodyFieldsOnly, @Placement(group="Search preferences") @Default(value="true") boolean returnSearchColumns, @Placement(group="Search preferences") @Optional Integer pageSize) throws NetSuiteException
search(String, SearchRecord, boolean, boolean, PagingConfiguration)
. Searches for all records that match the given criteria,
asynchronously. Note, due to the nature of the operation, this does not support paging meaning that only the first page of results would be returned. If no criteria is
specified, all records of the given type are retrieved. In asynchronous requests, your client application sends a request to the SuiteTalk Platform where it is placed in a
processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed contiguously. There is no enforced
waiting period for a job that is available. Once a job is initiated, a job ID is returned in the Web services response. Your client application can then check on the status
and result of the request by referencing the job ID.searchRecord
- The search type. See SearchRecordTypeEnum
.criteria
- An instance of SearchRecord
that defines the attributes that make up the search.bodyFieldsOnly
- Defaults to TRUE and indicates that the information in the body fields of the record are returned — significantly improving performance. Any fields in associated
lists or sublists are not returned. If the bodyFieldsOnly field is set to FALSE, all fields associated with the record are returned.returnSearchColumns
- Defaults to TRUE, meaning that only search columns will be returned in your search.pageSize
- Maximum amount of results per page.AsyncStatusResult
with the jobId that can be used to check the status and result of the job.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
InvalidSessionFault
@Processor public AsyncResult getAsyncResult(@Default(value="#[payload]") String jobId, @Default(value="1") Integer pageIndex, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
jobId
- The ID of the job.pageIndex
- The page number of the asynchronous result.preferences
- Preferences for the request.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
,
AsyncFault
@Processor public ReadResponse initialize(@RefOnly @Default(value="#[payload]") InitializeRecord record, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
record
- An instance of InitializeRecord
.preferences
- Preferences for the request.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
,@Processor public GetPostingTransactionSummaryResult getPostingTransactionSummary(@RefOnly @Default(value="#[payload]") PostingTransactionSummaryField fields, @RefOnly PostingTransactionSummaryFilter filters, @Default(value="1") Integer pageIndex, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
fields
- Specify how you want your data grouped.filters
- Specify your filtering criteria.pageIndex
- Specify the page to be returned.preferences
- Preferences for the request.GetPostingTransactionSummaryResult
containing the list of RecirdRef to the fields specifiedNetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
,
AsyncFault
@Processor public GetSelectValueResult getSelectValue(int page, @RefOnly @Default(value="#[payload]") GetSelectValueFieldDescription fieldDescriptor, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
page
- For select values that span multiple pages, use this argument to specify which page to return in your response.fieldDescriptor
- Use to specify all characteristics of the field containing the select values. For example, depending on the field and the values you want returned, you will
specify the names or internalIds for the record type, sublist, and field. You may also specify filtering criteria to refine the select options returned in the
response.preferences
- Preferences for the request.GetSelectValueResult
related to the request.NetSuiteException
- This could be one of the following: InvalidSessionFault
,
ExceededUsageLimitFault
, ExceededRequestLimitFault
,
ExceededRequestSizeFault
, UnexpectedErrorFault
,
InvalidCredentialsFault
, ExceededRecordCountFault
@Processor public GetCurrencyRateResult getCurrentRate(@RefOnly @Default(value="#[payload]") CurrencyRateFilter rateFilter, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
rateFilter
- Filter the returned currency exchange rates using this filter.preferences
- Preferences for the request.NetSuiteException
- This could be one of the following: InvalidSessionFault
,
ExceededUsageLimitFault
, ExceededRequestLimitFault
,
ExceededRequestSizeFault
, UnexpectedErrorFault
,
InvalidCredentialsFault
, ExceededRecordCountFault
@Processor public AsyncStatusResult asyncAddList(@MetaDataKeyParam String recordType, @RefOnly @Default(value="#[payload]") List<Map<String,Object>> recordsAttributes, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
addList(java.lang.String, java.util.List<java.util.Map<java.lang.String, java.lang.Object>>, com.netsuite.webservices.platform.messages.Preferences)
. The attributes can either be the POJOs corresponding to the field or a map that represents it. In asynchronous
requests, your client application sends a request to the SuiteTalk Platform where it is placed in a processing queue and handled asynchronously with other requests. Note
that all available jobs for each polling period will be processed contiguously. There is no enforced waiting period for a job that is available. Once a job is initiated, a
job ID is returned in the Web services response. Your client application can then check on the status and result of the request by referencing the job ID. NOTE: Asynchronous
request JobIDs are valid for 30 days.recordType
- The target record type.recordsAttributes
- A list of Mappreferences
- Preferences for the request.AsyncStatusResult
with the jobId that can be used to check the status and result of the job.NetSuiteException
- This could be one of the following: InvalidSessionFault
,
ExceededRequestLimitFault
, ExceededRequestSizeFault
,
UnexpectedErrorFault
, InvalidCredentialsFault
,
ExceededRecordCountFault
@Processor public AsyncStatusResult asyncUpdateList(@MetaDataKeyParam String recordType, @RefOnly @Default(value="#[payload]") List<Map<String,Object>> recordsAttributes, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
updateList(String, List, Preferences)
. In asynchronous requests, your client application sends a request to the SuiteTalk
Platform where it is placed in a processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed
contiguously. There is no enforced waiting period for a job that is available. Once a job is initiated, a job ID is returned in the Web services response. Your client
application can then check on the status and result of the request by referencing the job ID. NOTE: Asynchronous request JobIDs are valid for 30 days.recordType
- The target record type.recordsAttributes
- A list of Mappreferences
- Preferences for the request.AsyncStatusResult
with the jobId that can be used to check the status and result.NetSuiteException
- This could be one of the following: InvalidSessionFault
,
ExceededRequestLimitFault
, ExceededRequestSizeFault
,
UnexpectedErrorFault
, InvalidCredentialsFault
,
ExceededRecordCountFault
@Processor public AsyncStatusResult asyncUpsertList(@MetaDataKeyParam String recordType, @RefOnly @Default(value="#[payload]") List<Map<String,Object>> recordsAttributes, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
upsertList(String, List, Preferences)
. In asynchronous requests, your client application sends a request to the SuiteTalk
Platform where it is placed in a processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed
contiguously. There is no enforced waiting period for a job that is available. Once a job is initiated, a job ID is returned in the Web services response. Your client
application can then check on the status and result of the request by referencing the job ID. NOTE: Asynchronous request JobIDs are valid for 30 days.recordType
- The target record type.recordsAttributes
- A list of Mappreferences
- Preferences for the request.AsyncStatusResult
with the jobId that can be used to check the status and result of the job.NetSuiteException
- This could be one of the following: InvalidSessionFault
,
ExceededRequestLimitFault
, ExceededRequestSizeFault
,
UnexpectedErrorFault
, InvalidCredentialsFault
,
ExceededRecordCountFault
@Processor public AsyncStatusResult asyncDeleteListRecords(@RefOnly @Default(value="#[payload]") List<RecordRef> records, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
deleteRecordsList(List, Preferences)
. In asynchronous requests, your client application sends a request to the SuiteTalk
Platform where it is placed in a processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed
contiguously. There is no enforced waiting period for a job that is available. Once a job is initiated, a job ID is returned in the Web services response. Your client
application can then check on the status and result of the request by referencing the job ID. NOTE: Asynchronous request JobIDs are valid for 30 days.records
- A list of RecordRef
that references the objects to be deleted.preferences
- Preferences for the request.AsyncStatusResult
with the jobId that can be used to check the status and result of the job.NetSuiteException
- This could be one of the following: InvalidSessionFault
,
ExceededRequestLimitFault
, ExceededRequestSizeFault
,
UnexpectedErrorFault
, InvalidCredentialsFault
,
ExceededRecordCountFault
@Processor public AsyncStatusResult asyncDeleteList(@RefOnly @Default(value="#[payload]") List<BaseRefType> records, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
deleteList(List, Preferences)
. In asynchronous requests, your client application sends a request to the SuiteTalk Platform
where it is placed in a processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed contiguously.
There is no enforced waiting period for a job that is available. Once a job is initiated, a job ID is returned in the Web services response. Your client application can then
check on the status and result of the request by referencing the job ID. NOTE: Asynchronous request JobIDs are valid for 30 days.records
- A list of BaseRefType
that references the objects to be deleted.preferences
- Preferences for the request.AsyncStatusResult
with the jobId that can be used to check the status and result of the job.NetSuiteException
- This could be one of the following: InvalidSessionFault
,
ExceededRequestLimitFault
, ExceededRequestSizeFault
,
UnexpectedErrorFault
, InvalidCredentialsFault
,
ExceededRecordCountFault
@Processor public AsyncStatusResult asyncGetListRecords(@RefOnly @Default(value="#[payload]") List<RecordRef> records, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
getList(List, Preferences)
. In asynchronous requests, your client application sends a request to the SuiteTalk Platform where
it is placed in a processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed contiguously. There
is no enforced waiting period for a job that is available. Once a job is initiated, a job ID is returned in the Web services response. Your client application can then check
on the status and result of the request by referencing the job ID. NOTE: Asynchronous request JobIDs are valid for 30 days.records
- A list of RecordRef
that references the objects to be retrieved.preferences
- Preferences for the request.AsyncStatusResult
with the jobId that can be used to check the status and result of the job.NetSuiteException
- This could be one of the following: InvalidSessionFault
,
ExceededRequestLimitFault
, ExceededRequestSizeFault
,
UnexpectedErrorFault
, InvalidCredentialsFault
,
ExceededRecordCountFault
@Processor public AsyncStatusResult asyncGetList(@RefOnly @Default(value="#[payload]") List<BaseRefType> records, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
getList(List, Preferences)
. In asynchronous requests, your client application sends a request to the SuiteTalk Platform where
it is placed in a processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed contiguously. There
is no enforced waiting period for a job that is available. Once a job is initiated, a job ID is returned in the Web services response. Your client application can then check
on the status and result of the request by referencing the job ID. NOTE: Asynchronous request JobIDs are valid for 30 days.records
- A list of RecordRef
that references the objects to be retrieved.preferences
- Preferences for the request.AsyncStatusResult
with the jobId that can be used to check the status and result of the job.NetSuiteException
- This could be one of the following: InvalidSessionFault
,
ExceededRequestLimitFault
, ExceededRequestSizeFault
,
UnexpectedErrorFault
, InvalidCredentialsFault
,
ExceededRecordCountFault
@Processor public AsyncStatusResult asyncInitializeList(@RefOnly @Default(value="#[payload]") List<InitializeRecord> initializeRecord, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
initializeList(List, Preferences)
. In asynchronous requests, your client application sends a request to the SuiteTalk Platform
where it is placed in a processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed contiguously.
There is no enforced waiting period for a job that is available. Once a job is initiated, a job ID is returned in the Web services response. Your client application can then
check on the status and result of the request by referencing the job ID. NOTE: Asynchronous request JobIDs are valid for 30 days.initializeRecord
- A list of InitializeRecord
that references the objects to be initialized.preferences
- Preferences for the request.AsyncStatusResult
with the jobId that can be used to check the status and result of the job.NetSuiteException
- This could be one of the following: InvalidSessionFault
,
ExceededUsageLimitFault
, ExceededRequestLimitFault
,
ExceededRequestSizeFault
, UnexpectedErrorFault
,
InvalidCredentialsFault
, ExceededRecordCountFault
@Processor public List<ReadResponse> initializeList(@RefOnly @Default(value="#[payload]") List<InitializeRecord> initializeRecord, @Placement(group="Request Preferences") @RefOnly @Optional Preferences preferences) throws NetSuiteException
initializeRecord
- The list of InitializeRecord
to initialize.preferences
- Preferences for the request.NetSuiteException
- This could be one of the following: InvalidSessionFault
,
ExceededUsageLimitFault
, ExceededRequestLimitFault
,
ExceededRequestSizeFault
, UnexpectedErrorFault
,
InvalidCredentialsFault
, ExceededRecordCountFault
@Processor public SessionResponse changeEmail(@Default(value="#[payload]") String newEmail, @Default(value="true") Boolean justThisAccount) throws NetSuiteException
newEmail
- Value for the new email.justThisAccount
- Update email for the current account only.SessionResponse
.NetSuiteException
- This exception is thrown when this operation is used with SSO Login Authentication. This could also be one of the following:
ExceededRequestLimitFault
, UnexpectedErrorFault
,
InvalidCredentialsFault
, InvalidAccountFault
,
InsufficientPermissionFault
, InvalidVersionFault
,
ExceededRecordCountFault
@Processor public SessionResponse changePassword(@Default(value="#[payload]") String newPassword, @Default(value="true") Boolean justThisAccount) throws NetSuiteException
newPassword
- New password value.justThisAccount
- Apply change just to this account.SessionResponse
.NetSuiteException
- This could be one of the following: ExceededRequestLimitFault
,
UnexpectedErrorFault
, InvalidCredentialsFault
,
InvalidAccountFault
, InsufficientPermissionFault
,
InvalidVersionFault
, ExceededRecordCountFault
@Processor(friendlyName="Get Data Center URLs") public GetDataCenterUrlsResult getDataCenterUrls(@Default(value="#[payload]") String accountId) throws NetSuiteException
accountId
- NetSuite account Id.NetSuiteException
- This could be one of the following: UnexpectedErrorFault
,
ExceededRequestSizeFault
@Processor(friendlyName="Map SSO") public SessionResponse mapSso(String userAccount, String userPartnerId, String authenticationToken, String userEmail, String userPassword, @RefOnly @Default(value="#[payload]") RecordRef userRole) throws NetSuiteException
userAccount
- Account.userPartnerId
- The integration partner’s affiliate ID as provided to the partner by NetSuite.authenticationToken
- A string representing the encrypted token.userEmail
- Email.userPassword
- Password.userRole
- Role.NetSuiteException
- This could be one of the following: ExceededRequestLimitFault
,
UnexpectedErrorFault
, InvalidCredentialsFault
,
InvalidAccountFault
, InsufficientPermissionFault
,
InvalidVersionFault
,@MetaDataScope(value=SearchMetaData.class) @Processor @Paged public org.mule.streaming.ProviderAwarePagingDelegate<Map<String,Object>,NetSuiteConnector> search(@MetaDataKeyParam(affects=INPUT) String searchRecord, @RefOnly @Default(value="#[payload]") SearchRecord criteria, @Placement(group="Search preferences") @Default(value="true") boolean bodyFieldsOnly, @Placement(group="Search preferences") @Default(value="true") boolean returnSearchColumns, @RefOnly org.mule.streaming.PagingConfiguration pagingConfiguration) throws NetSuiteException
SearchRecord
for all the available searches.searchRecord
- The search type. See SearchRecordTypeEnum
.criteria
- An instance of SearchRecord
that defines the attributes that make up the search.bodyFieldsOnly
- Defaults to TRUE and indicates that the information in the body fields of the record are returned — significantly improving performance. Any fields in associated
lists or sub-lists are not returned. If the bodyFieldsOnly field is set to FALSE, all fields associated with the record are returned.returnSearchColumns
- Defaults to TRUE, meaning that only search columns will be returned in your search.pagingConfiguration
- The number of objects returned in each page.NetSuiteException
- This could be one of the following: ExceededRecordCountFault
,
InvalidCredentialsFault
, UnexpectedErrorFault
,
ExceededRequestSizeFault
, ExceededRequestLimitFault
,
ExceededUsageLimitFault
, InvalidSessionFault
,
AsyncFault
@Processor(friendlyName="Call RESTlet (GET)") public List<Map<String,Object>> callRestletGet(int script, int deploy, @RefOnly @Default(value="#[payload]") Map<String,Object> data)
script
- The ID of the deployed script.deploy
- The deploy number corresponding to the script.data
- The input data for the script.NetSuiteException
- If the call cannot be performed.@Processor(friendlyName="Call RESTlet (DELETE)") public void callRestletDelete(int script, int deploy, @RefOnly @Default(value="#[payload]") Map<String,Object> data)
script
- The ID of the deployed script.deploy
- The deploy number corresponding to the script.data
- The input data for the script.NetSuiteException
- If the call cannot be performed.@Processor(friendlyName="Call RESTlet (PUT)") public List<Map<String,Object>> callRestletPut(int script, int deploy, @RefOnly @Default(value="#[payload]") Map<String,Object> data)
script
- The ID of the deployed script.deploy
- The deploy number corresponding to the script.data
- The input data for the script.NetSuiteException
- If the call cannot be performed.@Processor(friendlyName="Call RESTlet (POST)") public List<Map<String,Object>> callRestletPost(int script, int deploy, @RefOnly @Default(value="#[payload]") Map<String,Object> data)
script
- The ID of the deployed script.deploy
- The deploy number corresponding to the script.data
- The input data for the script.NetSuiteException
- If the call cannot be performed.public void setRegistry(org.mule.api.registry.MuleRegistry registry)
public void setConfig(AbstractConfig config)
public AbstractConfig getConfig()
protected void registerTransformers()
@Start public void init()
Copyright © 2010–2017. All rights reserved.