<?php

namespace patest\ServiceType;

use \WsdlToPhp\PackageBase\AbstractSoapClientBase;

/**
 * This class stands for Initiate ServiceType
 * @subpackage Services
 */
class Initiate extends AbstractSoapClientBase
{
    /**
     * Sets the Context SoapHeader param
     * @uses AbstractSoapClientBase::setSoapHeader()
     * @param \patest\ArrayType\ArrayOfKeyValueOfstringstring $context
     * @param string $nameSpace
     * @param bool $mustUnderstand
     * @param string $actor
     * @return bool
     */
    public function setSoapHeaderContext(\patest\ArrayType\ArrayOfKeyValueOfstringstring $context, $nameSpace = 'http://toptix.com/2008', $mustUnderstand = false, $actor = null)
    {
        return $this->setSoapHeader($nameSpace, 'Context', $context, $mustUnderstand, $actor);
    }
    /**
     * Sets the SroBusinessFlow SoapHeader param
     * @uses AbstractSoapClientBase::setSoapHeader()
     * @param \patest\StructType\SroBusinessFlow $sroBusinessFlow
     * @param string $nameSpace
     * @param bool $mustUnderstand
     * @param string $actor
     * @return bool
     */
    public function setSoapHeaderSroBusinessFlow(\patest\StructType\SroBusinessFlow $sroBusinessFlow, $nameSpace = 'http://toptix.com/2008', $mustUnderstand = false, $actor = null)
    {
        return $this->setSoapHeader($nameSpace, 'SroBusinessFlow', $sroBusinessFlow, $mustUnderstand, $actor);
    }
    /**
     * Method to call the operation originally named InitiateSearchPaymentServerSession
     * Meta information extracted from the WSDL
     * - SOAPHeaderNames: Context, SroBusinessFlow
     * - SOAPHeaderNamespaces: http://toptix.com/2008, http://toptix.com/2008
     * - SOAPHeaderTypes: \patest\ArrayType\ArrayOfKeyValueOfstringstring, \patest\StructType\SroBusinessFlow
     * - SOAPHeaders: required, required
     * @uses AbstractSoapClientBase::getSoapClient()
     * @uses AbstractSoapClientBase::setResult()
     * @uses AbstractSoapClientBase::getResult()
     * @uses AbstractSoapClientBase::saveLastError()
     * @param \patest\StructType\InitiateSearchPaymentServerSession_Request $iPaymentFacade_InitiateSearchPaymentServerSession_RequestMsg
     * @return \patest\StructType\InitiateSearchPaymentServerSession_Response|bool
     */
    public function InitiateSearchPaymentServerSession(\patest\StructType\InitiateSearchPaymentServerSession_Request $iPaymentFacade_InitiateSearchPaymentServerSession_RequestMsg)
    {
        try {
            $this->setResult($this->getSoapClient()->InitiateSearchPaymentServerSession($iPaymentFacade_InitiateSearchPaymentServerSession_RequestMsg));
            return $this->getResult();
        } catch (\SoapFault $soapFault) {
            $this->saveLastError(__METHOD__, $soapFault);
            return false;
        }
    }
    /**
     * Method to call the operation originally named
     * InitiatePaymentDataCollectionSession
     * Meta information extracted from the WSDL
     * - SOAPHeaderNames: Context, SroBusinessFlow
     * - SOAPHeaderNamespaces: http://toptix.com/2008, http://toptix.com/2008
     * - SOAPHeaderTypes: \patest\ArrayType\ArrayOfKeyValueOfstringstring, \patest\StructType\SroBusinessFlow
     * - SOAPHeaders: required, required
     * @uses AbstractSoapClientBase::getSoapClient()
     * @uses AbstractSoapClientBase::setResult()
     * @uses AbstractSoapClientBase::getResult()
     * @uses AbstractSoapClientBase::saveLastError()
     * @param \patest\StructType\InitiatePaymentDataCollectionSessionRequest $iPaymentFacade_InitiatePaymentDataCollectionSession_RequestMsg
     * @return \patest\StructType\InitiatePaymentDataCollectionSessionResponse|bool
     */
    public function InitiatePaymentDataCollectionSession(\patest\StructType\InitiatePaymentDataCollectionSessionRequest $iPaymentFacade_InitiatePaymentDataCollectionSession_RequestMsg)
    {
        try {
            $this->setResult($this->getSoapClient()->InitiatePaymentDataCollectionSession($iPaymentFacade_InitiatePaymentDataCollectionSession_RequestMsg));
            return $this->getResult();
        } catch (\SoapFault $soapFault) {
            $this->saveLastError(__METHOD__, $soapFault);
            return false;
        }
    }
    /**
     * Method to call the operation originally named InitiatePaymentSession
     * Meta information extracted from the WSDL
     * - SOAPHeaderNames: Context, SroBusinessFlow
     * - SOAPHeaderNamespaces: http://toptix.com/2008, http://toptix.com/2008
     * - SOAPHeaderTypes: \patest\ArrayType\ArrayOfKeyValueOfstringstring, \patest\StructType\SroBusinessFlow
     * - SOAPHeaders: required, required
     * @uses AbstractSoapClientBase::getSoapClient()
     * @uses AbstractSoapClientBase::setResult()
     * @uses AbstractSoapClientBase::getResult()
     * @uses AbstractSoapClientBase::saveLastError()
     * @param \patest\StructType\InitiatePaymentSessionRequest $iPaymentFacade_InitiatePaymentSession_RequestMsg
     * @return \patest\StructType\InitiatePaymentSessionResponse|bool
     */
    public function InitiatePaymentSession(\patest\StructType\InitiatePaymentSessionRequest $iPaymentFacade_InitiatePaymentSession_RequestMsg)
    {
        try {
            $this->setResult($this->getSoapClient()->InitiatePaymentSession($iPaymentFacade_InitiatePaymentSession_RequestMsg));
            return $this->getResult();
        } catch (\SoapFault $soapFault) {
            $this->saveLastError(__METHOD__, $soapFault);
            return false;
        }
    }
    /**
     * Method to call the operation originally named InitiateSubscriptionsRenewal
     * Meta information extracted from the WSDL
     * - SOAPHeaderNames: Context, SroBusinessFlow
     * - SOAPHeaderNamespaces: http://toptix.com/2008, http://toptix.com/2008
     * - SOAPHeaderTypes: \patest\ArrayType\ArrayOfKeyValueOfstringstring, \patest\StructType\SroBusinessFlow
     * - SOAPHeaders: required, required
     * @uses AbstractSoapClientBase::getSoapClient()
     * @uses AbstractSoapClientBase::setResult()
     * @uses AbstractSoapClientBase::getResult()
     * @uses AbstractSoapClientBase::saveLastError()
     * @param \patest\StructType\InitiateSubscriptionsRenewalRequest $iSubscriptionFacade_InitiateSubscriptionsRenewal_RequestMsg
     * @return \patest\StructType\InitiateSubscriptionsRenewalResponse|bool
     */
    public function InitiateSubscriptionsRenewal(\patest\StructType\InitiateSubscriptionsRenewalRequest $iSubscriptionFacade_InitiateSubscriptionsRenewal_RequestMsg)
    {
        try {
            $this->setResult($this->getSoapClient()->InitiateSubscriptionsRenewal($iSubscriptionFacade_InitiateSubscriptionsRenewal_RequestMsg));
            return $this->getResult();
        } catch (\SoapFault $soapFault) {
            $this->saveLastError(__METHOD__, $soapFault);
            return false;
        }
    }
    /**
     * Returns the result
     * @see AbstractSoapClientBase::getResult()
     * @return \patest\StructType\InitiatePaymentDataCollectionSessionResponse|\patest\StructType\InitiatePaymentSessionResponse|\patest\StructType\InitiateSearchPaymentServerSession_Response|\patest\StructType\InitiateSubscriptionsRenewalResponse
     */
    public function getResult()
    {
        return parent::getResult();
    }
}
