@Connector(name="zuora", friendlyName="Zuora", minMuleVersion="3.7") @RequiresEnterpriseLicense(allowEval=true) public class ZuoraConnector extends Object
This connector provides access to the Z-Commerce platform API.
Modifier and Type | Class and Description |
---|---|
static class |
ZuoraConnector.ZuoraOperatorVisitor |
static class |
ZuoraConnector.ZuoraQueryVisitor |
Constructor and Description |
---|
ZuoraConnector() |
Modifier and Type | Method and Description |
---|---|
Job |
aquaDeleteJob(String jobId,
String entityId,
String entityName)
Deletes the current job, only if the job is not complete.
|
org.mule.api.callback.StopSourceCallback |
aquaGetBatchResults(String storeName,
org.mule.api.callback.SourceCallback callback,
String entityId,
String entityName)
Periodically polls for the status of the jobs retrieved from the object store and returns the results of the completed jobs
|
Job |
aquaGetJobMetadata(Object jobResponse)
Converts an Object returned by the source into an instance of a Job
|
Job |
aquaGetJobResults(String jobId,
String entityId,
String entityName)
Retrieves an aggregate query using the Job ID.
|
Job |
aquaGetLastCompletedJob(GetLastJobRequest request,
String entityId,
String entityName)
This operation returns the details of the last completed job.
|
PostQueryResponse |
aquaPostQuery(PostQueryRequest request,
boolean saveJobToObjectStore,
String storeName,
String entityId,
String entityName)
Submits an aggregated list of ZOQL and Export ZOQL queries.
|
ImportResponse |
checkImportStatus(String importUrl,
String entityId,
String entityName)
Checks the status of the import made with the Post Usage operation.
|
ZuoraClient |
getClient() |
ZuoraBasicAuthConfig |
getConfig() |
String |
getExportFileContent(String exportId,
String entityId,
String entityName)
Retrieve an exported file from Zuora, and return its content as a String
|
InputStream |
getExportFileStream(String exportId,
String entityId,
String entityName)
Retrieve an exported file from Zuora and return an InputStream to it
|
XMLStreamReader |
invokeSoapService(String soapMetadataKey,
XMLStreamReader input,
org.mule.api.MuleEvent event)
Calls SOAP based operations from THE Zuora WSDL.
|
PostUsageResponse |
postUsage(String fileLocation,
String entityId,
String entityName)
Post or imports usage data for one or more accounts in the CSV format.
|
org.mule.streaming.ProviderAwarePagingDelegate<Map<String,Object>,ZuoraConnector> |
query(String query,
org.mule.streaming.PagingConfiguration pagingConfiguration)
Lazily retrieves ZObjects that match a given query, written in Zuora native query language.
|
void |
setConfig(ZuoraBasicAuthConfig config) |
String |
toNativeQuery(org.mule.common.query.DsqlQuery query) |
@Processor(friendlyName="Invoke SOAP Service") @ReconnectOn(exceptions={ZuoraSessionExpiredException.class,ZuoraConnectionException.class}) @Mime(value="application/xml") @MetaDataScope(value=ZuoraMetadataCategory.class) public XMLStreamReader invokeSoapService(@MetaDataKeyParam(labels={"Service","Operation Name","Entity"},affects=BOTH)@FriendlyName(value="Apex Class Method Name") String soapMetadataKey, @Default(value="#[payload]")@Nullable XMLStreamReader input, org.mule.api.MuleEvent event) throws ZuoraException
soapMetadataKey
- the metadata Key that is used to extract useful information for executing the operation requestinput
- XMLStreamReader that represents the input of the operationevent
- MuleEventZuoraException
- this exception will he thrown in case that something went wrong.@Processor @ReconnectOn(exceptions={ZuoraSessionExpiredException.class,ZuoraConnectionException.class}) @MetaDataScope(value=ZuoraMetadataCategory.class) public InputStream getExportFileStream(@Default(value="#[payload]") String exportId, @Optional String entityId, @Optional String entityName) throws IOException, ZuoraException, org.mule.api.transformer.TransformerException
exportId
- id of the Zuora exported file to retrieveentityId
- optional parameter if the Zuora customer has multiple entities (either entityId or entityName must be specified)entityName
- optional parameter if Zuora customer has multiple entities (either entityId or entityName must be specified)IOException
- if can't access the exported file or the exported file doesn't existZuoraException
- if an error ocurred during the callorg.mule.api.transformer.TransformerException
- When the header cannot be properly constructed@Processor @ReconnectOn(exceptions={ZuoraSessionExpiredException.class,ZuoraConnectionException.class}) @MetaDataScope(value=ZuoraMetadataCategory.class) public String getExportFileContent(@Default(value="#[payload]") String exportId, @Optional String entityId, @Optional String entityName) throws IOException, org.mule.api.transformer.TransformerException, ZuoraException
exportId
- id of the Zuora exported file to retrieveentityId
- optional parameter if the Zuora customer has multiple entities (either entityId or entityName must be specified)entityName
- optional parameter if Zuora customer has multiple entities (either entityId or entityName must be specified)IOException
- if can't access the exported file or the exported file doesn't existZuoraException
- When the message cannot be succesfully extracted from the responseorg.mule.api.transformer.TransformerException
- When the header cannot be properly constructed@Paged @Processor @ReconnectOn(exceptions={ZuoraSessionExpiredException.class,ZuoraConnectionException.class}) @MetaDataScope(value=ZuoraQueryMetadataCategory.class) public org.mule.streaming.ProviderAwarePagingDelegate<Map<String,Object>,ZuoraConnector> query(@Query String query, org.mule.streaming.PagingConfiguration pagingConfiguration) throws Exception
query
- the query, using the SQL-Like Zuora Query LanguagepagingConfiguration
- the paging configurationException
- if the request fails@QueryTranslator public String toNativeQuery(org.mule.common.query.DsqlQuery query)
@Processor @ReconnectOn(exceptions={ZuoraSessionExpiredException.class,ZuoraConnectionException.class}) public PostQueryResponse aquaPostQuery(@Default(value="#[payload]")@RefOnly PostQueryRequest request, @Default(value="false")@Optional@Placement(order=4) boolean saveJobToObjectStore, @Optional@Placement(order=5) String storeName, @Optional String entityId, @Optional String entityName) throws ZuoraException, IOException, org.mule.api.transformer.TransformerException
request
- the PostQuery request objectsaveJobToObjectStore
- flag that determines if the result should be saved in the object storestoreName
- name for a PartitionedPersistentObjectStoreentityId
- optional parameter if the Zuora customer has multiple entities (either entityId or entityName must be specified)entityName
- optional parameter if Zuora customer has multiple entities (either entityId or entityName must be specified)ZuoraException
- when an exception occurs preparing or executing the requestIOException
- when it cannot properly construct the POJO that represents the responseorg.mule.api.transformer.TransformerException
- When the header cannot be properly constructed@Processor @ReconnectOn(exceptions={ZuoraSessionExpiredException.class,ZuoraConnectionException.class}) public PostUsageResponse postUsage(@Default(value="#[payload]")@RefOnly String fileLocation, @Optional String entityId, @Optional String entityName) throws ZuoraException, IOException, org.mule.api.transformer.TransformerException
fileLocation
- the location of the csv file to importentityId
- optional parameter if the Zuora customer has multiple entities (either entityId or entityName must be specified)entityName
- optional parameter if Zuora customer has multiple entities (either entityId or entityName must be specified)ZuoraException
- when an exception occurs preparing or executing the requestIOException
- when it cannot properly construct the POJO that represents the responseorg.mule.api.transformer.TransformerException
- When the header cannot be properly constructed@Processor @ReconnectOn(exceptions={ZuoraSessionExpiredException.class,ZuoraConnectionException.class}) public ImportResponse checkImportStatus(@Default(value="#[payload]") String importUrl, @Optional String entityId, @Optional String entityName) throws ZuoraException, IOException, org.mule.api.transformer.TransformerException
importUrl
- the url returned by the postUsage operation. When called, it returns the current status of the import.entityId
- optional parameter if the Zuora customer has multiple entities (either entityId or entityName must be specified)entityName
- optional parameter if Zuora customer has multiple entities (either entityId or entityName must be specified)ZuoraException
- when an exception occurs preparing or executing the requestIOException
- when it cannot properly construct the POJO that represents the responseorg.mule.api.transformer.TransformerException
- When the header cannot be properly constructed@Processor @ReconnectOn(exceptions={ZuoraSessionExpiredException.class,ZuoraConnectionException.class}) public Job aquaGetJobResults(@Default(value="#[payload]") String jobId, @Optional String entityId, @Optional String entityName) throws ZuoraException, IOException, org.mule.api.transformer.TransformerException
jobId
- the job IDentityId
- optional parameter if the Zuora customer has multiple entities (either entityId or entityName must be specified)entityName
- optional parameter if Zuora customer has multiple entities (either entityId or entityName must be specified)ZuoraException
- when an exception occurs preparing or executing the requestIOException
- when it cannot properly construct the POJO that represents the responseorg.mule.api.transformer.TransformerException
- When the header cannot be properly constructed@Processor @ReconnectOn(exceptions={ZuoraSessionExpiredException.class,ZuoraConnectionException.class}) public Job aquaGetLastCompletedJob(@Default(value="#[payload]")@RefOnly GetLastJobRequest request, @Optional String entityId, @Optional String entityName) throws ZuoraException, IOException, org.mule.api.transformer.TransformerException
request
- containing the partner field and projectId The partner field indicates the unique ID of a data integration partner. It must be used together with "projectId"
parameter to uniquely identify a data integration target. The projectId is the unique ID of a data integration project for a particular partner. This parameter
must be used together with partnerId field to uniquely identify a data integration target. This parameter is required only if you are using AQuA in stateful mode.
Otherwise, if you are using AQuA in stateless mode, projectId can be null.entityId
- optional parameter if the Zuora customer has multiple entities (either entityId or entityName must be specified)entityName
- optional parameter if Zuora customer has multiple entities (either entityId or entityName must be specified)ZuoraException
- When an exception occurs preparing or executing the requestIOException
- When it cannot properly construct the POJO that represents the responseorg.mule.api.transformer.TransformerException
- When the header cannot be properly constructed@Processor @ReconnectOn(exceptions={ZuoraSessionExpiredException.class,ZuoraConnectionException.class}) public Job aquaDeleteJob(String jobId, @Optional String entityId, @Optional String entityName) throws ZuoraException, IOException, org.mule.api.transformer.TransformerException
jobId
- the job IDentityId
- optional parameter if the Zuora customer has multiple entities (either entityId or entityName must be specified)entityName
- optional parameter if Zuora customer has multiple entities (either entityId or entityName must be specified)ZuoraException
- when an exception occurs preparing or executing the requestIOException
- when it cannot properly construct the POJO that represents the responseorg.mule.api.transformer.TransformerException
- When the header cannot be properly constructed@Processor @ReconnectOn(exceptions={ZuoraSessionExpiredException.class,ZuoraConnectionException.class}) public Job aquaGetJobMetadata(@Default(value="#[payload]")@RefOnly Object jobResponse) throws ZuoraException
jobResponse
- the jobResponse viewed as an ObjectZuoraException
- when the input object is not an instance of a GetJobIdResponse@Source(threadingModel=SINGLE_THREAD, sourceStrategy=POLLING, pollingPeriod=1000L) @ReconnectOn(exceptions={ZuoraSessionExpiredException.class,ZuoraConnectionException.class}) public org.mule.api.callback.StopSourceCallback aquaGetBatchResults(@Optional String storeName, org.mule.api.callback.SourceCallback callback, @Optional String entityId, @Optional String entityName) throws Exception
storeName
- the name of the objectStore that holds the PostQuery resultscallback
- The callback to call when a job is completedentityId
- optional parameter if the Zuora customer has multiple entities (either entityId or entityName must be specified)entityName
- optional parameter if Zuora customer has multiple entities (either entityId or entityName must be specified)Exception
- when an exception occurs preparing or executing the requestpublic ZuoraClient getClient()
public ZuoraBasicAuthConfig getConfig()
public void setConfig(ZuoraBasicAuthConfig config)
Copyright © 2010–2017. All rights reserved.