public class MaileonTransactionsService extends AbstractMaileonService
MaileonTransactionsService
client send operational requests to the TransactionsResource
.AbstractMaileonService.QueryParameters
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SERVICE |
MAILEON_XML_TYPE
Constructor and Description |
---|
MaileonTransactionsService(MaileonConfiguration config)
Instantiates a new maileon transaction service.
|
Modifier and Type | Method and Description |
---|---|
TransactionProcessingReport |
createTransaction(Transaction transaction,
boolean ignoreInvalidTransactions)
Creates a single transation in the account.
|
TransactionProcessingReport |
createTransaction(Transaction transaction,
boolean release,
boolean ignoreInvalidTransactions)
Deprecated.
use the version without release-parameter
|
java.util.List<TransactionProcessingReport> |
createTransactions(java.util.List<Transaction> transactions,
boolean ignoreInvalidTransactions)
Creates any number of transactions in the account.
|
java.util.List<TransactionProcessingReport> |
createTransactions(java.util.List<Transaction> transactions,
boolean release,
boolean ignoreInvalidTransactions)
Deprecated.
use the version without release-parameter
|
long |
createTransactionType(TransactionType type)
Creates a new transaction type with the given name in the account.
|
void |
deleteTransactions(long typeId,
long beforeTimestamp)
Delete all transactions of a given type before a given date in the account.
|
void |
deleteTransactionType(long id)
Delete a transaction type from the account according to a given id.
|
void |
deleteTransactionTypeByName(java.lang.String typeName)
Delete a transaction type from the account according to a given name.
|
TransactionType |
findTransactionTypeByName(java.lang.String typeName)
Searches for a patricular transaction type in the account according to a given name.
|
TransactionType |
getTransactionType(long id)
Retrieves the transaction type with the given id in the account.
|
Page<TransactionType> |
getTransactionTypes(int pageIndex,
int pageSize)
Returns a page (list) of all transaction types defined in the account.
|
int |
getTransactionTypesCount()
Returns the overall number of transaction types in the account.
|
delete, delete, delete, encodePath, get, get, get, isCompressionEnabled, isDebug, isRequestCompressionEnabled, post, post, post, put, put, put, setCompressionEnabled, setDebug, setRequestCompressionEnabled
public static final java.lang.String SERVICE
public MaileonTransactionsService(MaileonConfiguration config)
config
- the configuration of maileon APIpublic int getTransactionTypesCount() throws MaileonException
MaileonException
public Page<TransactionType> getTransactionTypes(int pageIndex, int pageSize) throws MaileonException
pageIndex
- strating from 1pageSize
- the number transaction types of within a pageTransactionType
objectsMaileonException
public long createTransactionType(TransactionType type) throws MaileonException
type
- the TransactionType to createMaileonException
public void deleteTransactionTypeByName(java.lang.String typeName) throws MaileonException
typeName
- the name of transaction typeMaileonException
public TransactionType findTransactionTypeByName(java.lang.String typeName) throws MaileonException
typeName
- the name of transaction type to findMaileonException
public void deleteTransactionType(long id) throws MaileonException
id
- the id of transaction type to deleteMaileonException
public TransactionType getTransactionType(long id) throws MaileonException
id
- the id of the required transaction typeMaileonException
public TransactionProcessingReport createTransaction(Transaction transaction, boolean ignoreInvalidTransactions) throws MaileonException
transaction
- the Transaction to createignoreInvalidTransactions
- if set to false
, exceptions like invalid contacts will cause the service to return 400 Bad request
TransactionProcessingReport
hat indicates if the queuing was successful for the underlying transactionMaileonException
public TransactionProcessingReport createTransaction(Transaction transaction, boolean release, boolean ignoreInvalidTransactions) throws MaileonException
transaction
- the Transaction to createrelease
- parameter is ignoredignoreInvalidTransactions
- if set to false
, exceptions like invalid contacts will cause the service to return 400 Bad request
TransactionProcessingReport
hat indicates if the queuing was successful for the underlying transactionMaileonException
public java.util.List<TransactionProcessingReport> createTransactions(java.util.List<Transaction> transactions, boolean ignoreInvalidTransactions) throws MaileonException
transactions
- the list of Transaction
to createignoreInvalidTransactions
- if set to false
, exceptions like invalid contacts will cause the service to return 400 Bad request
TransactionProcessingReport
that indicates if the queuing was successful for each transactionMaileonException
public java.util.List<TransactionProcessingReport> createTransactions(java.util.List<Transaction> transactions, boolean release, boolean ignoreInvalidTransactions) throws MaileonException
transactions
- the list of Transaction
to createrelease
- parameter is ignoredignoreInvalidTransactions
- if set to false
, exceptions like invalid contacts will cause the service to return 400 Bad request
TransactionProcessingReport
that indicates if the queuing was successful for each transactionMaileonException
public void deleteTransactions(long typeId, long beforeTimestamp) throws MaileonException
Delete all transactions of a given type before a given date in the account. Any previously-released transactions will be ignored.
typeId
- the transaction type id of the transactions to deletebeforeTimestamp
- the timestamp to compare against, in millisecondsMaileonException
Copyright © 2017. All Rights Reserved.