/**
 * Print the CloseBillingAgreement response to the console
 *
 * @param OffAmazonPaymentsService_Model_CloseBillingAgreementResponse $response
 *            response object
 *            
 * @return void
 */
function printCloseBillingAgreementResponse($response)
{
    echo "Service Response\n";
    echo "=============================================================================\n";
    echo "        CloseBillingAgreementResponse\n";
    if ($response->isSetResponseMetadata()) {
        echo "            ResponseMetadata\n";
        $responseMetadata = $response->getResponseMetadata();
        if ($responseMetadata->isSetRequestId()) {
            echo "                RequestId\n";
            echo "                    " . $responseMetadata->getRequestId() . "\n";
        }
    }
    echo "            ResponseHeaderMetadata: " . $response->getResponseHeaderMetadata() . "\n";
}
Esempio n. 2
0
 /**
  * Close Billing Agreement
  *
  * @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseBillingAgreementRequest request
  * or OffAmazonPaymentsService_Model_CloseBillingAgreementRequest object itself
  * @see OffAmazonPaymentsService_Model_CloseBillingAgreement
  * @return OffAmazonPaymentsService_Model_CloseBillingAgreementResponse OffAmazonPaymentsService_Model_CloseBillingAgreementResponse
  *
  * @throws OffAmazonPaymentsService_Exception
  */
 public function closeBillingAgreement($request)
 {
     if (!$request instanceof OffAmazonPaymentsService_Model_CloseBillingAgreementRequest) {
         $request = new OffAmazonPaymentsService_Model_CloseBillingAgreementRequest($request);
     }
     $httpResponse = $this->_invoke($this->_convertCloseBillingAgreement($request));
     $response = OffAmazonPaymentsService_Model_CloseBillingAgreementResponse::fromXML($httpResponse['ResponseBody']);
     $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
     return $response;
 }