Maileon PHP client  1.2.5
Easily integrate your PHP application with Maileon.
com_maileon_api_transactions_TransactionsService Class Reference
Inheritance diagram for com_maileon_api_transactions_TransactionsService:
com_maileon_api_AbstractMaileonService

Public Member Functions

 getTransactionTypesCount ()
 
 getTransactionTypes ($page_index=1, $page_size=10)
 
 getTransactionType ($id)
 
 createTransactionType ($trt)
 
 deleteTransactionType ($id)
 
 createTransactions ($transactions, $release=true, $ignoreInvalidEvents=false)
 
 deleteTransactions ($type_id, $before_timestamp=9223372036854775807)
 
 findTransactionTypeByName ($type_name)
 
 getRecentTransactions ($type_id, $count=1000, $minExcludedTxId=0)
 
- Public Member Functions inherited from com_maileon_api_AbstractMaileonService
 __construct (array $config)
 
 setDebug ($isDebug)
 
 isDebug ()
 
 get ($resourcePath, $queryParameters=array(), $mimeType= 'application/vnd.maileon.api+xml', $deserializationType=null)
 
 put ($resourcePath, $payload="", $queryParameters=array(), $mimeType= 'application/vnd.maileon.api+xml', $deserializationType=null)
 
 post ($resourcePath, $payload="", $queryParameters=array(), $mimeType= 'application/vnd.maileon.api+xml', $deserializationType=null)
 
 delete ($resourcePath, $queryParameters=array(), $mimeType= 'application/vnd.maileon.api+xml', $deserializationType=null)
 

Additional Inherited Members

- Static Public Attributes inherited from com_maileon_api_AbstractMaileonService
static $MAILEON_XML_MIME_TYPE = 'application/vnd.maileon.api+xml'
 
- Protected Member Functions inherited from com_maileon_api_AbstractMaileonService
 appendArrayFields ($params, $name, $fieldValues)
 
- Protected Attributes inherited from com_maileon_api_AbstractMaileonService
 $configuration
 
 $encodedApiKey
 
 $debug = false
 
 $throwException = true
 
 $proxy_host
 
 $proxy_port = 80
 
 $timeout
 

Detailed Description

Facade that wraps the REST service for transactions.

Author
Viktor Balogh | Wanadis Kft. | balogh.viktor@maileon.hu
Marcus Ständer | Trusted Technologies GmbH | marcus.staender@trusted-technologies.de

Definition at line 10 of file TransactionsService.php.

Member Function Documentation

com_maileon_api_transactions_TransactionsService::getTransactionTypesCount ( )
Returns
com_maileon_api_MaileonAPIResult the result object of the API call, with the count of transaction types available at com_maileon_api_MaileonAPIResult::getResult()
Exceptions
com_maileon_api_MaileonAPIExceptionif there was a connection problem or a server error occurred

Definition at line 19 of file TransactionsService.php.

com_maileon_api_transactions_TransactionsService::getTransactionTypes (   $page_index = 1,
  $page_size = 10 
)

Gets the TransactionTypes defined in the system.

Parameters
number$page_indexthe paging index number
number$page_sizethe number of results per page
Returns
com_maileon_api_MaileonAPIResult the result object of the API call, with a com_maileon_api_transactions_TransactionType[] available at com_maileon_api_MaileonAPIResult::getResult()
Exceptions
com_maileon_api_MaileonAPIExceptionif there was a connection problem or a server error occurred

Definition at line 36 of file TransactionsService.php.

com_maileon_api_transactions_TransactionsService::getTransactionType (   $id)

Gets information about a transaction type.

Parameters
integer$idthe id of the transaction type to get information about
Returns
com_maileon_api_MaileonAPIResult the result object of the API call
Exceptions
com_maileon_api_MaileonAPIExceptionif there was a connection problem or a server error occurred

Definition at line 55 of file TransactionsService.php.

com_maileon_api_transactions_TransactionsService::createTransactionType (   $trt)

Creates a new contact event type.

Parameters
com_maileon_api_transactions_TransactionType$trtthe com_maileon_api_transactions_TransactionType defining the new transaction type to create
Returns
com_maileon_api_MaileonAPIResult the result object of the API call
Exceptions
com_maileon_api_MaileonAPIExceptionif there was a connection problem or a server error occurred

Definition at line 69 of file TransactionsService.php.

com_maileon_api_transactions_TransactionsService::deleteTransactionType (   $id)

Deletes a transaction type from the system.

Parameters
integer$idthe id of the transaction type to delete
Returns
com_maileon_api_MaileonAPIResult the result object of the API call
Exceptions
com_maileon_api_MaileonAPIExceptionif there was a connection problem or a server error occurred

Definition at line 83 of file TransactionsService.php.

com_maileon_api_transactions_TransactionsService::createTransactions (   $transactions,
  $release = true,
  $ignoreInvalidEvents = false 
)

Creates a transaction

Parameters
array$transactionsan array of com_maileon_api_transactions_Transaction objects
boolean$releasewhether the transaction should be released instantly.
boolean$ignoreInvalidEventsIf set to false, exceptions like invalid contacts will cause the service to return 400 Bad request.
Returns
com_maileon_api_MaileonAPIResult the result object of the API call
Exceptions
com_maileon_api_MaileonAPIExceptionif there was a connection problem or a server error occurred

Definition at line 101 of file TransactionsService.php.

com_maileon_api_transactions_TransactionsService::deleteTransactions (   $type_id,
  $before_timestamp = 9223372036854775807 
)

Delete all transactions of a given type before a given date in the account. Any previously-released transactions will be ignored.

Parameters
integer$type_idthe transaction type id of the transactions to delete
long$before_timestampthe timestamp to compare against, in milliseconds since the start of the UNIX Epoch (1970-01-01 00:00:00)
Returns
com_maileon_api_MaileonAPIResult the result object of the API call
Exceptions
com_maileon_api_MaileonAPIExceptionif there was a connection problem or a server error occurred

Definition at line 129 of file TransactionsService.php.

com_maileon_api_transactions_TransactionsService::findTransactionTypeByName (   $type_name)

Finds a transaction type by name

Parameters
string$type_namethe transaction name to find
Returns
int the id if the found transaction
Exceptions
com_maileon_api_MaileonAPIExceptionif there was a connection problem or a server error occurred

Definition at line 148 of file TransactionsService.php.

com_maileon_api_transactions_TransactionsService::getRecentTransactions (   $type_id,
  $count = 1000,
  $minExcludedTxId = 0 
)

Gets the last $count transaction events of a given transaction type.

Parameters
int$type_idthe ID of the transaction type to get transaction events for
int$countThe number of last transactions to get. Valid range: [1..2000]

Definition at line 171 of file TransactionsService.php.


The documentation for this class was generated from the following file: